From 208548501db7256ab364f904196f614c4f1a0b40 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期一, 29 四月 2024 11:51:14 +0800
Subject: [PATCH] 添加action

---
 Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue |   46 ++++++++++++++++++++++++++--------------------
 1 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue
index 00548e2..d8fd372 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue
@@ -134,7 +134,7 @@
       const paramVOS=buttonitem.paramVOS;
       const DefineVO = this.componentVO.treeDefineVO || this.componentVO.tableDefineVO || this.componentVO.treeTableDefineVO || this.componentVO.formDefineVO;
       if (!paramVOS['title']) {
-        paramVOS['title'] = buttonitem.name + (DefineVO.title || DefineVO.componentTitle || '');
+        paramVOS['title'] = buttonitem.name + (DefineVO.title || this.componentVO.description || '');
       }
 
       if (!paramVOS['type']) {
@@ -146,29 +146,33 @@
         let values = paramVOS['initvalue'].split(';');
         let initValues = {}
         values.forEach((item,i) => {
-          item = item.replace(':', '=');
-          if (item.indexOf('${') > -1) {
-            if (item.split('=')[1].indexOf('.') > -1) {
-              if (this.sourceData.length < 1 || !this.sourceData.oid) {
-                isShow = false;
-                this.$message.error("璇峰厛閫夋嫨涓�鏉℃潵婧愭暟鎹�");
-                return false;
-              }
-              let name = item.split('=')[1].split('.')[1].replace('${', '').replace('}', '');
-              initValues[item.split('=')[0]] = this.sourceData[name]
-            } else {
-              if (this.dataStore.length < 1) {
-                isShow = false;
-                this.$message.error("璇峰厛閫夋嫨涓�鏉℃暟鎹�");
-                return false;
-              }
-              let name = item.split('=')[1].replace('${', '').replace('}', '');
-              initValues[item.split('=')[0]] = this.dataStore[0][name];
+          if(isShow){
+            item = item.replace(':', '=');
+            if (item.indexOf('${') > -1) {
+              if (item.split('=')[1].indexOf('.') > -1) {
+                if (this.sourceData.length < 1 || !this.sourceData.oid) {
+                  isShow = false;
+                  this.$message.error("璇峰厛閫夋嫨涓�鏉℃潵婧愭暟鎹�")
+                  return false;
+                }
+                let name = item.split('=')[1].split('.')[1].replace('${', '').replace('}', '');
+                initValues[item.split('=')[0]] = this.sourceData[name]
+              } else {
+                if (this.dataStore.length < 1) {
+                  isShow = false;
+                  this.$message.error("璇峰厛閫夋嫨涓�鏉℃暟鎹�");
+                  return false;
+                }
+                let name = item.split('=')[1].replace('${', '').replace('}', '');
+                initValues[item.split('=')[0]] = this.dataStore[0][name];
 
+              }
             }
           }
         })
-        paramVOS['initvalue'] = initValues
+        if(isShow){
+          paramVOS['initvalue'] = initValues
+        }
       }
       if(paramVOS['BSContent'] || paramVOS['BSContext']){
         paramVOS['context']=paramVOS['BSContext'] || paramVOS['BSContent']
@@ -177,6 +181,8 @@
 
       const that=this;
       if(isShow) {
+        //paramVOS.customBtn //寮圭獥榛樿鏈変繚瀛樻寜閽�,customBtn涓簍rue鏃跺唴瀹瑰睍绀鸿嚜瀹氫箟鎸夐挳
+        //paramVOS.form="editknowledgefolderall"
         doAction(buttonitem, {
           paramVOS: paramVOS,
           dataStore: this.dataStore || [],

--
Gitblit v1.9.3