feat: add total device count
This commit is contained in:
@@ -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();
|
||||
<span class="font-xx-small" :class="[online ? 'clickable' : '']" @click="openOfflineDeviceTreeModal">离线设备</span>
|
||||
</template>
|
||||
<template #default>
|
||||
<span class="font-medium">{{ offlineDeviceCount }}</span>
|
||||
<span class="font-medium">{{ offlineDeviceCount }}/{{ deviceCount }}</span>
|
||||
</template>
|
||||
<template #suffix>
|
||||
<span class="font-xx-small">台</span>
|
||||
|
||||
Reference in New Issue
Block a user