From 29c5821ce140e89a8b35e53f41672dd86da56982 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 18 二月 2020 18:43:38 +0800 Subject: [PATCH] 2020-02-18 --- src/templates/subtableconfig/index.jsx | 55 ++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 36 insertions(+), 19 deletions(-) diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx index d5ab747..8e5ae6a 100644 --- a/src/templates/subtableconfig/index.jsx +++ b/src/templates/subtableconfig/index.jsx @@ -24,6 +24,7 @@ import EditCard from '@/templates/tableshare/editcard' import VerifyCard from '@/templates/tableshare/verifycard' import VerifyCardExcelIn from '@/templates/tableshare/verifycardexcelin' +import VerifyCardExcelOut from '@/templates/tableshare/verifycardexcelout' import MenuForm from '@/templates/tableshare/menuform' import SourceElement from '@/templates/tableshare/dragelement/source' import Source from './source' @@ -655,6 +656,15 @@ }) resolve(false) } + } else if (btn.OpenType === 'excelOut') { + let _param = { + innerFunc: btn.innerFunc + } + + newLText = Utils.formatOptions(Utils.getTableFunc(_param, {MenuID: _config.uuid, MenuName: _config.tabName, MenuNo: _config.tabNo}, _config)) // 鍒涘缓瀛樺偍杩囩▼sql + DelText = Utils.formatOptions(Utils.dropfunc(btn.innerFunc)) + + resolve(true) } else { let _param = { funcName: btn.innerFunc, @@ -1141,10 +1151,27 @@ const { card } = this.state let config = JSON.parse(JSON.stringify(this.state.config)) - if (card.OpenType !== 'excelIn') { + if (card.OpenType === 'excelIn') { + this.verifyRef.handleConfirm().then(res => { + + config.action = config.action.map(item => { + if (item.uuid === card.uuid) { + item.verify = res + } + + return item + }) + + this.setState({ + profileVisible: false, + config: config, + card: '' + }) + }) + } else { let _verify = this.verifyRef.state.verify - if (_verify.default === 'false' && _verify.scripts.length === 0) { + if (card.OpenType !== 'excelOut' && _verify.default === 'false' && _verify.scripts.length === 0) { notification.warning({ top: 92, message: '涓嶆墽琛岄粯璁ql鏃讹紝蹇呴』璁剧疆鑷畾涔夎剼鏈紒', @@ -1165,23 +1192,6 @@ profileVisible: false, config: config, card: '' - }) - } else if (card.OpenType === 'excelIn') { - this.verifyRef.handleConfirm().then(res => { - - config.action = config.action.map(item => { - if (item.uuid === card.uuid) { - item.verify = res - } - - return item - }) - - this.setState({ - profileVisible: false, - config: config, - card: '' - }) }) } } @@ -2232,6 +2242,13 @@ wrappedComponentRef={(inst) => this.verifyRef = inst} /> : null } + {this.state.card && this.state.card.OpenType === 'excelOut' ? + <VerifyCardExcelOut + card={this.state.card} + dict={this.state.dict} + wrappedComponentRef={(inst) => this.verifyRef = inst} + /> : null + } </Modal> {/* 璁剧疆鍏ㄥ眬閰嶇疆鍙婂垪琛ㄦ暟鎹簮 */} <Modal -- Gitblit v1.8.0