refactor: 系统权限模块重构,迁移至PostgreSQL并对齐新设计
- 切换数据库为PostgreSQL,更新依赖与配置 - 重构权限体系,使用sys_user/sys_role/sys_menu等新实体替代旧模型 - 移除旧的用户角色/权限/系统设置相关代码与实体 - 新增字典、菜单管理模块与基础CRUD接口 - 优化鉴权逻辑,基于菜单权限标识进行接口校验 - 前端同步更新API、路由与权限控制逻辑 - 删除冗余的v-permission指令与相关代码
This commit is contained in:
1 parent
98c22f6afb
commit
0a8103f33d
67 files changed
+3263
-1924
No files matched your search
+50
-38
@@ -17,6 +17,7 @@ const routes: RouteRecordRaw[] = [
|
||||
},
|
||||
{
|
||||
path: "/",
|
||||
name: "Root",
|
||||
component: () => import("@/layouts/index.vue"),
|
||||
redirect: "/dashboard",
|
||||
children: [
|
||||
@@ -26,65 +27,76 @@ const routes: RouteRecordRaw[] = [
|
||||
component: () => import("@/views/dashboard/index.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: "仪表盘",
|
||||
permission: "dashboard"
|
||||
title: "仪表盘"
|
||||
}
|
||||
},
|
||||
// 业务模块(未开发,先使用占位页;菜单 component 落地后替换为真实组件)
|
||||
{
|
||||
path: "customer",
|
||||
name: "Customer",
|
||||
component: () => import("@/views/Placeholder.vue"),
|
||||
meta: { requiresAuth: true, title: "客户管理", permission: "customer:list" }
|
||||
},
|
||||
{
|
||||
path: "project",
|
||||
name: "Project",
|
||||
component: () => import("@/views/Placeholder.vue"),
|
||||
meta: { requiresAuth: true, title: "项目管理", permission: "project:list" }
|
||||
},
|
||||
{
|
||||
path: "dispatch",
|
||||
name: "Dispatch",
|
||||
component: () => import("@/views/Placeholder.vue"),
|
||||
meta: { requiresAuth: true, title: "运营派单", permission: "dispatch:list" }
|
||||
},
|
||||
{
|
||||
path: "device",
|
||||
name: "Device",
|
||||
component: () => import("@/views/Placeholder.vue"),
|
||||
meta: { requiresAuth: true, title: "设备监控", permission: "device:list" }
|
||||
},
|
||||
{
|
||||
path: "report",
|
||||
name: "Report",
|
||||
component: () => import("@/views/Placeholder.vue"),
|
||||
meta: { requiresAuth: true, title: "统计报表", permission: "report:list" }
|
||||
},
|
||||
// 系统管理
|
||||
{
|
||||
path: "system/user",
|
||||
name: "UserList",
|
||||
name: "SystemUser",
|
||||
component: () => import("@/views/system/user/index.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: "用户管理",
|
||||
permission: "user:list"
|
||||
}
|
||||
meta: { requiresAuth: true, title: "用户管理", permission: "system:user" }
|
||||
},
|
||||
{
|
||||
path: "system/role",
|
||||
name: "RoleList",
|
||||
name: "SystemRole",
|
||||
component: () => import("@/views/system/role/index.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: "角色管理",
|
||||
permission: "role:list"
|
||||
}
|
||||
meta: { requiresAuth: true, title: "角色管理", permission: "system:role" }
|
||||
},
|
||||
{
|
||||
path: "settings/basic",
|
||||
name: "BasicSettings",
|
||||
component: () => import("@/views/settings/basic.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: "基本设置",
|
||||
permission: "system:basicSetting"
|
||||
}
|
||||
path: "system/menu",
|
||||
name: "SystemMenu",
|
||||
component: () => import("@/views/system/menu/index.vue"),
|
||||
meta: { requiresAuth: true, title: "菜单管理", permission: "system:menu" }
|
||||
},
|
||||
{
|
||||
path: "settings/security",
|
||||
name: "SecuritySettings",
|
||||
component: () => import("@/views/settings/security.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: "安全设置",
|
||||
permission: "system:securitySetting"
|
||||
}
|
||||
path: "system/dict",
|
||||
name: "SystemDict",
|
||||
component: () => import("@/views/system/dict/index.vue"),
|
||||
meta: { requiresAuth: true, title: "数据字典", permission: "system:dict" }
|
||||
},
|
||||
{
|
||||
path: "log/operation",
|
||||
name: "OperationLog",
|
||||
component: () => import("@/views/log/operation.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: "操作日志",
|
||||
permission: "log:operation"
|
||||
}
|
||||
component: () => import("@/views/log/operation/index.vue"),
|
||||
meta: { requiresAuth: true, title: "操作日志", permission: "system:log" }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/:pathMatch(.*)*",
|
||||
redirect: "/login"
|
||||
redirect: "/403"
|
||||
}
|
||||
];
|
||||
|
||||
@@ -146,4 +158,4 @@ router.beforeEach(async (to, _from, next) => {
|
||||
next();
|
||||
});
|
||||
|
||||
export default router;
|
||||
export default router;
|
||||
Reference in new issue
Block a user