From cf8e332b14ca79859fcd89f2ac097ed7c6aa66c5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 01 十二月 2019 18:15:45 +0800 Subject: [PATCH] 2019-12-01 --- src/templates/comtableconfig/settingform/index.jsx | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/src/templates/comtableconfig/settingform/index.jsx b/src/templates/comtableconfig/settingform/index.jsx index da4b682..25d9a0b 100644 --- a/src/templates/comtableconfig/settingform/index.jsx +++ b/src/templates/comtableconfig/settingform/index.jsx @@ -47,6 +47,15 @@ primaryKey = '' } } + + 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}> @@ -131,6 +140,27 @@ )} </Form.Item> </Col> + <Col span={12}> + <Form.Item label="榛樿鎺掑簭"> + {getFieldDecorator('orderColumn', { + initialValue: orderColumn, + rules: [ + { + required: true, + message: dict['form.required.select'] + '榛樿鎺掑簭瀛楁!' + } + ] + })( + <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> + )} + </Form.Item> + </Col> </Row> </Form> ) -- Gitblit v1.8.0