king
2020-02-15 c76e56d9cc6f8f5e93aaf355b269ec8cac8c6b95
src/tabviews/formtab/index.jsx
@@ -89,7 +89,7 @@
      }
      let _arrField = []     // 字段集
      console.log(this.props.param)
      if (this.props.param && this.props.param.arr_field) {
        _arrField = this.props.param.arr_field
      } else {
@@ -132,34 +132,21 @@
        }
      })
      let _data = null
      let _isCustomData = false
      if (this.props.param && this.props.param.data) {
        _data = this.props.param.data[0] || null
      }
      if ((config.setting.interType === 'inner' && config.setting.innerFunc) || (config.setting.interType === 'outer' && config.setting.interface)) {
        _isCustomData = true
        _data = null
      }
      this.setState({
        config: config,
        setting: config.setting,
        actions: config.action,
        isLinkMain: _isLinkMain,
        arr_field: _arrField,
        data: _data,
        data: config.setting.datatype === 'query' ? null : (this.props.param.data[0] || null),
        BIDs: {
          mainTable: (!_isCustomData && _data && _data[0] && _data[0][config.setting.primaryKey]) || '',
          mainTabledata: (!_isCustomData && _data && _data[0]) || ''
          mainTable: this.props.param.primaryId || '',
          mainTabledata: config.setting.datatype === 'query' ? '' : (this.props.param.data[0] || '')
        }
      }, () => {
        this.improveSelectOption(config.groups)
        if (_isCustomData) {
        if (config.setting.datatype === 'query') {
          this.loadmaindata()
        }
      })