diff --git a/src/views/checkManage/index.vue b/src/views/checkManage/index.vue index 5726d32..9fbb682 100644 --- a/src/views/checkManage/index.vue +++ b/src/views/checkManage/index.vue @@ -289,42 +289,42 @@ export default { }) .catch((err) => {}); }, - initWebSocket() { - //初始化weosocket - const wsuri = "ws://127.0.0.1:8099/ws/111"; - this.websock = new WebSocket(wsuri); - this.websock.onmessage = this.websocketonmessage; - this.websock.onopen = this.websocketonopen; - this.websock.onerror = this.websocketonerror; - this.websock.onclose = this.websocketclose; - }, - websocketonopen() { - //连接建立之后执行send方法发送数据 - this.websocketsend(JSON.stringify(actions)); - }, - websocketonerror() { - //连接建立失败重连 - this.initWebSocket(); - }, - websocketonmessage(e) { - console.log("aaaa"); - var el = JSON.parse(e.data) - console.log(el.type); + // initWebSocket() { + // //初始化weosocket + // const wsuri = "ws://127.0.0.1:8099/ws/111"; + // this.websock = new WebSocket(wsuri); + // this.websock.onmessage = this.websocketonmessage; + // this.websock.onopen = this.websocketonopen; + // this.websock.onerror = this.websocketonerror; + // this.websock.onclose = this.websocketclose; + // }, + // websocketonopen() { + // //连接建立之后执行send方法发送数据 + // this.websocketsend(JSON.stringify(actions)); + // }, + // websocketonerror() { + // //连接建立失败重连 + // this.initWebSocket(); + // }, + // websocketonmessage(e) { + // console.log("aaaa"); + // var el = JSON.parse(e.data) + // console.log(el.type); - if (el.type == "InventoryPush") { - this.wsData.push(el); - } - //数据接收 - const redata = JSON.parse(e.data); - }, - websocketsend(Data) { - //数据发送 - this.websock.send(Data); - }, - websocketclose(e) { - //关闭 - console.log("断开连接", e); - }, + // if (el.type == "InventoryPush") { + // this.wsData.push(el); + // } + // //数据接收 + // const redata = JSON.parse(e.data); + // }, + // websocketsend(Data) { + // //数据发送 + // this.websock.send(Data); + // }, + // websocketclose(e) { + // //关闭 + // console.log("断开连接", e); + // }, }, components: { Subsection, diff --git a/src/views/realTimeMonitoring/index.vue b/src/views/realTimeMonitoring/index.vue index 5e195ca..16f514f 100644 --- a/src/views/realTimeMonitoring/index.vue +++ b/src/views/realTimeMonitoring/index.vue @@ -1,6 +1,6 @@