From f7f6839e2780e518b192c387a9016b638e5e79cd Mon Sep 17 00:00:00 2001 From: 23688nl <329261568@qq.com> Date: Thu, 29 Sep 2022 09:07:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=EF=BC=9A=20=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=20=E8=AE=BE=E5=A4=87=E8=AF=A6=E6=83=85=E9=A1=B5=20?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=8A=B6=E6=80=81=E6=9B=B4=E6=96=B0=20ws?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/project/profileV2/DeviceManage/EDeviceChildren.vue | 4 ++-- src/views/profile/DeviceDetailsView/deviceSelectNav.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/iot/project/profileV2/DeviceManage/EDeviceChildren.vue b/src/views/iot/project/profileV2/DeviceManage/EDeviceChildren.vue index 481ff48f..2e7ee01d 100644 --- a/src/views/iot/project/profileV2/DeviceManage/EDeviceChildren.vue +++ b/src/views/iot/project/profileV2/DeviceManage/EDeviceChildren.vue @@ -338,7 +338,7 @@ export default { handleDeviceInfo(param) { if (this.tableList && this.tableList.length > 0) { this.tableList = this.tableList.map((v) => { - if (v["deviceId"] === param["deviceId"]) { + if (v["deviceKey"] === param["deviceKey"]) { return Object.assign(v, param); } else { return v; @@ -357,7 +357,7 @@ export default { if (!this.tableList || this.length <= 0) { return; } - let deviceIds = this.tableList.map((v) => v["deviceId"]); + let deviceIds = this.tableList.map((v) => v["deviceKey"]); this.stompClient = new WebSocket( `${webSocketProjectGatewayUrl}/${this.getGuid()}/${deviceIds.toString()}` ); diff --git a/src/views/profile/DeviceDetailsView/deviceSelectNav.vue b/src/views/profile/DeviceDetailsView/deviceSelectNav.vue index ec4a92e7..8aa2d784 100644 --- a/src/views/profile/DeviceDetailsView/deviceSelectNav.vue +++ b/src/views/profile/DeviceDetailsView/deviceSelectNav.vue @@ -349,12 +349,12 @@ export default { }, // 处理 socket 数据返回 赋值问题 handleDeviceInfo(param) { - if (param.deviceId === this.deviceInfo.deviceId) { + if (param.deviceKey === this.deviceInfo.deviceKey) { this.deviceInfo = Object.assign(this.deviceInfo, param); } else { if (this.childDeviceList && this.childDeviceList.length > 0) { this.childDeviceList = this.childDeviceList.map((v) => { - if (v["deviceId"] === param["deviceId"]) { + if (v["deviceKey"] === param["deviceKey"]) { return Object.assign(v, param); } else { return v;