From 88f02c2c018fb1e5c171bd4975dac534c584c3ba Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 10 十二月 2019 09:31:37 +0800 Subject: [PATCH] 2019-12-10 --- src/templates/comtableconfig/actionform/index.jsx | 26 +++++++++++++++++--------- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/templates/comtableconfig/actionform/index.jsx b/src/templates/comtableconfig/actionform/index.jsx index 3c19340..cf9a8d2 100644 --- a/src/templates/comtableconfig/actionform/index.jsx +++ b/src/templates/comtableconfig/actionform/index.jsx @@ -111,13 +111,13 @@ if (_intertype === 'outer') { _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method'] } else { - _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sql'] + _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType'] } } else { if (_intertype === 'outer') { _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'method'] } else { - _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql'] + _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType'] } } this.setState({ @@ -158,11 +158,11 @@ if (this.state.interType === 'outer') { _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method'] } else { - _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sql'] + _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType'] } } else { if (this.state.interType === 'inner') { - _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql'] + _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType'] } else { _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'interface', 'outerFunc', 'callbackFunc', 'method'] } @@ -240,7 +240,7 @@ if (key === 'intertype') { let _options = null if (value === 'inner') { - _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql'] + _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType'] } else { _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'interface', 'outerFunc', 'callbackFunc', 'method'] } @@ -261,9 +261,13 @@ if (item.hidden) return if (item.type === 'text') { // 鏂囨湰鎼滅储 + let help = '' + if (item.key === 'sql') { + help = this.props.dict['header.form.actionhelp.datasource'] + } fields.push( <Col span={12} key={index}> - <Form.Item label={item.label}> + <Form.Item label={item.label} help={help}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -277,9 +281,13 @@ </Col> ) } else if (item.type === 'select') { // 涓嬫媺鎼滅储 + let help = '' + if (item.key === 'sqlType') { + help = this.props.dict['header.form.actionhelp.sqlType'] + } fields.push( <Col span={12} key={index}> - <Form.Item label={item.label}> + <Form.Item label={item.label} help={help}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -334,7 +342,7 @@ } else if (item.type === 'textarea') { fields.push( <Col span={24} key={index}> - <Form.Item label={item.label} help={this.props.dict['header.form.datasource.actionhelp']} className="textarea"> + <Form.Item label={item.label} className="textarea"> {getFieldDecorator(item.key, { initialValue: item.initVal })(<TextArea rows={4} />)} @@ -362,7 +370,7 @@ if (values.innerFunc === '' && values.sql === '') { notification.warning({ top: 92, - message: this.props.dict['header.form.datasource.actionhelp'], + message: this.props.dict['header.form.actionhelp.datasource'], duration: 10 }) } else { -- Gitblit v1.8.0