From 3cac6d1b43cef5ed4fa9ea3ca2f1912f7a1a28eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Thu, 15 May 2025 17:27:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=89=E7=BA=A4=E6=8A=A5=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/JiHeExpressway/components/WarningNotify.vue | 9 +++++++++ ruoyi-ui/src/views/websocket.vue | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/WarningNotify.vue b/ruoyi-ui/src/views/JiHeExpressway/components/WarningNotify.vue index 379b9cc2..5f337301 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/WarningNotify.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/WarningNotify.vue @@ -79,6 +79,15 @@ export default { title:'扫码报警', duration: 0 } + } else if(checkRole(["admin"]) && para.subEvent === "opticalFiberAlarm"){ + obj = { + content: para.content.message, + time:'', + type: "opticalFiberAlarm", + level: "danger", + title:'光纤报警(' +para.content.contentType+")", + duration: 0 + } } else if(checkPermi(["home:notice:warningEvent"]) && para.subEvent === '1'){ //非机预警 diff --git a/ruoyi-ui/src/views/websocket.vue b/ruoyi-ui/src/views/websocket.vue index 826ff7f5..e0b78c8f 100644 --- a/ruoyi-ui/src/views/websocket.vue +++ b/ruoyi-ui/src/views/websocket.vue @@ -56,7 +56,8 @@ export default { if (method !== "event") { return; } - +console.log("推送測試") +console.log(message) const params = message.params; const subEvent = params.subEvent; const content = params.content; @@ -68,7 +69,8 @@ export default { } switch (subEvent) { - case "payment_webSocket_send": + + case "payment_webSocket_send": this.$store.commit("PAYMENT", content); break; case "carList": @@ -107,9 +109,11 @@ export default { break; case "0": this.$emit("newEvent", params); + break; case "3": case "externalPlatformOffline": + case "opticalFiberAlarm": case "trafficFlowDataEarlyWarning": this.$emit("newEvent", params); break;