king
2023-06-23 50821207863ae07b0ab36a604fcbad200a055af9
src/tabviews/basetable/index.jsx
@@ -25,7 +25,6 @@
    param: PropTypes.any,        // 其他页面传递的参数
    Tab: PropTypes.string,       // 弹窗标签
    MenuID: PropTypes.string,    // 菜单Id
    MenuNo: PropTypes.string,    // 菜单参数
    MenuName: PropTypes.string,  // 菜单名称
    changeTemp: PropTypes.func
  }
@@ -51,7 +50,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { MenuID } = this.props
    const { MenuID, MenuName } = this.props
    let _param = {
      func: 'sPC_Get_LongParam',
@@ -67,6 +66,8 @@
        config = window.decodeURIComponent(window.atob(result.LongParam))
        config = config.replace(/@mywebsite@\//ig, window.GLOB.baseurl)
        config = JSON.parse(config)
        config.MenuID = MenuID
        config.MenuName = MenuName || config.MenuName
      } catch (e) {
        console.warn('Parse Failure')
        config = ''
@@ -156,7 +157,7 @@
        })
      }
      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, skip, param, MenuID)
      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, skip, param, MenuID, config.MenuName)
      let autoMatic = null
      if (config.autoMatic && config.autoMatic.enable === 'true') {
@@ -263,11 +264,11 @@
    }
  }
  filterComponent = (components, roleId, permAction, skip, urlparam, pageId) => {
  filterComponent = (components, roleId, permAction, skip, urlparam, pageId, MenuName) => {
    return components.filter(item => {
      item.$pageId = pageId
      item.$menuname = (this.props.MenuName || '') + '-' + (item.name || '主表')
      item.$menuname = (MenuName || '') + '-' + (item.name || '主表')
      if (item.type === 'tabs') {
        item.subtabs = item.subtabs.filter(tab => {
@@ -286,13 +287,13 @@
          if (tab.permission !== 'true') { // 权限未开启不做权限控制
            skip = true
          }
          tab.components = this.filterComponent(tab.components, roleId, permAction, skip, urlparam, pageId)
          tab.components = this.filterComponent(tab.components, roleId, permAction, skip, urlparam, pageId, MenuName)
          return tab
        })
        return true
      } else {
        item.name = (this.props.MenuName || '')
        item.name = (MenuName || '')
      }
      // 搜索条件初始化