From 5e1d4d5155c57c43739d61914e2d29a64f9bb683 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 27 八月 2023 17:40:38 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/custom/index.jsx | 50 ++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 38 insertions(+), 12 deletions(-) diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index 8cf3efe..80d4e93 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -328,11 +328,24 @@ filterComponent = (components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, searchId, syncId) => { return components.filter(item => { item.$pageId = pageId - item.$cache = cache - item.$time = time item.$searchId = searchId item.$syncId = syncId + if (cache) { + item.$cache = cache + item.$time = time + + if (item.wrap && item.wrap.cacheLocal === 'false') { + item.$cache = false + } else if (item.plot && item.plot.cacheLocal === 'false') { + item.$cache = false + } + + if (!item.$cache && item.setting && item.setting.sync === 'true') { + item.setting.sync = 'false' + } + } + if (item.style && item.style.boxShadow) { delete item.style.hShadow delete item.style.vShadow @@ -530,7 +543,6 @@ } if (item.type === 'table') { - let statFields = [] let getCols = (cols) => { return cols.filter(col => { if (col.blacklist && col.blacklist.filter(v => roleId.indexOf(v) > -1).length > 0) { @@ -542,9 +554,6 @@ } if (col.type === 'number') { - if (col.sum === 'true' && !statFields.includes(col.field)) { - statFields.push(col) - } if (typeof(col.decimal) === 'number') { col.round = Math.pow(10, col.decimal) if (col.format === 'percent') { @@ -595,7 +604,6 @@ } item.cols = getCols(item.cols) - item.statFields = statFields if (item.subtype === 'editable') { item.submit.logLabel = item.$menuname + '-鎻愪氦' @@ -713,6 +721,11 @@ group.subButton.Ot = item.wrap.datatype === 'static' ? 'notRequired' : 'requiredSgl' } + if (item.$cache && item.$time) { + group.$cache = item.$cache + group.$time = item.$time + } + group.subButton.syncComponentId = group.subButton.syncComponent ? (group.subButton.syncComponent.pop() || '') : '' if (group.subButton.syncComponentId && group.subButton.syncComponentId === item.setting.supModule) { @@ -826,6 +839,10 @@ cell.errorType = 'error2' } } + } else if (cell.OpenType === 'pop' && item.$cache && item.$time && cell.modal) { + cell.modal.$cache = item.$cache + cell.modal.$time = item.$time + cell.modal.uuid = cell.uuid + 'pop' } if (cell.syncComponentId) { @@ -859,6 +876,11 @@ resetElement = (cell) => { cell.style = cell.style || {} + + if (cell.style.display === 'inline-block') { + cell.style.verticalAlign = 'top' + } + if (['text', 'number', 'formula'].includes(cell.eleType)) { if (!cell.height) { cell.innerHeight = 'auto' @@ -1007,8 +1029,10 @@ component.setting.customScript = _customScript // 鏁寸悊鍚庤嚜瀹氫箟鑴氭湰 component.setting.tailScript = _tailScript // 鍚庣疆鑷畾涔夎剼鏈� - if (component.setting.laypage) { - component.setting.custompage = /@pageSize@/i.test(component.setting.dataresource + component.setting.customScript) + component.setting.custompage = /@pageSize@|@orderBy@/i.test(component.setting.dataresource + component.setting.customScript) + + if (!component.setting.execute || component.setting.custompage) { + component.forbidLine = true } if (component.setting.sync === 'true') { @@ -1143,6 +1167,8 @@ inter.setting.customScript = _customScript // 鏁寸悊鍚庤嚜瀹氫箟鑴氭湰 inter.setting.tailScript = _tailScript // 鍚庣疆鑷畾涔夎剼鏈� + inter.setting.custompage = /@pageSize@|@orderBy@/i.test(inter.setting.dataresource + inter.setting.customScript) + return inter }) } @@ -1151,13 +1177,13 @@ * @description 涓昏〃鏁版嵁鍔犺浇 */ loadmaindata = (params) => { - const { config } = this.state - let param = getStructuredParams(params, config, this.state.BID || '') + const { config, BID } = this.state + let param = getStructuredParams(params, config, BID || '') this.setState({loading: true, loadingview: false}) if (config.$cache && config.$time) { - Api.getLCacheConfig(params[0].uuid, config.$time).then(res => { + Api.getLCacheConfig(params[0].uuid, config.$time, BID).then(res => { if (!res.valid) { this.getMainData(param, params, config.MenuID) } else { -- Gitblit v1.8.0