This commit is contained in:
yangsy
2025-08-21 21:11:45 +08:00
parent 230aee89c2
commit 9cfc5924f9

View File

@@ -39,7 +39,7 @@ const alarmCount = computed(() => {
}, 0);
});
const classifiedCount = computed(() => {
const classifiedCounts = computed(() => {
return Object.values(DeviceType).map<{ label: string; count: number }>((deviceType) => {
return {
label: DeviceTypeName[deviceType],
@@ -168,11 +168,13 @@ const onModalClose = () => {};
<span>当前没有设备告警</span>
</div>
<div v-else style="height: 100%; display: flex; flex-direction: column">
<NRow style="flex: 0 0 auto; margin-bottom: 16px">
<NCol :span="3" v-for="item in classifiedCount" :key="item.label">
<NStatistic :label="item.label + '告警'" :value="item.count"></NStatistic>
</NCol>
</NRow>
<div style="flex: 0 0 auto; margin-bottom: 16px">
<NRow>
<NCol :span="3" v-for="item in classifiedCounts" :key="item.label">
<NStatistic :label="item.label + '告警'" :value="item.count" />
</NCol>
</NRow>
</div>
<div style="flex: 0 0 auto; display: flex; align-items: center; padding: 8px 0">
<div style="font-size: medium">今日设备告警列表</div>
<NSpace style="margin-left: auto">