From 03006a8f06e09e163f297d5646f3dc27ee8ad1d5 Mon Sep 17 00:00:00 2001 From: yangsy Date: Mon, 26 Jan 2026 14:05:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=8C=E5=96=84=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=8D=A1=E7=89=87=E6=A0=87=E7=AD=BE=E9=A1=B5=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/device-card/ndm-alarm-host/alarm-host-card.vue | 4 ++-- src/components/device/device-card/ndm-camera/camera-card.vue | 4 ++-- .../device/device-card/ndm-decoder/decoder-card.vue | 4 ++-- .../device/device-card/ndm-keyboard/keyboard-card.vue | 4 ++-- src/components/device/device-card/ndm-nvr/nvr-card.vue | 4 ++-- .../device/device-card/ndm-security-box/security-box-card.vue | 4 ++-- src/components/device/device-card/ndm-server/server-card.vue | 4 ++-- src/components/device/device-card/ndm-switch/switch-card.vue | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/components/device/device-card/ndm-alarm-host/alarm-host-card.vue b/src/components/device/device-card/ndm-alarm-host/alarm-host-card.vue index 771a9d1..968064c 100644 --- a/src/components/device/device-card/ndm-alarm-host/alarm-host-card.vue +++ b/src/components/device/device-card/ndm-alarm-host/alarm-host-card.vue @@ -35,8 +35,8 @@ const activeTabName = ref('当前诊断'); const onTabChange = (name: string) => { activeTabName.value = name; }; -watch([ndmDevice, showDeviceRawData], ([newDevice, enabled], [oldDevice]) => { - if (newDevice.id !== oldDevice.id || !enabled) { +watch([ndmDevice, showDeviceRawData], ([newDevice, showRaw], [oldDevice]) => { + if (newDevice.id !== oldDevice.id || (!showRaw && activeTabName.value === '原始数据')) { activeTabName.value = '当前诊断'; } }); diff --git a/src/components/device/device-card/ndm-camera/camera-card.vue b/src/components/device/device-card/ndm-camera/camera-card.vue index 1763f83..d5ee763 100644 --- a/src/components/device/device-card/ndm-camera/camera-card.vue +++ b/src/components/device/device-card/ndm-camera/camera-card.vue @@ -35,8 +35,8 @@ const activeTabName = ref('当前诊断'); const onTabChange = (name: string) => { activeTabName.value = name; }; -watch([ndmDevice, showDeviceRawData], ([newDevice, enabled], [oldDevice]) => { - if (newDevice.id !== oldDevice.id || !enabled) { +watch([ndmDevice, showDeviceRawData], ([newDevice, showRaw], [oldDevice]) => { + if (newDevice.id !== oldDevice.id || (!showRaw && activeTabName.value === '原始数据')) { activeTabName.value = '当前诊断'; } }); diff --git a/src/components/device/device-card/ndm-decoder/decoder-card.vue b/src/components/device/device-card/ndm-decoder/decoder-card.vue index ee3dcc0..d3aa989 100644 --- a/src/components/device/device-card/ndm-decoder/decoder-card.vue +++ b/src/components/device/device-card/ndm-decoder/decoder-card.vue @@ -35,8 +35,8 @@ const activeTabName = ref('当前诊断'); const onTabChange = (name: string) => { activeTabName.value = name; }; -watch([ndmDevice, showDeviceRawData], ([newDevice, enabled], [oldDevice]) => { - if (newDevice.id !== oldDevice.id || !enabled) { +watch([ndmDevice, showDeviceRawData], ([newDevice, showRaw], [oldDevice]) => { + if (newDevice.id !== oldDevice.id || (!showRaw && activeTabName.value === '原始数据')) { activeTabName.value = '当前诊断'; } }); diff --git a/src/components/device/device-card/ndm-keyboard/keyboard-card.vue b/src/components/device/device-card/ndm-keyboard/keyboard-card.vue index 850e118..1c0279a 100644 --- a/src/components/device/device-card/ndm-keyboard/keyboard-card.vue +++ b/src/components/device/device-card/ndm-keyboard/keyboard-card.vue @@ -35,8 +35,8 @@ const activeTabName = ref('当前诊断'); const onTabChange = (name: string) => { activeTabName.value = name; }; -watch([ndmDevice, showDeviceRawData], ([newDevice, enabled], [oldDevice]) => { - if (newDevice.id !== oldDevice.id || !enabled) { +watch([ndmDevice, showDeviceRawData], ([newDevice, showRaw], [oldDevice]) => { + if (newDevice.id !== oldDevice.id || (!showRaw && activeTabName.value === '原始数据')) { activeTabName.value = '当前诊断'; } }); diff --git a/src/components/device/device-card/ndm-nvr/nvr-card.vue b/src/components/device/device-card/ndm-nvr/nvr-card.vue index d5fa41f..a49e4d0 100644 --- a/src/components/device/device-card/ndm-nvr/nvr-card.vue +++ b/src/components/device/device-card/ndm-nvr/nvr-card.vue @@ -35,8 +35,8 @@ const activeTabName = ref('当前诊断'); const onTabChange = (name: string) => { activeTabName.value = name; }; -watch([ndmDevice, showDeviceRawData], ([newDevice, enabled], [oldDevice]) => { - if (newDevice.id !== oldDevice.id || !enabled) { +watch([ndmDevice, showDeviceRawData], ([newDevice, showRaw], [oldDevice]) => { + if (newDevice.id !== oldDevice.id || (!showRaw && activeTabName.value === '原始数据')) { activeTabName.value = '当前诊断'; } }); diff --git a/src/components/device/device-card/ndm-security-box/security-box-card.vue b/src/components/device/device-card/ndm-security-box/security-box-card.vue index f26854d..bc3ef1b 100644 --- a/src/components/device/device-card/ndm-security-box/security-box-card.vue +++ b/src/components/device/device-card/ndm-security-box/security-box-card.vue @@ -35,8 +35,8 @@ const activeTabName = ref('当前诊断'); const onTabChange = (name: string) => { activeTabName.value = name; }; -watch([ndmDevice, showDeviceRawData], ([newDevice, enabled], [oldDevice]) => { - if (newDevice.id !== oldDevice.id || !enabled) { +watch([ndmDevice, showDeviceRawData], ([newDevice, showRaw], [oldDevice]) => { + if (newDevice.id !== oldDevice.id || (!showRaw && activeTabName.value === '原始数据')) { activeTabName.value = '当前诊断'; } }); diff --git a/src/components/device/device-card/ndm-server/server-card.vue b/src/components/device/device-card/ndm-server/server-card.vue index 317c63d..6c5680d 100644 --- a/src/components/device/device-card/ndm-server/server-card.vue +++ b/src/components/device/device-card/ndm-server/server-card.vue @@ -35,8 +35,8 @@ const activeTabName = ref('当前诊断'); const onTabChange = (name: string) => { activeTabName.value = name; }; -watch([ndmDevice, showDeviceRawData], ([newDevice, enabled], [oldDevice]) => { - if (newDevice.id !== oldDevice.id || !enabled) { +watch([ndmDevice, showDeviceRawData], ([newDevice, showRaw], [oldDevice]) => { + if (newDevice.id !== oldDevice.id || (!showRaw && activeTabName.value === '原始数据')) { activeTabName.value = '当前诊断'; } }); diff --git a/src/components/device/device-card/ndm-switch/switch-card.vue b/src/components/device/device-card/ndm-switch/switch-card.vue index 770efaa..c4965ba 100644 --- a/src/components/device/device-card/ndm-switch/switch-card.vue +++ b/src/components/device/device-card/ndm-switch/switch-card.vue @@ -35,8 +35,8 @@ const activeTabName = ref('当前诊断'); const onTabChange = (name: string) => { activeTabName.value = name; }; -watch([ndmDevice, showDeviceRawData], ([newDevice, enabled], [oldDevice]) => { - if (newDevice.id !== oldDevice.id || !enabled) { +watch([ndmDevice, showDeviceRawData], ([newDevice, showRaw], [oldDevice]) => { + if (newDevice.id !== oldDevice.id || (!showRaw && activeTabName.value === '原始数据')) { activeTabName.value = '当前诊断'; } });