提交: ws 更改设备id 为deviceKey
This commit is contained in:
parent
1af91ba9e5
commit
7edd17714d
|
@ -404,7 +404,7 @@ export default {
|
|||
if (!this.list || this.length <= 0) {
|
||||
return;
|
||||
}
|
||||
let deviceIds = this.list.map((v) => v["deviceId"]);
|
||||
let deviceIds = this.list.map((v) => v["deviceKey"]);
|
||||
this.stompClient = new WebSocket(
|
||||
`${webSocketProjectGatewayUrl}/${this.getGuid()}/${deviceIds.toString()}`
|
||||
);
|
||||
|
@ -424,7 +424,7 @@ export default {
|
|||
handleDeviceInfo(param) {
|
||||
if (this.list && this.list.length > 0) {
|
||||
this.list = this.list.map((v) => {
|
||||
if (v["deviceId"] === param["deviceId"]) {
|
||||
if (v["deviceKey"] === param["deviceKey"]) {
|
||||
return Object.assign(v, param);
|
||||
} else {
|
||||
return v;
|
||||
|
|
|
@ -340,7 +340,7 @@ export default {
|
|||
handleOpenDevStatusService(str) {
|
||||
console.log("handleOpenDevStatusService", str);
|
||||
this.wsStatusService = `${webSocketProjectGatewayUrl}/${this.getGuid()}/${
|
||||
this.deviceInfo.deviceId
|
||||
this.deviceInfo.deviceKey
|
||||
},${str}`;
|
||||
},
|
||||
wsMessage(e) {
|
||||
|
@ -602,7 +602,7 @@ export default {
|
|||
}).then((response) => {
|
||||
this.childDeviceList = response.rows;
|
||||
var childDeviceIds = [...response.rows].map((v) => {
|
||||
return v.deviceId;
|
||||
return v.deviceKey;
|
||||
});
|
||||
this.handleOpenDevStatusService(childDeviceIds.toString());
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue