From 678dc0801e09c68c3faa45c72e7f7b3e25a7e373 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 13 三月 2025 11:13:45 +0800 Subject: [PATCH] 2025-03-13 --- src/menu/debug/index.jsx | 72 ++++++++++++++++++++++++++++++++++++ 1 files changed, 72 insertions(+), 0 deletions(-) diff --git a/src/menu/debug/index.jsx b/src/menu/debug/index.jsx index f6567bd..ac2ec2e 100644 --- a/src/menu/debug/index.jsx +++ b/src/menu/debug/index.jsx @@ -162,6 +162,78 @@ return } + let getMsearch = (components) => { + let val = null + components.forEach(com => { + if (com.type !== 'search') return + + if (com.wrap && com.wrap.supModule && com.wrap.supModule.length > 0) { + let supModule = com.wrap.supModule[com.wrap.supModule.length - 1]; + + (com.search || []).forEach(item => { + if (item.type === 'datemonth') { + if (item.initval && item.dateShift) { + val = {supModule: supModule, name: com.name} + } + } else if (item.type === 'daterange') { + if (item.initval && item.dateShift) { + val = {supModule: supModule, name: com.name} + } + } else if ((item.type === 'select' || item.type === 'link') && item.resourceType === '1') { + if (/@BID@/ig.test(item.dataSource)) { + val = {supModule: supModule, name: com.name} + } + } + }) + } + }) + + return val + } + + let checkSearch = (components, mSearch) => { + components.forEach(item => { + if (error) return + + if (item.type === 'tabs') { + item.subtabs.forEach(tab => { + let _ms = getMsearch(tab.components) + + if (_ms) { + checkSearch(tab.components, _ms) + } else { + checkSearch(tab.components, mSearch) + } + }) + return + } else if (item.type === 'group') { + checkSearch(item.components, mSearch) + return + } else if (!mSearch || !item.setting) { + return + } else if (!(item.type === 'table' || (item.type === 'card' && ['datacard', 'dualdatacard'].includes(item.subtype)))) { + return + } + + if (item.setting.useMSearch === 'true' && item.setting.supModule && item.setting.supModule[0] !== 'empty') { + let id = item.setting.supModule[item.setting.supModule.length - 1] + if (mSearch.supModule !== id) { + error = `${item.name} 浣跨敤浜嗗閮ㄦ悳绱紝浣嗕笌澶栭儴鎼滅储锛�${mSearch.name}锛夌殑涓婄骇缁勪欢涓嶄竴鑷淬�俙 + } + } + }) + } + + checkSearch(config.components, getMsearch(config.components)) + + if (error) { + Modal.warning({ + title: error, + okText: '鐭ラ亾浜�' + }) + return + } + this.sqlList = [] this.linkMain = [] -- Gitblit v1.8.0