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(() => {
-
+
@@ -131,7 +138,7 @@ onMounted(() => { >
-
+
{{ searchQuery.trim() ? t('admin.dept.noSearchResults') : t('admin.dept.noDepts') }}
@@ -215,7 +222,7 @@ onMounted(() => {
-
+
@@ -295,15 +309,18 @@ onMounted(() => {