From 9b4433fddf5b401edb0aace8a404ac733b122702 Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期四, 03 四月 2025 14:35:02 +0800
Subject: [PATCH] 添加非密字段显示

---
 Source/UBCS-WEB/src/components/Master/MasterTransfer.vue |   87 ++++++++++++++++++++++++++++---------------
 1 files changed, 57 insertions(+), 30 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
index 97a96c6..639cf39 100644
--- a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
+++ b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
@@ -10,11 +10,11 @@
           <el-radio :label="1">鍏ㄩ儴</el-radio>
           <el-radio :label="2">椤电爜</el-radio>
         </el-radio-group>
-        <span v-if="radio === 2" style="margin-left: 20px;"><el-input v-model="pageExport"
-                                                                      style="width: 150px"></el-input> 锛堣緭鍏ラ〉鐮佹垨鑰呴〉闈㈣寖鍥达紝濡傦細1-10)锛�</span>
+        <span v-if="radio === 2" style="margin-left: 20px;color: #F56C6C; ">
+          <el-input v-model="pageExport" style="width: 150px"></el-input> 锛堣緭鍏ラ〉鐮佹垨鑰呴〉闈㈣寖鍥达紝濡傦細1-10锛�</span>
       </div>
     </div>
-    <div style="text-align: center">
+    <div v-loading="isLoading" style="text-align: center">
       <el-transfer
         v-model="value"
         :data="data"
@@ -44,6 +44,7 @@
       pageExport: "",
       data: [],
       value: [],
+      isLoading: false,
       filterMethod(query, item) {
         return item.label.indexOf(query) > -1;
       },
@@ -113,7 +114,7 @@
     },
     value: {
       handler(newval, oldval) {
-        console.log('value', newval)
+        // console.log('value', newval)
       }
     }
   },
@@ -121,6 +122,24 @@
   mounted() {
   },
   methods: {
+    handlerFile(res) {
+      // let reader = new FileReader();
+      // reader.readAsText(res.data);
+      // reader.onload = (result) => {
+      //   try {
+      //     let resData = JSON.parse(result.target.result);  // 瑙f瀽瀵硅薄鎴愬姛
+      //     if (resData.code != 200) {
+      //       this.$message.error(resData.msg);
+      //     }
+      //   } catch (err) {
+      //   // 瑙f瀽鎴愬璞″け璐ワ紝璇存槑鏄甯哥殑鏂囦欢娴�
+      //     func.downloadFileByBlobHandler(res);
+      //     this.$message.success('涓嬭浇鎴愬姛锛岃鏌ョ湅锛�');
+      //   }
+      // };
+      func.downloadFileByBlobHandler(res);
+      this.$message.success('涓嬭浇鎴愬姛锛岃鏌ョ湅锛�');
+    },
     escHandler() {
       this.$emit('update:visible', false);
       this.value = [];
@@ -138,6 +157,7 @@
         if (this.selectRow.length <= 0) {
           this.$message.warning('璇烽�夋嫨瑕佸鍑虹殑妯℃澘')
         } else {
+          this.isLoading = true;
           //宸查�夋嫨澶氶��
           const selectList = []
           //宸查�夋嫨灞炴��
@@ -158,11 +178,11 @@
               'conditionMap[oid]': this.ids, ...this.exportArrTwo,
               limit: -1
             }).then(res => {
-              // console.log('res',res)
-              if (res) {
-                func.downloadFileByBlobHandler(res);
-                this.escHandler()
-              }
+              this.handlerFile(res);
+              this.escHandler();
+              this.isLoading = false;
+            }).catch(error => {
+              this.isLoading = false;
             })
           } else {
 
@@ -171,34 +191,38 @@
               'conditionMap[oid]': this.ids, ...this.exportArr
             }).then(res => {
               // console.log('res',res)
-              if (res) {
-                func.downloadFileByBlobHandler(res);
-                this.escHandler()
-              }
+              this.handlerFile(res);
+              this.escHandler();
+              this.isLoading = false;
+            }).catch(error => {
+              this.isLoading = false;
             })
 
           }
         }
       } else if (this.radio === 1) {
+        this.isLoading = true;
         if (this.value <= 0) {
           this.tableHeadData.map(item => item.prop)
             .forEach((prop, index) => {
               this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop;
             });
           exportCode({codeClassifyOid: this.codeClassifyOid, ...this.exportArrTwo, limit: -1}).then(res => {
-            // console.log('res',res)
             if (res) {
               func.downloadFileByBlobHandler(res);
-              this.escHandler()
+              this.escHandler();
+              this.isLoading = false;
             }
+          }).catch(error => {
+            this.isLoading = false;
           })
         } else {
           exportCode({codeClassifyOid: this.codeClassifyOid, ...this.exportArr, limit: -1}).then(res => {
-            // console.log('res',res)
-            if (res) {
-              func.downloadFileByBlobHandler(res);
-              this.escHandler()
-            }
+            this.handlerFile(res);
+            this.escHandler();
+            this.isLoading = false;
+          }).catch(error => {
+            this.isLoading = false;
           })
         }
       } else if (this.radio === 2) {
@@ -227,6 +251,7 @@
           }
         }
         if (this.value >= 1) {
+          this.isLoading = true;
           exportCode({
             codeClassifyOid: this.codeClassifyOid, ...this.exportArr,
             limit: this.limit,
@@ -234,12 +259,14 @@
             endPage: end
           }).then((res) => {
             // console.log('res',res)
-            if (res) {
-              func.downloadFileByBlobHandler(res);
-              this.escHandler()
-            }
+            this.handlerFile(res);
+            this.escHandler();
+            this.isLoading = false;
+          }).catch(error => {
+            this.isLoading = false;
           });
         } else {
+          this.isLoading = true;
           this.tableHeadData.map(item => item.prop)
             .forEach((prop, index) => {
               this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop;
@@ -250,12 +277,12 @@
             page: start,
             endPage: end
           }).then(res => {
-            // console.log('res',res)
-            if (res) {
-              func.downloadFileByBlobHandler(res);
-              this.escHandler()
-            }
-          })
+            this.isLoading = false;
+            this.handlerFile(res);
+            this.escHandler();
+          }).catch(error => {
+            this.isLoading = false;
+          });
         }
       }
     },

--
Gitblit v1.9.3