From b6cbfb08b51e87e6eac995be8e7751815715e6a1 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 29 三月 2022 15:36:21 +0800 Subject: [PATCH] 2022-03-29 --- src/menu/components/share/actioncomponent/actionform/index.jsx | 49 ++++++++++++++++++++++++++++++++++++------------- 1 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 3d0d78e..55184da 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -358,6 +358,9 @@ if (this.record.control) { shows.push('controlField', 'controlVal') } + if (this.record.control === 'disabled') { + shows.push('reason') + } } } else { if (Ot !== 'notRequired') { @@ -381,6 +384,9 @@ } if (this.record.control) { shows.push('controlField', 'controlVal') + } + if (this.record.control === 'disabled') { + shows.push('reason') } } @@ -645,19 +651,36 @@ { required: item.required, message: dict['form.required.select'] + item.label + '!' } ] - content = <Select - showSearch - allowClear={item.allowClear === true} - filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} - onChange={(value) => {this.optionChange(item.key, value)}} - getPopupContainer={() => document.getElementById('winter')} - > - {item.options.map((option, index) => - <Select.Option key={index} value={(option.value || option.field)}> - {(option.text || option.label)} - </Select.Option> - )} - </Select> + if (item.extendName) { + content = <Select + showSearch + allowClear={item.allowClear === true} + filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 || + option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0} + onChange={(value) => {this.optionChange(item.key, value)}} + getPopupContainer={() => document.getElementById('winter')} + > + {item.options.map((option, index) => + <Select.Option key={index} extend={option[item.extendName] || ''} value={(option.value || option.field)}> + {(option.text || option.label)} + </Select.Option> + )} + </Select> + } else { + content = <Select + showSearch + allowClear={item.allowClear === true} + filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} + onChange={(value) => {this.optionChange(item.key, value)}} + getPopupContainer={() => document.getElementById('winter')} + > + {item.options.map((option, index) => + <Select.Option key={index} value={(option.value || option.field)}> + {(option.text || option.label)} + </Select.Option> + )} + </Select> + } } else if (item.type === 'radio') { rules = [ { required: item.required, message: dict['form.required.select'] + item.label + '!' } -- Gitblit v1.8.0