| | |
| | | |
| | | class SettingForm extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | config: PropTypes.object, // 表单配置信息 |
| | | isSubTab: PropTypes.bool, // 是否为子标签 |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { config, dict } = this.props |
| | | const { config } = this.props |
| | | const { fields, appType, display } = this.state |
| | | const { getFieldDecorator } = this.props.form |
| | | |
| | |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={12}> |
| | | <Form.Item label="焦点"> |
| | | <Form.Item label="初始焦点"> |
| | | {getFieldDecorator('focus', { |
| | | initialValue: config.setting.focus || '' |
| | | })( |
| | | <Select |
| | | showSearch |
| | | allowClear |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | > |
| | | <Select.Option value=""> |
| | | {dict['model.empty']} |
| | | </Select.Option> |
| | | {fields.map(option => |
| | | <Select.Option id={option.uuid} title={option.label} key={option.uuid} value={option.field}> |
| | | {option.label} |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="执行失败时需要聚焦的表单。"> |
| | | <Icon type="question-circle" /> |
| | | 失败焦点 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('errFocus', { |
| | | initialValue: config.setting.errFocus || '' |
| | | })( |
| | | <Select |
| | | showSearch |
| | | allowClear |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | > |
| | | {fields.map(option => |
| | | <Select.Option key={option.uuid} value={option.uuid}> |
| | | {option.label} |
| | | </Select.Option> |
| | | )} |
| | | </Select> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | {appType !== 'mob' ? <Col span={12}> |
| | | <Form.Item label="表单排列"> |
| | | {getFieldDecorator('align', { |