feat: 新增安防箱网卡信息展示并更新卡片标题
- 修改安防箱环境卡片标题为“安防箱环境状态” - 新增网卡信息展示模块,包含IP、子网掩码、MAC地址等参数
This commit is contained in:
@@ -1,5 +1,36 @@
|
|||||||
export interface NdmSecurityBoxDiagInfo {
|
export interface NdmSecurityBoxDiagInfo {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
|
ethInfo?: {
|
||||||
|
adminStatus?: string; // '1'
|
||||||
|
desc?: string; // 'br-lan'
|
||||||
|
ifType?: string; // '6'
|
||||||
|
inDiscards?: string; // '84977'
|
||||||
|
inErrors?: string; // '0'
|
||||||
|
inNUcastPkts?: string; // '233473'
|
||||||
|
inOctets?: string; // '92355850'
|
||||||
|
inUcastPkts?: string; // '899970'
|
||||||
|
inUnknownProtos?: string; // '0'
|
||||||
|
index?: string; // '8'
|
||||||
|
lastChange?: string; // '0:00:00.00'
|
||||||
|
mTU?: string; // '1500'
|
||||||
|
macAddress?: string; // '56:62:bc:d3:9e:37'
|
||||||
|
operStatus?: string; // '1'
|
||||||
|
outDiscards?: string; // '0'
|
||||||
|
outErrors?: string; // '0'
|
||||||
|
outNUcastPkts?: string; // '0'
|
||||||
|
outOctets?: string; // '68175904'
|
||||||
|
outQLen?: string; // '0'
|
||||||
|
outUcastPkts?: string; // '748100'
|
||||||
|
specific?: string; // '0.0'
|
||||||
|
speed?: string; // '0'
|
||||||
|
};
|
||||||
|
ipInfo?: {
|
||||||
|
broadcastAddress?: string; // '1'
|
||||||
|
iPAddress?: string; // '10.24.18.101'
|
||||||
|
index?: string; // '8'
|
||||||
|
mASK?: string; // '255.255.255.0'
|
||||||
|
reasmMaxSize?: string; // '0'
|
||||||
|
};
|
||||||
info?: [
|
info?: [
|
||||||
{
|
{
|
||||||
addrCode?: number;
|
addrCode?: number;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const getStatusTagType = (status: string | null) => {
|
|||||||
<template>
|
<template>
|
||||||
<NCard v-if="showCard" hoverable size="small">
|
<NCard v-if="showCard" hoverable size="small">
|
||||||
<template #header>
|
<template #header>
|
||||||
<span>安防箱状态</span>
|
<span>安防箱环境状态</span>
|
||||||
</template>
|
</template>
|
||||||
<template #default>
|
<template #default>
|
||||||
<NFlex vertical>
|
<NFlex vertical>
|
||||||
|
|||||||
@@ -35,9 +35,15 @@ const vendor = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const commonInfo = computed<DeviceCommonCardProps['commonInfo']>(() => {
|
const commonInfo = computed<DeviceCommonCardProps['commonInfo']>(() => {
|
||||||
const { stCommonInfo } = lastDiagInfo.value ?? {};
|
const { ipAddress } = ndmDevice.value;
|
||||||
|
const { ethInfo, ipInfo, stCommonInfo } = lastDiagInfo.value ?? {};
|
||||||
const { 设备ID, 软件版本, 设备厂商, 设备别名, 设备型号, 硬件版本 } = stCommonInfo ?? {};
|
const { 设备ID, 软件版本, 设备厂商, 设备别名, 设备型号, 硬件版本 } = stCommonInfo ?? {};
|
||||||
|
|
||||||
|
let operStatus = '-';
|
||||||
|
if (!!ethInfo?.operStatus) {
|
||||||
|
operStatus = ethInfo?.operStatus === '1' ? '正常' : '异常';
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
title: '设备型号信息',
|
title: '设备型号信息',
|
||||||
@@ -50,6 +56,17 @@ const commonInfo = computed<DeviceCommonCardProps['commonInfo']>(() => {
|
|||||||
{ label: '硬件版本', value: 硬件版本 || '-' },
|
{ label: '硬件版本', value: 硬件版本 || '-' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '设备网卡信息',
|
||||||
|
items: [
|
||||||
|
{ label: 'IP地址', value: ipAddress || '-' },
|
||||||
|
{ label: '子网掩码', value: ipInfo?.mASK || '-' },
|
||||||
|
{ label: 'MAC地址', value: ethInfo?.macAddress || '-' },
|
||||||
|
{ label: '连接速率', value: ethInfo?.speed || '-' },
|
||||||
|
{ label: 'MTU', value: ethInfo?.mTU || '-' },
|
||||||
|
{ label: '运行状态', value: operStatus },
|
||||||
|
],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user