fix:ap设备界面状态修改和wlan中英修复
This commit is contained in:
@@ -711,6 +711,7 @@ const local: any = {
|
|||||||
aptitle:'AP Device Management',
|
aptitle:'AP Device Management',
|
||||||
online:'Online',
|
online:'Online',
|
||||||
outline:'Offline',
|
outline:'Offline',
|
||||||
|
pending:'Pending',
|
||||||
apname:'Device Name',
|
apname:'Device Name',
|
||||||
ip:'IP',
|
ip:'IP',
|
||||||
mac:'MAC',
|
mac:'MAC',
|
||||||
@@ -765,10 +766,13 @@ const local: any = {
|
|||||||
name:'SSID Name',
|
name:'SSID Name',
|
||||||
security:'Security',
|
security:'Security',
|
||||||
none:'None',
|
none:'None',
|
||||||
wpaEnterprise:'WPA-Enterprise',
|
security: {
|
||||||
wpaPersonal:'WPA-Personal',
|
security:'Security',
|
||||||
ppskWithoutRadius:'PPSK without RADIUS',
|
wpaEnterprise: 'WPA-Enterprise',
|
||||||
ppskWithRadius:'PPSK with RADIUS',
|
wpaPersonal: 'WPA-Personal',
|
||||||
|
ppskWithoutRadius: 'PPSK without RADIUS',
|
||||||
|
ppskWithRadius: 'PPSK with RADIUS',
|
||||||
|
},
|
||||||
band:'Band',
|
band:'Band',
|
||||||
guestNetwork:'Guest Network',
|
guestNetwork:'Guest Network',
|
||||||
enable:'Enable',
|
enable:'Enable',
|
||||||
|
|||||||
@@ -711,6 +711,7 @@ const local:any = {
|
|||||||
aptitle:'AP设备管理',
|
aptitle:'AP设备管理',
|
||||||
online:'在线',
|
online:'在线',
|
||||||
outline:'离线',
|
outline:'离线',
|
||||||
|
pending:'待定',
|
||||||
apname:'设备名称',
|
apname:'设备名称',
|
||||||
ip:'IP地址',
|
ip:'IP地址',
|
||||||
mac:'MAC地址',
|
mac:'MAC地址',
|
||||||
|
|||||||
@@ -66,8 +66,8 @@
|
|||||||
>
|
>
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.key === 'status'">
|
<template v-if="column.key === 'status'">
|
||||||
<ATag :color="record.status === 1 ? 'success' : 'error'">
|
<ATag :color="getStatusColor(record.status)">
|
||||||
{{ record.status === 1 ? t('page.apdevice.online') : t('page.apdevice.outline') }}
|
{{ getStatusText(record.status) }}
|
||||||
</ATag>
|
</ATag>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="record.status === 0">
|
<template v-if="record.status === 0 || record.status === 2">
|
||||||
<a-tooltip :title="t('page.apdevice.adopt')">
|
<a-tooltip :title="t('page.apdevice.adopt')">
|
||||||
<a-button type="link" size="small" @click="handleAdopt(record)">
|
<a-button type="link" size="small" @click="handleAdopt(record)">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
@@ -709,6 +709,29 @@ const configFormRef = ref();
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSiteList();
|
getSiteList();
|
||||||
});
|
});
|
||||||
|
// 获取状态对应的颜色
|
||||||
|
const getStatusColor = (status: number) => {
|
||||||
|
switch (status) {
|
||||||
|
case 1:
|
||||||
|
return 'success';
|
||||||
|
case 2:
|
||||||
|
return 'warning';
|
||||||
|
default:
|
||||||
|
return 'error';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取状态对应的文本
|
||||||
|
const getStatusText = (status: number) => {
|
||||||
|
switch (status) {
|
||||||
|
case 1:
|
||||||
|
return t('page.apdevice.online');
|
||||||
|
case 2:
|
||||||
|
return t('page.apdevice.pending');
|
||||||
|
default:
|
||||||
|
return t('page.apdevice.outline');
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -144,7 +144,7 @@
|
|||||||
<a-checkbox v-model:checked="addForm.guestNetEnable" /> {{t('page.wlan.open')}}
|
<a-checkbox v-model:checked="addForm.guestNetEnable" /> {{t('page.wlan.open')}}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item name="security" :label="t('page.wlan.security')">
|
<a-form-item name="security" :label="t('page.wlan.security.security')">
|
||||||
<a-select v-model:value="addForm.security">
|
<a-select v-model:value="addForm.security">
|
||||||
<a-select-option :value="0">{{ t('page.wlan.none') }}</a-select-option>
|
<a-select-option :value="0">{{ t('page.wlan.none') }}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -209,7 +209,7 @@
|
|||||||
<a-checkbox v-model:checked="editForm.guestNetEnable" /> {{t('page.wlan.open')}}
|
<a-checkbox v-model:checked="editForm.guestNetEnable" /> {{t('page.wlan.open')}}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item name="security" :label="t('page.wlan.security')">
|
<a-form-item name="security" :label="t('page.wlan.security.security')">
|
||||||
<a-select v-model:value="editForm.security">
|
<a-select v-model:value="editForm.security">
|
||||||
<a-select-option :value="0">{{ t('page.wlan.none') }}</a-select-option>
|
<a-select-option :value="0">{{ t('page.wlan.none') }}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -297,7 +297,7 @@ const {
|
|||||||
width: 150
|
width: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('page.wlan.security'),
|
title: t('page.wlan.security.security'),
|
||||||
dataIndex: 'security',
|
dataIndex: 'security',
|
||||||
key: 'security',
|
key: 'security',
|
||||||
width: 100,
|
width: 100,
|
||||||
|
|||||||
Reference in New Issue
Block a user