update role frontend

This commit is contained in:
2026-03-30 10:13:57 +08:00
parent 368cb24ba5
commit 50d8d7267b
4 changed files with 19 additions and 11 deletions
+11 -5
View File
@@ -6,10 +6,10 @@ import RolePermissionModal from '@/components/RolePermissionModal.vue'
const roleStore = useRoleManageStore()
const columns = [
{ title: '角色名称', dataIndex: 'description', key: 'description' },
{ title: '角色名称', dataIndex: 'label', key: 'label' },
{ title: '标识', dataIndex: 'name', key: 'name' },
{ title: '用户数', dataIndex: 'user_count', key: 'user_count', width: 100 },
{ title: '路由组数', key: 'route_group_count', width: 120 },
{ title: '用户数', dataIndex: 'users_count', key: 'users_count', width: 100 },
{ title: '路由组数', key: 'route_groups_count', width: 120 },
{ title: '操作', key: 'action', width: 120 },
]
@@ -41,9 +41,15 @@ onMounted(() => {
size="middle"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'route_group_count'">
<template v-if="column.key === 'label'">
<div>
<div>{{ record.label }}</div>
<div class="text-xs text-gray-400">{{ record.description }}</div>
</div>
</template>
<template v-if="column.key === 'route_groups_count'">
<a-tag v-if="record.name === 'administrator'" color="blue">全部</a-tag>
<span v-else>{{ record.route_group_count }}</span>
<span v-else>{{ record.route_groups_count }}</span>
</template>
<template v-if="column.key === 'action'">
<a-button