From 60fd79e0eba3f62ca2f2d5077e1136c3faf71622 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期三, 19 七月 2023 17:42:22 +0800
Subject: [PATCH] 主题库参照配置

---
 Source/UBCS-WEB/src/components/Master/MasterTransfer.vue |   38 +++++++++++++++++++++++++++++---------
 1 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
index 9341b92..1663b08 100644
--- a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
+++ b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
@@ -1,8 +1,6 @@
 <template>
 <el-dialog :visible.sync="dialogPush" append-to-body  :close-on-click-modal="false"  @close="recoverPage" title="瀵煎嚭">
   <div style="margin-bottom: 10px">
-    <el-button type="success"
-               @click="handleExcel">涓嬭浇 澶氱骇琛ㄥごexcel</el-button>
     <el-radio-group v-model="radio">
       <el-radio :label="0">閫夋嫨</el-radio>
       <el-radio :label="1">鍏ㄩ儴</el-radio>
@@ -20,13 +18,18 @@
     :data="data">
   </el-transfer>
   </div>
+  <div style="display: flex;justify-content: flex-end;">
+    <el-button size="small" plain type="success" @click="handleExcel">纭畾</el-button>
+    <el-button size="small" plain >鍙栨秷</el-button>
+  </div>
 </el-dialog>
 </template>
 
 <script>
+import {exportCode} from '@/api/GetItem'
 export default {
 name: "MasterTransfer",
-  props:['visible','tableHeadData','codeClassifyOid','tableData'],
+  props:['visible','tableHeadData','codeClassifyOid','tableData','selectRow'],
   data(){
     return {
       data: [],
@@ -41,7 +44,7 @@
       option:{
         title: '鏂囨。鏍囬',
         column: [{
-          label: '澶氱骇琛ㄥご',
+          label: '涓绘暟鎹�',
           prop: 'header',
           children: []
         }],
@@ -106,11 +109,28 @@
       this.$emit('update:visible', false);
     },
     handleExcel(){
-      this.$Export.excel({
-        title: this.option.title,
-        columns: this.option.column,
-        data: this.option.data
-      });
+      // this.$Export.excel({
+      //   title: this.option.title,
+      //   columns: this.option.column,
+      //   data: this.option.data
+      // });
+      if(this.radio === 0){
+        if(this.selectRow.length<=0){
+          this.$message.warning('璇烽�夋嫨瑕佸鍑虹殑妯℃澘')
+        }else {
+          const selectList=[]
+          let exportArr=[]
+          this.selectRow.forEach(item=>{
+            selectList.push(
+             item.oid
+            )
+          })
+          exportArr=this.value.map(index => this.tableHeadData[index].prop);
+          exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':selectList,'attrIdIndexMap[index]':exportArr}).then(res=>{
+            console.log(res)
+          })
+        }
+      };
     },
   }
 }

--
Gitblit v1.9.3