king
2021-09-16 d7ec8fbd65cd7225ce8d405a0ee0a1f166f44d7b
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -51,7 +51,7 @@
          try {
            originVal = parseFloat(originVal)
            contrastVal = parseFloat(contrastVal)
          } catch {
          } catch (e) {
            originVal = NaN
          }
  
@@ -62,7 +62,7 @@
          try {
            originVal = parseFloat(originVal)
            contrastVal = parseFloat(contrastVal)
          } catch {
          } catch (e) {
            originVal = NaN
          }
  
@@ -120,7 +120,7 @@
        try {
          originVal = parseFloat(originVal)
          contrastVal = parseFloat(contrastVal)
        } catch {
        } catch (e) {
          originVal = NaN
        }
@@ -131,7 +131,7 @@
        try {
          originVal = parseFloat(originVal)
          contrastVal = parseFloat(contrastVal)
        } catch {
        } catch (e) {
          originVal = NaN
        }
@@ -223,7 +223,7 @@
        if (isNaN(content)) {
          content = ''
        }
      } catch {
      } catch (e) {
        content = ''
      }
@@ -332,7 +332,7 @@
        
        try {
          _param = window.btoa(_quary)
        } catch {
        } catch (e) {
          _param = window.btoa(window.encodeURIComponent(_quary))
        }
        
@@ -500,6 +500,7 @@
  }
  componentDidMount () {
    MKEmitter.addListener('mkCheckTopLine', this.mkCheckTopLine)
    MKEmitter.addListener('mkCheckAll', this.mkCheckAll)
    MKEmitter.addListener('resetTable', this.resetTable)
  }
@@ -511,8 +512,23 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('mkCheckTopLine', this.mkCheckTopLine)
    MKEmitter.removeListener('mkCheckAll', this.mkCheckAll)
    MKEmitter.removeListener('resetTable', this.resetTable)
  }
  mkCheckTopLine = (menuId) => {
    const { MenuID, data, setting } = this.props
    if (MenuID !== menuId || !data || data.length === 0) return
    this.changedata(0)
    this.setState({ selectedRowKeys: [0], activeIndex: 0 })
    this.props.chgSelectData([data[0]])
    if (setting.$hasSyncModule) {
      MKEmitter.emit('syncBalconyData', MenuID, [data[0]], data.length === 1)
    }
  }
  mkCheckAll = (menuId, checked) => {
@@ -594,7 +610,7 @@
          _param.User_Name = sessionStorage.getItem('User_Name')
          _param.param = __param
          src = _url + window.btoa(window.encodeURIComponent(JSON.stringify(_param)))
        } catch {
        } catch (e) {
          console.warn('菜单参数解析错误!')
        }
      } else {
@@ -853,8 +869,10 @@
      _footer = statFValue.map(f => `${f.label}(合计):${f.value}`).join(';')
    }
    let height = setting.height || false
    return (
      <div className={`normal-custom-table ${setting.tableHeader || ''} ${setting.mode || ''}`} id={tableId}>
      <div className={`normal-custom-table ${setting.tableHeader || ''} ${height ? 'fixed-height' : ''} ${setting.mode || ''}`} id={tableId}>
        {(setting.tableType === 'radio' || setting.tableType === 'checkbox') && data && data.length > 0 ?
          <Switch title="收起" className="main-pickup" checkedChildren="开" unCheckedChildren="关" checked={pickup} onChange={this.pickupChange} /> : null
        }
@@ -867,7 +885,7 @@
          columns={this.state.columns}
          dataSource={_data}
          loading={this.props.loading}
          scroll={{ x: '100%', y: false }}
          scroll={{ x: '100%', y: height }}
          onRow={(record, index) => {
            return {
              lineMarks,