From b69b5f6329ca5f87932436b7a6c1ddfc3377e10f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 16 五月 2024 10:56:41 +0800 Subject: [PATCH] 2024-05-16 --- src/menu/components/form/formaction/actionform/index.jsx | 58 ++++++++++++++++++++++++---------------------------------- 1 files changed, 24 insertions(+), 34 deletions(-) diff --git a/src/menu/components/form/formaction/actionform/index.jsx b/src/menu/components/form/formaction/actionform/index.jsx index 69ca082..33ebafb 100644 --- a/src/menu/components/form/formaction/actionform/index.jsx +++ b/src/menu/components/form/formaction/actionform/index.jsx @@ -57,10 +57,13 @@ } else if (this.record.type === 'close' || this.record.type === 'reset') { shows = ['typeName', 'label'] } else { - shows = ['typeName', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'output', 'reload', 'preButton'] // 閫夐」鍒楄〃 + shows = ['typeName', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'output', 'reload', 'preButton', 'refreshTab'] // 閫夐」鍒楄〃 if (this.record.execSuccess === 'never') { shows.push('resetForms') + } + if (this.record.syncComponent && this.record.syncComponent[0]) { + shows.push('syncDelay') } if (this.record.intertype === 'custom') { shows.push('procMode', 'interface', 'callbackType', 'proInterface', 'method', 'cross', 'stringify', 'ContentType', 'outerBlacklist') @@ -102,6 +105,9 @@ shows.push('innerFunc') } else { shows.push('sql', 'sqlType') + if (this.record.execSuccess === 'never' && this.record.resetForms && this.record.resetForms[0]) { + shows.push('returnValue') + } } if (this.record.linkmenu && this.record.linkmenu !== 'goback') { @@ -170,6 +176,15 @@ this.state.formlist.forEach((item, index) => { if (item.hidden || item.forbid) return + let label = item.label + if (item.tooltip) { + if (item.toolWidth) { + label = <Tooltip placement="topLeft" overlayStyle={{maxWidth: item.toolWidth}} title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> + } else { + label = <Tooltip placement="topLeft" title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip> + } + } + if (item.type === 'text') { let _rules = [] if (item.key === 'innerFunc') { @@ -216,12 +231,7 @@ } fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -238,7 +248,7 @@ } else if (item.type === 'tip') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.label}> + <Form.Item label={label}> {item.initVal} </Form.Item> </Col> @@ -246,12 +256,7 @@ } else if (item.type === 'number') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [ @@ -260,19 +265,14 @@ message: '璇疯緭鍏�' + item.label + '!' } ] - })(<InputNumber min={0} max={10000} precision={0} onPressEnter={this.handleSubmit}/>)} + })(<InputNumber min={0} max={10000} placeholder={item.placeholder || ''} precision={0} onPressEnter={this.handleSubmit}/>)} </Form.Item> </Col> ) } else if (item.type === 'select') { // 涓嬫媺鎼滅储 fields.push( <Col span={12} key={index}> - <Form.Item help={item.help || null} label={item.tooltip ? - <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item help={item.help || null} label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -303,12 +303,7 @@ } else if (item.type === 'radio') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [ @@ -334,7 +329,7 @@ } else if (item.type === 'textarea') { fields.push( <Col span={24} key={index}> - <Form.Item label={item.label} className="textarea"> + <Form.Item label={label} className="textarea"> {getFieldDecorator(item.key, { initialValue: item.initVal, rules: [ @@ -350,12 +345,7 @@ } else if (item.type === 'cascader') { fields.push( <Col span={12} key={index}> - <Form.Item label={item.tooltip ? - <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - {item.label} - </Tooltip> : item.label - }> + <Form.Item label={label}> {getFieldDecorator(item.key, { initialValue: item.initVal || [], rules: [ -- Gitblit v1.8.0