路由修整

This commit is contained in:
妖姐 2024-01-27 14:32:35 +08:00
parent 1e01d15b33
commit 6c9c1fc509
2 changed files with 101 additions and 13 deletions

View File

@ -29,7 +29,7 @@ function getItem(label, key, icon, children, type) {
} }
const items = reactive([ const items = reactive([
getItem('首页', 'sub1'), getItem('首页', '0'),
getItem('系统管理', 'sub1', () => h(MailOutlined), [ getItem('系统管理', 'sub1', () => h(MailOutlined), [
getItem('用户管理', '1'), getItem('用户管理', '1'),
getItem('角色管理', '2'), getItem('角色管理', '2'),
@ -39,16 +39,16 @@ const items = reactive([
getItem('消息管理', '6'), getItem('消息管理', '6'),
], 'submenu'), ], 'submenu'),
getItem('首页管理', 'sub2', () => h(AppstoreOutlined), [ getItem('首页管理', 'sub2', () => h(AppstoreOutlined), [
getItem('轮播图管理', '5'), getItem('轮播图管理', '7'),
getItem('团队简介', '6'), getItem('团队简介', '8'),
getItem('项目推荐', '7'), getItem('项目推荐', '9'),
getItem('新闻展示', '8'), getItem('新闻展示', '10'),
getItem('用户推荐', '9'), getItem('用户推荐', '11'),
], 'submenu'), ], 'submenu'),
getItem('信息管理', 'sub4', () => h(SettingOutlined), [ getItem('信息管理', 'sub4', () => h(SettingOutlined), [
getItem('项目信息管理', '9'), getItem('项目信息管理', '12'),
getItem('团队信息管理', '10'), getItem('团队信息管理', '13'),
getItem('新闻信息管理', '11'), getItem('新闻信息管理', '14'),
], 'submenu'), ], 'submenu'),
]); ]);
@ -68,17 +68,54 @@ const onOpenChange = (openKeys) => {
}; };
const HandleClick = (e) => { const HandleClick = (e) => {
console.log("点击成功"); // console.log("");
const key = e.key; const key = e.key;
console.log(e.key); console.log(e.key);
switch (key) { switch (key) {
case '0':
router.push('/Manager/Main'); //
break;
case '1': case '1':
router.push('/Manager/User'); // router.push('/Manager/User'); //
break; break;
case '2': case '2':
router.push('/Manager/Role');
break; break;
case '3': case '3':
router.push('/Manager/Authority');
break;
case '4':
router.push('/Manager/Log');
break;
case '5':
router.push('/Manager/Daily');
break;
case '6':
router.push('/Manager/Message');
break;
case '7':
router.push('/Manager/Carousel');
break;
case '8':
router.push('/Manager/TeamProfile');
break;
case '9':
router.push('/Manager/ProjectRecommend');
break;
case '10':
router.push('/Manager/NewsDisplay');
break;
case '11':
router.push('/Manager/UserRecommend');
break;
case '12':
router.push('/Manager/ProjectInformation');
break;
case '13':
router.push('/Manager/TeamInformation');
break;
case '14':
router.push('/Manager/NewsInformation');
break; break;
default: default:
break; break;

View File

@ -12,10 +12,61 @@ const router = createRouter({
path:'/Manager', path:'/Manager',
name:'Manager', name:'Manager',
component:()=>import('../Manager/Manage.vue'), component:()=>import('../Manager/Manage.vue'),
children:[{ children:[
{
path:'/Manager/Main',
component:() =>import('../Manager/components/Main.vue')
},
{
path:'/Manager/User', path:'/Manager/User',
component:() =>import('../Manager/components/User.vue') component:() =>import('../Manager/components/User.vue')
}] },
{
path:'/Manager/Role',
component:() =>import('../Manager/components/Role.vue')
},
{
path:'/Manager/Authority',
component:() =>import('../Manager/components/Authority.vue')
},
{
path:'/Manager/Log',
component:() =>import('../Manager/components/Log.vue')
},
{
path:'/Manager/Daily',
component:() =>import('../Manager/components/Daily.vue')
},
{
path:'/Manager/Message',
component:() =>import('../Manager/components/Message.vue')
},
{
path:'/Manager/Carousel',
component:() =>import('../Manager/components/Carousel.vue')
} ,{
path:'/Manager/TeamProfile',
component:() =>import('../Manager/components/TeamProfile.vue')
},{
path:'/Manager/ProjectRecommend',
component:() =>import('../Manager/components/ProjectRecommend.vue')
},{
path:'/Manager/NewsDisplay',
component:() =>import('../Manager/components/NewsDisplay.vue')
},{
path:'/Manager/UserRecommend',
component:() =>import('../Manager/components/UserRecommend.vue')
},{
path:'/Manager/ProjectInformation',
component:() =>import('../Manager/components/ProjectInformation.vue')
},{
path:'/Manager/TeamInformation',
component:() =>import('../Manager/components/TeamInformation.vue')
},{
path:'/Manager/NewsInformation',
component:() =>import('../Manager/components/NewsInformation.vue')
}
]
} }
] ]
}) })