From de42c8e66e2303b46741fa66dc72f4b4183f8084 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 28 七月 2023 12:00:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/components/Master/MasterTransfer.vue |   20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
index fe85e28..267b33b 100644
--- a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
+++ b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
@@ -27,6 +27,7 @@
 
 <script>
 import {exportCode} from '@/api/GetItem'
+import func from "@/util/func";
 export default {
 name: "MasterTransfer",
   props:['visible','tableHeadData','codeClassifyOid','tableData','selectRow'],
@@ -132,23 +133,12 @@
             exportArr[`attrIdIndexMap[${index}]`] = item
           })
           exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':ids,...exportArr}).then(res=>{
-            console.log('res',res)
-            const filename = '涓嬭浇.xlsx'; // 涓嬭浇鐨勬枃浠跺悕
-            let blob = new Blob([res.data], {
-              type: res.data.type + ";charset=utf-8",
-            });
-            let src = window.URL.createObjectURL(blob);
-            if (src) {
-              let link = document.createElement("a");
-              link.style.display = "none";
-              link.href = src;
-              link.setAttribute("download", "鏂囦欢鍚嶅瓧.xls");
-              document.body.appendChild(link);
-              link.click();
-              document.body.removeChild(link); //涓嬭浇瀹屾垚绉婚櫎鍏冪礌
-              window.URL.revokeObjectURL(src); //閲婃斁鎺塨lob瀵硅薄
+            // console.log('res',res)
+            if(res){
+              func.downloadFileByBlob(res);
             }
           })
+
         }
       };
     },

--
Gitblit v1.9.3