From 6ca240a14ccf55d4e0a94fff77e95f64db2cdfcc Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 11 十月 2024 17:34:25 +0800 Subject: [PATCH] 2024-10-11 --- src/tabviews/custom/popview/index.jsx | 59 ++++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 38 insertions(+), 21 deletions(-) diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx index ff072e0..71b9453 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 @@ -513,6 +517,9 @@ return true }) } else if (item.type === 'form') { + if (item.wrap.datatype === 'public') { + balMap.set(item.wrap.publicId + 'public', true) + } item.subcards = item.subcards.map(group => { group.subButton.uuid = group.uuid group.subButton.OpenType = 'formSubmit' @@ -609,7 +616,7 @@ item.setting.customScript = _customScript // 鏁寸悊鍚庤嚜瀹氫箟鑴氭湰 item.setting.tailScript = _tailScript // 鍚庣疆鑷畾涔夎剼鏈� - item.setting.custompage = /@pageSize@|@orderBy@/i.test(item.setting.dataresource + item.setting.customScript) + item.setting.custompage = /@pageSize@|@orderBy@|@mk_total/i.test(item.setting.dataresource + item.setting.customScript) if (!item.setting.execute || item.setting.custompage) { item.forbidLine = true @@ -617,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' @@ -664,21 +671,14 @@ if (cell.OpenType === 'excelOut') { // 瀵煎嚭 cell.$menuName = item.$menuname - - if (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0) { - cell.errorType = 'error1' - } else if (cell.intertype === 'system' && cell.verify.dataType !== 'custom') { - if (item.setting.interType !== 'system') { - cell.errorType = 'error2' - } else if (item.type === 'balcony' || item.subtype === 'propcard') { - cell.errorType = 'error2' - } - } + } else if (cell.OpenType === 'pop' && cell.modal) { + cell.modal.uuid = cell.uuid + '_pop' } if (cell.verify) { + let isStatic = item.wrap && (item.wrap.datatype === 'static' || item.wrap.datatype === 'public') if (cell.verify.invalid === 'true') { - if (item.wrap && (item.wrap.datatype === 'static' || item.wrap.datatype === 'public')) { + if (isStatic) { cell.verify.invalid = 'false' } else if (item.setting && item.setting.maxScript && item.setting.maxScript >= 300) { cell.verify.invalid = 'false' @@ -689,6 +689,10 @@ } else if (cell.Ot === 'notRequired') { cell.verify.invalid = 'false' } + } + + if (cell.verify.uniques && cell.verify.uniques.length > 0 && cell.Ot === 'requiredOnce' && isStatic) { + cell.verify.uniques = [] } if (cell.verify.linkEnable === 'true' && /@/.test(cell.verify.linkUrl)) { @@ -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 } @@ -891,6 +895,8 @@ if (component.setting.interType !== 'system') return component + component.setting.uuid = component.uuid + // dataName 绯荤粺鐢熸垚鐨勬暟鎹簮鍚嶇О if (component.setting.sync === 'true') { component.dataName = 'mk' + component.uuid.slice(-18) @@ -912,12 +918,23 @@ 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)) + } } } } - component.setting.delay = delay + component.setting.delay = delay + (component.setting.delay || 0) delay += 20 return component @@ -955,11 +972,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