feat(role): 根据role判断用户的权限

This commit is contained in:
sophie committed 2026-09-18 09:21:04 +08:00
1 parent 80d78130f8
commit a24bd94d43
93 files changed
+4472 -387

No files matched your search

@@ -7,6 +7,7 @@ import { onMounted } from 'vue';
import { useI18n } from 'vue-i18n';
import { ShieldCheck, Trash2 } from 'lucide-vue-next';
import DeleteConfirmDialog from '@/shared/components/DeleteConfirmDialog.vue';
import { adminRoleLabel } from '@/features/admin/utils/roleLabel';
import { useApprovalsAdmin } from './composables/useApprovalsAdmin';
const { t } = useI18n();
@@ -71,7 +72,7 @@ onMounted(() => {
<span
class="px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800 border border-yellow-200"
>
{{ t('admin.role.' + user.role) }}
{{ adminRoleLabel(t, user.role, user.role_name) }}
</span>
</td>
<td class="px-8 py-5 text-right flex items-center justify-end gap-2">