From d2a06b827fdcf4b274c503c25b3c21fd727ccbbc Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 07 三月 2025 10:18:45 +0800
Subject: [PATCH] 文件下载全局修改

---
 src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue |   16 ++--------------
 1 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue b/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue
index 2fb5e0a..ef642c2 100644
--- a/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue
+++ b/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue
@@ -154,19 +154,7 @@
     // 涓嬭浇
     handleDown(row) {
       downFile({ id: row.id, }).then(res => {
-        if (res.code === 200) {
-          let url = '';
-          if (res.data.type == 1) {
-            url = this.javaApi + '/img/' + res.data.fileUrl
-            file.downloadIamge(url, row.fileName)
-          } else {
-            url = this.javaApi + '/word/' + res.data.fileUrl
-            const link = document.createElement('a');
-            link.href = url;
-            link.download = row.fileName;
-            link.click();
-          }
-        }
+        this.$download.downloadFileFromUrl(res.data.fileUrl, row.fileName);
       }).catch(error => {
 
       })
@@ -175,7 +163,7 @@
       this.upLoading = false;
       if (response.code == 200) {
         this.$message.success('涓婁紶鎴愬姛');
-        this.$refs.fileList.selectList()
+        this.getFileList()
       }
     },
     beforeUpload(file) {

--
Gitblit v1.9.3