| | |
| | | } |
| | | } |
| | | |
| | | let orderColumn = data.orderColumn |
| | | if (orderColumn) { |
| | | let field = this.props.columns.filter(column => column.field === orderColumn) |
| | | if (field.length !== 1) { |
| | | orderColumn = '' |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <Form {...formItemLayout} className="ant-advanced-search-form commontable-setting-form" id="commontable-setting-form"> |
| | | <Row gutter={24}> |
| | |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="默认排序"> |
| | | {getFieldDecorator('orderColumn', { |
| | | initialValue: orderColumn, |
| | | {getFieldDecorator('order', { |
| | | initialValue: data.order, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['form.required.select'] + '默认排序字段!' |
| | | message: dict['form.required.input'] + '默认排序字段!' |
| | | } |
| | | ] |
| | | })( |
| | | <Select |
| | | getPopupContainer={() => document.getElementById('commontable-setting-form')} |
| | | > |
| | | {this.props.columns.map(option => |
| | | <Select.Option id={option.uuid} title={option.label} key={option.uuid} value={option.field}>{option.label}</Select.Option> |
| | | )} |
| | | </Select> |
| | | )} |
| | | })(<Input placeholder="ID asc, UID desc" autoComplete="off" />)} |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |