20260728173026

This commit is contained in:
oneao committed 2026-07-28 17:30:27 +08:00
1 parent 63588bd217
commit 5ec7aadef9
25 files changed
+627 -462

No files matched your search

+2 -5
View File
@@ -34,14 +34,11 @@ router.beforeEach(async (to) => {
return getRedirectPath(to.query.redirect);
}
if (to.meta.dataCode || to.meta.moduleCode) {
if (to.meta.moduleId) {
const permissionStore = usePermissionStore();
try {
await permissionStore.load();
const canAccess = to.meta.dataCode
? permissionStore.canData(to.meta.dataCode)
: permissionStore.canModule(to.meta.moduleCode);
if (!canAccess) {
if (!permissionStore.canAccess(to.meta.moduleId)) {
message.warning("没有该模块的访问权限");
return false;
}
+3 -3
View File
@@ -22,7 +22,7 @@ const routes = [
title: "模块管理",
section: "系统管理",
menuKey: "/system/module-management",
moduleCode: "m_metadata",
moduleId: "m_metadata",
},
},
{
@@ -33,7 +33,7 @@ const routes = [
title: "多语言类型",
section: "系统管理",
menuKey: "/system/i18n-type",
moduleCode: "m_i18n_type",
moduleId: "b_i18n_type",
},
},
{
@@ -44,7 +44,7 @@ const routes = [
title: "登录日志",
section: "系统管理",
menuKey: "/system/login-log",
dataCode: "d_login_log",
moduleId: "d_login_log",
},
},
],