From 27a03ffac131c044ac347b6236856bff2ee1e51f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 02 八月 2021 15:01:10 +0800
Subject: [PATCH] 2021-08-02

---
 src/tabviews/custom/index.jsx |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index 4b084e0..22c148f 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -281,6 +281,8 @@
         return
       }
 
+      item.MenuName = config.MenuName || ''
+
       inters.push(item)
     })
     
@@ -447,6 +449,8 @@
         delete item.style.shadowColor
       }
 
+      item.$menuname = this.props.MenuName + '-' + (item.name || '')
+
       if (item.type === 'tabs') {
         if (
           item.setting.blacklist && item.setting.blacklist.length > 0 &&
@@ -556,7 +560,7 @@
       let tabId = this.props.Tab ? this.props.Tab.uuid : '' // 寮圭獥鏍囩鎸夐挳Id
       if (item.action && item.action.length > 0) {
         item.action = item.action.filter(cell => {
-          cell.logLabel = item.name + '-' + cell.label
+          cell.logLabel = item.$menuname + '-' + cell.label
           cell.ContainerId = this.state.ContainerId
           cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
           cell.$menuId = item.uuid
@@ -589,7 +593,7 @@
 
           card.elements = card.elements.filter(cell => {
             if (cell.eleType === 'button') {
-              cell.logLabel = item.name + '-' + cell.label
+              cell.logLabel = item.$menuname + '-' + cell.label
               cell.Ot = 'requiredSgl'
               cell.ContainerId = this.state.ContainerId
               cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
@@ -612,7 +616,7 @@
           })
           card.backElements = card.backElements.filter(cell => {
             if (cell.eleType === 'button') {
-              cell.logLabel = item.name + '-' + cell.label
+              cell.logLabel = item.$menuname + '-' + cell.label
               cell.Ot = 'requiredSgl'
               cell.ContainerId = this.state.ContainerId
               cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
@@ -636,7 +640,7 @@
       } else if (item.type === 'balcony') {
         item.elements = item.elements.filter(cell => {
           if (cell.eleType === 'button') {
-            cell.logLabel = item.name + '-' + cell.label
+            cell.logLabel = item.$menuname + '-' + cell.label
             cell.ContainerId = this.state.ContainerId
             cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
             cell.$menuId = item.uuid
@@ -657,7 +661,7 @@
           let _hasheight = card.style.height && card.style.height !== 'auto'
           card.elements = card.elements.filter(cell => {
             if (cell.eleType === 'button') {
-              cell.logLabel = item.name + '-' + cell.label
+              cell.logLabel = item.$menuname + '-' + cell.label
               cell.Ot = 'requiredSgl'
               cell.ContainerId = this.state.ContainerId
               cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
@@ -683,7 +687,7 @@
         item.cols = item.cols.filter(col => {
           if (col.type !== 'action') return true
           col.elements = col.elements.filter(cell => {
-            cell.logLabel = item.name + '-' + cell.label
+            cell.logLabel = item.$menuname + '-' + cell.label
             cell.Ot = 'requiredSgl'
             cell.ContainerId = this.state.ContainerId
             cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
@@ -787,7 +791,7 @@
         }
       })
       delete component.scripts
-      component.setting.$name = component.name || ''
+      component.setting.$name = component.$menuname || ''
       component.setting.execute = component.setting.execute !== 'false'  // 榛樿sql鏄惁鎵ц锛岃浆涓篵oolean 缁熶竴鏍煎紡
       component.setting.laypage = component.setting.laypage === 'true'   // 鏄惁鍒嗛〉锛岃浆涓篵oolean 缁熶竴鏍煎紡
 

--
Gitblit v1.8.0