diff --git a/src/router/index.js b/src/router/index.js index 7782dbf..f9e268d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,4 +1,4 @@ -import { createWebHistory, createRouter } from 'vue-router' +import { createRouter, createWebHistory } from 'vue-router' /* Layout */ import Layout from '@/layout' @@ -83,6 +83,24 @@ export const constantRoutes = [ meta: { title: '个人中心', icon: 'user' } } ] + }, + + { + path: '/fileManagement', + component: Layout, + hidden: true, // 若不需要在侧边栏显示「档案管理」菜单,设为 true + redirect: 'noRedirect', + children: [ + { + path: 'pedigree', // 最终路径为 /fileManagement/pedigree + component: () => import('@/views/fileManagement/pedigree/index.vue'), + name: 'Pedigree', + meta: { + title: '羊只系谱', + activeMenu: '/fileManagement/pedigree' // 高亮对应的菜单(可选) + } + } + ] } ] @@ -159,6 +177,28 @@ export const dynamicRoutes = [ } ] }, + { + path: '/fileManagement', + component: Layout, + hidden: false, // 是否在侧边栏显示,默认 false 显示 + redirect: 'noRedirect', + name: 'FileManagement', + meta: { + title: '档案管理', + icon: 'example' // 你可以换成合适的图标名(如 'tree') + }, + children: [ + { + path: 'pedigree', // 最终路径 /fileManagement/pedigree + component: () => import('@/views/fileManagement/pedigree/index.vue'), + name: 'Pedigree', + meta: { + title: '系谱图', + activeMenu: '/fileManagement/pedigree' + } + } + ] + } ] const router = createRouter({ diff --git a/src/views/fileManagement/pedigree/index.vue b/src/views/fileManagement/pedigree/index.vue index d9c1389..c8840e4 100644 --- a/src/views/fileManagement/pedigree/index.vue +++ b/src/views/fileManagement/pedigree/index.vue @@ -3,20 +3,24 @@ - - - + + + 查询 @@ -96,10 +100,16 @@