From 2cee02bec1f8614d0faab24b59862354dc7f4371 Mon Sep 17 00:00:00 2001 From: "HTEWJ\\26070045" <2815434552@qq.com> Date: Thu, 22 Oct 2026 09:30:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(admin):=20=E4=BF=AE=E5=A4=8D=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E6=88=90=E5=91=98=E9=9D=A2=E6=9D=BF=E8=A1=A8=E5=A4=B4?= =?UTF-8?q?=E4=B8=8E=E5=88=86=E9=A1=B5=E5=99=A8=E7=A9=BF=E6=A8=A1=E5=B9=B6?= =?UTF-8?q?=E9=94=81=E5=AE=9A=E5=88=97=E5=AE=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/departments/DepartmentsPage.vue | 53 ++++++++++++------- frontend/src/locales/en/admin.json | 5 ++ frontend/src/locales/th/admin.json | 5 ++ frontend/src/locales/zh-CN/admin.json | 5 ++ frontend/src/locales/zh-TW/admin.json | 5 ++ 5 files changed, 55 insertions(+), 18 deletions(-) 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(() => {