| | |
| | | class SettingForm extends Component { |
| | | static propTpyes = { |
| | | config: PropTypes.object, // 页面配置 |
| | | dict: PropTypes.object, // 字典项 |
| | | menu: PropTypes.object, // 菜单信息 |
| | | setting: PropTypes.object, // 数据源配置 |
| | | columns: PropTypes.array, // 列设置 |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { setting, dict, menu, config, columns } = this.props |
| | | const { setting, menu, config, columns } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { interType, funcRules, funcTooltip, tableType, controlField, sysInterface } = this.state |
| | | |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['form.required.input'] + '表名!' |
| | | message: '请输入表名!' |
| | | }, |
| | | { |
| | | max: 50, |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={8}> |
| | | <Form.Item label={dict['header.form.intertype']}> |
| | | <Form.Item label="接口类型"> |
| | | {getFieldDecorator('interType', { |
| | | initialValue: interType, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['form.required.select'] + dict['header.form.intertype'] + '!' |
| | | message: '请选择接口类型!' |
| | | }, |
| | | ] |
| | | })( |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | {interType === 'outer' ? <Col span={8}> |
| | | <Form.Item label={dict['header.form.sysInterface']}> |
| | | <Form.Item label="系统接口"> |
| | | {getFieldDecorator('sysInterface', { |
| | | initialValue: sysInterface, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['form.required.select'] + dict['header.form.sysInterface'] + '!' |
| | | message: '请选择系统接口!' |
| | | }, |
| | | ] |
| | | })( |
| | | <Radio.Group onChange={(e) => {this.onRadioChange(e, 'sysInterface')}}> |
| | | <Radio value="true">{dict['model.true']}</Radio> |
| | | <Radio value="false">{dict['model.false']}</Radio> |
| | | <Radio value="true">是</Radio> |
| | | <Radio value="false">否</Radio> |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | |
| | | rules: [ |
| | | { |
| | | required: interType === 'outer' && sysInterface === 'true' ? false : true, |
| | | message: dict['form.required.input'] + '接口地址!' |
| | | message: '请输入接口地址!' |
| | | }, |
| | | ] |
| | | })(<TextArea rows={2} readOnly={interType === 'outer' && sysInterface === 'true'}/>)} |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['form.required.input'] + '内部函数!' |
| | | message: '请输入内部函数!' |
| | | }, |
| | | { |
| | | max: formRule.func.max, |
| | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['form.required.input'] + '默认排序!' |
| | | message: '请输入默认排序!' |
| | | }, |
| | | { |
| | | max: formRule.input.max, |
| | |
| | | initialValue: setting.laypage || 'true' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="true">{dict['model.true']}</Radio> |
| | | <Radio value="false">{dict['model.false']}</Radio> |
| | | <Radio value="true">是</Radio> |
| | | <Radio value="false">否</Radio> |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | initialValue: setting.actionfixed === 'true' || setting.actionfixed === true ? 'true' : 'false' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="true">{dict['model.true']}</Radio> |
| | | <Radio value="false">{dict['model.false']}</Radio> |
| | | <Radio value="true">是</Radio> |
| | | <Radio value="false">否</Radio> |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | |
| | | initialValue: setting.columnfixed === 'true' || setting.columnfixed === true ? 'true' : 'false' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="true">{dict['model.true']}</Radio> |
| | | <Radio value="false">{dict['model.false']}</Radio> |
| | | <Radio value="true">是</Radio> |
| | | <Radio value="false">否</Radio> |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} */} |