king
2019-12-24 a859b8d276dcdc0a9a806498f4a6af845858e3a9
src/tabviews/subtable/index.jsx
@@ -15,7 +15,8 @@
export default class NormalTable extends Component {
  static propTpyes = {
    BID: PropTypes.string,       // 上级数据ID
    Tab: PropTypes.object,       // 标签信息
    BIDs: PropTypes.string,       // 上级数据ID
    MenuID: PropTypes.string,    // 菜单Id
    SupMenuID: PropTypes.string  // 上级菜单Id
  }
@@ -31,7 +32,7 @@
    columns: null,
    arr_field: '',
    setting: null,
    data: null,
    data: [],
    total: 0,
    loading: false,
    pageIndex: 1,
@@ -40,6 +41,12 @@
    orderType: 'asc',
    search: '',
    configMap: {}
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (this.props.Tab.supMenu && !is(fromJS(this.props.BIDs[this.props.Tab.supMenu]), fromJS(nextProps.BIDs[this.props.Tab.supMenu]))) {
      this.loadmaindata()
    }
  }
  /**
@@ -63,15 +70,9 @@
      // 页面配置解析错误时提示
      if (!config) {
        // notification.warning({
        //   top: 92,
        //   message: this.state.dict['main.page.settingerror'],
        //   duration: 10
        // })
        this.setState({
          loadingview: false,
          viewlost: true
          // lostmsg: this.state.dict['main.page.settingerror']
        })
        return
      }
@@ -303,7 +304,8 @@
    let param = {
      func: 'sPC_Get_TableData',
      obj_name: 'data',
      arr_field: arr_field
      arr_field: arr_field,
      BID: this.props.BIDs[this.props.Tab.supMenu] || ''
    }
    let orderBy = orderColumn ? (orderColumn + ' ' + orderType) : setting.order
@@ -488,7 +490,7 @@
          <SubAction
            ref="subButton"
            MenuID={this.props.MenuID}
            BID={this.props.BID}
            BID={this.props.BIDs[this.props.Tab.supMenu] || ''}
            setting={setting}
            refreshdata={this.refreshbyaction}
            gettableselected={this.gettableselected}