update RolePermissionAssign style

This commit is contained in:
Timi
2026-08-11 17:34:43 +08:00
parent 1bf53c9d1c
commit c045fbb49b
7 changed files with 76 additions and 145 deletions
+1 -10
View File
@@ -54,6 +54,7 @@ import ManagedUserAPI from "@/api/ManagedUserAPI";
import { useCurrentStoreStore } from "@/store/currentStoreStore";
import type { Role } from "@/store/permissionSettingsStore";
import type { ManagedUser } from "@/types/ManagedUser";
import { getErrorMessage } from "@/utils/error";
import { corePermissionCodes, gaoRoleCodes } from "@/utils/permission";
defineOptions({
@@ -270,16 +271,6 @@ function getRoleId(role: UserRole | string): string {
return fullRole?.id || "";
}
function getErrorMessage(error: unknown, fallback: string): string {
if (error instanceof Error && error.message) {
return error.message;
}
if (typeof error === "string" && error) {
return error;
}
return fallback;
}
function setRoleChecked(roleId: string, value: boolean): void {
if (value && !checkedRoleIds.value.includes(roleId)) {
checkedRoleIds.value.push(roleId);