king
2022-07-22 0c439ced2c97905cb2b02f5f689a37b19369fb8a
src/tabviews/custom/components/table/normal-table/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Collapse } from 'antd'
@@ -25,7 +24,6 @@
    data: PropTypes.array,           // 统一查询数据
    config: PropTypes.object,        // 组件配置信息
    mainSearch: PropTypes.any,       // 外层搜索条件
    menuType: PropTypes.any,         // 菜单类型
  }
  state = {
@@ -210,7 +208,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType)
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -290,7 +288,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType, id)
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -373,7 +371,7 @@
    }
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getStatQueryDataParams(setting, config.statFields, searches, _orderBy, BID, this.props.menuType)
    let param = UtilsDM.getStatQueryDataParams(setting, config.statFields, searches, _orderBy, BID)
    Api.genericInterface(param).then(res => {
      if (res.status) {
@@ -635,7 +633,7 @@
        {config.wrap.collapse === 'true' ? <Collapse bordered={false} defaultActiveKey="1" expandIconPosition="right">
          <Panel forceRender={true} header={<NormalHeader config={config}/>} key="1">
            {config.search && config.search.length ?
              <MainSearch BID={BID} config={config} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null
              <MainSearch BID={BID} config={config} refreshdata={this.refreshbysearch}/> : null
            }
            <MainAction
              BID={BID}
@@ -664,7 +662,7 @@
        </Collapse> : <>
          <NormalHeader config={config}/>
          {config.search && config.search.length ?
            <MainSearch BID={BID} config={config} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null
            <MainSearch BID={BID} config={config} refreshdata={this.refreshbysearch}/> : null
          }
          <MainAction
            BID={BID}
@@ -695,14 +693,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menuType: state.editLevel
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
export default NormalTable