king
2020-06-28 48a18736c461ad730bd264b0ac7b40b68a0e33a1
src/components/tabview/index.jsx
@@ -18,20 +18,22 @@
const Home = asyncComponent(() => import('@/tabviews/home'))
const CommonTable = asyncComponent(() => import('@/tabviews/commontable'))
const VerupTable = asyncComponent(() => import('@/tabviews/verup'))
const ManageTable = asyncComponent(() => import('@/tabviews/managetable'))
const TreePage = asyncComponent(() => import('@/tabviews/treepage'))
const VerupTable = asyncComponent(() => import('@/tabviews/verupmanage'))
const ScriptTable = asyncComponent(() => import('@/tabviews/scriptmanage'))
const TabManage = asyncComponent(() => import('@/tabviews/tabmanage'))
const Iframe = asyncComponent(() => import('@/tabviews/iframe'))
const DataManage = asyncComponent(() => import('@/tabviews/datamanage'))
const RoleManage = asyncComponent(() => import('@/tabviews/rolemanage'))
const TabForm = asyncComponent(() => import('@/tabviews/tabform'))
const FormTab = asyncComponent(() => import('@/tabviews/formtab'))
let service = window.GLOB.service ? (/\/$/.test(window.GLOB.service) ? window.GLOB.service : window.GLOB.service + '/') : ''
let service = ''
if (process.env.NODE_ENV === 'production') {
  service = document.location.origin + '/' + service + 'zh-CN/'
  service = document.location.origin + '/' + window.GLOB.service + 'zh-CN/'
} else {
  service = 'http://qingqiumarket.cn/' + service + 'zh-CN/'
  service = window.GLOB.location + window.GLOB.service + 'zh-CN/'
}
class Header extends Component {
@@ -43,8 +45,8 @@
  state = {
    tabviews: null, // 标签集
    iFrameHeight: 0,
    dict: (!sessionStorage.getItem('lang') || sessionStorage.getItem('lang') === 'zh-CN') ? mzhCN : menUS,
    locale: (!sessionStorage.getItem('lang') || sessionStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS
    dict: localStorage.getItem('lang') !== 'en-US' ? mzhCN : menUS,
    locale: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
  }
  handleTabview = (e, menu) => {
@@ -98,12 +100,16 @@
    // 根据tab页中菜单信息,选择所需的组件
    if (view.type === 'Home') {
      return (<Home MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>)
    } else if (view.type === 'CommonTable') {
      return (<CommonTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>)
    } else if (view.type === 'CommonTable' || view.type === 'ManageTable') {
      return (<CommonTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param}/>)
    } else if (view.type === 'TreePage') {
      return (<TreePage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>)
    } else if (view.type === 'VerupTable') {
      return (<VerupTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>)
    } else if (view.type === 'ManageTable') {
      return (<ManageTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>)
    } else if (view.type === 'ScriptTable') {
      return (<ScriptTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>)
    } else if (view.type === 'TabManage') {
      return (<TabManage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>)
    } else if (view.type === 'DataManage') {
      return (<DataManage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>)
    } else if (view.type === 'RolePermission') {
@@ -204,7 +210,7 @@
                      className="test"
                      tab={
                        <span className="tab-control">
                          {['CommonTable', 'FormTab'].includes(view.type) ?
                          {['CommonTable', 'FormTab', 'TreePage'].includes(view.type) ?
                            <Icon type="redo" onClick={(e) => {this.refreshTabview(e, view)}}/> : null
                          }
                          <span className="tab-name" onClick={(e) => {this.changeTab(e, view)}}>
@@ -218,7 +224,7 @@
                      key={view.MenuID}
                    >
                      {this.selectcomponent(view)}
                      {view.type !== 'CommonTable' && view.type !== 'ManageTable' ?
                      {!['CommonTable', 'TreePage', 'ManageTable'].includes(view.type) ?
                        <Button
                          icon="copy"
                          shape="circle"