king
2024-06-21 2bccb9ec7bdefe23292a22bc153463cfa1479a49
src/tabviews/commontable/index.jsx
@@ -1,14 +1,10 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Spin, Tabs, Switch, Row, Col } from 'antd'
import { notification, Spin, Tabs, Switch, Row, Col, Modal } from 'antd'
import Api from '@/api'
import zhCN from '@/locales/zh-CN/main.js'
import enUS from '@/locales/en-US/main.js'
import Utils from '@/utils/utils.js'
import options from '@/store/options.js'
import UtilsDM from '@/utils/utils-datamanage.js'
import { updateCommonTable } from '@/utils/utils-update.js'
import asyncComponent from '@/utils/asyncComponent'
@@ -26,8 +22,6 @@
const SubTable = asyncSpinComponent(() => import('@/tabviews/subtable'))
const CardComponent = asyncSpinComponent(() => import('@/tabviews/zshare/cardcomponent'))
const ChartComponent = asyncSpinComponent(() => import('@/tabviews/zshare/chartcomponent'))
const PagemsgComponent = asyncComponent(() => import('@/tabviews/zshare/pageMessage'))
const AutoMatic = asyncComponent(() => import('@/tabviews/zshare/automatic'))
const DebugTable = asyncComponent(() => import('@/tabviews/debugtable'))
const { TabPane } = Tabs
@@ -37,11 +31,11 @@
    param: PropTypes.any,        // 其他页面传递的搜索条件等参数
    MenuID: PropTypes.string,    // 菜单Id
    MenuNo: PropTypes.string,    // 菜单参数
    MenuName: PropTypes.string   // 菜单名称
    MenuName: PropTypes.string,  // 菜单名称
    changeTemp: PropTypes.func
  }
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    ContainerId: Utils.getuuid(), // 菜单外层html Id
    BID: null,            // 页面跳转时携带ID
    loadingview: true,    // 页面加载中
@@ -49,10 +43,8 @@
    lostmsg: '',          // 页面丢失时的提示信息
    config: {},           // 页面配置信息,包括按钮、搜索、显示列、标签等
    shortcuts: null,      // 快捷键
    searchlist: null,     // 搜索条件
    actions: null,        // 按钮集
    columns: null,        // 显示列
    arr_field: '',        // 查询字段集
    setting: null,        // 页面全局设置:数据源、按钮及显示列固定、主键等
    data: [],             // 列表数据集
    selectedData: [],     // 已选表格数据
@@ -68,16 +60,15 @@
    statFields: [],       // 合计字段
    statFValue: [],       // 合计值
    absFields: [],        // 绝对值字段
    loadCustomApi: true,  // 加载外部资源
    hasReqFields: false,
    autoMatic: null
    autoMatic: null,
    visible: false
  }
  /**
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction, permMenus, param, MenuName, MenuID } = this.props
    const { param, MenuName, MenuID } = this.props
    let _param = {
      func: 'sPC_Get_LongParam',
@@ -91,17 +82,38 @@
      try { // 配置信息解析
        config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
        config.MenuID = MenuID
        config.MenuName = MenuName
        config.setting.MenuName = MenuName
        config.setting.$name = MenuName
      } catch (e) {
        console.warn('Parse Failure')
        config = ''
      }
      // 页面配置解析错误时提示
      if (!config) {
        this.setState({
          loadingview: false,
          viewlost: true
        })
        return
      }
      // 页面未启用时,显示未启用页面
      if (!config.enabled) {
        this.setState({
          loadingview: false,
          viewlost: true,
          lostmsg: '抱歉,您访问的页面未启用,请联系管理员。'
        })
        return
      }
      // 模板错误
      if (config.Template === 'BaseTable' || config.Template === 'CustomPage') {
        this.props.changeTemp(MenuID, config.Template)
        return
      }
      
      // HS不使用自定义设置
      if (result.LongParamUser && !window.GLOB.mkHS) {
      if (result.LongParamUser) {
        try { // 配置信息解析
          let userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser)))
          if (userConfig && !userConfig.version) {
@@ -126,8 +138,8 @@
              })
            })
          } else if (userConfig) {
            shortcuts = userConfig.action
            userConfig.printers.forEach(item => {
            shortcuts = userConfig.action || []
            userConfig.printers && userConfig.printers.forEach(item => {
              window.GLOB.UserCacheMap.set(item.parentId + item.uuid, item)
            })
          }
@@ -136,37 +148,27 @@
        }
      }
      // 页面配置解析错误时提示
      if (!config) {
        this.setState({
          loadingview: false,
          viewlost: true
        })
        return
      }
      // 页面未启用时,显示未启用页面
      if (!config.enabled) {
        this.setState({
          loadingview: false,
          viewlost: true,
          lostmsg: this.state.dict['main.view.unenabled']
        })
        return
      }
      // 信息初始化赋值
      config.MenuID = MenuID
      config.MenuName = MenuName
      config.setting.MenuName = MenuName
      config.setting.$name = MenuName
      // 版本兼容
      config = updateCommonTable(config)
      // 权限过滤
      if (!window.GLOB.mkHS) {
        config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid])
        config.action = config.action.filter(item => item.hidden !== 'true' && window.GLOB.mkActions[item.uuid])
        config.tabgroups.forEach(group => {
          group.sublist = group.sublist.filter(tab => {
            if (tab.supMenu === 'mainTable') {
              tab.supMenu = MenuID
            }
            return permAction[tab.linkTab]
            tab.ContainerId = this.state.ContainerId
            // return window.GLOB.mkActions[tab.linkTab]
            return tab
          })
        })
      } else {
@@ -176,6 +178,8 @@
            if (tab.supMenu === 'mainTable') {
              tab.supMenu = MenuID
            }
            tab.ContainerId = this.state.ContainerId
            return tab
          })
        })
@@ -201,19 +205,13 @@
        chartId = config.charts[0] ? config.charts[0].uuid : ''
      }
      config.search = Utils.initSearchVal(config.search)
      Utils.initSearchVal(config)
      // 字段透视及必填标志
      let hasReqFields = false
      config.search = config.search.map(item => {
        if (['text', 'select', 'link'].includes(item.type) && param && param.$searchkey === item.field) {
        if (['text', 'select', 'link', 'checkcard'].includes(item.type) && param && param.$searchkey === item.field.toLowerCase()) {
          item.initval = param.$searchval
        }
        if (item.required) {
          hasReqFields = true
        }
        return item
      })
@@ -228,6 +226,7 @@
      // 标记主页面,用于按钮固定及表单挂载设置
      config.setting.tabType = 'main'
      config.setting.ContainerId = this.state.ContainerId
      // 数据源信息预处理
      config.setting.laypage = config.setting.laypage !== 'false'     // 是否分页,转为boolean 统一格式
@@ -235,7 +234,7 @@
      config.setting.customScript = ''                                // 自定义脚本
      config.setting.dataresource = config.setting.dataresource || ''
      if (config.setting.interType === 'system' || (config.setting.interType === 'custom' && config.setting.requestMode === 'system')) {
      if (config.setting.interType === 'system') {
        if (config.setting.scripts && config.setting.scripts.length > 0) {
          let _customScript = ''
          config.setting.scripts.forEach(item => {
@@ -254,10 +253,8 @@
        }
  
        if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
          config.setting.dataresource = config.setting.dataresource.replace(/\$@/ig, '/*')
          config.setting.dataresource = config.setting.dataresource.replace(/@\$/ig, '*/')
          config.setting.customScript = config.setting.customScript.replace(/\$@/ig, '/*')
          config.setting.customScript = config.setting.customScript.replace(/@\$/ig, '*/')
          config.setting.dataresource = config.setting.dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/')
          config.setting.customScript = config.setting.customScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/')
        } else {
          config.setting.dataresource = config.setting.dataresource.replace(/@\$|\$@/ig, '')
          config.setting.customScript = config.setting.customScript.replace(/@\$|\$@/ig, '')
@@ -265,11 +262,6 @@
        let userName = sessionStorage.getItem('User_Name') || ''
        let fullName = sessionStorage.getItem('Full_Name') || ''
        if (sessionStorage.getItem('isEditState') === 'true') {
          userName = sessionStorage.getItem('CloudUserName') || ''
          fullName = sessionStorage.getItem('CloudFullName') || ''
        }
        let regs = [
          { reg: /@userName@/ig, value: `'${userName}'` },
@@ -290,6 +282,8 @@
            config.setting.customScript = config.setting.customScript.replace(reg, val)
          })
        }
      } else {
        config.setting.dataresource = ''
      }
      let _arrField = []     // 字段集
@@ -301,10 +295,27 @@
      let _actions = []      // 工具栏按钮
      let _operations = []   // 操作列按钮(存在时)
      let colors = { primary: '#1890ff', yellow: '#c49f47', orange: 'orange', danger: '#ff4d4f', green: '#26C281', dgreen: '#32c5d2', purple: '#8E44AD', cyan: '#13c2c2', gray: '#E7E7EF', default: 'rgba(0, 0, 0, 0.65)' }
      config.action.forEach(item => {
        item.logLabel = MenuName + '-' + item.label // 用于sPC_TableData_InUpDe记录操作按钮
        item.$menuId = this.props.MenuID
        item.$old = true
        item.ContainerId = this.state.ContainerId
        if (item.OpenType === 'excelOut') { // 导出
          item.$menuName = MenuName
        }
        if (item.verify && item.verify.invalid === 'true') {
          if (item.sqlType === 'insert') {
            item.verify.invalid = 'false'
          } else if (item.Ot === 'notRequired') {
            item.verify.invalid = 'false'
          } else if (item.intertype !== 'system' && item.procMode !== 'system') {
            item.verify.invalid = 'false'
          }
        }
        if (item.OpenType === 'funcbutton' && item.funcType === 'print' && item.verify) { // 打印机设置
          let _item = window.GLOB.UserCacheMap.get(this.props.MenuID + item.uuid)
@@ -321,11 +332,34 @@
            }
          }
        }
        if (item.controlField) {
          if (/,/ig.test(item.controlVal)) {
            item.controlVals = item.controlVal.split(',')
          } else {
            item.controlVals = [(item.controlVal || '')]
          }
        }
        item.show = 'button'
        let _c = item.class ? item.class.replace('border-', '') : ''
        let color = colors[_c] || '#1890ff'
        if (item.position === 'toolbar') {
          item.$toolbtn = true
          if (item.class === 'default') {
            item.style = {color: 'rgba(0, 0, 0, 0.65)', backgroundColor: '#fff', borderColor: '#d9d9d9', marginRight: '15px'}
          } else if (item.class.indexOf('border') > -1) {
            item.style = {color: color, backgroundColor: '#fff', borderColor: color, marginRight: '15px'}
          } else {
            item.style = {color: item.class === 'gray' ? 'rgba(0, 0, 0, 0.65)' : '#fff', backgroundColor: color, borderColor: color, marginRight: '15px'}
          }
          _actions.push(item)
        } else if (item.position === 'grid') {
          item.style = {color: color, backgroundColor: 'transparent', borderColor: 'transparent'}
          _operations.push(item)
        }
      })
@@ -337,7 +371,7 @@
          if (col.linkmenu && col.linkmenu.length > 0) {
            let menu_id = col.linkmenu.slice(-1)[0]
            col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || ''
            col.linkThdMenu = window.GLOB.mkThdMenus.get(menu_id) || ''
          } else {
            col.linkThdMenu = ''
          }
@@ -425,6 +459,21 @@
        }
      }
      config.type = 'table'
      config.wrap = {
        show: config.setting.show || '',
        float: config.setting.float || '',
        advanceType: config.setting.advanceType || '',
        advanceWidth: config.setting.advanceWidth || '',
        drawerPlacement: config.setting.drawerPlacement || '',
        searchRatio: config.setting.searchRatio || '',
        searchLwidth: config.setting.searchLwidth,
        borderRadius: config.setting.borderRadius,
        resetContrl: config.setting.resetContrl,
      }
      config.setting.arr_field = _arrField.join(',')
      this.setState({
        pageSize: config.setting.pageSize || 10,
        loadingview: false,
@@ -433,15 +482,12 @@
        chartId,
        config,
        statFields,
        shortcuts,
        shortcuts: shortcuts.length > 0 ? shortcuts : null,
        setting: config.setting,
        searchlist: config.search,
        actions: _actions,
        columns: _columns,
        arr_field: _arrField.join(','),
        BID: param && param.$BID ? param.$BID : '',
        search: Utils.initMainSearch(config.search),
        hasReqFields
        search: Utils.initMainSearch(config.search)
      }, () => {
        if (config.setting.onload !== 'false') { // 初始化可加载
          this.loadData()
@@ -464,11 +510,6 @@
  setShortcut = () => {
    const { shortcuts } = this.state
    if (!shortcuts || shortcuts.length === 0) {
      document.onkeydown = () => {}
      return
    }
    document.onkeydown = (event) => {
      let e = event || window.event
      let keyCode = e.keyCode || e.which || e.charCode
@@ -485,6 +526,15 @@
      if (!preKey || !keyCode) return
      let _shortcut = `${preKey}+${keyCode}`
      if (window.GLOB.breakpoint && _shortcut === 'ctrl+67') {
        window.GLOB.breakpoint = false
        sessionStorage.removeItem('breakpoint')
        MKEmitter.emit('debugChange')
      }
      if (!shortcuts) return
      shortcuts.some(item => {
        if (item.$shortcut === _shortcut) {
@@ -504,14 +554,14 @@
  loadData = (id) => {
    const { MenuID } = this.props
    const { setting, search, loadCustomApi, hasReqFields, ContainerId } = this.state
    const { setting, search, config, ContainerId } = this.state
    this.setState({
      selectedData: []
    })
    MKEmitter.emit('changeTableLine', ContainerId, MenuID, '', '')
    if (hasReqFields) {
    if (config.$s_req) {
      let requireFields = search.filter(item => item.required && item.value === '')
      if (requireFields.length > 0) {
@@ -522,200 +572,32 @@
      }
    }
    if (window.GLOB.systemType === 'production' && setting.interType === 'custom' && !setting.proInterface) {
    if (setting.interType === 'custom') {
      notification.warning({
        top: 92,
        message: '未设置正式系统地址!',
        message: '系统不在支持自定义接口!',
        duration: 3
      })
      return
    }
    if (setting.interType === 'custom' && loadCustomApi) {
      if (setting.execTime === 'once') {
        this.setState({loadCustomApi: false})
      }
      this.loadOutResource()
      if (setting.execType === 'async') {
        this.loadmaindata(id)
      }
    } else {
      this.loadmaindata(id)
    }
  }
  loadOutResource = () => {
    const { setting, search, BID } = this.state
    let param = UtilsDM.getPrevQueryParams(setting, search, BID)
    if (setting.execType === 'sync') {
      this.setState({
        loading: true
      })
    }
    Api.genericInterface(param).then(res => {
      if (res.status) {
        if (res.mk_ex_invoke === 'false' || res.mk_ex_invoke === false) {
          this.loadmaindata()
        } else {
          this.customOuterRequest(res)
        }
      } else {
        this.setState({
          loading: false
        })
        notification.error({
          top: 92,
          message: res.message,
          duration: 10
        })
      }
    }, () => {
      this.setState({
        loading: false
      })
    })
  }
  customOuterRequest = (result) => {
    const { setting } = this.state
    let url = ''
    if (window.GLOB.systemType === 'production') {
      url = setting.proInterface
    } else {
      url = setting.interface
    }
    let mkey = result.mk_api_key || ''
    delete result.mk_ex_invoke // 是否继续执行
    delete result.status
    delete result.message
    delete result.ErrCode
    delete result.ErrMesg
    delete result.mk_api_key   // 当前请求的key值,用于回调
    let param = {}
    Object.keys(result).forEach(key => {
      key = key.replace(/^mk_/ig, '')
      param[key] = result[key]
    })
    Api.directRequest(url, setting.method, param, setting.cross).then(res => {
      if (typeof(res) !== 'object') {
        let error = '未知的返回结果!'
        if (typeof(res) === 'string') {
          error = res.replace(/'/ig, '"')
        }
        let _result = {
          mk_api_key: mkey,
          $ErrCode: 'E',
          $ErrMesg: error
        }
        this.customCallbackRequest(_result)
      } else {
        if (Array.isArray(res)) {
          res = { data: res }
        }
        res.mk_api_key = mkey
        this.customCallbackRequest(res)
      }
    }, (e) => {
      let _result = {
        mk_api_key: mkey,
        $ErrCode: 'E',
        $ErrMesg: e && e.statusText ? e.statusText : ''
      }
      this.customCallbackRequest(_result)
    })
  }
  customCallbackRequest = (result) => {
    const { setting, BID } = this.state
    let errSql = ''
    if (result.$ErrCode === 'E') {
      errSql = `
        set @ErrorCode='E'
        set @retmsg='${result.$ErrMesg}'
      `
      delete result.$ErrCode
      delete result.$ErrMesg
    }
    let lines = UtilsDM.getCallBackSql(setting, result)
    let param = {}
    if (setting.callbackType === 'script') { // 使用自定义脚本
      let sql = lines.map(item => (`
        ${item.insert}
        ${item.selects.join(` union all
        `)}
      `))
      sql = sql.join('')
      param = UtilsDM.getCallBackQueryParams(setting, sql, errSql, BID)
    } else {
      param.func = 's_ex_result_back'
      param.s_ex_result = lines.map((item, index) => ({
        MenuID: this.state.config.MenuID,
        MenuName: this.state.config.MenuName,
        TableName: item.table,
        LongText: window.btoa(window.encodeURIComponent(`${item.insert}  ${item.selects.join(` union all `)}`)),
        Sort: index + 1
      }))
      if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) {
        let sql = lines.map(item => (`
          ${item.insert}
          ${item.selects.join(` union all
          `)}
        `))
        sql = sql.join('')
        console.info(sql.replace(/\n\s{10}/ig, '\n'))
      }
    }
    Api.genericInterface(param).then(res => {
      if (res.status) {
        this.loadmaindata()
      } else {
        this.setState({
          loading: false
        })
        notification.error({
          top: 92,
          message: res.message,
          duration: 10
        })
      }
    }, () => {
      this.setState({
        loading: false
      })
    })
    this.loadmaindata(id)
  }
  /**
   * @description 主表数据加载
   */ 
  async loadmaindata (id) {
    const { setting, arr_field, search, orderBy, BID, pageIndex, pageSize, absFields, autoMatic } = this.state
    const { setting, search, orderBy, BID, pageIndex, pageSize, absFields, autoMatic } = this.state
    this.setState({
      loading: true
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID)
    let param = UtilsDM.getQueryDataParams(setting, search, _orderBy, pageIndex, pageSize, BID)
    delete param.s_version_up
    let result = await Api.genericInterface(param)
@@ -754,7 +636,7 @@
          item.$Index = start + index + ''
          if (setting.controlField) {
            if (setting.controlVal.includes(item[setting.controlField])) {
            if (setting.controlVal.includes(item[setting.controlField] + '')) {
              item.$disabled = true
            }
          }
@@ -780,11 +662,18 @@
      if (autoMatic) {
        MKEmitter.emit('autoMaticError', this.props.MenuID)
      }
      notification.error({
        top: 92,
        message: result.message,
        duration: 10
      })
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
    }
  }
@@ -792,14 +681,16 @@
   * @description 获取单行数据
   */ 
  async loadmainLinedata (id) {
    const { setting, arr_field, search, orderBy, BID, pageIndex, pageSize, absFields } = this.state
    const { setting, search, orderBy, BID, pageIndex, pageSize, absFields } = this.state
    this.setState({
      loading: true
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID, id)
    let param = UtilsDM.getQueryDataParams(setting, search, _orderBy, pageIndex, pageSize, BID, id)
    delete param.s_version_up
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -864,7 +755,7 @@
  getStatFieldsValue = () => {
    const { setting, search, BID, orderBy, statFields } = this.state
    if (statFields.length === 0 || !(setting.interType === 'system' || (setting.interType === 'custom' && setting.requestMode === 'system')) || !setting.dataresource) return
    if (statFields.length === 0 || setting.interType !== 'system' || !setting.dataresource) return
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getStatQueryDataParams(setting, statFields, search, _orderBy, BID)
@@ -981,7 +872,7 @@
  reloadview = () => {
    this.setState({ loadingview: true, viewlost: false, config: {}, setting: null,
      data: null, total: 0, loading: false, pageIndex: 1, shortcuts: null,
      pageSize: 10, orderBy: '', search: '', BIDs: {}, pickup: false, searchlist: null
      pageSize: 10, orderBy: '', search: '', BIDs: {}, pickup: false
    }, () => {
      this.loadconfig()
    })
@@ -991,16 +882,14 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { MenuName, MenuID } = this.props
    const { arr_field, orderBy, search, setting} = this.state
    const { MenuID } = this.props
    const { orderBy, search, setting } = this.state
    if (MenuID !== menuId) return
    callback({
      arr_field: arr_field,
      orderBy: orderBy || setting.order,
      search: search,
      menuName: MenuName
      search: search
    })
  }
@@ -1091,6 +980,10 @@
    }
  }
  debugChange = () => {
    this.setState({visible: !this.state.visible})
  }
  UNSAFE_componentWillMount () {
    // 组件加载时,获取菜单数据
    this.loadconfig()
@@ -1102,6 +995,7 @@
  componentDidMount () {
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('debugChange', this.debugChange)
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.addListener('changeTableLine', this.changeTableLine)
    MKEmitter.addListener('resetActiveMenu', this.resetActiveMenu)
@@ -1118,6 +1012,7 @@
    }
    document.onkeydown = () => {}
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('debugChange', this.debugChange)
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.removeListener('changeTableLine', this.changeTableLine)
    MKEmitter.removeListener('resetActiveMenu', this.resetActiveMenu)
@@ -1127,13 +1022,13 @@
  render() {
    const { MenuID } = this.props
    const { BID, setting, searchlist, pageSize, actions, columns, loadingview, viewlost, pickup, config, chartId, search, selectedData, shortcuts, autoMatic } = this.state
    const { BID, setting, pageSize, actions, columns, loadingview, viewlost, pickup, config, chartId, search, selectedData, shortcuts } = this.state
    return (
      <div className="commontable" id={this.state.ContainerId}>
        {loadingview ? <Spin size="large" /> : null}
        {searchlist && searchlist.length ?
          <MainSearch BID={BID} searchlist={searchlist} setting={setting} refreshdata={this.refreshbysearch}/> : null
        {config && config.search && config.search.length ?
          <MainSearch BID={BID} config={config} refreshdata={this.refreshbysearch}/> : null
        }
        {setting && config.charts ? <Row className="chart-view" gutter={16}>
          {/* 视图组 */}
@@ -1155,10 +1050,8 @@
                      setting={setting}
                      actions={actions}
                      columns={columns}
                      dict={this.state.dict}
                      MenuID={MenuID}
                      selectedData={selectedData}
                      ContainerId={this.state.ContainerId}
                    />
                  </div>
                  <div className="main-table-box">
@@ -1172,12 +1065,10 @@
                      setting={setting}
                      columns={columns}
                      pageSize={pageSize}
                      dict={this.state.dict}
                      data={this.state.data}
                      total={this.state.total}
                      loading={this.state.loading}
                      statFValue={this.state.statFValue}
                      ContainerId={this.state.ContainerId}
                      refreshdata={this.refreshbytable}
                      chgSelectData={this.changeSelectedData}
                    />
@@ -1196,7 +1087,6 @@
                    columns={columns}
                    data={this.state.data}
                    loading={this.state.loading}
                    ContainerId={this.state.ContainerId}
                  />
                </Col>
              )
@@ -1222,10 +1112,8 @@
              setting={setting}
              actions={actions}
              columns={columns}
              dict={this.state.dict}
              MenuID={MenuID}
              selectedData={selectedData}
              ContainerId={this.state.ContainerId}
            />
          </div>
          <div className="main-table-box">
@@ -1239,12 +1127,10 @@
              setting={setting}
              columns={columns}
              pageSize={pageSize}
              dict={this.state.dict}
              data={this.state.data}
              total={this.state.total}
              loading={this.state.loading}
              statFValue={this.state.statFValue}
              ContainerId={this.state.ContainerId}
              refreshdata={this.refreshbytable}
              chgSelectData={this.changeSelectedData}
            />
@@ -1265,7 +1151,6 @@
                    SupMenuID={MenuID}
                    MenuID={_tab.linkTab}
                    mainSearch={_tab.searchPass === 'true' ? search : null}
                    ContainerId={this.state.ContainerId}
                    BID={this.state.BIDs[_tab.supMenu] || ''}
                    BData={this.state.BIDs[_tab.supMenu + 'data'] || ''}
                  />
@@ -1275,24 +1160,11 @@
          </Tabs>))
        }
        {setting && window.GLOB.breakpoint ? <DebugTable /> : null}
        {!window.GLOB.mkHS && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null}
        {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null}
        {setting ? <SettingComponent config={config} shortcuts={shortcuts || []}/> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
      </div>
    )
  }
}
const mapStateToProps = (state) => {
  return {
    permAction: state.permAction,
    permMenus: state.permMenus
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
export default NormalTable