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;