|
@@ -162,7 +162,8 @@ const handleRemove = (uploadFile: any) => {
|
|
|
};
|
|
|
// 下载
|
|
|
const handleDownload = (uploadFile: any) => {
|
|
|
- if (!uploadFile.path) {
|
|
|
+ const path = uploadFile.path ? uploadFile.path : uploadFile.response.result.path ? uploadFile.response.result.path : '';
|
|
|
+ if (!path) {
|
|
|
ElMessage.error('附件不存在');
|
|
|
return;
|
|
|
}
|
|
@@ -176,7 +177,7 @@ const handleDownload = (uploadFile: any) => {
|
|
|
})
|
|
|
.then(() => {
|
|
|
const fileName = uploadFile.name;
|
|
|
- const url = import.meta.env.VITE_FILE_PREFIX + uploadFile.path;
|
|
|
+ const url = import.meta.env.VITE_FILE_PREFIX + path;
|
|
|
downloadFile(url, fileName);
|
|
|
})
|
|
|
.catch(() => {});
|