fix:合并登录页

This commit is contained in:
fanzhuxian
2025-03-06 15:46:52 +08:00
parent ccef07e8e7
commit 4510f058c3
2 changed files with 26 additions and 21 deletions

View File

@@ -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);
}
}
};

View File

@@ -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: '系统首页' }
},