From dab59f7624a2fb8d4114bb67b554ff09d91f810c Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 10 四月 2025 13:07:36 +0800
Subject: [PATCH] Merge branch 'radio-frequency-cable' of http://114.132.189.42:9002/r/lims-ruoyi-before into radio-frequency-cable

---
 src/views/CNAS/process/method/standardMethodsChange/component/calibrationsFileDia.vue |   32 ++++++++++++++++++++++----------
 1 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/src/views/CNAS/process/method/standardMethodsChange/component/calibrationsFileDia.vue b/src/views/CNAS/process/method/standardMethodsChange/component/calibrationsFileDia.vue
index 0f43503..41174ef 100644
--- a/src/views/CNAS/process/method/standardMethodsChange/component/calibrationsFileDia.vue
+++ b/src/views/CNAS/process/method/standardMethodsChange/component/calibrationsFileDia.vue
@@ -103,16 +103,28 @@
     },
     // 涓嬭浇
     upload (row) {
-      let url = '';
-      if(row.type==1){
-        url = this.javaApi+'/img/'+row.fileUrl
-        file.downloadIamge(url,row.fileName)
-      }else{
-        url = this.javaApi+'/word/'+row.fileUrl
-        const link = document.createElement('a');
-        link.href = url;
-        link.download = row.fileName;
-        link.click();
+      const fileName = row.fileName; 
+      const fileUrl = row.fileUrl;  
+      try {
+          const response = axios({
+              method: 'get',
+              url: `${Vue.prototype.javaApi}/common/downloadMinio`,
+              params: {
+                fileUrl,
+                fileName
+              },
+              responseType: 'blob',
+              headers: { Authorization: 'Bearer ' + getToken() }
+          });
+  
+          if (blobValidate(response.data)) {
+              saveAs(new Blob([response.data]), fileName);
+              Message.success("涓嬭浇鎴愬姛");
+          } else {
+              this.printErrMsg(response.data);
+          }
+      } catch (error) {
+          Message.error("涓嬭浇澶辫触锛�" + error.message);
       }
     },
   }

--
Gitblit v1.9.3