king
2021-01-24 606b0b991748740179fa37448f645e6e9c7f1c41
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
@@ -19,11 +19,12 @@
    setting: PropTypes.object,    // 数据源配置
    columns: PropTypes.array,     // 列设置
    scripts: PropTypes.array,     // 自定义脚本
    updateStatus: PropTypes.func, // 状态更新
  }
  state = {
    interType: 'system',
    procMode: 'system',
    procMode: 'script',
    requestMode: 'system',
    funcTooltip: '',
    funcRules: []
@@ -59,7 +60,7 @@
    this.setState({
      interType: setting.interType || 'system',
      procMode: setting.procMode || 'system',
      procMode: setting.procMode || 'script',
      requestMode: setting.requestMode || 'system',
      funcTooltip: tooltip,
      funcRules: rules
@@ -175,6 +176,7 @@
        interface: window.GLOB.mainSystemApi || ''
      })
    }
    this.props.updateStatus({[key]: value})
  }
  primaryKeyChange = (val) => {
@@ -279,7 +281,7 @@
                  ]
                })(
                <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => {this.onRadioChange(e, 'procMode')}}>
                  <Radio value="system">前置脚本</Radio>
                  <Radio value="script">前置脚本</Radio>
                  <Radio value="inner">前置函数</Radio>
                </Radio.Group>)}
              </Form.Item>
@@ -463,15 +465,32 @@
            {interType === 'custom' ? <Col span={12}>
              <Form.Item label="回调方式">
                {getFieldDecorator('callbackType', {
                  initialValue: setting.callbackType || 'default'
                  initialValue: setting.callbackType || 'script'
                })(
                <Radio.Group>
                <Radio.Group onChange={(e) => {this.onRadioChange(e, 'callbackType')}}>
                  <Radio value="default">默认脚本</Radio>
                  <Radio value="script">自定义脚本</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {interType === 'custom' ? <Col span={12}>
              <Form.Item label="回调表名">
                {getFieldDecorator('cbTable', {
                  initialValue: setting.cbTable || '',
                  rules: [
                    {
                      required: true,
                      message: dict['form.required.input'] + '回调表名!'
                    },
                    {
                      max: formRule.input.max,
                      message: formRule.input.message
                    }
                  ]
                })(<Input placeholder={''} autoComplete="off" />)}
              </Form.Item>
            </Col> : null}
            {interType === 'custom' ? <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'同步执行:外部接口调用成功后再请求数据;异步执行:外部接口调用与请求数据同时进行。'}>
                  <Icon type="question-circle" />