审计日志并入系统管理、规范项目成员获取逻辑

This commit is contained in:
Cheng Zhou
2025-12-26 14:57:57 +08:00
parent 7c9befc3c9
commit 71db309e12
17 changed files with 94 additions and 116 deletions
+13 -6
View File
@@ -191,12 +191,6 @@ const routes: RouteRecordRaw[] = [
component: Verification,
meta: { title: "核查进度", requiresStudy: true },
},
{
path: "study/audit-logs",
name: "AuditLogs",
component: AuditLogs,
meta: { title: "审计日志", requiresStudy: true },
},
],
},
{
@@ -234,6 +228,12 @@ const routes: RouteRecordRaw[] = [
component: AdminSites,
meta: { title: "中心管理", requiresAdmin: true },
},
{
path: "audit-logs",
name: "AdminAuditLogs",
component: AuditLogs,
meta: { title: "审计日志", requiresAdmin: true },
},
],
},
{
@@ -261,6 +261,9 @@ router.beforeEach(async (to, _from, next) => {
auth.logout();
}
}
if (token && !studyStore.currentStudy) {
await studyStore.ensureDefaultStudy();
}
if (!to.meta.public && !token) {
next({ path: "/login" });
return;
@@ -287,6 +290,10 @@ router.beforeEach(async (to, _from, next) => {
next({ path: "/workbench" });
return;
}
if (to.path === "/workbench" && studyStore.currentStudy) {
next({ path: "/study/home" });
return;
}
next();
});