From b91c28df2f734b680198e755b7828666e238cea0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 21 六月 2024 16:43:44 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/zshare/actionList/excelInbutton/index.jsx | 55 +++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 39 insertions(+), 16 deletions(-) diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx index ab1cc80..1be21b1 100644 --- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx +++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx @@ -29,6 +29,7 @@ disabled: false, hidden: false, primaryId: '', + dict: window.GLOB.dict } UNSAFE_componentWillMount () { @@ -108,7 +109,7 @@ */ actionTrigger = (triggerId, record, type, lid) => { const { setting, BID, btn, selectedData, LID } = this.props - const { loading, disabled } = this.state + const { loading, disabled, dict } = this.state if (loading || disabled) return if (triggerId && btn.uuid !== triggerId) return @@ -119,20 +120,14 @@ if (setting.supModule && !BID) { notification.warning({ top: 92, - message: '闇�瑕佷笂绾т富閿�硷紒', + message: dict['sup_key_req'] || '闇�瑕佷笂绾т富閿�硷紒', duration: 5 }) } else if (btn.Ot === 'requiredSgl' && data.length !== 1) { // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁 notification.warning({ top: 92, - message: '璇烽�夋嫨鍗曡鏁版嵁锛�', - duration: 5 - }) - } else if (!btn.verify || !btn.verify.sheet || !btn.verify.columns || btn.verify.columns.length === 0) { - notification.warning({ - top: 92, - message: 'excel瀵煎叆楠岃瘉淇℃伅鏈缃紒', + message: dict['select_single_row'] || '璇烽�夋嫨鍗曡鏁版嵁锛�', duration: 5 }) } else { @@ -164,16 +159,18 @@ */ execSuccess = (res = {}) => { const { btn } = this.props + const { dict } = this.state if (res.ErrCode === 'S' || !res.ErrCode) { // 鎵ц鎴愬姛 notification.success({ top: 92, - message: res.message || '鎵ц鎴愬姛锛�', + message: res.message || dict['exc_success'] || '鎵ц鎴愬姛锛�', duration: btn.verify && btn.verify.stime ? btn.verify.stime : 2 }) } else if (res.ErrCode === 'Y') { // 鎵ц鎴愬姛 Modal.success({ - title: res.message || '鎵ц鎴愬姛锛�' + title: res.message || dict['exc_success'] || '鎵ц鎴愬姛锛�', + okText: dict['got_it'] || '鐭ラ亾浜�', }) } else if (res.ErrCode === '-1') { // 瀹屾垚鍚庝笉鎻愮ず @@ -226,6 +223,7 @@ */ execError = (res = {}) => { const { btn } = this.props + const { dict } = this.state if (!['LoginError', 'C', '-2', 'E', 'N', 'F', 'NM'].includes(res.ErrCode)) { res.ErrCode = 'E' @@ -233,23 +231,24 @@ if (res.ErrCode === 'E') { Modal.error({ - title: res.message || '鎵ц澶辫触锛�', + title: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', + okText: dict['got_it'] || '鐭ラ亾浜�' }) } else if (res.ErrCode === 'N') { notification.error({ top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: btn.verify && btn.verify.ntime ? btn.verify.ntime : 10 }) } else if (res.ErrCode === 'F') { notification.error({ className: 'notification-custom-error', top: 92, - message: res.message || '鎵ц澶辫触锛�', + message: res.message || dict['exc_fail'] || '鎵ц澶辫触锛�', duration: btn.verify && btn.verify.ftime ? btn.verify.ftime : 10 }) } else if (res.ErrCode === 'NM') { - message.error(res.message || '鎵ц澶辫触锛�') + message.error(res.message || dict['exc_fail'] || '鎵ц澶辫触锛�') } this.setState({ @@ -260,6 +259,24 @@ MKEmitter.emit('popclose') } else if (btn.execError !== 'never') { 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 { + MKEmitter.emit('reloadData', btn.syncComponentId) + } + } } if (btn.execError === 'popclose' && btn.$tabId) { // 鏍囩鍏抽棴鍒锋柊 @@ -336,6 +353,10 @@ param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } + if (btn.database === 'sso' && window.GLOB.mainSystemApi) { + param.rduri = window.GLOB.mainSystemApi + } + param.menuname = btn.logLabel if (window.GLOB.probation) { @@ -358,8 +379,10 @@ } else if (res.ErrCode === 'C') { const _this = this confirm({ - title: '璇风‘璁�', + title: window.GLOB.dict['exec_sure'] || '璇风‘璁�', content: res.message, + okText: window.GLOB.dict['ok'] || '纭畾', + cancelText: window.GLOB.dict['cancel'] || '鍙栨秷', onOk() { return new Promise(resolve => { Api.genericInterface(unCheckParam).then(result => { -- Gitblit v1.8.0