From 42928bfe7fea4cd35eb122bc7708c54d828d2199 Mon Sep 17 00:00:00 2001
From: fanluyan <754122931@qq.com>
Date: Tue, 16 Jul 2024 10:17:22 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E5=88=99=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
socket/index.js | 20 ++++++++--------
src/App.vue | 23 ++++++++++++++++++-
src/views/alarmRules/components/addRules.vue | 24 +++++++++++++-------
src/views/homePage/warnMessage/index.vue | 24 ++------------------
4 files changed, 50 insertions(+), 41 deletions(-)
diff --git a/socket/index.js b/socket/index.js
index 6d581450..b08df317 100644
--- a/socket/index.js
+++ b/socket/index.js
@@ -88,16 +88,16 @@ const webSocketOnMessage = (e) => {
// WebSocket关闭处理
const closeWebsocket = (e) => {
console.log("WebSocket连接已关闭:", e);
- if (!hasShownNotification) {
- Notification({
- title: "告警",
- message: "WebSocket连接已关闭",
- position: "bottom-right",
- type: "warning",
- duration: 2000,
- });
- hasShownNotification = true; // 更新状态,防止再次显示
- }
+ // if (!hasShownNotification) {
+ // Notification({
+ // title: "告警",
+ // message: "WebSocket连接已关闭",
+ // position: "bottom-right",
+ // type: "warning",
+ // duration: 2000,
+ // });
+ // hasShownNotification = true; // 更新状态,防止再次显示
+ // }
// 清除所有定时器
clearTimeout(timeoutObj);
diff --git a/src/App.vue b/src/App.vue
index c0e0ff38..5eae690f 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -5,6 +5,7 @@