From 50821207863ae07b0ab36a604fcbad200a055af9 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 23 六月 2023 00:11:38 +0800
Subject: [PATCH] 2023-06-23

---
 src/tabviews/basetable/index.jsx |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx
index 59932b9..d979e0c 100644
--- a/src/tabviews/basetable/index.jsx
+++ b/src/tabviews/basetable/index.jsx
@@ -25,7 +25,6 @@
     param: PropTypes.any,        // 鍏朵粬椤甸潰浼犻�掔殑鍙傛暟
     Tab: PropTypes.string,       // 寮圭獥鏍囩
     MenuID: PropTypes.string,    // 鑿滃崟Id
-    MenuNo: PropTypes.string,    // 鑿滃崟鍙傛暟
     MenuName: PropTypes.string,  // 鑿滃崟鍚嶇О
     changeTemp: PropTypes.func
   }
@@ -51,7 +50,7 @@
    * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅
    */
   async loadconfig () {
-    const { MenuID } = this.props
+    const { MenuID, MenuName } = this.props
 
     let _param = {
       func: 'sPC_Get_LongParam',
@@ -67,6 +66,8 @@
         config = window.decodeURIComponent(window.atob(result.LongParam))
         config = config.replace(/@mywebsite@\//ig, window.GLOB.baseurl)
         config = JSON.parse(config)
+        config.MenuID = MenuID
+        config.MenuName = MenuName || config.MenuName
       } catch (e) {
         console.warn('Parse Failure')
         config = ''
@@ -156,7 +157,7 @@
         })
       }
 
-      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, skip, param, MenuID)
+      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, skip, param, MenuID, config.MenuName)
 
       let autoMatic = null
       if (config.autoMatic && config.autoMatic.enable === 'true') {
@@ -263,11 +264,11 @@
     }
   }
 
-  filterComponent = (components, roleId, permAction, skip, urlparam, pageId) => {
+  filterComponent = (components, roleId, permAction, skip, urlparam, pageId, MenuName) => {
     return components.filter(item => {
       item.$pageId = pageId
 
-      item.$menuname = (this.props.MenuName || '') + '-' + (item.name || '涓昏〃')
+      item.$menuname = (MenuName || '') + '-' + (item.name || '涓昏〃')
 
       if (item.type === 'tabs') {
         item.subtabs = item.subtabs.filter(tab => {
@@ -286,13 +287,13 @@
           if (tab.permission !== 'true') { // 鏉冮檺鏈紑鍚笉鍋氭潈闄愭帶鍒�
             skip = true
           }
-          tab.components = this.filterComponent(tab.components, roleId, permAction, skip, urlparam, pageId)
+          tab.components = this.filterComponent(tab.components, roleId, permAction, skip, urlparam, pageId, MenuName)
           return tab
         })
 
         return true
       } else {
-        item.name = (this.props.MenuName || '')
+        item.name = (MenuName || '')
       }
 
       // 鎼滅储鏉′欢鍒濆鍖�

--
Gitblit v1.8.0