From eb0a11ecf1f876518779cf8bd3f368ed2fa13293 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 03 三月 2025 16:38:06 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev

---
 src/views/business/reportPreparation/index.vue |   19 +++----------------
 1 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/src/views/business/reportPreparation/index.vue b/src/views/business/reportPreparation/index.vue
index f1a6481..50e0e16 100644
--- a/src/views/business/reportPreparation/index.vue
+++ b/src/views/business/reportPreparation/index.vue
@@ -555,13 +555,10 @@
           let url = '';
           if(res.data.type==1){
             url = this.javaApi+'/img/'+res.data.fileUrl
-            file.downloadIamge(url,row.fileName)
+            this.$download.saveAs(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.saveAs(url, row.fileName);
           }
         }
       }).catch(error => {
@@ -603,17 +600,7 @@
       downAll({ids: str}).then(res => {
         this.outLoading = false
         this.$message.success('瀵煎嚭鎴愬姛')
-        // const blob = new Blob([res],{ type: 'application/octet-stream' });
-        // const url = URL.createObjectURL(blob);
-        // const link = document.createElement('a');
-        // link.href = url;
-        // link.download = '鎶ュ憡.zip';
-        // link.click();
-        const link = document.createElement('a');
-        link.href = this.javaApi + res.message;
-        link.target = '_blank';
-        document.body.appendChild(link);
-        link.click();
+        this.$download.saveAs(this.javaApi + res.message, row.fileName);
       })
     },
     beforeUpload(file){

--
Gitblit v1.9.3