From 904488f59a99358d9e5ce453215b77f4c5b0dd63 Mon Sep 17 00:00:00 2001
From: TsMask <340112800@qq.com>
Date: Mon, 15 Sep 2025 19:32:11 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=B4=BB=E5=8A=A8?=
=?UTF-8?q?=E5=91=8A=E8=AD=A6=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=E5=B9=B6=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E7=BB=93?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/layouts/BasicLayout.vue | 6 ++
src/views/faultManage/active-alarm/index.vue | 71 ++++++++++++++------
2 files changed, 58 insertions(+), 19 deletions(-)
diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue
index 0353d81b..1b410274 100644
--- a/src/layouts/BasicLayout.vue
+++ b/src/layouts/BasicLayout.vue
@@ -217,6 +217,7 @@ onMounted(() => {
let serverTimeInterval: any = null;
let serverTime = 0;
let serverTimeZone = getTimezoneOffset();
+let activeAlarmRefresh = 0;
// 获取服务器时间
function fnGetServerTime() {
@@ -230,6 +231,7 @@ function fnGetServerTime() {
const serverTimeDom = document.getElementById('serverTimeDom');
serverTimeInterval = setInterval(() => {
serverTime += 1000;
+ activeAlarmRefresh += 1;
if (serverTimeDom) {
serverTimeDom.innerText = parseDateUTCToStr(
serverTime,
@@ -239,6 +241,10 @@ function fnGetServerTime() {
clearInterval(serverTimeInterval);
serverTimeInterval = null;
}
+ if (activeAlarmRefresh === 5) {
+ useAlarmStore().fnGetActiveAlarmInfo();
+ activeAlarmRefresh = 0;
+ }
}, 1000);
}
});
diff --git a/src/views/faultManage/active-alarm/index.vue b/src/views/faultManage/active-alarm/index.vue
index eecc281b..b5aae601 100644
--- a/src/views/faultManage/active-alarm/index.vue
+++ b/src/views/faultManage/active-alarm/index.vue
@@ -1,5 +1,5 @@
@@ -957,7 +982,11 @@ onMounted(() => {
{{ t('views.faultManage.activeAlarm.updateConfirm') }}
-
+
@@ -982,7 +1011,11 @@ onMounted(() => {
{{ t('views.faultManage.activeAlarm.clear') }}
-
+
{{ t('common.export') }}