From 162440a345abe2432df48b933bb858e6f1b56449 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 18 一月 2024 11:26:38 +0800 Subject: [PATCH] 2024-01-18 --- src/tabviews/basetable/index.jsx | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 53 insertions(+), 7 deletions(-) diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx index 6e2c374..83f496c 100644 --- a/src/tabviews/basetable/index.jsx +++ b/src/tabviews/basetable/index.jsx @@ -208,7 +208,7 @@ } }) } - + // 鑾峰彇涓绘悳绱㈡潯浠� config.components.forEach(component => { if (component.type === 'tabs') return @@ -346,11 +346,6 @@ item.name = (MenuName || '') } - // 鎼滅储鏉′欢鍒濆鍖� - Utils.initSearchVal(item) - - item.$searches = Utils.initMainSearch(item.search) - if (item.setting.supModule) { let pid = item.setting.supModule.pop() if (pid && pid !== 'empty') { @@ -359,6 +354,11 @@ item.setting.supModule = '' } } + + // 鎼滅储鏉′欢鍒濆鍖� + Utils.initSearchVal(item) + + item.$searches = Utils.initMainSearch(item.search) let statFields = [] let getCols = (cols) => { @@ -409,6 +409,11 @@ } } } + + if (cell.marks && cell.marks.length === 0) { + cell.marks = null + } + return true }) @@ -422,6 +427,10 @@ col.linkThdMenu = window.GLOB.mkThdMenus.get(menu_id) || '' } else { col.linkThdMenu = '' + } + + if (col.marks && col.marks.length === 0) { + col.marks = null } return true @@ -475,12 +484,46 @@ } if (cell.OpenType === 'excelOut') { // 瀵煎嚭 - cell.$menuName = item.name + 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' && item.setting.interType !== 'system') { cell.errorType = 'error2' + } + } + + if (cell.verify && cell.verify.invalid === 'true') { + if (item.setting.maxScript && item.setting.maxScript >= 300) { + cell.verify.invalid = 'false' + } else if (cell.intertype !== 'system' && cell.procMode !== 'system') { + cell.verify.invalid = 'false' + } else if (cell.sqlType === 'insert') { + cell.verify.invalid = 'false' + } else if (cell.Ot === 'notRequired') { + cell.verify.invalid = 'false' + } + } + + if (cell.verify && cell.verify.preHandle === 'true') { + let script = cell.verify.pre_func + if (!/#position-/.test(script) || /#position-init/.test(script)) { + try { + // eslint-disable-next-line + let func = new Function('btn', 'position', 'systemType', script) + func(cell, 'init', window.GLOB.systemType) + } catch (e) { + console.warn(e) + } + } + if (/#position-inner/.test(script)) { + cell.$innerScript = script + } + if (/#position-outer/.test(script)) { + cell.$outerScript = script + } + if (/#position-callback/.test(script)) { + cell.$callbackScript = script } } @@ -516,6 +559,8 @@ getPrinter = (item, parentId) => { let _item = window.GLOB.UserCacheMap.get(parentId + item.uuid) + item.verify.logLabel = item.logLabel + if (_item) { item.printer = _item.printer || '' item.verify.defaultPrinter = _item.printer || '' @@ -555,6 +600,7 @@ if (component.setting.interType !== 'system') { // 涓嶄娇鐢ㄧ郴缁熷嚱鏁版椂 component.setting.sync = 'false' + component.setting.dataresource = '' component.setting.laypage = component.setting.laypage === 'true' return component } -- Gitblit v1.8.0