检查表手动添加检查项时根据部门类型展示不一样
This commit is contained in:
@@ -36,6 +36,13 @@ function resolveRoleKey(roles, fallback = '') {
|
||||
return normalizeRoleKey(first.roleKey || first.role || fallback);
|
||||
}
|
||||
|
||||
/** 从 userInfo 中读取当前身份 roleKey(仅取 userIdentity.roleKey) */
|
||||
export function resolveUserIdentityRoleKey(userInfo) {
|
||||
if (!userInfo) return '';
|
||||
const identity = normalizeUserIdentity(userInfo.userIdentity);
|
||||
return normalizeRoleKey(identity?.roleKey);
|
||||
}
|
||||
|
||||
/** 解析用于权限判断的角色标识,优先当前身份 roleKey */
|
||||
export function resolveUserRoleKey(userInfo) {
|
||||
if (!userInfo) return '';
|
||||
|
||||
Reference in New Issue
Block a user