From 4510f058c347db0fe00eb04c7858bbe54a907c54 Mon Sep 17 00:00:00 2001 From: fanzhuxian Date: Thu, 6 Mar 2025 15:46:52 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E5=90=88=E5=B9=B6=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/Sidebar.vue | 31 ++++++++++--------- h5-enginex-manager/src/router/index.js | 16 ++++++---- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/h5-enginex-manager/src/components/common/Sidebar.vue b/h5-enginex-manager/src/components/common/Sidebar.vue index 7605e72..68317f0 100644 --- a/h5-enginex-manager/src/components/common/Sidebar.vue +++ b/h5-enginex-manager/src/components/common/Sidebar.vue @@ -60,26 +60,27 @@ methods: { async getMenus() { - const data = await getMenus({entity:{resourceSystem:localStorage.getItem('platform')}}); + const data1 = await getMenus({entity:{resourceSystem:'Auth'}}); + const data2 = await getMenus({entity:{resourceSystem:'DataX'}}); + const data3 = await getMenus({entity:{resourceSystem:'Enginex'}}); // console.log('菜单接口返回的数据',data); - if (data.status === "0") { - this.$message.error(data.msg); - if (data.error === "01000103") { - if (localStorage.getItem('platform') === 'Auth') { - this.$router.push('/loginAuth') - } else if (localStorage.getItem('platform') === 'DataX') { - this.$router.push('/loginDatax') - } else if (localStorage.getItem('platform') === 'Enginex') { - this.$router.push('/loginEnginex') - } - } - } + // if (data.status === "0") { + // this.$message.error(data.msg); + // if (data.error === "01000103") { + // if (localStorage.getItem('platform') === 'Auth') { + // this.$router.push('/loginAuth') + // } else if (localStorage.getItem('platform') === 'DataX') { + // this.$router.push('/loginDatax') + // } else if (localStorage.getItem('platform') === 'Enginex') { + // this.$router.push('/loginEnginex') + // } + // } + // } - this.items = data.data; + this.items = [...data1.data, ...data2.data, ...data3.data]; if(this.items.length == 0){ this.$message.error('您没有导航权限,请联系管理员'); } - // console.log("items", this.items); } } }; diff --git a/h5-enginex-manager/src/router/index.js b/h5-enginex-manager/src/router/index.js index e3a26a3..0ae0dc5 100644 --- a/h5-enginex-manager/src/router/index.js +++ b/h5-enginex-manager/src/router/index.js @@ -19,7 +19,7 @@ export default new Router({ */ // 决策引擎系统 - 登录 { - path: '/loginEnginex', + path: '/login', component: () => import('../components/page/LoginEnginex.vue'), meta: { title: '登录' } }, @@ -42,15 +42,19 @@ export default new Router({ component: () => import('../components/common/Home.vue'), meta: { title: '自述文件' }, children: [ + { + path: '/dashboardEnginex', + component: () => { + const userRole = localStorage.getItem('platform'); + return import('../components/page/DashboardEnginex.vue'); + }, + meta: { title: '系统首页' } + }, { path: '/dashboard', component: () => { const userRole = localStorage.getItem('platform'); - if (userRole === 'DataX') { - return import('../components/page/DashboardDatax.vue'); - } else { - return import('../components/page/DashboardEnginex.vue'); - } + return import('../components/page/DashboardDatax.vue'); }, meta: { title: '系统首页' } },