检查表手动添加检查项时根据部门类型展示不一样

This commit is contained in:
王利强
2026-08-03 11:51:07 +08:00
parent 088ff356f2
commit ec76d588e2
50 changed files with 826 additions and 428 deletions

View File

@@ -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 '';