From 4d6b9f8a2d7b316633e43b489eae9ada949c07b5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 10 九月 2024 10:18:08 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/tabviews/custom/popview/index.jsx | 31 +++++++++++++++++++++++-------- 1 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx index 338eb38..9e557fc 100644 --- a/src/tabviews/custom/popview/index.jsx +++ b/src/tabviews/custom/popview/index.jsx @@ -156,7 +156,7 @@ let params = [] let BID = urlparam.$BID || '' - config.components = this.formatSetting(config.components, params, balMap, tbMap) + config.components = this.formatSetting(config.components, params, balMap, tbMap, BID) this.setState({ BID: BID, @@ -414,6 +414,7 @@ if (item.hasExtend) { item.setting.hasExtend = true + item.setting.sync = 'false' item.setting.tableMode = 'compatible' item.setting.extendTime = moment().format('YYYY-MM-DD HH:mm:ss') item.colsCtrls = null @@ -432,6 +433,9 @@ } } } else if (item.type === 'card' || item.type === 'carousel' || item.type === 'timeline') { + if (item.wrap.datatype === 'public') { + balMap.set(item.wrap.publicId + 'public', true) + } item.subcards && item.subcards.forEach(card => { if (card.style.boxShadow) { delete card.style.hShadow @@ -620,7 +624,7 @@ if (item.setting.sync === 'true') { // pageable 鏄惁鍒嗛〉锛岀粍浠跺睘鎬э紝涓嶅垎椤电殑缁勪欢鎵嶅彲浠ョ粺涓�鏌ヨ - if ((!item.pageable || (item.pageable && !item.setting.laypage)) && item.setting.onload === 'true') { + if ((!item.pageable || (item.pageable && !item.setting.laypage)) && item.setting.onload === 'true' && !_tailScript) { } else { item.setting.sync = 'false' @@ -814,17 +818,17 @@ } // 鏍煎紡鍖栭粯璁よ缃� - formatSetting = (components, params, balMap, tbMap) => { + formatSetting = (components, params, balMap, tbMap, BID) => { let delay = 20 return components.map(component => { if (component.type === 'tabs') { component.subtabs = component.subtabs.map(tab => { - tab.components = this.formatSetting(tab.components, null, balMap, tbMap) + tab.components = this.formatSetting(tab.components, null, balMap, tbMap, BID) return tab }) return component } else if (component.type === 'group') { - component.components = this.formatSetting(component.components, params, balMap, tbMap) + component.components = this.formatSetting(component.components, params, balMap, tbMap, BID) return component } @@ -912,7 +916,18 @@ component.setting.sync = 'false' component.setting.onload = 'false' } else { - params.push(getStructDefaultParam(component, searchlist, params.length === 0)) + let backend = false + if (window.backend && params.length === 0 && window.GLOB.CacheData.has('sql_' + component.uuid)) { + backend = true + } else if (window.backend && params[0] && params[0].exps) { + backend = true + } + + if (backend && !window.GLOB.CacheData.has('sql_' + component.uuid)) { + component.setting.sync = 'false' + } else { + params.push(getStructDefaultParam(component, searchlist, params.length === 0, BID)) + } } } } @@ -955,11 +970,11 @@ } params.forEach((item) => { - let _data = result[item.name] || '' + let _data = result[item.dataName] || '' if (_data && !Array.isArray(_data)) { _data = [_data] } - window.GLOB.SyncData.set(item.name, _data) + window.GLOB.SyncData.set(item.dataName, _data) }) MKEmitter.emit('transferSyncData', Tab.uuid) -- Gitblit v1.8.0