提交:设备详情 网关设备 添加 子设备以及自身网关设备 上下线状态 ws

This commit is contained in:
23688nl 2022-09-29 09:30:16 +08:00
parent f7f6839e27
commit 7e3dc27513
2 changed files with 3 additions and 9 deletions

View File

@ -412,11 +412,7 @@ export default {
this.stompClient.onclose = this.socket_onclose; this.stompClient.onclose = this.socket_onclose;
}, },
socket_message(evt) { socket_message(evt) {
console.log("wsljcg:=", evt);
const data = JSON.parse(evt.data); const data = JSON.parse(evt.data);
// this.actualEnergyCensus = data.params || {};
console.log("socket-message:", data);
this.handleDeviceInfo(data); this.handleDeviceInfo(data);
this.$forceUpdate(); this.$forceUpdate();
}, },

View File

@ -344,8 +344,9 @@ export default {
},${str}`; },${str}`;
}, },
wsMessage(e) { wsMessage(e) {
console.log('ws-message--', e) if (e['deviceState']) {
this.handleDeviceInfo(e); this.handleDeviceInfo(e);
}
}, },
// socket // socket
handleDeviceInfo(param) { handleDeviceInfo(param) {
@ -363,9 +364,6 @@ export default {
} }
} }
}, },
wsOpen(e) {
console.log("srrr---", e);
},
handleAllStatus(type) { handleAllStatus(type) {
if (this.childDeviceList.length > 0) { if (this.childDeviceList.length > 0) {
this.childDeviceList.forEach((v) => { this.childDeviceList.forEach((v) => {