| | |
| | | |
| | | class SettingForm extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | config: PropTypes.object, // 组件配置 |
| | | setting: PropTypes.object, // 数据源配置 |
| | | modules: PropTypes.array, // 可绑定的上级组件 |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + '数据源名称!' |
| | | message: '请输入数据源名称!' |
| | | } |
| | | ] |
| | | })(<Input placeholder={''} autoComplete="off" />)} |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + '表名!' |
| | | message: '请输入表名!' |
| | | }, |
| | | { |
| | | max: 50, |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.select'] + '接口类型!' |
| | | message: '请选择接口类型!' |
| | | }, |
| | | ] |
| | | })( |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + '内部函数!' |
| | | message: '请输入内部函数!' |
| | | }, |
| | | ...innerRules |
| | | ] |
| | |
| | | rules: [ |
| | | { |
| | | required: setting.sysInterface !== 'true' ? true : false, |
| | | message: this.props.dict['form.required.input'] + '接口地址!' |
| | | message: '请输入接口地址!' |
| | | } |
| | | ] |
| | | })(<TextArea rows={2} readOnly={setting.sysInterface === 'true'}/>)} |
| | |
| | | rules: [ |
| | | { |
| | | required: setting.execute !== 'false' ? true : false, |
| | | message: this.props.dict['form.required.input'] + '数据源!' |
| | | message: '请输入数据源!' |
| | | } |
| | | ] |
| | | })(<CodeMirror />)} |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + '默认排序!' |
| | | message: '请输入默认排序!' |
| | | } |
| | | ] |
| | | })(<Input placeholder={'ID asc, UID desc'} autoComplete="off" />)} |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.select'] + '上级组件!' |
| | | message: '请选择上级组件!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + '每页数量!' |
| | | message: '请输入每页数量!' |
| | | } |
| | | ] |
| | | })(<InputNumber min={1} max={500} precision={0} />)} |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={8}> |
| | | {/* <Col span={8}> |
| | | <Form.Item label="事务"> |
| | | {getFieldDecorator('transaction', { |
| | | initialValue: setting.transaction || 'false' |
| | |
| | | <Radio value="false">不使用</Radio> |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> |
| | | </Col> */} |
| | | {!['navbar', 'balcony', 'menubar', 'interface'].includes(config.type) ? <Col span={8}> |
| | | <Form.Item label="初始化数据"> |
| | | {getFieldDecorator('onload', { |