From 10ffa741546c5d36b14932e4a6c17faa81e479bd Mon Sep 17 00:00:00 2001 From: 董国庆 <364620639@qq.com> Date: 星期五, 16 五月 2025 14:41:07 +0800 Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/leshan-laboratory --- culture/src/router/index.js | 57 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 42 insertions(+), 15 deletions(-) diff --git a/culture/src/router/index.js b/culture/src/router/index.js index 07c3c42..2d85a1d 100644 --- a/culture/src/router/index.js +++ b/culture/src/router/index.js @@ -61,6 +61,24 @@ keepAlive: true, }, component: () => import("../views/projectList/addProject"), + }, + { + path: "editProject", + name: "EditProject", + meta: { + title: "编辑菌种库项目组", + hide: true, + }, + component: () => import("../views/projectList/editProject"), + }, + { + path: "detailProject", + name: "DetailProject", + meta: { + title: "菌种库项目组详情", + hide: true, + }, + component: () => import("../views/projectList/detailProject"), } ] }, @@ -244,7 +262,7 @@ { path: 'breeding-record', name: 'BreedingRecord', - meta: { + meta: { title: "菌种选育保藏记录", }, component: () => import("../views/strain-library/breeding-record"), @@ -281,6 +299,15 @@ hide: true }, component: () => import("../views/strain-library/validation/primitive-cell/add.vue") + }, + { + path: 'confirm-detail', + name: 'ConfirmDetail', + meta: { + title: '确认原始细胞库资料', + hide: true + }, + component: () => import("../views/strain-library/validation/primitive-cell/confirm-detail.vue") }, { path: 'chief-cell', @@ -408,21 +435,21 @@ // 登录验证 // 排除登录页的校验 - // if (to.path === "/login") { - // if (sessionStorage.getItem('token')) { - // next('/projectList'); // 已登录状态访问登录页时重定向到系统首页 - // return; - // } - // next(); - // return; - // } + if (to.path === "/login") { + if (sessionStorage.getItem('token')) { + next('/projectList'); // 已登录状态访问登录页时重定向到系统首页 + return; + } + next(); + return; + } - // // 登录状态校验 - // const isAuthenticated = sessionStorage.getItem('token'); - // if (!isAuthenticated) { - // next('/login'); // 未登录用户重定向到登录页 - // return; - // } + // 登录状态校验 + const isAuthenticated = sessionStorage.getItem('token'); + if (!isAuthenticated) { + next('/login'); // 未登录用户重定向到登录页 + return; + } // 判断是否拥有要跳转菜单权限 let menus = store.state.menus -- Gitblit v1.7.1