From 11b673550b971595a4b25a27777ed9ed9186a9de Mon Sep 17 00:00:00 2001 From: yangsy Date: Tue, 19 May 2026 15:08:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=91=84=E5=83=8F=E6=9C=BA=E7=BD=91=E5=8D=A1=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=9A=84=E8=BF=90=E8=A1=8C=E7=8A=B6=E6=80=81=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=B9=B6=E7=A7=BB=E9=99=A4=E7=AE=A1=E7=90=86=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将运行状态的原始值转换为中文展示,值为'1'时显示“正常”,其他非空值显示“异常”,无值时显示'-' --- .../device/device-card/ndm-camera/camera-current-diag.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/device/device-card/ndm-camera/camera-current-diag.vue b/src/components/device/device-card/ndm-camera/camera-current-diag.vue index a0959e7..d0f77e7 100644 --- a/src/components/device/device-card/ndm-camera/camera-current-diag.vue +++ b/src/components/device/device-card/ndm-camera/camera-current-diag.vue @@ -141,6 +141,11 @@ const commonInfo = computed(() => { // } = ndmDevice.value; + let operStatus = '-'; + if (!!ethInfo?.operStatus) { + operStatus = ethInfo?.operStatus === '1' ? '正常' : '异常'; + } + return [ { title: '设备型号信息', @@ -161,8 +166,7 @@ const commonInfo = computed(() => { { label: 'MAC地址', value: ethInfo?.macAddress || '-' }, { label: '连接速率', value: ethInfo?.speed || '-' }, { label: 'MTU', value: ethInfo?.mTU || '-' }, - { label: '管理状态', value: ethInfo?.adminStatus || '-' }, - { label: '运行状态', value: ethInfo?.operStatus || '-' }, + { label: '运行状态', value: operStatus }, ], }, {