From 34f78e1203a839592ca6764f88f1632088e07d2a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 10 二月 2020 13:41:43 +0800 Subject: [PATCH] 2020-02-10 --- src/templates/formtabconfig/actionform/index.jsx | 30 ++++++++++++++++++++---------- 1 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/templates/formtabconfig/actionform/index.jsx b/src/templates/formtabconfig/actionform/index.jsx index 91772f5..5e1fbff 100644 --- a/src/templates/formtabconfig/actionform/index.jsx +++ b/src/templates/formtabconfig/actionform/index.jsx @@ -58,19 +58,24 @@ UNSAFE_componentWillMount () { + const { card } = this.props let _intertype = '' let _options = null - - this.props.formlist.forEach(form => { - if (form.key === 'intertype') { - _intertype = form.initVal - } - }) - - if (_intertype === 'outer') { - _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'sysInterface', 'icon', 'class', 'execSuccess', 'execError', 'method'] + console.log(this.props.card.btnType) + if (card.btnType === 'cancel') { + _options = ['label', 'OpenType', 'icon', 'class', 'execSuccess'] } else { - _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType'] + this.props.formlist.forEach(form => { + if (form.key === 'intertype') { + _intertype = form.initVal + } + }) + + if (_intertype === 'outer') { + _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'sysInterface', 'icon', 'class', 'execSuccess', 'execError'] + } else { + _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType'] + } } this.setState({ @@ -91,6 +96,11 @@ text: this.props.dict['header.form.exec'] } ] + if (card.btnType === 'cancel') { + item.readonly = 'true' + } + } else if (item.key === 'execSuccess' && card.btnType === 'cancel') { + item.label = '杩斿洖鍚�' } item.hidden = !_options.includes(item.key) return item -- Gitblit v1.8.0