From c27d57333ed38c92f595219d2190ea63cef4d182 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 12 一月 2021 18:29:16 +0800 Subject: [PATCH] 2021-01-12 --- src/tabviews/subtable/index.jsx | 26 ++++++-------------------- 1 files changed, 6 insertions(+), 20 deletions(-) diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index eb8c555..6bee37b 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -35,7 +35,6 @@ mainSearch: PropTypes.any, // 涓昏〃鎼滅储鏉′欢 ContainerId: PropTypes.any, // 涓夌骇鑿滃崟Container(html) ID handleTableId: PropTypes.func, // 鎺у埗琛ㄦ牸鏁版嵁鍒囨崲鏃讹紝鏇存柊鍦ㄤ富琛ㄤ腑鐨刬d - userConfig: PropTypes.any, // 鐢ㄦ埛鑷畾涔夎缃� } state = { @@ -92,7 +91,7 @@ * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅 */ async loadconfig () { - const { permAction, permMenus, Tab, BID, userConfig } = this.props + const { permAction, permMenus, Tab, BID } = this.props let param = { func: 'sPC_Get_LongParam', @@ -175,11 +174,14 @@ } let chartId = config.charts[0] ? config.charts[0].uuid : '' + let userConfig = null + if (window.GLOB.UserCacheMap.has(Tab.uuid)) { + userConfig = window.GLOB.UserCacheMap.get(Tab.uuid) + } if (userConfig) { config.action = config.action.map(item => { - if (userConfig.action[item.uuid]) { - delete userConfig.action[item.uuid].label + if (userConfig[item.uuid]) { item = {...item, ...userConfig.action[item.uuid]} } @@ -276,22 +278,6 @@ valid = false } }) - - // 娣诲姞鐢ㄦ埛鏄剧ず鍒楄缃� - if (userConfig) { - _columns = _columns.map(item => { - if (userConfig.columns[item.uuid]) { - delete userConfig.columns[item.uuid].label - item = {...item, ...userConfig.columns[item.uuid]} - } - - return item - }) - - _columns.sort((pre, next) => { - return pre.sort - next.sort - }) - } config.setting.tabType = 'sub' // 鏁版嵁婧愪俊鎭澶勭悊 -- Gitblit v1.8.0