king
2020-03-11 2d1ecb2628680c31ed075261b40d6f16ca6363dd
src/tabviews/formtab/index.jsx
@@ -568,11 +568,42 @@
    return this.formGroupRef.handleConfirm()
  }
  reloadview = () => {
    this.setState({
      loadingview: true,
      viewlost: false,
      lostmsg: '',
      config: {},
      groups: null,
      actions: null,
      arr_field: '',
      setting: null,
      data: null,
      configMap: {},
      BIDs: {},
      setsingle: false,
      pickup: false,
      popData: false,
      visible: false,
      primaryId: null,
      refreshtabs: null
    }, () => {
      this.loadconfig()
    })
  }
  UNSAFE_componentWillMount () {
    // 组件加载时,获取菜单数据
    this.loadconfig()
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (nextProps.refreshTab && nextProps.refreshTab.MenuID === this.props.MenuID) {
      this.reloadview()
      this.props.refreshTabView('')
    }
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }