From 2a3cc4e6cecfc6dab8b60adf93f7fde898ddc939 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 25 七月 2023 16:36:23 +0800 Subject: [PATCH] 2023-07-25 --- src/tabviews/custom/popview/index.jsx | 29 +++++++++-------------------- 1 files changed, 9 insertions(+), 20 deletions(-) diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx index 74ada91..9b2324c 100644 --- a/src/tabviews/custom/popview/index.jsx +++ b/src/tabviews/custom/popview/index.jsx @@ -131,9 +131,7 @@ }) } - config.$cache = config.cacheLocal === 'true' - - config.components = this.filterComponent(config.components, roleId, balMap, param, Tab, config.$cache, Tab.uuid, Tab.uuid) + config.components = this.filterComponent(config.components, roleId, balMap, param, Tab, Tab.uuid, Tab.uuid) // 鑾峰彇涓绘悳绱㈡潯浠� config.components.forEach(component => { @@ -160,15 +158,8 @@ let params = [] let BID = param.$BID || '' - let inherit = {} - if (config.cacheUseful === 'true') { // 缂撳瓨缁ф壙 - inherit.cacheUseful = config.cacheUseful - inherit.timeUnit = config.timeUnit - inherit.cacheTime = config.cacheTime - } - - config.components = this.formatSetting(config.components, params, inherit, regs, balMap) + config.components = this.formatSetting(config.components, params, regs, balMap) if ([...balMap.keys()].length > 0) { config.components = this.filterBalcony(config.components, balMap) @@ -184,10 +175,9 @@ }) } - filterComponent = (components, roleId, balMap, urlparam, Tab, cache, searchId, syncId) => { + filterComponent = (components, roleId, balMap, urlparam, Tab, searchId, syncId) => { return components.filter(item => { item.$pageId = Tab.uuid - item.$cache = cache item.$searchId = searchId item.$syncId = syncId @@ -293,7 +283,7 @@ } }) - tab.components = this.filterComponent(tab.components, roleId, balMap, urlparam, Tab, cache, _searchId, tab.uuid) + tab.components = this.filterComponent(tab.components, roleId, balMap, urlparam, Tab, _searchId, tab.uuid) return tab }) @@ -306,7 +296,7 @@ return false } - item.components = this.filterComponent(item.components, roleId, balMap, urlparam, Tab, cache, searchId, syncId) + item.components = this.filterComponent(item.components, roleId, balMap, urlparam, Tab, searchId, syncId) return true } else if (['pie', 'bar', 'line', 'dashboard', 'scatter', 'chart'].includes(item.type)) { @@ -703,18 +693,17 @@ } // 鏍煎紡鍖栭粯璁よ缃� - formatSetting = (components, params, inherit, regs, balMap) => { + formatSetting = (components, params, regs, balMap) => { let delay = 20 return components.map(component => { if (component.type === 'tabs') { component.subtabs = component.subtabs.map(tab => { - tab.components = this.formatSetting(tab.components, null, null, inherit, regs, balMap) - tab = {...tab, ...inherit} + tab.components = this.formatSetting(tab.components, null, regs, balMap) return tab }) return component } else if (component.type === 'group') { - component.components = this.formatSetting(component.components, params, null, regs, balMap) + component.components = this.formatSetting(component.components, params, regs, balMap) return component } else if (component.wrap && component.wrap.datatype === 'public') { component.setting.useMSearch = false @@ -1135,7 +1124,7 @@ return ( <div className={'pop-page-wrap ' + (loading ? 'loading' : '')} style={config ? config.style : null}> - {loading && !config.$cache ? <Spin className="view-spin" size="large" /> : null} + {loading ? <Spin className="view-spin" size="large" /> : null} <Row className="component-wrap">{this.getComponents()}</Row> {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} </div> -- Gitblit v1.8.0