From df2a8398142b7a5176552e254422300b5a014ece Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 18 十月 2024 15:01:41 +0800 Subject: [PATCH] 2024-10-18 --- src/tabviews/zshare/actionList/normalbutton/index.jsx | 91 ++++++++++++++++++++++++++++++++++++--------- 1 files changed, 72 insertions(+), 19 deletions(-) diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 158e42d..b816257 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -307,16 +307,16 @@ } } - // if (window.GLOB.systemType === 'production') { - // let _change = { - // prompt: '鎻愮ず妗�', - // exec: '鐩存帴鎵ц', - // pop: '寮圭獥锛堣〃鍗曪級', - // formSubmit: '琛ㄥ崟', - // form: '琛ㄥ崟', - // } - // MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: _change[btn.OpenType]}) - // } + if (window.GLOB.systemType === 'production') { + let _change = { + prompt: '鎻愮ず妗�', + exec: '鐩存帴鎵ц', + pop: '寮圭獥锛堣〃鍗曪級', + formSubmit: '琛ㄥ崟', + form: '琛ㄥ崟', + } + MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: _change[btn.OpenType]}) + } } preTrigger = (callback) => { @@ -836,7 +836,7 @@ let formkeys = [] formdata && formdata.forEach(form => { - if (!ex.reps.includes(form.key)) return + // if (!ex.reps.includes(form.key)) return formkeys.push(form.key) @@ -1156,10 +1156,11 @@ return { $backend: true, + $type: 's_TableData_InUpDe', data: [{ id: ex.id, - exps: exps, menuname: btn.logLabel || '', + exps: exps, md5_id: md5_id }] } @@ -1585,6 +1586,7 @@ if (window.backend && params[0].$backend && (!btn.verify || (btn.verify.printEnable !== 'true' && !btn.output))) { params = [{ $backend: true, + $type: 's_TableData_InUpDe', data: params.map(item => item.data[0]) }] } @@ -2777,7 +2779,11 @@ duration: 5 }) } else if (window.GLOB.localSystemApi) { - Api.cacheInterface({rduri: window.GLOB.localSystemApi.replace('dostars', 'excache')}).then(result => { + Api.cacheInterface({ + userid: sessionStorage.getItem('LocalUserID') || sessionStorage.getItem('UserID') || '', + LoginUID: sessionStorage.getItem('LocalLoginUID') || sessionStorage.getItem('LoginUID') || '', + rduri: window.GLOB.localSystemApi.replace('dostars', 'excache') + }).then(result => { if (!result.status) { notification.warning({ top: 92, @@ -2862,9 +2868,9 @@ res.ErrCode = '-1' } } - if (/@close_tab@|@close_popup@|@goback@|@no_target_menu@/i.test(res.message)) { - sign = res.message.match(/@close_tab@|@close_popup@|@goback@|@no_target_menu@/i)[0].toLowerCase() - res.message = res.message.replace(/@close_tab@|@close_popup@|@goback@|@no_target_menu@/i, '') + if (/@close_tab@|@close_popup@|@goback@|@no_target_menu@|@open_target_menu@/i.test(res.message)) { + sign = res.message.match(/@close_tab@|@close_popup@|@goback@|@no_target_menu@|@open_target_menu@/i)[0].toLowerCase() + res.message = res.message.replace(/@close_tab@|@close_popup@|@goback@|@no_target_menu@|@open_target_menu@/i, '') } let id = '' @@ -2930,6 +2936,10 @@ let tabId = '' if (btn.refreshTab && btn.refreshTab.length > 0) { tabId = btn.refreshTab[btn.refreshTab.length - 1] + } + + if (btn.excache === 'true') { + this.clearBackSqlCache() } if (tabId && btn.$MenuID === tabId) { // 鍒锋柊褰撳墠鑿滃崟鏃讹紝鍋滄鍏朵粬鎿嶄綔 @@ -3040,6 +3050,20 @@ window.open(url) } + } + + clearBackSqlCache = () => { + if (!window.backend) return + + Api.cacheInterface({}).then(res => { + if (!res.status) { + notification.warning({ + top: 92, + message: res.message || '缂撳瓨娓呯┖澶辫触锛�', + duration: 5 + }) + } + }) } triggerNote = (res, ID) => { @@ -3599,9 +3623,9 @@ if (!res.message) { res.ErrCode = '-1' } - } else if (/@close_tab@|@close_popup@|@goback@/i.test(res.message)) { - sign = res.message.match(/@close_tab@|@close_popup@|@goback@/i)[0].toLowerCase() - res.message = res.message.replace(/@close_tab@|@close_popup@|@goback@/i, '') + } else if (/@close_tab@|@close_popup@|@goback@|@open_target_menu@/i.test(res.message)) { + sign = res.message.match(/@close_tab@|@close_popup@|@goback@|@open_target_menu@/i)[0].toLowerCase() + res.message = res.message.replace(/@close_tab@|@close_popup@|@goback@|@open_target_menu@/i, '') } if (res.ErrCode === 'E') { @@ -3732,6 +3756,35 @@ MKEmitter.emit('refreshDebugTable') } + if (sign === '@open_target_menu@' && btn.openmenu && Array.isArray(btn.openmenu) && btn.openmenu.length > 0) { + let id = '' + if (this.state.selines && this.state.selines.length > 0 && btn.Ot !== 'notRequired') { + if (btn.Ot === 'requiredOnce') { + id = this.state.selines.map(d => d.$$uuid).filter(Boolean).join(',') + } else { + id = this.state.selines[0].$$uuid + } + } + + let menuId = btn.openmenu.slice(-1)[0] + let menu = null + + if (window.GLOB.mkThdMenus.has(menuId)) { + menu = {...window.GLOB.mkThdMenus.get(menuId), param: { $BID: id || '' }} + } else if (btn.MenuID) { + menu = { + MenuID: btn.MenuID, + MenuName: btn.MenuName, + type: btn.tabType, + param: { $BID: id || '' } + } + } + + if (menu) { + MKEmitter.emit('modifyTabs', menu, true) + } + } + if (btn.execError === 'popclose' && btn.$tabId) { // 鏍囩鍏抽棴鍒锋柊 MKEmitter.emit('refreshPopButton', btn.$tabId) } -- Gitblit v1.8.0