审计日志并入系统管理、规范项目成员获取逻辑
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user