| | |
| | | const CustomSwitch = asyncComponent(() => import('./customSwitch')) |
| | | const FileUpload = asyncComponent(() => import('../fileupload')) |
| | | const ColorSketch = asyncComponent(() => import('@/mob/colorsketch')) |
| | | // const Editor = asyncComponent(() => import('@/components/editor')) |
| | | const Editor = asyncComponent(() => import('@/components/editor')) |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | |
| | | } |
| | | |
| | | let _fieldlen = item.fieldlength || 50 |
| | | if (item.type === 'textarea' || item.type === 'fileupload' || item.type === 'multiselect') { |
| | | if (item.type === 'textarea' || item.type === 'fileupload' || item.type === 'multiselect' || item.type === 'brafteditor') { |
| | | _fieldlen = item.fieldlength || 512 |
| | | } else if (item.type === 'number') { |
| | | _fieldlen = item.decimal ? item.decimal : 0 |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'brafteditor') { |
| | | let _max = item.fieldlength || 512 |
| | | |
| | | fields.push( |
| | | <Col span={24} key={index}> |
| | | <Form.Item label={item.tooltip ? |
| | | <Tooltip placement="topLeft" title={item.tooltip}> |
| | | <Icon type="question-circle" /> |
| | | {item.label} |
| | | </Tooltip> : item.label |
| | | }> |
| | | {getFieldDecorator(item.field, { |
| | | initialValue: item.initval || null, |
| | | rules: [ |
| | | { |
| | | required: item.required === 'true', |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | }, |
| | | { |
| | | max: _max, |
| | | message: formRule.input.formMessage.replace('@max', _max) |
| | | } |
| | | ] |
| | | })(<Editor />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } |
| | | }) |
| | | |
| | |
| | | return ( |
| | | <Form {...formItemLayout} className="ant-advanced-search-form main-form-field" id="main-form-box"> |
| | | <Row className={'cols' + cols} gutter={24}>{this.getFields()}</Row> |
| | | {/* <Editor /> */} |
| | | </Form> |
| | | ) |
| | | } |