From ee7d7c29b8d95f0adab3bd9d93fdb1af51565a2d Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期四, 03 八月 2023 20:54:48 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs

---
 Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue |   27 ++++++++++++++++++---------
 1 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
index 7771e5c..0b8e3cd 100644
--- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -174,6 +174,9 @@
     tableHeadBtnData: {
       type: Array,
     },
+    Treedata:{
+      type:Array
+    }
   },
   data() {
     return {
@@ -189,6 +192,7 @@
       //鍙戝竷
       parameter: {
         ids: [],
+        btmtype:'',
         code: "",
         type: '',
         // this.visibleDeactivate ?'ENABLE':this.visibleEnable ? 'DISABLE' :this.visibleRecovery ? 'ROLLBACK' :'PUBLIC'
@@ -338,7 +342,7 @@
         }
       },
       deep: true
-    }
+    },
   },
   methods: {
     //鐘舵�佹悳绱�
@@ -422,6 +426,7 @@
     },
     // 鍙戝竷
     setHandler() {
+      console.log('Treedata',this.Treedata)
       if (this.selectRow.length > 0) {
         let hasEditing = this.selectRow.some(item => item.lcstatus !== 'Editing');
         let showMessage = true;
@@ -436,9 +441,10 @@
             processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => {
               if (res.data.data.records && res.data.data.records.length != 0) {
                 this.userName = localStorage.getItem("username");
-                this.parameter.template = this.userName + '-鐢宠[' + this.result + '-' + this.selectRow[0].name + ']';
+                this.parameter.template = this.userName + '-鐢宠[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']';
                 this.parameter.type = 'PUBLIC';
-                this.parameter.code = this.templateOid
+                this.parameter.code = this.templateOid;
+                this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype;
                 this.title = '娴佺▼瀹℃壒'
                 this.visibleFlow = true;
               } else {
@@ -483,12 +489,13 @@
             this.$message.warning('鎮ㄩ�夋嫨鐨勬暟鎹叏閮ㄤ负銆愬彂甯冪姸鎬併�戞墠鍙互鍙戣捣娴佺▼');
             showMessage = false;
           } else if (this.selectRow.length >= 1 && hasEditing && showMessage) {
-            processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => {
+            processTS({templateId: this.templateOid, buttonTypeKey: 'DISABLE'}).then(res => {
               if (res.data.records != [] && res.data.data.records.length != 0) {
                 this.userName = localStorage.getItem("username");
-                this.parameter.template = this.userName + '-鍋滅敤[' + this.result + '-' + this.selectRow[0].name + ']';
+                this.parameter.template = this.userName + '-鍋滅敤[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']';
                 this.parameter.type = 'DISABLE';
                 this.parameter.code = this.templateOid
+                this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype;
                 this.title = '鍋滅敤锛堝喕缁擄級缂栫爜鏁版嵁'
                 this.visibleDeactivate = true;
               } else {
@@ -533,13 +540,14 @@
             this.$message.warning('閫夋嫨鐨勬暟鎹腑鐘舵�佹棤闇�鍐嶆墽琛屽綋鍓嶆搷浣�');
             showMessage = false;
           } else if (this.selectRow.length >= 1 && hasEditing && showMessage) {
-            processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => {
+            processTS({templateId: this.templateOid, buttonTypeKey: 'ENABLE'}).then(res => {
               if (res.data.data.records && res.data.data.records.length != 0) {
                 this.parameter = res.data.data.records[0]
                 this.userName = localStorage.getItem("username");
-                this.parameter.template = this.userName + '-鍚敤[' + this.result + '-' + this.selectRow[0].name + ']';
+                this.parameter.template = this.userName + '-鍚敤[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']';
                 this.parameter.type = 'Released';
                 this.parameter.code = this.templateOid
+                this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype;
                 this.title = '鍚敤缂栫爜鏁版嵁'
                 this.visibleDeactivate = true;
               } else {
@@ -591,12 +599,13 @@
             showMessage = false;
           } else if (this.selectRow.length >= 1 && (disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0) && showMessage) {
             //disabledCount 鍜� releasedCount 涓换鎰忎竴涓瓑浜� this.selectRow 鏁扮粍鐨勯暱搴﹀垯琛ㄧず鍏ㄩ儴鏄悓涓�绉嶇姸鎬侊紝杩斿洖 true 濡傛灉disabledCount 鍜� releasedCount 閮藉ぇ浜�0锛屽垯琛ㄧず鏃㈡湁Disabled涔熸湁Released杩斿洖 true
-            processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => {
+            processTS({templateId: this.templateOid, buttonTypeKey: 'ROLLBACK'}).then(res => {
               if (res.data.records != [] && res.data.data.records.length != 0) {
                 this.userName = localStorage.getItem("username");
-                this.parameter.template = this.userName + '-鍥炴敹[' + this.result + '-' + this.selectRow[0].name + ']';
+                this.parameter.template = this.userName + '-鍥炴敹[' + this.selectRow[0].btmname + '-' + this.selectRow[0].name + ']';
                 this.parameter.type = 'TakeBack';
                 this.parameter.code = this.templateOid
+                this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype;
                 this.title = '鍥炴敹缂栫爜鏁版嵁'
                 this.visibleDeactivate = true;
               } else {

--
Gitblit v1.9.3