From ab303371606d35958a5bea98b934b4b0da588b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Tue, 17 Dec 2024 14:47:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9C=8B=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/board/index.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ruoyi-ui/src/views/board/index.vue b/ruoyi-ui/src/views/board/index.vue index 041a9af..312c9de 100644 --- a/ruoyi-ui/src/views/board/index.vue +++ b/ruoyi-ui/src/views/board/index.vue @@ -592,6 +592,7 @@ export default { }, methods: { getData() { + let _this = this const socket = new WebSocket('ws://192.168.2.165:7181/ws'); @@ -601,17 +602,15 @@ export default { }; socket.onmessage = function (event) { - console.log(event); let data = JSON.parse(event.data) - console.log(data); if (data.AlarmInfo) { - this.AlarmInfo = data.AlarmInfo + _this.AlarmInfo = data.AlarmInfo } if (data.DeviceInfo) { - this.DeviceInfo = data.DeviceInfo + _this.DeviceInfo = data.DeviceInfo } if (data.TemParam) { - this.TemParam = data.TemParam + _this.TemParam = data.TemParam } };