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/tabviews/zshare/topSearch/index.jsx | 2 src/menu/debug/index.jsx | 72 ++++++++++++++++++++++++++++++++++++ src/views/menudesign/index.jsx | 13 ------ src/utils/utils.js | 18 ++++---- 4 files changed, 83 insertions(+), 22 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 = [] diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index b6eed2b..6b79f41 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -381,7 +381,7 @@ UNSAFE_componentWillReceiveProps(nextProps) { const { config, BID } = this.props - if (config.checkBid && config.type !== 'search' && nextProps.BID !== BID) { + if (config.$checkBid && nextProps.BID !== BID) { this.resetOptions(nextProps.BID) } } diff --git a/src/utils/utils.js b/src/utils/utils.js index 06c3017..cc06e69 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -249,9 +249,6 @@ config.checkBid = true item.checkShift = true - if (config.setting) { - config.setting.checkBid = true - } } item.initval = '' @@ -317,9 +314,6 @@ config.checkBid = true item.checkShift = true - if (config.setting) { - config.setting.checkBid = true - } } item.initval = '' @@ -418,9 +412,6 @@ if (/@BID@/ig.test(item.dataSource) && supModule) { config.checkBid = true item.checkBid = true - if (config.setting) { - config.setting.checkBid = true - } } if (item.initval === '$first') { item.initval = '' @@ -469,6 +460,15 @@ return item }) + if (config.checkBid) { + if (config.setting) { + config.setting.checkBid = true + } + if (config.type !== 'search') { + config.$checkBid = true + } + } + config.$s_keys = keys config.$s_req = required } diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx index 0c66ca1..56d8e6c 100644 --- a/src/views/menudesign/index.jsx +++ b/src/views/menudesign/index.jsx @@ -828,13 +828,7 @@ } long_data = [] - // let oriIds = {} - // if (config.allSqls) { - // config.allSqls.forEach(item => { - // if (!item.md5) return - // oriIds[item.uuid + item.md5] = item.v_id - // }) - // } + let perm = true if (config.permission === 'false' || config.sqlperm === 'false') { perm = false @@ -843,10 +837,6 @@ config.allSqls = sqls.map(item => { let v_id = _t + getguid() - // if (oriIds[item.uuid + item.md5]) { - // v_id = oriIds[item.uuid + item.md5] - // } - long_data.push(`${md5(window.GLOB.appkey + v_id)},${item.uuid},${v_id},${window.btoa(window.encodeURIComponent(item.LText))},${perm ? item.roleId || '' : ''}`) return { @@ -854,7 +844,6 @@ v_id: v_id, type: item.type, reps: item.reps, - // md5: item.md5 || '', luser: item.luser === true } }) -- Gitblit v1.8.0