king
2022-08-24 4a8970e43aa886987c39ddc85ca1dd8b6e43806e
src/menu/datasource/verifycard/settingform/index.jsx
@@ -27,6 +27,7 @@
    modules: [],
    usefulFields: [],
    useMSearch: this.props.setting.useMSearch || 'false',
    sysInterface: this.props.setting.sysInterface || 'false',
    supModule: this.props.setting.supModule || [],
    appType: sessionStorage.getItem('appType')
  }
@@ -141,10 +142,13 @@
      })
    }
  }
  onSysInter = (e) => {
    let value = e.target.value
    this.setState({
      sysInterface: value
    })
    if (value === 'true') {
      this.props.form.setFieldsValue({interface: window.GLOB.mainSystemApi})
    }
@@ -157,7 +161,7 @@
  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: {
@@ -226,7 +230,13 @@
            {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>
@@ -256,17 +266,17 @@
            {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" />
                  正式地址