| | |
| | | return item |
| | | }) |
| | | } |
| | | if (btn.database === 'sso') { |
| | | if ((window.GLOB.mkHS || window.GLOB.systemType === 'production') && window.GLOB.mainSystemApi) { |
| | | params = params.map(item => { |
| | | item.rduri = window.GLOB.mainSystemApi |
| | | return item |
| | | }) |
| | | } |
| | | } |
| | | } else { |
| | | params = this.getInnerParam(data, formdata) |
| | | } |
| | |
| | | sql = sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`) |
| | | sql = sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`) |
| | | sql = sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) |
| | | sql = sql.replace(/@lang@/ig, `'${sessionStorage.getItem('lang')}'`) |
| | | sql = sql.replace(/@typename@/ig, `'admin'`) |
| | | |
| | | if (sessionStorage.getItem('dataM') === 'true') { // 数据权限 |
| | |
| | | } |
| | | |
| | | let sign = '' |
| | | let focusField = '' |
| | | |
| | | if (/@focus:[a-z0-9_]+@/i.test(res.message)) { |
| | | let val = res.message.match(/@focus:[a-z0-9_]+@/i) |
| | | res.message = res.message.replace(/@focus:[a-z0-9_]+@/i, '') |
| | | focusField = val ? val[0].replace(/@focus:|@/ig, '') : '' |
| | | |
| | | if (!res.message) { |
| | | res.ErrCode = '-1' |
| | | } |
| | | } |
| | | if (/^@speak@/i.test(res.message)) { |
| | | res.message = res.message.replace(/^@speak@/i, '') |
| | | let val = res.message.match(/<<.*>>/) |
| | |
| | | if (!res.message) { |
| | | res.ErrCode = '-1' |
| | | } |
| | | } else if (/@close_tab@|@close_popup@|@goback@|@no_target_menu@/i.test(res.message)) { |
| | | } |
| | | 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, '') |
| | | } |
| | |
| | | Modal.success({ |
| | | title: msg, |
| | | onOk: () => { |
| | | this.successContinue(sign, id, res) |
| | | this.successContinue(sign, id, res, focusField) |
| | | } |
| | | }) |
| | | return |
| | |
| | | |
| | | } |
| | | |
| | | this.successContinue(sign, id, res) |
| | | this.successContinue(sign, id, res, focusField) |
| | | } |
| | | |
| | | successContinue = (sign, id, res) => { |
| | | successContinue = (sign, id, res, focusField) => { |
| | | const { btn } = this.props |
| | | const { btnconfig } = this.state |
| | | |
| | | if (focusField) { |
| | | MKEmitter.emit('resetFocus', btn.uuid, focusField) |
| | | } |
| | | |
| | | this.setState({ |
| | | loadingNumber: '', |
| | |
| | | |
| | | if (verify.wxNoteLink === 'url' && verify.wxNoteLinkUrl) { |
| | | _param.url = verify.wxNoteLinkUrl |
| | | } else if (verify.wxNoteLink === 'miniProgram' && window.GLOB.WXminiAppID) { |
| | | } else if (verify.wxNoteLink === 'miniProgram' && (window.GLOB.WXminiAppID || verify.wxNoteMiniId)) { |
| | | _param.miniprogram = { |
| | | appid: window.GLOB.WXminiAppID, |
| | | appid: verify.wxNoteMiniId || window.GLOB.WXminiAppID, |
| | | pagepath: '/pages/index/index' |
| | | } |
| | | |
| | |
| | | } else if (btn.execError === 'closepoptab' || sign === '@close_popup@') { |
| | | MKEmitter.emit('popclose') |
| | | } else if (btn.execError !== 'never') { |
| | | let tabId = '' |
| | | if (btn.refreshTab && btn.refreshTab.length > 0) { |
| | | tabId = btn.refreshTab[btn.refreshTab.length - 1] |
| | | } |
| | | if (tabId && btn.$MenuID === tabId) { // 刷新当前菜单时,停止其他操作 |
| | | MKEmitter.emit('reloadMenuView', tabId, 'table') |
| | | return |
| | | } |
| | | |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines) |
| | | |
| | | if (btn.syncComponentId) { |
| | | if (btn.syncComponentId === 'multiComponent') { |
| | | btn.syncComponentIds.forEach((id, i) => { |
| | | setTimeout(() => { |
| | | if (/\$focus/.test(id)) { |
| | | MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1]) |
| | | } else { |
| | | MKEmitter.emit('reloadData', id) |
| | | } |
| | | }, 20 * i) |
| | | }) |
| | | } else if (/\$focus/.test(btn.syncComponentId)) { |
| | | MKEmitter.emit('reloadData', btn.syncComponentId.split('$')[0], btn.syncComponentId.split('$')[1]) |
| | | } else { |
| | | if (btn.syncDelay) { |
| | | this.delayTimer && clearTimeout(this.delayTimer) |
| | | this.delayTimer = setTimeout(() => { |
| | | MKEmitter.emit('reloadData', btn.syncComponentId) |
| | | }, btn.syncDelay) |
| | | } else { |
| | | MKEmitter.emit('reloadData', btn.syncComponentId) |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (tabId) { |
| | | MKEmitter.emit('reloadMenuView', tabId, 'table') |
| | | } |
| | | } |
| | | |
| | | if (btn.OpenType === 'form') { |
| | | let data = this.props.selectedData && this.props.selectedData[0] ? this.props.selectedData[0] : null |
| | | |