diff --git a/frontend/src/features/admin/modules/departments/DepartmentsPage.vue b/frontend/src/features/admin/modules/departments/DepartmentsPage.vue index 55236210..e2172480 100644 --- a/frontend/src/features/admin/modules/departments/DepartmentsPage.vue +++ b/frontend/src/features/admin/modules/departments/DepartmentsPage.vue @@ -27,7 +27,7 @@ import DepartmentFormModal from './components/DepartmentFormModal.vue'; import { useDepartmentsAdmin } from './composables/useDepartmentsAdmin'; import type { AdminDepartmentTreeNode } from '@/features/admin/types/admin.types'; -const { t } = useI18n(); +const { t, te } = useI18n(); const { displayRows, @@ -67,6 +67,13 @@ const { setMemberPageSize, } = useDepartmentsAdmin(); +/** 成员状态 → 本地化标签;未知状态回退显示原值。 */ +const statusLabel = (status?: string): string => { + if (!status) return '-'; + const key = `admin.dept.members.status.${status}`; + return te(key) ? t(key) : status; +}; + /** 成员面板总页数(由 total / page_size 推导)。 */ const memberTotalPages = computed(() => { const data = memberData.value; @@ -106,7 +113,7 @@ onMounted(() => {
| {{ t('admin.dept.members.columns.name') }} | {{ t('admin.dept.members.columns.contact') }} | @@ -281,10 +295,10 @@ onMounted(() => {{{ member.phone_number || member.email || '-' }} | -{{ member.employee_id || '-' }} | +{{ member.employee_id || '-' }} | {{ member.department || '-' }} | - {{ member.status || '-' }} + {{ statusLabel(member.status) }} |
|---|