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