From da7068bd48791cdee966c786ce0dfd46f6e03df9 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 08 一月 2021 19:02:24 +0800
Subject: [PATCH] 2021-01-08

---
 src/tabviews/custom/index.jsx |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index 47a8849..7fad292 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -30,6 +30,7 @@
 class CustomPage extends Component {
   static propTpyes = {
     param: PropTypes.any,        // 鍏朵粬椤甸潰浼犻�掔殑鍙傛暟
+    Tab: PropTypes.string,       // 寮圭獥鏍囩
     MenuID: PropTypes.string,    // 鑿滃崟Id
     MenuNo: PropTypes.string,    // 鑿滃崟鍙傛暟
     MenuName: PropTypes.string   // 鑿滃崟鍚嶇О
@@ -249,11 +250,15 @@
 
       // 鏉冮檺杩囨护
       let isHS = this.props.menuType === 'HS'
+      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.ContainerId = this.state.ContainerId
+          cell.syncComponentId = cell.syncComponent ? cell.syncComponent.pop() : ''
           cell.$menuId = item.uuid
+          cell.$tabId = tabId
+          cell.$type = 'CustomPage'
 
           return isHS || permAction[cell.uuid]
         })
@@ -272,7 +277,10 @@
               cell.logLabel = item.name + '-' + cell.label
               cell.Ot = 'requiredSgl'
               cell.ContainerId = this.state.ContainerId
+              cell.syncComponentId = cell.syncComponent ? cell.syncComponent.pop() : ''
               cell.$menuId = item.uuid
+              cell.$tabId = tabId
+              cell.$type = 'CustomPage'
             } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height && _hasheight) {
               cell.innerHeight = 'auto'
             }
@@ -284,7 +292,10 @@
               cell.logLabel = item.name + '-' + cell.label
               cell.Ot = 'requiredSgl'
               cell.ContainerId = this.state.ContainerId
+              cell.syncComponentId = cell.syncComponent ? cell.syncComponent.pop() : ''
               cell.$menuId = item.uuid
+              cell.$tabId = tabId
+              cell.$type = 'CustomPage'
             } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height && _hasheight) {
               cell.innerHeight = 'auto'
             }
@@ -299,7 +310,10 @@
               cell.logLabel = item.name + '-' + cell.label
               cell.Ot = 'requiredSgl'
               cell.ContainerId = this.state.ContainerId
+              cell.syncComponentId = cell.syncComponent ? cell.syncComponent.pop() : ''
               cell.$menuId = item.uuid
+              cell.$tabId = tabId
+              cell.$type = 'CustomPage'
             } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height && _hasheight) {
               cell.innerHeight = 'auto'
             }
@@ -313,7 +327,10 @@
             cell.logLabel = item.name + '-' + cell.label
             cell.Ot = 'requiredSgl'
             cell.ContainerId = this.state.ContainerId
+            cell.syncComponentId = cell.syncComponent ? cell.syncComponent.pop() : ''
             cell.$menuId = item.uuid
+            cell.$tabId = tabId
+            cell.$type = 'CustomPage'
 
             return isHS || permAction[cell.uuid]
           })
@@ -322,7 +339,7 @@
       } 
 
       if (item.setting && item.setting.supModule) {
-        let pid = item.setting.supModule.slice(-1)[0]
+        let pid = item.setting.supModule.pop()
         if (pid && pid !== 'empty') {
           item.setting.supModule = pid
         } else {
@@ -355,7 +372,7 @@
       }
 
       if (col.linkmenu && col.linkmenu.length > 0) {
-        let menu_id = col.linkmenu.slice(-1)[0]
+        let menu_id = col.linkmenu.pop()
         col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || ''
       } else {
         col.linkThdMenu = ''

--
Gitblit v1.8.0