From c51f5e007a3e03c9d6731ab7f28f0080de009990 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 17 十一月 2021 18:38:32 +0800 Subject: [PATCH] 2021-11-17 --- src/templates/formtabconfig/actionform/index.jsx | 92 ++++++++++++++++++++++++++++++---------------- 1 files changed, 60 insertions(+), 32 deletions(-) diff --git a/src/templates/formtabconfig/actionform/index.jsx b/src/templates/formtabconfig/actionform/index.jsx index 11f8243..42bba10 100644 --- a/src/templates/formtabconfig/actionform/index.jsx +++ b/src/templates/formtabconfig/actionform/index.jsx @@ -79,42 +79,70 @@ let _options = this.getOptions(card.btnType, _intertype) - this.setState({ - formlist: this.props.formlist.map(item => { - if (item.key === 'class') { - item.options = btnClasses - } else if (item.key === 'icon') { - item.options = btnIcons - } else if (item.key === 'resetPageIndex') { - item.tooltip = '椤甸潰鍏抽棴锛屼笖鎵ц鍒锋柊鏃剁敓鏁�' - } else if (item.key === 'sqlType') { - item.options = this.state.insertUpdateOptions - } else if (item.key === 'OpenType') { - item.options = [ - { - value: 'prompt', - text: this.props.dict['model.form.prompt'] - }, { - value: 'exec', - text: this.props.dict['model.form.exec'] - } - ] - if (card.btnType === 'cancel') { - item.readonly = true + let formlist = this.props.formlist.map(item => { + if (item.key === 'class') { + item.options = btnClasses + } else if (item.key === 'icon') { + item.options = btnIcons + } else if (item.key === 'resetPageIndex') { + item.tooltip = '椤甸潰鍏抽棴锛屼笖鎵ц鍒锋柊鏃剁敓鏁�' + } else if (item.key === 'sqlType') { + item.options = this.state.insertUpdateOptions + } else if (item.key === 'OpenType') { + item.options = [ + { + value: 'prompt', + text: this.props.dict['model.form.prompt'] + }, { + value: 'exec', + text: this.props.dict['model.form.exec'] } - } else if (item.key === 'execSuccess' && card.btnType === 'cancel') { - item.label = '鍏抽棴鍚�' - item.options[1].text = '鍒锋柊' - } else if (item.key === 'execSuccess' || item.key === 'execError') { - item.options[1].text = '鍒锋柊' - } else if (item.key === 'innerFunc' && card.btnType !== 'confirm' && _intertype === 'inner') { - item.required = true + ] + if (card.btnType === 'cancel') { + item.readonly = true } + } else if (item.key === 'execSuccess' && card.btnType === 'cancel') { + item.label = '鍏抽棴鍚�' + item.options[1].text = '鍒锋柊' + } else if (item.key === 'execSuccess' || item.key === 'execError') { + item.options[1].text = '鍒锋柊' + } else if (item.key === 'innerFunc' && card.btnType !== 'confirm' && _intertype === 'inner') { + item.required = true + } - item.hidden = !_options.includes(item.key) - return item - }) + item.hidden = !_options.includes(item.key) + return item }) + formlist.push({ + type: 'radio', + key: 'afterExecSuccess', + label: '鎴愬姛鍚�', + initVal: card.afterExecSuccess || 'close', + required: true, + options: [{ + value: 'close', + text: '鍏抽棴' + }, { + value: 'notclose', + text: '涓嶅叧闂�' + }] + }, + { + type: 'radio', + key: 'afterExecError', + label: '澶辫触鍚�', + initVal: card.afterExecError || 'notclose', + required: true, + options: [{ + value: 'close', + text: '鍏抽棴' + }, { + value: 'notclose', + text: '涓嶅叧闂�' + }] + },) + + this.setState({formlist}) } componentDidMount () { -- Gitblit v1.8.0