From dad4b7fd3a7fcaed73d28f0ebd9e90d86ca21225 Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期二, 22 七月 2025 12:34:51 +0800 Subject: [PATCH] # --- src/main/webapp/views/admin/locMap/locMap.html | 26 ++++++++++++++++---------- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/main/webapp/views/admin/locMap/locMap.html b/src/main/webapp/views/admin/locMap/locMap.html index 347f66c..1942958 100644 --- a/src/main/webapp/views/admin/locMap/locMap.html +++ b/src/main/webapp/views/admin/locMap/locMap.html @@ -193,22 +193,26 @@ }, methods: { init(){ + let that = this ws = new WebSocket("ws://" + window.location.host + baseUrl + "/console/websocket"); ws.onopen = this.webSocketOnOpen ws.onerror = this.webSocketOnError ws.onmessage = this.webSocketOnMessage ws.onclose = this.webSocketClose - this.getMap(this.currentLev) - this.initLev()//鍒濆鍖栨ゼ灞備俊鎭� - this.consoleInterval = setInterval(() => { - this.getMap(this.currentLev) //鑾峰彇瀹炴椂鍦板浘鏁版嵁 - this.getShuttleStateInfo() //鑾峰彇鍥涘悜绌挎杞︿俊鎭� - this.getLiftStateInfo() //鑾峰彇鎻愬崌鏈轰俊鎭� - this.getSiteInfo() //鑾峰彇杈撻�佺珯鐐规暟鎹� - // this.getCodeData()//鑾峰彇鏉$爜 - }, 1000) + this.initLev()//鍒濆鍖栨ゼ灞備俊鎭� + setTimeout(() => { + that.getMap(this.currentLev) + }, 1000); + + // this.consoleInterval = setInterval(() => { + // this.getMap(this.currentLev) //鑾峰彇瀹炴椂鍦板浘鏁版嵁 + // this.getShuttleStateInfo() //鑾峰彇鍥涘悜绌挎杞︿俊鎭� + // this.getLiftStateInfo() //鑾峰彇鎻愬崌鏈轰俊鎭� + // this.getSiteInfo() //鑾峰彇杈撻�佺珯鐐规暟鎹� + // // this.getCodeData()//鑾峰彇鏉$爜 + // }, 1000) }, initLev(){ @@ -317,7 +321,7 @@ //鑾峰彇鍦板浘鏁版嵁 getMap(lev) { this.sendWs(JSON.stringify({ - "url": "/console/map/auth", + "url": "/console/locMap/auth", "data": lev })) }, @@ -693,6 +697,8 @@ this.setSiteInfo(JSON.parse(result.data)) }else if (result.url == "/console/map/auth") { this.setMap(JSON.parse(result.data)) + }else if (result.url == "/console/locMap/auth") { + this.setMap(JSON.parse(result.data)) }else if (result.url == "/console/barcode/output/site") { this.setCodeData(JSON.parse(result.data)) } -- Gitblit v1.9.1