| | |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | columns: PropTypes.array, |
| | | card: PropTypes.any, |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | |
| | | <Form {...formItemLayout} style={{minHeight: '190px'}} id="columncolspan"> |
| | | <Row gutter={24}> |
| | | <Col span={12}> |
| | | <Form.Item label={this.props.dict['model.name']}> |
| | | <Form.Item label="名称"> |
| | | {getFieldDecorator('label', { |
| | | initialValue: card.label, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + this.props.dict['model.name'] + '!' |
| | | message: '请输入名称!' |
| | | }, |
| | | { |
| | | max: formRule.input.max, |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label={this.props.dict['model.form.type']}> |
| | | <Form.Item label="类型"> |
| | | {getFieldDecorator('type', { |
| | | initialValue: this.props.dict['model.form.colspan'], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + this.props.dict['model.form.type'] + '!' |
| | | } |
| | | ] |
| | | initialValue: '合并列' |
| | | })(<Input placeholder="" autoComplete="off" disabled={true}/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label={this.props.dict['model.form.align']}> |
| | | <Form.Item label="对齐方式"> |
| | | {getFieldDecorator('Align', { |
| | | initialValue: card.Align, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.select'] + this.props.dict['model.form.align'] + '!' |
| | | message: '请选择对齐方式!' |
| | | } |
| | | ] |
| | | })( |
| | | <Select |
| | | getPopupContainer={() => document.getElementById('columncolspan')} |
| | | > |
| | | <Select.Option value="left">{this.props.dict['model.form.alignLeft']}</Select.Option> |
| | | <Select.Option value="right">{this.props.dict['model.form.alignRight']}</Select.Option> |
| | | <Select.Option value="center">{this.props.dict['model.form.alignCenter']}</Select.Option> |
| | | <Select.Option value="left">左对齐</Select.Option> |
| | | <Select.Option value="right">右对齐</Select.Option> |
| | | <Select.Option value="center">居中</Select.Option> |
| | | </Select> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label={this.props.dict['model.form.columnWidth']}> |
| | | <Form.Item label="列宽"> |
| | | {getFieldDecorator('Width', { |
| | | initialValue: card.Width, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + this.props.dict['model.form.columnWidth'] + '!' |
| | | message: '请输入列宽!' |
| | | } |
| | | ] |
| | | })(<InputNumber min={1} max={1000} precision={0} onPressEnter={this.handleSubmit} />)} |
| | |
| | | initialValue: card.unfold || 'false' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="true">{this.props.dict['model.true']}</Radio> |
| | | <Radio value="false">{this.props.dict['model.false']}</Radio> |
| | | <Radio value="true">是</Radio> |
| | | <Radio value="false">否</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label={this.props.dict['model.hidden']}> |
| | | <Form.Item label="隐藏"> |
| | | {getFieldDecorator('Hide', { |
| | | initialValue: card.Hide || 'false', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.select'] + this.props.dict['model.hidden'] + '!' |
| | | } |
| | | ] |
| | | initialValue: card.Hide || 'false' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="true">{this.props.dict['model.true']}</Radio> |
| | | <Radio value="false">{this.props.dict['model.false']}</Radio> |
| | | <Radio value="true">是</Radio> |
| | | <Radio value="false">否</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.select'] + '排列!' |
| | | message: '请选择排列方式!' |
| | | } |
| | | ] |
| | | })( |