From 5b4f4b4ae18983256c49d11c1a7c4a0e89e6b705 Mon Sep 17 00:00:00 2001 From: zhongzm Date: Fri, 7 Feb 2025 18:30:15 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9AAP=E8=AE=BE=E5=A4=87=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E4=B8=AD=E8=8B=B1=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/langs/en-us.ts | 17 +++++++++++++++ src/locales/langs/zh-cn.ts | 17 +++++++++++++++ src/views/device/apdevice/index.vue | 21 ++++++++++--------- .../device/apdevice/modules/device-search.vue | 15 ++++++------- 4 files changed, 53 insertions(+), 17 deletions(-) diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index 6d2c39a..1fce58f 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -698,6 +698,23 @@ const local: any = { reset:'Reset', search:'Search', }, + apdevice:{ + aptitle:'AP Device Management', + online:'Online', + outline:'Offline', + apname:'Device Name', + ip:'IP', + mac:'MAC', + model:'Model', + uptime:'Online Time', + status:'Status', + total:'Total', + pledevice:'Please enter device name', + plemac:'Please enter MAC address', + search:'Search', + reset:'Reset', + + }, }, form: { required: 'Cannot be empty', diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 88f3ff6..ca569af 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -698,6 +698,23 @@ const local:any = { reset:'重置', search:'查询', }, + apdevice:{ + aptitle:'AP设备管理', + online:'在线', + outline:'离线', + apname:'设备名称', + ip:'IP地址', + mac:'MAC地址', + model:'型号', + uptime:'在线时间', + status:'状态', + total:'共', + pledevice:'请输入设备名称', + plemac:'请输入MAC地址', + search:'搜索', + reset:'重置', + + }, }, form: { required: '不能为空', diff --git a/src/views/device/apdevice/index.vue b/src/views/device/apdevice/index.vue index 289703a..1400307 100644 --- a/src/views/device/apdevice/index.vue +++ b/src/views/device/apdevice/index.vue @@ -8,7 +8,7 @@ @search="handleSearch" /> `共 ${total} 条` + showTotal: (total: number) => `${t('page.apdevice.total')} ${total} ` }" :scroll="scrollConfig" class="h-full" @@ -48,7 +48,7 @@ @@ -66,7 +66,8 @@ import { useElementSize } from '@vueuse/core'; import { fetchApDeviceList } from '@/service/api/auth'; import { Card as ACard, Table as ATable, Tag as ATag } from 'ant-design-vue'; import DeviceSearch from './modules/device-search.vue'; - +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); const wrapperEl = shallowRef(null); const { height: wrapperElHeight } = useElementSize(wrapperEl); @@ -121,42 +122,42 @@ const { { key: 'name', dataIndex: 'name', - title: '设备名称', + title: t('page.apdevice.apname'), align: 'center', width: 150 }, { key: 'publicIp', dataIndex: 'publicIp', - title: 'IP地址', + title: t('page.apdevice.ip'), align: 'center', width: 150 }, { key: 'mac', dataIndex: 'mac', - title: 'MAC地址', + title: t('page.apdevice.mac'), align: 'center', width: 180 }, { key: 'model', dataIndex: 'model', - title: '型号', + title: t('page.apdevice.model'), align: 'center', width: 150 }, { key: 'uptime', dataIndex: 'uptime', - title: '在线时间', + title: t('page.apdevice.uptime'), align: 'center', width: 180 }, { key: 'status', dataIndex: 'status', - title: '状态', + title: t('page.apdevice.status'), align: 'center', width: 100 } diff --git a/src/views/device/apdevice/modules/device-search.vue b/src/views/device/apdevice/modules/device-search.vue index ba498f5..41ddd33 100644 --- a/src/views/device/apdevice/modules/device-search.vue +++ b/src/views/device/apdevice/modules/device-search.vue @@ -1,19 +1,19 @@ - 搜索 + {{ t('page.apdevice.search') }} - 重置 + {{ t('page.apdevice.reset') }} @@ -41,7 +41,8 @@