king
2023-03-04 7ec82053855cf041ab2357a3b8c1684fcc6cc061
src/tabviews/subtabtable/index.jsx
@@ -1,8 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Spin} from 'antd'
import { notification, Spin, Modal } from 'antd'
import Api from '@/api'
import zhCN from '@/locales/zh-CN/main.js'
@@ -61,7 +60,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction, Tab } = this.props
    const { Tab } = this.props
    let param = {
      func: 'sPC_Get_LongParam',
@@ -128,11 +127,7 @@
      }
      // 权限过滤
      if (!window.GLOB.mkHS) {
        config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid])
      } else {
        config.action = config.action.filter(item => item.hidden !== 'true')
      }
      config.action = config.action.filter(item => item.hidden !== 'true')
      config.search = Utils.initSearchVal(config.search)
@@ -216,6 +211,15 @@
      config.action.forEach(item => {
        item.logLabel = Tab.label + '-' + item.label // 用于sPC_TableData_InUpDe记录操作按钮
        item.$menuId = this.props.MenuID
        item.$old = true
        if (item.controlField) {
          if (/,/ig.test(item.controlVal)) {
            item.controlVals = item.controlVal.split(',')
          } else {
            item.controlVals = [(item.controlVal || '')]
          }
        }
        if (item.position === 'toolbar') {
          item.$toolbtn = true
@@ -601,11 +605,17 @@
      this.setState({
        loading: false
      })
      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
        })
      }
    }
  }
@@ -891,14 +901,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    permAction: state.permAction
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(SubTabModalTable)
export default SubTabModalTable