| | |
| | | modules: [], |
| | | usefulFields: [], |
| | | useMSearch: this.props.setting.useMSearch || 'false', |
| | | sysInterface: this.props.setting.sysInterface || 'false', |
| | | supModule: this.props.setting.supModule || [], |
| | | appType: sessionStorage.getItem('appType') |
| | | } |
| | |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | onSysInter = (e) => { |
| | | let value = e.target.value |
| | | |
| | | |
| | | this.setState({ |
| | | sysInterface: value |
| | | }) |
| | | if (value === 'true') { |
| | | this.props.form.setFieldsValue({interface: window.GLOB.mainSystemApi}) |
| | | } |
| | |
| | | render() { |
| | | const { setting, columns, config } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { interType, modules, useMSearch, laypage, supModule, usefulFields, appType } = this.state |
| | | const { interType, modules, useMSearch, laypage, supModule, usefulFields, appType, sysInterface } = this.state |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | {interType === 'outer' ? <Col span={8}> |
| | | <Form.Item label="系统接口"> |
| | | {getFieldDecorator('sysInterface', { |
| | | initialValue: setting.sysInterface || 'false' |
| | | initialValue: sysInterface, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请选择是否使用系统接口!' |
| | | } |
| | | ] |
| | | })( |
| | | <Radio.Group onChange={this.onSysInter}> |
| | | <Radio value="true">是</Radio> |
| | |
| | | {interType === 'outer' ? <Col className="outer-interface" span={24}> |
| | | <Form.Item label="接口地址"> |
| | | {getFieldDecorator('interface', { |
| | | initialValue: setting.interface || '', |
| | | initialValue: setting.interface || (sysInterface === 'true' ? window.GLOB.mainSystemApi : ''), |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | required: sysInterface !== 'true' ? true : false, |
| | | message: this.props.dict['form.required.input'] + '接口地址!' |
| | | } |
| | | ] |
| | | })(<TextArea rows={2}/>)} |
| | | })(<TextArea rows={2} readOnly={sysInterface === 'true'}/>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {interType === 'outer' ? <Col className="outer-interface" span={24}> |
| | | {interType === 'outer' && sysInterface !== 'true' ? <Col className="outer-interface" span={24}> |
| | | <Form.Item label={<Tooltip placement="topLeft" title="正式系统接口地址,为空时使用接口地址"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 正式地址 |