king
2020-02-04 fbe8b1adf4b50323b7ea6ad09c810cb3e07a69b9
2020-02-04
11个文件已修改
240 ■■■■ 已修改文件
src/api/index.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtabtable/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/actionList/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/settingform/index.jsx 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/source.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/modalform/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/settingform/index.jsx 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/ushare/modalform/index.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js
@@ -230,9 +230,9 @@
    param.SessionUid = sessionStorage.getItem('SessionUid') || ''
    param.LoginUID = sessionStorage.getItem('LoginUID') || ''
    if (param.func === 'RolesAdd') { // 角色添加时,传appkey
      param.appkey = window.GLOB.appkey || ''
    }
    // if (param.func === 'RolesAdd') { // 角色添加时,传appkey(外部接口统一添加)
    //   param.appkey = window.GLOB.appkey || ''
    // }
    param.nonc = Utils.getuuid()
    
src/index.js
@@ -36,9 +36,9 @@
if (process.env.NODE_ENV === 'production') {
  let service = window.GLOB.service ? (/\/$/.test(window.GLOB.service) ? window.GLOB.service : window.GLOB.service + '/') : ''
  window.GLOB.subSystemApi = document.location.origin + '/' + service + 'webapi/dostar'
  window.GLOB.subSystemApi = document.location.origin + '/' + service + 'webapi/dostars'
} else {
  window.GLOB.subSystemApi = 'http://qingqiumarket.cn/mkwms/webapi/dostar'
  window.GLOB.subSystemApi = 'http://qingqiumarket.cn/mkwms/webapi/dostars'
}
src/tabviews/commontable/index.jsx
@@ -360,7 +360,14 @@
    if (setting.interType === 'inner') {
      param.func = setting.innerFunc
    } else {
      param.rduri = setting.interface
      if (setting.sysInterface === 'true') {
        param.rduri = window.GLOB.mainSystemApi || window.GLOB.subSystemApi
      } else {
        param.rduri = setting.interface
      }
      param.appkey = window.GLOB.appkey || '' // 调用外部接口增加appkey
      if (setting.outerFunc) {
        param.func = setting.outerFunc
      }
src/tabviews/subtable/index.jsx
@@ -331,7 +331,14 @@
    if (setting.interType === 'inner') {
      param.func = setting.innerFunc
    } else {
      param.rduri = setting.interface
      if (setting.sysInterface === 'true') {
        param.rduri = window.GLOB.mainSystemApi || window.GLOB.subSystemApi
      } else {
        param.rduri = setting.interface
      }
      param.appkey = window.GLOB.appkey || '' // 调用外部接口增加appkey
      if (setting.outerFunc) {
        param.func = setting.outerFunc
      }
src/tabviews/subtabtable/index.jsx
@@ -294,7 +294,14 @@
    if (setting.interType === 'inner') {
      param.func = setting.innerFunc
    } else {
      param.rduri = setting.interface
      if (setting.sysInterface === 'true') {
        param.rduri = window.GLOB.mainSystemApi || window.GLOB.subSystemApi
      } else {
        param.rduri = setting.interface
      }
      param.appkey = window.GLOB.appkey || '' // 调用外部接口增加appkey
      if (setting.outerFunc) {
        param.func = setting.outerFunc
      }
src/tabviews/tableshare/actionList/index.jsx
@@ -380,6 +380,9 @@
          if (!res) return
          // 外部请求
          _outParam = JSON.parse(JSON.stringify(res))
          res.appkey = window.GLOB.appkey || '' // 外部请求时,统一添加appkey
          return Api.genericInterface(res)
        }).then(response => {
          if (!response) return
src/templates/comtableconfig/settingform/index.jsx
@@ -20,7 +20,8 @@
    interType: this.props.data.interType || 'inner',
    columns: this.props.columns.filter(item => item.field && item.type !== 'colspan'),
    currentTabs: null,
    selectTabs: []
    selectTabs: [],
    interReadonly: false
  }
  UNSAFE_componentWillMount() {
@@ -46,7 +47,8 @@
    this.setState({
      currentTabs: _tabs,
      selectTabs: _select
      selectTabs: _select,
      interReadonly: data.sysInterface === 'true'
    })
  }
@@ -77,7 +79,38 @@
  onChange = (e) => {
    this.setState({
      interType: e.target.value
    }, () => {
      if (e.target.value === 'inner') return
      let _type = this.props.form.getFieldValue('sysInterface')
      if (_type === 'true') {
        this.props.form.setFieldsValue({
          interface: window.GLOB.mainSystemApi || window.GLOB.subSystemApi
        })
        this.setState({
          interReadonly: true
        })
      } else {
        this.setState({
          interReadonly: false
        })
      }
    })
  }
  onSysChange = (e) => {
    if (e.target.value === 'true') {
      this.props.form.setFieldsValue({
        interface: window.GLOB.mainSystemApi || window.GLOB.subSystemApi
      })
      this.setState({
        interReadonly: true
      })
    } else {
      this.setState({
        interReadonly: false
      })
    }
  }
  selectChange = (val) => {
@@ -164,9 +197,21 @@
            </Form.Item>
          </Col>
          {interType === 'outer' ? <Col span={12}>
            <Form.Item label={dict['header.form.sysInterface']}>
              {getFieldDecorator('sysInterface', {
                initialValue: data.sysInterface || 'false'
              })(
                <Radio.Group onChange={this.onSysChange}>
                  <Radio value="true">{dict['header.form.true']}</Radio>
                  <Radio value="false">{dict['header.form.false']}</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {interType === 'outer' ? <Col span={12}>
            <Form.Item label={dict['header.form.interface']}>
              {getFieldDecorator('interface', {
                initialValue: data.interface || '',
                initialValue: data.sysInterface === 'true' ? (window.GLOB.mainSystemApi || window.GLOB.subSystemApi) : (data.interface || ''),
                rules: [
                  {
                    required: true,
@@ -175,6 +220,22 @@
                  {
                    max: formRule.input.max,
                    message: formRule.input.message
                  }
                ]
              })(<Input placeholder="" autoComplete="off" disabled={this.state.interReadonly} />)}
            </Form.Item>
          </Col> : null}
          {interType === 'outer' ? <Col span={12}>
            <Form.Item label={dict['header.form.outerFunc']}>
              {getFieldDecorator('outerFunc', {
                initialValue: data.outerFunc || '',
                rules: [
                  {
                    pattern: formRule.func.pattern,
                    message: formRule.func.message
                  }, {
                    max: formRule.func.max,
                    message: formRule.func.maxMessage
                  }
                ]
              })(<Input placeholder="" autoComplete="off" />)}
@@ -242,22 +303,7 @@
              )}
            </Form.Item>
          </Col>
          {interType === 'outer' ? <Col span={12}>
            <Form.Item label={dict['header.form.outerFunc']}>
              {getFieldDecorator('outerFunc', {
                initialValue: data.outerFunc || '',
                rules: [
                  {
                    pattern: formRule.func.pattern,
                    message: formRule.func.message
                  }, {
                    max: formRule.func.max,
                    message: formRule.func.maxMessage
                  }
                ]
              })(<Input placeholder="" autoComplete="off" />)}
            </Form.Item>
          </Col> : null}
          <Col span={12}>
            <Form.Item label="固定表头">
              {getFieldDecorator('columnfixed', {
src/templates/comtableconfig/source.jsx
@@ -18,6 +18,7 @@
      order: '',
      dataresource: '',
      interType: 'inner',
      sysInterface: 'false',
      innerFunc: '',
      interface: '',
      outerFunc: '',
src/templates/formtabconfig/modalform/index.jsx
@@ -39,7 +39,10 @@
    }
    if (type === 'select') {
      _options = [..._options, 'setAll', 'linkSubField']
      _options = [..._options, 'setAll']
      if (resourceType === '1') {
        _options.push('linkSubField')
      }
    } else if (type === 'link') {          // 关联类型、增加关联字段
      _options = [..._options, 'setAll', 'linkField']
    } else if (type === 'funcvar') {       // 设置为函数变量时,不需要其他信息
@@ -90,7 +93,10 @@
      }
      if (value === 'select') {
        _options = [..._options, 'setAll', 'linkSubField']
        _options = [..._options, 'setAll']
        if (this.state.resourceType === '1') {
          _options.push('linkSubField')
        }
      } else if (value === 'link') {
        _options = [..._options, 'setAll', 'linkField']
      } else if (value === 'funcvar') {
@@ -142,7 +148,10 @@
      }
      if (openType === 'select') {
        _options = [..._options, 'setAll', 'linkSubField']
        _options = [..._options, 'setAll']
        if (value === '1') {
          _options.push('linkSubField')
        }
      } else if (openType === 'link') {
        _options = [..._options, 'setAll', 'linkField']
      }
src/templates/subtableconfig/settingform/index.jsx
@@ -17,7 +17,8 @@
  state = {
    interType: this.props.data.interType || 'inner',
    columns: this.props.columns.filter(item => item.field && item.type !== 'colspan')
    columns: this.props.columns.filter(item => item.field && item.type !== 'colspan'),
    interReadonly: this.props.data.sysInterface === 'true'
  }
  handleConfirm = () => {
@@ -44,10 +45,44 @@
    })
  }
  /**
   * @description 切换接口类型
   */
  onChange = (e) => {
    this.setState({
      interType: e.target.value
    }, () => {
      if (e.target.value === 'inner') return
      let _type = this.props.form.getFieldValue('sysInterface')
      if (_type === 'true') {
        this.props.form.setFieldsValue({
          interface: window.GLOB.mainSystemApi || window.GLOB.subSystemApi
        })
        this.setState({
          interReadonly: true
        })
      } else {
        this.setState({
          interReadonly: false
        })
      }
    })
  }
  onSysChange = (e) => {
    if (e.target.value === 'true') {
      this.props.form.setFieldsValue({
        interface: window.GLOB.mainSystemApi || window.GLOB.subSystemApi
      })
      this.setState({
        interReadonly: true
      })
    } else {
      this.setState({
        interReadonly: false
      })
    }
  }
  selectChange = (val) => {
@@ -134,9 +169,21 @@
            </Form.Item>
          </Col>
          {interType === 'outer' ? <Col span={12}>
            <Form.Item label={dict['header.form.sysInterface']}>
              {getFieldDecorator('sysInterface', {
                initialValue: data.sysInterface || 'false'
              })(
                <Radio.Group onChange={this.onSysChange}>
                  <Radio value="true">{dict['header.form.true']}</Radio>
                  <Radio value="false">{dict['header.form.false']}</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {interType === 'outer' ? <Col span={12}>
            <Form.Item label={dict['header.form.interface']}>
              {getFieldDecorator('interface', {
                initialValue: data.interface || '',
                initialValue: data.sysInterface === 'true' ? (window.GLOB.mainSystemApi || window.GLOB.subSystemApi) : (data.interface || ''),
                rules: [
                  {
                    required: true,
@@ -145,6 +192,22 @@
                  {
                    max: formRule.input.max,
                    message: formRule.input.message
                  }
                ]
              })(<Input placeholder="" autoComplete="off" disabled={this.state.interReadonly} />)}
            </Form.Item>
          </Col> : null}
          {interType === 'outer' ? <Col span={12}>
            <Form.Item label={dict['header.form.outerFunc']}>
              {getFieldDecorator('outerFunc', {
                initialValue: data.outerFunc || '',
                rules: [
                  {
                    pattern: formRule.func.pattern,
                    message: formRule.func.message
                  }, {
                    max: formRule.func.max,
                    message: formRule.func.maxMessage
                  }
                ]
              })(<Input placeholder="" autoComplete="off" />)}
@@ -220,22 +283,6 @@
              )}
            </Form.Item>
          </Col>
          {interType === 'outer' ? <Col span={12}>
            <Form.Item label={dict['header.form.outerFunc']}>
              {getFieldDecorator('outerFunc', {
                initialValue: data.outerFunc || '',
                rules: [
                  {
                    pattern: formRule.func.pattern,
                    message: formRule.func.message
                  }, {
                    max: formRule.func.max,
                    message: formRule.func.maxMessage
                  }
                ]
              })(<Input placeholder="" autoComplete="off" />)}
            </Form.Item>
          </Col> : null}
          <Col span={12}>
            <Form.Item label="默认排序">
              {getFieldDecorator('order', {
src/templates/ushare/modalform/index.jsx
@@ -39,7 +39,10 @@
    }
    if (type === 'select') {
      _options = [..._options, 'setAll', 'linkSubField']
      _options = [..._options, 'setAll']
      if (resourceType === '1') {
        _options.push('linkSubField')
      }
    } else if (type === 'link') {          // 关联类型、增加关联字段
      _options = [..._options, 'setAll', 'linkField']
    } else if (type === 'funcvar') {       // 设置为函数变量时,不需要其他信息
@@ -92,7 +95,10 @@
      }
      if (value === 'select') {
        _options = [..._options, 'setAll', 'linkSubField']
        _options = [..._options, 'setAll']
        if (this.state.resourceType === '1') {
          _options.push('linkSubField')
        }
      } else if (value === 'link') {
        _options = [..._options, 'setAll', 'linkField']
      } else if (value === 'funcvar') {
@@ -136,7 +142,7 @@
    const { openType } = this.state
    let value = e.target.value
    if (key === 'resourceType') {
      let _options = ['label', 'field', 'initval', 'type', 'resourceType', 'readonly', 'required']
      let _options = ['label', 'field', 'initval', 'type', 'resourceType', 'readonly', 'required', 'hidden']
      if (value === '0') {
        _options = [..._options, 'options']
      } else if (value === '1') {
@@ -144,7 +150,10 @@
      }
      if (openType === 'select') {
        _options = [..._options, 'setAll', 'linkSubField']
        _options = [..._options, 'setAll']
        if (value === '1') {
          _options.push('linkSubField')
        }
      } else if (openType === 'link') {
        _options = [..._options, 'setAll', 'linkField']
      }