From ed698a4ef051a13fe22c9ccfe121232c753725c1 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 12 二月 2025 00:45:40 +0800 Subject: [PATCH] 2025-02-12 --- src/tabviews/custom/index.jsx | 64 +++++++++++++++++++++++++------- 1 files changed, 50 insertions(+), 14 deletions(-) diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index 8e29805..949577d 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -49,6 +49,7 @@ const DebugTable = asyncComponent(() => import('@/tabviews/debugtable')) const FlowFloat = asyncComponent(() => import('@/tabviews/zshare/flowFloat')) const TableNodes = asyncComponent(() => import('@/tabviews/zshare/tablenodes')) +const DeepSeek = asyncComponent(() => import('@/tabviews/zshare/deepseek')) const MkInterfaces = asyncComponent(() => import('@/tabviews/custom/components/interfaces')) class CustomPage extends Component { @@ -69,7 +70,8 @@ loading: false, // 鍒楄〃鏁版嵁鍔犺浇涓� visible: false, // 鏍囩椤垫帶鍒� shortcuts: null, // 蹇嵎閿� - loadinginter: false + loadinginter: false, + noParam: false } stepInter = null @@ -79,6 +81,7 @@ */ async loadconfig () { const { MenuID, MenuName, param } = this.props + const { noParam } = this.state let _param = { func: 'sPC_Get_LongParam', @@ -209,13 +212,17 @@ let skip = config.permission === 'false' || window.GLOB.mkHS let urlparam = {} // url鍙傛暟 if (param) { - Object.keys(param).forEach(key => { - if (/^\$/.test(key)) { - urlparam[key] = param[key] - } else { - urlparam[key.toLowerCase()] = param[key] - } - }) + if (!noParam) { + Object.keys(param).forEach(key => { + if (/^\$/.test(key)) { + urlparam[key] = param[key] + } else { + urlparam[key.toLowerCase()] = param[key] + } + }) + } else { + urlparam.$BID = param.$BID + } } window.GLOB.CacheData.set(MenuID, urlparam) @@ -224,7 +231,7 @@ let keys = Object.keys(urlparam) config.allSqls.forEach(item => { item.id = md5(window.GLOB.appkey + item.v_id) - if (item.type === 'datasource' || item.type === 'excelOut') { + if (['datasource', 'interface', 'excelOut'].includes(item.type)) { item.urlkeys = keys item.urlparam = urlparam if (config.flow_code) { @@ -583,8 +590,9 @@ Utils.initSearchVal(item) if (urlparam.$searchkey) { + let reg = new RegExp('(^|,)' + urlparam.$searchkey + '($|,)', 'ig') item.search.forEach(cell => { - if (urlparam.$searchkey === cell.field.toLowerCase() && ['text', 'select', 'link', 'checkcard'].includes(cell.type)) { + if (reg.test(cell.field) && ['text', 'select', 'link', 'checkcard'].includes(cell.type)) { cell.initval = urlparam.$searchval } }) @@ -700,6 +708,12 @@ item.setting.tableMode = 'compatible' item.setting.extendTime = moment().format('YYYY-MM-DD HH:mm:ss') item.colsCtrls = null + } + + if (item.wrap.tree === 'true') { + item.setting.sync = 'false' + item.$cache = false + item.setting.$tree = true } if (item.subtype === 'editable') { @@ -824,6 +838,13 @@ group.subButton = this.resetButton(item, group.subButton) + if (group.subButton.linkmenu) { + if (Array.isArray(group.subButton.linkmenu) && group.subButton.linkmenu.length > 0) { + group.subButton.openmenu = group.subButton.linkmenu + } + delete group.subButton.linkmenu + } + if (item.$cache && item.$time) { // 琛ㄥ崟缂撳瓨 group.$cache = item.$cache group.$time = item.$time @@ -921,6 +942,10 @@ item.setting.tailScript = _tailScript // 鍚庣疆鑷畾涔夎剼鏈� item.setting.custompage = /@pageSize@|@orderBy@|@mk_total/i.test(item.setting.dataresource + item.setting.customScript) + + if (item.setting.$tree) { + item.setting.custompage = true + } if (!item.setting.execute || item.setting.custompage) { item.forbidLine = true @@ -1020,12 +1045,20 @@ } if (/#position-inner/.test(script)) { cell.$innerScript = script + + if (window.backend && window.GLOB.CacheData.has('sql_' + cell.uuid) && !/\$backend/.test(script)) { + window.GLOB.CacheData.delete('sql_' + cell.uuid) + } } if (/#position-outer/.test(script)) { cell.$outerScript = script } if (/#position-callback/.test(script)) { cell.$callbackScript = script + + if (window.backend && window.GLOB.CacheData.has('sql_back_' + cell.uuid) && !/\$backend/.test(script)) { + window.GLOB.CacheData.delete('sql_back_' + cell.uuid) + } } } } @@ -1038,6 +1071,7 @@ } } else if (cell.syncComponentId === 'multiComponent') { let ids = cell.syncComponents.map(m => { + if (Array.isArray(m)) return m.pop() || '' return m.syncComId.pop() || '' }) @@ -1454,12 +1488,12 @@ }) } - reloadMenuView = (menuId) => { + reloadMenuView = (menuId, clear) => { const { MenuID } = this.props if (MenuID !== menuId) return - this.reloadview() + this.reloadview(clear) } resetActiveMenu = (menuId) => { @@ -1554,7 +1588,7 @@ }) } - reloadview = () => { + reloadview = (clear) => { window.GLOB.CacheData.delete(this.props.MenuID) if (this.state.config) { @@ -1572,7 +1606,8 @@ viewlost: false, // 椤甸潰涓㈠け锛�1銆佹湭鑾峰彇鍒伴厤缃�-椤甸潰涓㈠け锛�2銆侀〉闈㈡湭鍚敤 config: null, // 椤甸潰閰嶇疆淇℃伅锛屽寘鎷粍浠剁瓑 loading: false, // 鍒楄〃鏁版嵁鍔犺浇涓� - shortcuts: null + shortcuts: null, + noParam: clear === true }, () => { this.loadconfig() }) @@ -1807,6 +1842,7 @@ {config.process === 'true' ? <FlowFloat config={config}/> : null} <SettingComponent config={config} shortcuts={shortcuts || []}/> <TableNodes config={config} /> + <DeepSeek/> </div> </div> ) -- Gitblit v1.8.0