From db18f67e6a9ec7be3446ebfb1592809b3c3dcb7d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 06 一月 2020 10:43:42 +0800 Subject: [PATCH] 2020-01-06 --- src/templates/comtableconfig/index.jsx | 53 +++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 37 insertions(+), 16 deletions(-) diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index ae698a1..cc74c33 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -17,6 +17,7 @@ import ColspanForm from '@/templates/tableshare/colspanform' import GridBtnForm from '@/templates/tableshare/gridbtnform' import EditCard from '@/templates/tableshare/editcard' +import VerifyCard from '@/templates/tableshare/verifycard' import MenuForm from '@/templates/tableshare/menuform' import SourceElement from '@/templates/tableshare/dragelement/source' import zhCN from '@/locales/zh-CN/comtable.js' @@ -1839,10 +1840,38 @@ * @description 楠岃瘉淇℃伅閰嶇疆 */ profileAction = (element) => { - // this.setState({ - // profileVisible: true, - // card: element - // }) + this.setState({ + profileVisible: true, + card: element + }) + } + + /** + * @description 楠岃瘉淇℃伅淇濆瓨 + */ + verifySubmit = () => { + const { card } = this.state + let config = JSON.parse(JSON.stringify(this.state.config)) + let _verify = this.verifyRef.state.verify + + config.action = config.action.map(item => { + if (item.uuid === card.uuid) { + item.verify = _verify + } + + return item + }) + + this.setState({ + profileVisible: false, + config: config, + card: '', + actionloading: true + }, () => { + this.setState({ + actionloading: false + }) + }) } /** @@ -3034,21 +3063,13 @@ wrapClassName="common-table-fields-modal" title={'楠岃瘉淇℃伅'} visible={this.state.profileVisible} - width={'65vw'} + width={'75vw'} style={{minWidth: '900px', maxWidth: '1200px'}} - cancelText={this.state.dict['header.close']} - onOk={this.addFieldSubmit} - onCancel={() => { // 鍙栨秷娣诲姞 - this.setState({ - tableVisible: false, - addType: '' - }) - }} + onOk={this.verifySubmit} + onCancel={() => { this.setState({ profileVisible: false }) }} destroyOnClose > - {this.state.addType && this.state.fields.length > 0 ? - <EditCard data={this.state.fields} ref="searchcard" type={this.state.addType} dict={this.state.dict} /> : null - } + <VerifyCard card={this.state.card} wrappedComponentRef={(inst) => this.verifyRef = inst} dict={this.state.dict} /> </Modal> {/* 璁剧疆鍏ㄥ眬閰嶇疆鍙婂垪琛ㄦ暟鎹簮 */} <Modal -- Gitblit v1.8.0