From 8b2caa0333c5b3baa2172bf38907e197748814f4 Mon Sep 17 00:00:00 2001 From: 23688nl <329261568@qq.com> Date: Wed, 12 Oct 2022 18:17:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=EF=BC=9A=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=A1=B9=E7=9B=AE=E4=B8=8B=20=E5=AD=90=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=20ws=20=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DeviceManage/EDeviceChildren.vue | 14 ++--- .../profileV2/DeviceManage/EDeviceTable.vue | 56 +------------------ .../DeviceDetailsView/deviceSelectNav.vue | 19 +++++++ 3 files changed, 29 insertions(+), 60 deletions(-) diff --git a/src/views/iot/project/profileV2/DeviceManage/EDeviceChildren.vue b/src/views/iot/project/profileV2/DeviceManage/EDeviceChildren.vue index 2e7ee01d..86bda6ab 100644 --- a/src/views/iot/project/profileV2/DeviceManage/EDeviceChildren.vue +++ b/src/views/iot/project/profileV2/DeviceManage/EDeviceChildren.vue @@ -261,10 +261,10 @@ export default { ).then((res) => { this.tableList = res.rows; this.deviceTotal = res.total; - if (this.stompClient) { - this.closeSocket(); - } - this.connection(); + // if (this.stompClient) { + // this.closeSocket(); + // } + // this.connection(); }); }, // 动态表格 返回的 勾选数据 @@ -364,9 +364,9 @@ export default { this.stompClient.onmessage = this.socket_message; this.stompClient.onclose = this.socket_onclose; }, - socket_message(evt) { - console.log("wsljcg:=", evt); - const data = JSON.parse(evt.data); + socket_message(data) { + console.log("wsljcg:=", data); + // const data = JSON.parse(evt.data); // this.actualEnergyCensus = data.params || {}; console.log("socket-message:", data); this.handleDeviceInfo(data); diff --git a/src/views/iot/project/profileV2/DeviceManage/EDeviceTable.vue b/src/views/iot/project/profileV2/DeviceManage/EDeviceTable.vue index 5388336f..d147c431 100644 --- a/src/views/iot/project/profileV2/DeviceManage/EDeviceTable.vue +++ b/src/views/iot/project/profileV2/DeviceManage/EDeviceTable.vue @@ -181,6 +181,7 @@