diff --git a/src/Manager/LeftBar.vue b/src/Manager/LeftBar.vue index 44d4676..5e9371f 100644 --- a/src/Manager/LeftBar.vue +++ b/src/Manager/LeftBar.vue @@ -29,7 +29,7 @@ function getItem(label, key, icon, children, type) { } const items = reactive([ - getItem('首页', 'sub1'), + getItem('首页', '0'), getItem('系统管理', 'sub1', () => h(MailOutlined), [ getItem('用户管理', '1'), getItem('角色管理', '2'), @@ -39,16 +39,16 @@ const items = reactive([ getItem('消息管理', '6'), ], 'submenu'), getItem('首页管理', 'sub2', () => h(AppstoreOutlined), [ - getItem('轮播图管理', '5'), - getItem('团队简介', '6'), - getItem('项目推荐', '7'), - getItem('新闻展示', '8'), - getItem('用户推荐', '9'), + getItem('轮播图管理', '7'), + getItem('团队简介', '8'), + getItem('项目推荐', '9'), + getItem('新闻展示', '10'), + getItem('用户推荐', '11'), ], 'submenu'), getItem('信息管理', 'sub4', () => h(SettingOutlined), [ - getItem('项目信息管理', '9'), - getItem('团队信息管理', '10'), - getItem('新闻信息管理', '11'), + getItem('项目信息管理', '12'), + getItem('团队信息管理', '13'), + getItem('新闻信息管理', '14'), ], 'submenu'), ]); @@ -68,17 +68,54 @@ const onOpenChange = (openKeys) => { }; const HandleClick = (e) => { - console.log("点击成功"); - + // console.log("点击成功"); const key = e.key; console.log(e.key); switch (key) { + case '0': + router.push('/Manager/Main'); // 导航到用户管理界面的路由 + break; case '1': router.push('/Manager/User'); // 导航到用户管理界面的路由 break; case '2': + router.push('/Manager/Role'); break; 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; default: break; diff --git a/src/router/index.js b/src/router/index.js index 7e398a7..2bfbe81 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -12,10 +12,61 @@ const router = createRouter({ path:'/Manager', name:'Manager', component:()=>import('../Manager/Manage.vue'), - children:[{ + children:[ + { + path:'/Manager/Main', + component:() =>import('../Manager/components/Main.vue') + }, + { path:'/Manager/User', 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') + } + ] } ] })