2
0

fix:ap设备界面状态修改和wlan中英修复

This commit is contained in:
zhongzm
2025-02-25 14:50:37 +08:00
parent c707a338c6
commit 8b6e4b27e6
4 changed files with 38 additions and 10 deletions

View File

@@ -66,8 +66,8 @@
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
<ATag :color="record.status === 1 ? 'success' : 'error'">
{{ record.status === 1 ? t('page.apdevice.online') : t('page.apdevice.outline') }}
<ATag :color="getStatusColor(record.status)">
{{ getStatusText(record.status) }}
</ATag>
</template>
@@ -99,7 +99,7 @@
</a-tooltip>
</template>
<template v-if="record.status === 0">
<template v-if="record.status === 0 || record.status === 2">
<a-tooltip :title="t('page.apdevice.adopt')">
<a-button type="link" size="small" @click="handleAdopt(record)">
<template #icon>
@@ -709,6 +709,29 @@ const configFormRef = ref();
onMounted(() => {
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>
<style scoped>