| | |
| | | } |
| | | } |
| | | |
| | | // 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) => { |
| | |
| | | |
| | | let formkeys = [] |
| | | formdata && formdata.forEach(form => { |
| | | if (!ex.reps.includes(form.key)) return |
| | | // if (!ex.reps.includes(form.key)) return |
| | | |
| | | formkeys.push(form.key) |
| | | |
| | |
| | | |
| | | return { |
| | | $backend: true, |
| | | $type: 's_TableData_InUpDe', |
| | | data: [{ |
| | | id: ex.id, |
| | | exps: exps, |
| | | menuname: btn.logLabel || '', |
| | | exps: exps, |
| | | md5_id: md5_id |
| | | }] |
| | | } |
| | |
| | | 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]) |
| | | }] |
| | | } |
| | |
| | | clearBackCache = () => { |
| | | if (!window.GLOB.backend) return |
| | | |
| | | Api.cacheInterface({}).then(res => { |
| | | Api.cacheInterface({userid: sessionStorage.getItem('UserID') || '', LoginUID: sessionStorage.getItem('LoginUID') || ''}).then(res => { |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | 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, |
| | |
| | | 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 = '' |
| | |
| | | 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') { |
| | |
| | | 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) |
| | | } |