权限系统重构:
- 角色模型改为 permissions 字段,移除 methods/includeUri/excludeUri - 角色管理页面支持权限树选择,保存时只传最上级权限 - /common/verifyToken 返回 permissions,存入 vuex - 新增 v-permission 指令,所有操作按钮和菜单均按权限控制显示 - 菜单按 list 权限过滤 - 各业务页面按钮加权限指令 - 角色管理列表只显示名称/描述/时间,不显示权限列,权限必选
This commit is contained in:
@@ -2,9 +2,15 @@ export interface SystemRoleModel {
|
||||
_id: string | null
|
||||
name: string | null // 角色名称
|
||||
description: string | null // 描述
|
||||
methods: string[] // 允许的请求类型(优先级3)
|
||||
includeUri: string[] // 包含的URI(优先级2)
|
||||
excludeUri: string[] // 排除的URI(优先级1)
|
||||
permissions: string[] // 权限标识列表
|
||||
createdAt?: Date // 创建时间
|
||||
updatedAt?: Date // 更新时间
|
||||
}
|
||||
|
||||
export interface PermissionTreeNode {
|
||||
code: string
|
||||
name: string
|
||||
description: string
|
||||
leaf: boolean
|
||||
children: PermissionTreeNode[]
|
||||
}
|
||||
Reference in New Issue
Block a user