From 3c58e215ed1c075c3a7729c899335c99d35c3f56 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 28 七月 2023 20:05:38 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs

---
 Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue |  137 ++++++++++++++++++++++++++++-----------------
 1 files changed, 85 insertions(+), 52 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
similarity index 94%
rename from Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
rename to Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
index 63be185..1b5b779 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -16,7 +16,7 @@
             <div style="display: flex; margin-top: 10px">
               <el-button plain size="small" type="primary" @click="Enable">鍚敤</el-button>
               <el-button plain size="small" type="primary" @click="Deactivate">鍋滅敤</el-button>
-              <el-button plain size="small" type="primary" @click="ImportExcel">瀵煎叆</el-button>
+              <el-button plain size="small" type="primary" @click.native="ImportExcel">瀵煎叆</el-button>
               <el-button plain size="small" type="primary" @click="ExportExcel">瀵煎嚭</el-button>
             </div>
           </div>
@@ -312,6 +312,8 @@
             </div>
           </div>
         </el-dialog>
+<!--        瀵煎嚭-->
+          <ThemeImport :visible.sync="ThemeImportVisible" :codeClassifyOid="this.codeClassifyOid"></ThemeImport>
       </basic-container>
     </el-main>
   </el-container>
@@ -335,9 +337,11 @@
   copy,
   upVersion,
   stopLose,
-  startRelease
+  startRelease,
+  exportClassify
 } from "@/api/template/templateAttr";
 import {defaultReferDataGrid,referDataGrid} from '@/api/MasterData/master'
+import func from "@/util/func";
 export default {
   name: "classifyTrees.vue",
   //浣跨敤inject鎺ユ敹鍙傛暟
@@ -346,6 +350,8 @@
   inject: ["crudTreeData"],
   data() {
     return {
+      //瀵煎叆鐘舵�佹
+      ThemeImportVisible:false,
       selectRow:'',
       //鏍戣妭鐐规樉绀洪殣钘�
       TreeFlagCode:false,
@@ -677,7 +683,7 @@
             label: '',
             prop: 'radio',
             width: 60,
-            hide: false,
+            display: false
           },
           {
             label: "妯℃澘缂栧彿",
@@ -711,18 +717,33 @@
             prop:"lcStatusText",
             display:false
           }
-        ]
+        ],
+        batchImportData: {
+          visible: false,
+          type: '',
+          codeClassifyOid: ''
+        }
       }
     }
+  },
+  created() {
+
   },
   methods: {
     /** 瀵煎叆 */
     ImportExcel(){
-      
+      this.ThemeImportVisible=true;
     },
     /** 瀵煎嚭 */
     ExportExcel(){
-
+      if(this.nodeClickList){
+        exportClassify({oid:this.nodeClickList.oid}).then(res=>{
+          console.log(res)
+          func.downloadFileByBlob(res);
+        })
+      }else {
+        this.$message.warning('璇峰厛閫夋嫨瑕佸鍑虹殑涓婚搴撳垎绫�')
+      }
     },
     //妯℃澘绠$悊宸插彂甯冪紪杈�
     // checkShowEditBtn() {
@@ -1109,69 +1130,81 @@
     //鍚敤鍜屽仠鐢ㄩ兘鍏堝垽鏂姸鎬�
     //鍚敤
     Enable() {
-      if (this.FlagObj.lcStatus == "Enabled") {
-        this.$message({
-          type: 'warning',
-          message: '褰撳墠鍒嗙被涓嶆槸鍋滅敤鐘舵��'
-        });
-      } else {
-        this.$confirm('鏄惁灏嗗瓙鍒嗙被涓�骞跺惎鐢紵', '鎻愮ず', {
-          confirmButtonText: '鏄�',
-          cancelButtonText: '鍙栨秷',
-          type: 'warning'
-        }).then(() => {
-          TreeEnable(this.nodeClickList).then(() => {
-            this.$message({
-              type: 'success',
-              message: '鍚敤鎴愬姛!'
-            });
-            this.getAttr()
-          })
-        }).catch(() => {
+      if(Object.keys(this.nodeClickList).length<1){
+        this.$message.warning('璇峰厛浠庢爲涓婇�夋嫨涓�鏉℃暟鎹�')
+      }else {
+        if (this.FlagObj.lcStatus == "Enabled") {
           this.$message({
-            type: 'info',
-            message: '宸插彇娑堝惎鐢�'
+            type: 'warning',
+            message: '褰撳墠鍒嗙被涓嶆槸鍋滅敤鐘舵��'
           });
-        });
+        } else {
+          this.$confirm('鏄惁灏嗗瓙鍒嗙被涓�骞跺惎鐢紵', '鎻愮ず', {
+            confirmButtonText: '鏄�',
+            cancelButtonText: '鍙栨秷',
+            type: 'warning'
+          }).then(() => {
+            TreeEnable(this.nodeClickList).then(() => {
+              this.$message({
+                type: 'success',
+                message: '鍚敤鎴愬姛!'
+              });
+              this.getAttr()
+            })
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '宸插彇娑堝惎鐢�'
+            });
+          });
+        }
       }
+
     },
     //鍋滅敤
     Deactivate() {
-      if (this.FlagObj.lcStatus === "Disabled") {
-        this.$message({
-          type: 'warning',
-          message: '褰撳墠鍒嗙被涓嶆槸鍚敤鐘舵��!'
-        });
-      } else {
-        this.$confirm('鏄惁鍋滅敤褰撳墠鍒嗙被锛屽仠鐢ㄥ悗锛屽瓙鍒嗙被涔熷皢涓嶈兘琚娇鐢紝鏄惁缁х画锛�', '鎻愮ず', {
-          confirmButtonText: '纭畾',
-          cancelButtonText: '鍙栨秷',
-          type: 'warning'
-        }).then(() => {
-          TreeDeactivate(this.nodeClickList).then(() => {
-            this.$message({
-              type: 'success',
-              message: '鍋滅敤鎴愬姛!'
-            });
-            this.nodeClickList['flag'] = true;
-            this.getAttr()
-          })
-        }).catch(() => {
+      if(Object.keys(this.nodeClickList).length<1){
+        this.$message.warning('璇峰厛浠庢爲涓婇�夋嫨涓�鏉℃暟鎹�')
+      }else {
+        if (this.FlagObj.lcStatus === "Disabled") {
           this.$message({
-            type: 'info',
-            message: '宸插彇娑堝仠鐢�'
+            type: 'warning',
+            message: '褰撳墠鍒嗙被涓嶆槸鍚敤鐘舵��!'
           });
-        });
+        } else {
+          this.$confirm('鏄惁鍋滅敤褰撳墠鍒嗙被锛屽仠鐢ㄥ悗锛屽瓙鍒嗙被涔熷皢涓嶈兘琚娇鐢紝鏄惁缁х画锛�', '鎻愮ず', {
+            confirmButtonText: '纭畾',
+            cancelButtonText: '鍙栨秷',
+            type: 'warning'
+          }).then(() => {
+            TreeDeactivate(this.nodeClickList).then(() => {
+              this.$message({
+                type: 'success',
+                message: '鍋滅敤鎴愬姛!'
+              });
+              this.nodeClickList['flag'] = true;
+              this.getAttr()
+            })
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '宸插彇娑堝仠鐢�'
+            });
+          });
+        }
       }
+
     },
     //鏍戠偣鍑讳簨浠�
     async nodeClick(data) {
       //瀹氫箟涓�涓ā鏉垮睘鎬d锛屾暟鎹槸妯℃澘绠$悊琛ㄦ牸閲岄潰鐨刼id
       if(data.parentId == ""){
         this.TreeFlagCode=true;
+
       }
       this.nodeClickList = data
-      this.ProData=[]
+      this.ProData=[];
+      this.selectRow=0;
       try {
         await TreeObjcet(data.oid).then(res => {
           this.FlagObj = res.data.data

--
Gitblit v1.9.3