king
2021-09-26 0f22c04237fbe746887feafafca36d5cf996d0e0
src/tabviews/custom/components/table/normal-table/index.jsx
@@ -56,7 +56,7 @@
   * 1、 initdata 为打印时使用的数据集
   */
  UNSAFE_componentWillMount () {
    const { data, initdata, BID } = this.props
    const { data, initdata, BID, BData } = this.props
    let _config = fromJS(this.props.config).toJS()
    let _cols = new Map()
    let _data = null
@@ -80,6 +80,7 @@
        item.key = index
        item.$$uuid = item[_config.setting.primaryKey] || ''
        item.$$BID = BID || ''
        item.$$BData = BData || ''
        item.$Index = index + 1 + ''
        return item
      })
@@ -124,6 +125,7 @@
    this.setState({
      BID: BID || '',
      BData: BData || '',
      title: _config.wrap.title,
      sync: _sync,
      data: _data,
@@ -521,7 +523,7 @@
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    const { sync, config, setting, BID } = this.state
    const { sync, config, setting, BID, BData } = this.state
    if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) {
      let _data = []
@@ -531,6 +533,7 @@
          item.key = index
          item.$$uuid = item[config.setting.primaryKey] || ''
          item.$$BID = BID || ''
          item.$$BData = BData || ''
          item.$Index = index + 1 + ''
          return item
        })
@@ -578,7 +581,7 @@
  }
  render() {
    const { BID, setting, searchlist, actions, config, columns, selectedData } = this.state
    const { BID, setting, searchlist, actions, config, columns, selectedData, BData } = this.state
    return (
      <div className="custom-normal-table" style={config.style}>
@@ -591,7 +594,7 @@
              BID={BID}
              setting={setting}
              actions={actions}
              BData={this.state.BData}
              BData={BData}
              columns={config.columns}
              selectedData={selectedData}
            />
@@ -620,7 +623,7 @@
            BID={BID}
            setting={setting}
            actions={actions}
            BData={this.state.BData}
            BData={BData}
            columns={config.columns}
            selectedData={selectedData}
          />