From e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 17 十月 2022 17:57:34 +0800 Subject: [PATCH] 2022-10-17 --- src/templates/sharecomponent/searchcomponent/searchform/index.jsx | 24 +++++++++--------------- 1 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx index 06d7186..c4365b3 100644 --- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx @@ -109,7 +109,6 @@ class MainSearch extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� formlist: PropTypes.any, // 琛ㄥ崟 card: PropTypes.object, // 鎼滅储鏉′欢淇℃伅 inputSubmit: PropTypes.any // 鍥炶溅鎻愪氦浜嬩欢 @@ -267,7 +266,6 @@ } optionChange = (key, value) => { - let oriType = this.record.type this.record[key] = value let _fieldval = {} @@ -292,9 +290,6 @@ if (value === 'checkcard') { this.record.multiple = 'false' _fieldval.multiple = 'false' - _fieldval.ratio = 24 - } else if (oriType === 'checkcard') { - _fieldval.ratio = 6 } if (this.record.options.length > 0) { @@ -437,7 +432,6 @@ getFields() { const { getFieldDecorator } = this.props.form - const { dict } = this.props const { formlist } = this.state const fields = [] @@ -454,7 +448,7 @@ if (item.type === 'text') { let type = this.record.type rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] if (item.key === 'field' || item.key === 'datefield') { rules.push({ @@ -487,7 +481,7 @@ } } else if (item.type === 'number') { rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] initVal = item.initVal @@ -498,7 +492,7 @@ } } else if (item.type === 'select') { // 涓嬫媺鎼滅储 rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <Select @@ -516,7 +510,7 @@ </Select> } else if (item.type === 'radio') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => {this.optionChange(item.key, e.target.value)}}> @@ -528,7 +522,7 @@ </Radio.Group> } else if (item.type === 'codemirror') { rules = [ - { required: item.required, message: dict['form.required.input'] + item.label + '!' } + { required: item.required, message: '璇疯緭鍏�' + item.label + '!' } ] span = 24 className = 'text-area' @@ -550,7 +544,7 @@ if (this.record.linkField) { type = 'link' } - content = <DataTable dict={dict} type={type} display={this.record.display} linkSubFields={[]} transfield={{}} fields={this.record.fields || []} onChange={this.changeOptions}/> + content = <DataTable type={type} display={this.record.display} linkSubFields={[]} transfield={{}} fields={this.record.fields || []} onChange={this.changeOptions}/> } } else if (item.type === 'fields') { span = 24 @@ -560,10 +554,10 @@ { required: item.required, message: '璇锋坊鍔�' + item.label + '!' } ] - content = <FieldsTable dict={dict} onChange={this.changeField}/> + content = <FieldsTable onChange={this.changeField}/> } else if (item.type === 'checkbox') { rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <Checkbox.Group style={{width: '105%'}} options={item.options} onChange={(values) => this.optionChange(item.key, values)}/> @@ -582,7 +576,7 @@ } else if (item.type === 'color') { className = 'color-form-item' rules = [ - { required: item.required, message: dict['form.required.select'] + item.label + '!' } + { required: item.required, message: '璇烽�夋嫨' + item.label + '!' } ] content = <ColorSketch allowClear={true}/> -- Gitblit v1.8.0