From 5bf2b51ec743cd422a0eb3277b9c93a08c700315 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期一, 10 二月 2025 08:46:30 +0800
Subject: [PATCH] #
---
src/main/webapp/views/console.html | 50 +++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 39 insertions(+), 11 deletions(-)
diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html
index f23fd86..7f5fb5d 100644
--- a/src/main/webapp/views/console.html
+++ b/src/main/webapp/views/console.html
@@ -60,8 +60,8 @@
<!--杈撳嚭灏忚溅-->
<div v-for="(car,idx) in currentLevShuttleList"
:style="{
- left: getCarPosition(car.wcsPoint.x,car.wcsPoint.y)[1]
- ,top: getCarPosition(car.wcsPoint.x,car.wcsPoint.y)[0]
+ left: getCarPosition(car.point.x,car.point.y)[1]
+ ,top: getCarPosition(car.point.x,car.point.y)[0]
,color: shuttleColorList[car.shuttleNo]
}"
class="sxcar" :id="'sxcar-' + car.shuttleNo">
@@ -76,8 +76,9 @@
<el-button :style="{background:currentLev === lev ? '#7DCDFF':''}" @click="changFloor(lev)">{{lev}}F</el-button>
</div>
<div>
- <el-button @click="testMove()">娴嬭瘯绉诲姩杞�</el-button>
+<!-- <el-button @click="testMove()">娴嬭瘯绉诲姩杞�</el-button>-->
<el-button @click="resetMap()">閲嶇疆鍦板浘</el-button>
+<!-- <el-button @click="initLoc()">鍒濆鍖栧簱浣�</el-button>-->
</div>
</div>
</div>
@@ -333,7 +334,7 @@
map: [],//鍦板浘鏁版嵁
currentLev: 1,//鍦板浘褰撳墠妤煎眰
siteWindow: false, //绔欑偣寮圭獥鏄剧ず榛樿涓嶆樉绀�
- floorList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //褰撳墠椤圭洰妤煎眰
+ floorList: [1, 2, 3, 4], //褰撳墠椤圭洰妤煎眰
shuttleList: [], //鍥涘悜绌挎杞﹂泦鍚�
currentLevShuttleList: [],//褰撳墠妤煎眰鍥涘悜绌挎杞﹂泦鍚�
shuttleColorList: [],//鍥涘悜绌挎杞﹂鑹查泦鍚�
@@ -414,7 +415,10 @@
},
getSiteInfo() {
//鑾峰彇杈撻�佺珯鐐规暟鎹�
- this.sendWs("{\"url\":\"/console/latest/data/site\",\"data\":{}}")
+ this.sendWs(JSON.stringify({
+ "url": "/console/latest/data/site",
+ "data": {}
+ }))
},
setSiteInfo(res) {
//鑾峰彇杈撻�佺珯鐐规暟鎹�
@@ -441,7 +445,10 @@
this.getMap(lev)
},
getShuttleStateInfo() {
- this.sendWs("{\"url\":\"/shuttle/table/shuttle/state\",\"data\":{}}")
+ this.sendWs(JSON.stringify({
+ "url": "/shuttle/table/shuttle/state",
+ "data": {}
+ }))
},
setShuttleStateInfo(res) {
// 鍥涘悜绌挎杞︿俊鎭〃鑾峰彇
@@ -469,7 +476,10 @@
},
getLiftStateInfo() {
// 鎻愬崌鏈轰俊鎭〃鑾峰彇
- this.sendWs("{\"url\":\"/lift/table/lift/state\",\"data\":{}}")
+ this.sendWs(JSON.stringify({
+ "url": "/lift/table/lift/state",
+ "data": {}
+ }))
},
setLiftStateInfo(res) {
// 鎻愬崌鏈轰俊鎭〃鑾峰彇
@@ -589,8 +599,8 @@
let tmp = null
tmp = setInterval(() => {
if (index < res.length) {
- that.currentLevShuttleList[0].wcsPoint.y = res[index].y
- that.currentLevShuttleList[0].wcsPoint.x = res[index].x
+ that.currentLevShuttleList[0].point.y = res[index].y
+ that.currentLevShuttleList[0].point.x = res[index].x
index++
}else {
clearInterval(tmp)
@@ -639,7 +649,7 @@
//閲嶇疆鍦板浘
let that = this
$.ajax({
- url:baseUrl+"/console/map/resetMap/auth",
+ url:baseUrl+"/console/map/resetMap/" + this.currentLev,
headers:{
'token': localStorage.getItem('token')
},
@@ -647,7 +657,25 @@
method:'get',
success:function (res) {
that.$message({
- message: '閲嶇疆瀹屾垚',
+ message: that.currentLev + '灞傚湴鍥鹃噸缃畬鎴�',
+ type: 'success'
+ });
+ }
+ })
+ },
+ initLoc() {
+ //鍒濆鍖栧簱浣�
+ let that = this
+ $.ajax({
+ url:baseUrl+"/locMast/init",
+ headers:{
+ 'token': localStorage.getItem('token')
+ },
+ data:{},
+ method:'post',
+ success:function (res) {
+ that.$message({
+ message: '鍒濆鍖栧畬鎴�',
type: 'success'
});
}
--
Gitblit v1.9.1