#
Junjie
2025-08-01 728ad81fa10d2879654c5f9ae4314db94eafb865
src/main/webapp/views/console.html
@@ -358,17 +358,13 @@
            },
            methods: {
               init() {
                  this.ws = new WebSocket("ws://" + window.location.host + baseUrl + "/console/websocket");
                  this.ws.onopen = this.webSocketOnOpen
                  this.ws.onerror = this.webSocketOnError
                  this.ws.onmessage = this.webSocketOnMessage
                  this.ws.onclose = this.webSocketClose
                  this.getMap(this.currentLev)
                  this.getSystemRunningStatus() //获取系统运行状态
                  this.initLev()//初始化楼层信息
                  this.consoleInterval = setInterval(() => {
                     this.websocketConnect()
                     this.getShuttleStateInfo() //获取四向穿梭车信息
                     this.getLiftStateInfo() //获取提升机信息
                     this.getSiteInfo() //获取输送站点数据
@@ -709,10 +705,20 @@
                     }
                  }
               },
               websocketConnect() {
                  if (this.ws == null) {
                     this.ws = new WebSocket("ws://" + window.location.host + baseUrl + "/console/websocket");
                     this.ws.onopen = this.webSocketOnOpen
                     this.ws.onerror = this.webSocketOnError
                     this.ws.onmessage = this.webSocketOnMessage
                     this.ws.onclose = this.webSocketClose
                  }
               },
               webSocketOnOpen(e) {
                  console.log("open");
               },
               webSocketOnError(e) {
                  this.ws = null;
                  console.log(e);
               },
               webSocketOnMessage(e) {
@@ -730,11 +736,16 @@
                  }
               },
               webSocketClose(e) {
                  this.ws = null;
                  console.log("close");
               },
               sendWs(message) {
                  if (this.ws == null) {
                     return;
                  }
                  if (this.ws.readyState == WebSocket.OPEN) {
                     this.ws.send(message)
                     this.ws.send(message);
                  }
               }
            }