| | |
| | | } |
| | | |
| | | updateDataType = (e) => { |
| | | this.setState({dataType: e.target.value}) |
| | | this.props.updateDataType(e.target.value) |
| | | |
| | | if (e.target.value === 'custom') { |
| | | setTimeout(() => { |
| | | this.setState({ |
| | | dataType: e.target.value, |
| | | defaultSql: this.props.setting.defaultSql || 'true' |
| | | }) |
| | | }, 10) |
| | | } else { |
| | | this.setState({dataType: e.target.value}) |
| | | } |
| | | } |
| | | |
| | | render() { |
| | |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}> |
| | | {/* {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}> |
| | | <Form.Item label="主键"> |
| | | {getFieldDecorator('primaryKey', { |
| | | initialValue: setting.primaryKey || 'ID', |
| | | })(<Input placeholder={''} autoComplete="off" />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Col> : null} */} |
| | | {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}> |
| | | <Form.Item label="排序方式"> |
| | | {getFieldDecorator('order', { |
| | |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {btnType !== 'print' ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="Excel内容区是否自动换行。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 自动换行 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('wrapText', { |
| | | initialValue: setting.wrapText || 'false' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="false">否</Radio> |
| | | <Radio value="true">是</Radio> |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Row> |
| | | </Form> |
| | | </div> |