king
2020-03-16 8eb9303af35b6bee86daaa9ff478b623516fc183
src/tabviews/commontable/index.jsx
@@ -9,19 +9,21 @@
import zhCN from '@/locales/zh-CN/main.js'
import enUS from '@/locales/en-US/main.js'
import Utils from '@/utils/utils.js'
import asyncComponent from '@/utils/asyncLoadComponent'
import asyncComponent from '@/utils/asyncComponent'
import asyncLoadComponent from '@/utils/asyncLoadComponent'
import {refreshTabView, modifyTabview} from '@/store/action'
import MainTable from './mainTable'
import VerifyCard from '@/tabviews/tableshare/verifycard'
import MainAction from '@/tabviews/tableshare/actionList'
import MainSearch from '@/tabviews/tableshare/topSearch'
import SubTable from '@/tabviews/subtable'
import NotFount from '@/components/404'
import './index.scss'
const SubTabTable = asyncComponent(() => import('@/tabviews/subtabtable'))
const FormTab = asyncComponent(() => import('@/tabviews/formtab'))
const MainAction = asyncComponent(() => import('@/tabviews/tableshare/actionList'))
const SubTable = asyncLoadComponent(() => import('@/tabviews/subtable'))
const SubTabTable = asyncLoadComponent(() => import('@/tabviews/subtabtable'))
const FormTab = asyncLoadComponent(() => import('@/tabviews/formtab'))
const { TabPane } = Tabs
const { TreeNode } = Tree
const { Paragraph } = Typography
@@ -89,11 +91,13 @@
        config = ''
      }
      
      try { // 配置信息解析
        userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser)))
      } catch (e) {
        console.warn('Parse Failure')
        userConfig = ''
      if (result.LongParamUser) {
        try { // 配置信息解析
          userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser)))
        } catch (e) {
          console.warn('Parse Failure')
          userConfig = ''
        }
      }
      // 页面配置解析错误时提示
@@ -117,10 +121,11 @@
      // 权限过滤
      config.action = config.action.filter(item => permAction[item.uuid])
      // config.tabgroups.forEach(group => {
      //   if (!config[group]) return
      //   config[group] = config[group].filter(tab => permAction[tab.uuid])
      // })
      config.tabgroups.forEach(group => {
        if (!config[group]) return
        config[group] = config[group].filter(tab => permAction[tab.linkTab])
      })
      if (userConfig) {
        config.setting = {...config.setting, ...userConfig.setting}
@@ -941,22 +946,24 @@
            /> : null
          }
          {actions && setting.onload !== 'false' ?
            <MainAction
              ref="mainButton"
              BID=""
              type="main"
              menuType="main"
              setting={setting}
              actions={actions}
              dict={this.state.dict}
              MenuID={this.props.MenuID}
              logcolumns={this.state.logcolumns}
              ContainerId={this.state.ContainerId}
              refreshdata={this.refreshbyaction}
              triggerPopview={this.triggerPopview}
              getexceloutparam={this.getexceloutparam}
              gettableselected={this.gettableselected}
            /> : null
            <div style={{minHeight: '45px'}}>
              <MainAction
                ref="mainButton"
                BID=""
                type="main"
                menuType="main"
                setting={setting}
                actions={actions}
                dict={this.state.dict}
                MenuID={this.props.MenuID}
                logcolumns={this.state.logcolumns}
                ContainerId={this.state.ContainerId}
                refreshdata={this.refreshbyaction}
                triggerPopview={this.triggerPopview}
                getexceloutparam={this.getexceloutparam}
                gettableselected={this.gettableselected}
              />
            </div> : null
          }
          {columns && setting.onload !== 'false' ?
            <div className="main-table-box">