From 5a82f47b78d643ccf34a22602bebb60237e5c3c1 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 28 七月 2023 11:54:04 +0800
Subject: [PATCH] 前端代码打包

---
 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