From c61f02cc6c4d19dd58e9c7d62453aa82c565f4b8 Mon Sep 17 00:00:00 2001 From: yangsy Date: Mon, 8 Sep 2025 16:40:57 +0800 Subject: [PATCH] feat: NvrDiskHealthHistoryDiagCard --- .../nvr-diag-history-card.vue | 9 +++- .../nvr-disk-health-history-diag-card.vue | 53 +++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 src/components/device-page/device-card/history-diag-card/nvr-disk-health-history-diag-card.vue diff --git a/src/components/device-page/device-card/history-diag-card/nvr-diag-history-card.vue b/src/components/device-page/device-card/history-diag-card/nvr-diag-history-card.vue index 4c4a161..f940b0b 100644 --- a/src/components/device-page/device-card/history-diag-card/nvr-diag-history-card.vue +++ b/src/components/device-page/device-card/history-diag-card/nvr-diag-history-card.vue @@ -7,6 +7,7 @@ import { computed, onMounted, reactive, toRefs, useTemplateRef } from 'vue'; import DeviceStatusHistoryDiagCard from './device-status-history-diag-card.vue'; import DeviceAlarmHistoryDiagCard from './device-alarm-history-diag-card.vue'; import DeviceUsageHistoryDiagCard from './device-usage-history-diag-card.vue'; +import NvrDiskHealthHistoryDiagCard from './nvr-disk-health-history-diag-card.vue'; const props = defineProps<{ stationCode: string; @@ -22,18 +23,23 @@ const searchFields = reactive({ type DeviceStatusHistoryDiagCardInst = InstanceType | null; type DeviceAlarmHistoryDiagCardInst = InstanceType | null; type DeviceUsageHistoryDiagCardInst = InstanceType | null; +type NvrDiskHealthHistoryCardInst = InstanceType | null; const deviceStatusHistoryDiagCardRef = useTemplateRef('deviceStatusHistoryDiagCardRef'); const deviceAlarmHistoryDiagCardRef = useTemplateRef('deviceAlarmHistoryDiagCardRef'); const deviceUsageHistoryDiagCardRef = useTemplateRef('deviceUsageHistoryDiagCardRef'); +const nvrDiskHealthHistoryCardRef = useTemplateRef('nvrDiskHealthHistoryCardRef'); function refreshData() { deviceStatusHistoryDiagCardRef.value?.refresh(); deviceAlarmHistoryDiagCardRef.value?.refresh(); deviceUsageHistoryDiagCardRef.value?.refresh(); + nvrDiskHealthHistoryCardRef.value?.refresh(); } const loading = computed(() => { - return deviceStatusHistoryDiagCardRef.value?.isPending || deviceAlarmHistoryDiagCardRef.value?.isPending || deviceUsageHistoryDiagCardRef.value?.isPending; + return ( + deviceStatusHistoryDiagCardRef.value?.isPending || deviceAlarmHistoryDiagCardRef.value?.isPending || deviceUsageHistoryDiagCardRef.value?.isPending || nvrDiskHealthHistoryCardRef.value?.isPending + ); }); onMounted(() => { @@ -72,6 +78,7 @@ onMounted(() => { :cpu-usage-field="'stCommonInfo.CPU使用率'" :mem-usage-field="'stCommonInfo.内存使用率'" /> + diff --git a/src/components/device-page/device-card/history-diag-card/nvr-disk-health-history-diag-card.vue b/src/components/device-page/device-card/history-diag-card/nvr-disk-health-history-diag-card.vue new file mode 100644 index 0000000..0ec8c44 --- /dev/null +++ b/src/components/device-page/device-card/history-diag-card/nvr-disk-health-history-diag-card.vue @@ -0,0 +1,53 @@ + + + + +