From 48a18736c461ad730bd264b0ac7b40b68a0e33a1 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 28 六月 2020 20:30:20 +0800 Subject: [PATCH] 2020-06-28 --- src/components/tabview/index.jsx | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/tabview/index.jsx b/src/components/tabview/index.jsx index 2637efe..b779de6 100644 --- a/src/components/tabview/index.jsx +++ b/src/components/tabview/index.jsx @@ -18,22 +18,22 @@ const Home = asyncComponent(() => import('@/tabviews/home')) const CommonTable = asyncComponent(() => import('@/tabviews/commontable')) +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 ManageTable = asyncComponent(() => import('@/tabviews/managetable')) 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 { @@ -45,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) => { @@ -100,16 +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') { + } 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 === '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 === 'ManageTable') { - return (<ManageTable 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') { @@ -210,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)}}> @@ -224,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" -- Gitblit v1.8.0