2
0

fix:AP设备界面中英适配

This commit is contained in:
zhongzm
2025-02-07 18:30:15 +08:00
parent a974a042b0
commit 5b4f4b4ae1
4 changed files with 53 additions and 17 deletions

View File

@@ -8,7 +8,7 @@
@search="handleSearch"
/>
<ACard
title="AP设备管理"
:title="t('page.apdevice.aptitle')"
:bordered="false"
:body-style="{ flex: 1, overflow: 'hidden' }"
class="flex-col-stretch sm:flex-1-hidden card-wrapper"
@@ -35,7 +35,7 @@
total: mobilePagination.total,
current: searchParams.pageNum,
pageSize: searchParams.pageSize,
showTotal: (total: number) => ` ${total} `
showTotal: (total: number) => `${t('page.apdevice.total')} ${total} `
}"
:scroll="scrollConfig"
class="h-full"
@@ -48,7 +48,7 @@
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
<ATag :color="record.status === 1 ? 'success' : 'error'">
{{ record.status === 1 ? '在线' : '离线' }}
{{ record.status === 1 ? t('page.apdevice.online') : t('page.apdevice.outline') }}
</ATag>
</template>
</template>
@@ -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<HTMLElement | null>(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
}