统一项目角色展示与预设文案
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
<el-table-column
|
||||
v-for="role in roles"
|
||||
:key="role"
|
||||
:label="role"
|
||||
:label="roleLabel(role)"
|
||||
:width="90"
|
||||
align="center"
|
||||
>
|
||||
@@ -81,6 +81,7 @@ import { fetchApiOperations } from "@/api/projectPermissions";
|
||||
import { isApiPermissionAllowed } from "@/utils/apiPermissionValue";
|
||||
import { useAuthStore } from "@/store/auth";
|
||||
import { isSystemAdmin } from "@/utils/roles";
|
||||
import { useRoleTemplateMeta } from "@/composables/useRoleTemplateMeta";
|
||||
|
||||
interface Operation {
|
||||
operation_key: string;
|
||||
@@ -103,6 +104,7 @@ const props = defineProps<Props>();
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const auth = useAuthStore();
|
||||
const { roleLabel, loadRoleTemplates } = useRoleTemplateMeta();
|
||||
const isAdmin = computed(() => isSystemAdmin(auth.user));
|
||||
const isRoleEditable = (role: string) => {
|
||||
if (role === "ADMIN") return false;
|
||||
@@ -267,6 +269,7 @@ const onPermissionChange = (operation_key: string, role: string, allowed: boolea
|
||||
|
||||
onMounted(() => {
|
||||
loadOperations();
|
||||
loadRoleTemplates();
|
||||
});
|
||||
|
||||
defineExpose({ searchText });
|
||||
|
||||
Reference in New Issue
Block a user