From a6f2a0a54e97431f06986d8cf222ec298a386b6f Mon Sep 17 00:00:00 2001 From: yangsy Date: Thu, 21 Aug 2025 21:12:31 +0800 Subject: [PATCH] feat: add total device count --- .../offline-device-detail-modal.vue | 59 ++++++++++++------- src/components/station-card.vue | 9 ++- 2 files changed, 45 insertions(+), 23 deletions(-) diff --git a/src/components/offline-device-detail-modal.vue b/src/components/offline-device-detail-modal.vue index 9fb1a5a..0a15077 100644 --- a/src/components/offline-device-detail-modal.vue +++ b/src/components/offline-device-detail-modal.vue @@ -1,5 +1,5 @@ - + diff --git a/src/components/station-card.vue b/src/components/station-card.vue index 9b44bbf..f190036 100644 --- a/src/components/station-card.vue +++ b/src/components/station-card.vue @@ -32,6 +32,13 @@ const offlineDeviceCount = computed(() => { }); return count; }); +const deviceCount = computed(() => { + let count = 0; + Object.values(DeviceType).forEach((deviceType) => { + count += stationDevices.value[deviceType].length; + }); + return count; +}); const devicAlarmCount = computed(() => { let count = 0; Object.values(DeviceType).forEach((deviceType) => { @@ -116,7 +123,7 @@ const theme = useThemeVars(); 离线设备