king
2020-06-23 c83a50317baeba1a4771e4d802eee029ed2b7e31
src/tabviews/subtable/index.jsx
@@ -61,7 +61,7 @@
    pageIndex: 1,         // 页码
    pageSize: 10,         // 每页数据条数
    orderBy: '',          // 排序
    search: '',           // 搜索条件数组,使用时需分场景处理
    search: [],           // 搜索条件数组,使用时需分场景处理
    pickup: false,        // 子表数据隐藏显示切换
    triggerBtn: null,     // 按钮触发
    chartId: ''           // 展开图表ID
@@ -77,7 +77,9 @@
        selectedData: [],
        resetTable: !this.state.resetTable,
      }, () => {
        this.loadmaindata(nextProps.BID, 'refresh')
        if (this.state.setting) {
          this.loadmaindata(nextProps.BID, 'refresh')
        }
      })
    } else if (this.state.config && nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) {
      this.reloadtable()
@@ -90,9 +92,11 @@
        triggerBtn: trigger
      })
    } else if (!this.props.Tab.supMenu && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
      this.setState({}, () => {
        this.loadmaindata()
      })
      if (this.state.setting) {
        this.setState({}, () => {
          this.loadmaindata()
        })
      }
    }
  }
@@ -263,8 +267,9 @@
      config.columns.forEach(col => {
        if (col.field) {
          _arrField.push(col.field)
          _logcolumns.push(col)
          col.nameField && _arrField.push(col.nameField) // 链接名字段
        }
        if (col.type === 'colspan' && col.sublist) { // 筛选隐藏列
          _hideCol = _hideCol.concat(col.sublist)
@@ -778,7 +783,7 @@
  reloadview = () => {
    this.setState({ loadingview: true, viewlost: false, lostmsg: '', config: null, searchlist: null, actions: null,
      columns: null, arr_field: '', setting: null, data: null, total: 0, loading: false, pageIndex: 1, pageSize: 10,
      orderBy: '', search: '', triggerBtn: null
      orderBy: '', search: [], triggerBtn: null
    }, () => {
      this.loadconfig()
    })