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/console4.html | 172 ++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 122 insertions(+), 50 deletions(-)
diff --git a/src/main/webapp/views/console4.html b/src/main/webapp/views/console4.html
index d6737c5..d974358 100644
--- a/src/main/webapp/views/console4.html
+++ b/src/main/webapp/views/console4.html
@@ -14,7 +14,7 @@
<script type="text/javascript" src="../static/vue/js/vue.min.js"></script>
<script type="text/javascript" src="../static/vue/element/element.js"></script>
<script src="../static/js/gsap.min.js"></script>
- <script src="../static/js/pixi.min.js"></script>
+ <script src="../static/js/pixi-legacy.min.js"></script>
<style>
*{
margin: 0;
@@ -131,9 +131,11 @@
let pixiShuttleMap = new Map();
let pixiShuttleMoveAdvancePathMap = new Map();
let pixiShuttleMoveAdvancePathList = [];
+ let pixiShuttleLockPathMap = new Map();
let pixiStaMap = new Map();
let objectsContainer;
let objectsContainer2;
+ let objectsContainer3;
let graphics0;
let graphics3;
let graphics4;
@@ -148,7 +150,7 @@
data: {
map: [],
currentLev: 1,
- floorList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //褰撳墠椤圭洰妤煎眰
+ floorList: [1, 2, 3], //褰撳墠椤圭洰妤煎眰
currentLevShuttleList: [],//褰撳墠妤煎眰鍥涘悜绌挎杞﹂泦鍚�
shuttleColorList: [],//鍥涘悜绌挎杞﹂鑹查泦鍚�
drawer: false,
@@ -182,7 +184,7 @@
deep: true,
handler(val) {
if (!val) {
- var sprite = pixiStageList[this.drawerLocNoData.x][this.drawerLocNoData.y];
+ var sprite = pixiStageList[this.drawerLocNoData.x - 1][this.drawerLocNoData.y];
updateColor(sprite, 0xFFFFFF);//鎭㈠棰滆壊
}
}
@@ -200,10 +202,10 @@
// this.getSystemRunningStatus() //鑾峰彇绯荤粺杩愯鐘舵��
this.consoleInterval = setInterval(() => {
+ this.getMap(this.currentLev) //鑾峰彇瀹炴椂鍦板浘鏁版嵁
this.getShuttleStateInfo() //鑾峰彇鍥涘悜绌挎杞︿俊鎭�
this.getLiftStateInfo() //鑾峰彇鎻愬崌鏈轰俊鎭�
this.getSiteInfo() //鑾峰彇杈撻�佺珯鐐规暟鎹�
- this.getMap(this.currentLev) //鑾峰彇瀹炴椂鍦板浘鏁版嵁
// this.getCodeData()//鑾峰彇鏉$爜
}, 1000)
@@ -249,8 +251,8 @@
const shuttle = new PIXI.Sprite(resources.shuttle.texture);
shuttle.width = width
shuttle.height = height
- shuttle.x = item.point.x * width;//鏇存柊鍧愭爣x
- shuttle.y = item.point.y * height;//鏇存柊鍧愭爣y
+ shuttle.x = (item.wcsPoint.y - 0) * width;//鏇存柊鍧愭爣x
+ shuttle.y = (item.wcsPoint.x - 1) * height;//鏇存柊鍧愭爣y
shuttle.updateMoveStatus = true;//鍔ㄧ敾鎵ц瀹屾垚
shuttle.interactive = true; // 蹇呴』瑕佽缃墠鑳芥帴鏀朵簨浠�
shuttle.buttonMode = true; // 璁╁厜鏍囧湪hover鏃跺彉涓烘墜鍨嬫寚閽�
@@ -310,6 +312,15 @@
this.reloadMap = true
this.reloadSta = true
this.getMap(lev)
+
+ //娓呯┖鍗犵敤璺緞
+ objectsContainer3.removeChildren();
+ pixiShuttleLockPathMap = new Map();
+
+ //娓呯┖棰勮璺緞
+ objectsContainer2.removeChildren();
+ pixiShuttleMoveAdvancePathMap = new Map();
+ pixiShuttleMoveAdvancePathList = []
},
createMap(){
//Create a Pixi Application
@@ -341,6 +352,10 @@
// 鍒涘缓涓�涓鍣ㄦ潵绠$悊澶ф壒閲忕殑鏄剧ず瀵硅薄
objectsContainer2 = new PIXI.Container();
pixiApp.stage.addChild(objectsContainer2);
+
+ // 鍒涘缓涓�涓鍣ㄦ潵绠$悊澶ф壒閲忕殑鏄剧ず瀵硅薄
+ objectsContainer3 = new PIXI.Container();
+ pixiApp.stage.addChild(objectsContainer3);
//*******************鎷栧姩鐢诲竷*******************
let stageOriginalPos;
@@ -453,7 +468,7 @@
this.openDrawerLift(val)
}else{
//搴撲綅
- this.rightEvent(index, idx, e);
+ this.rightEvent(index + 1, idx, e);
updateColor(sprite, 0x9900ff);
}
});
@@ -488,24 +503,45 @@
pixiStaMap.set(parseInt(val.data), sprite);//绔欑偣鏁版嵁娣诲姞鍒癿ap涓�
}
- objectsContainer.addChild(sprite);
+ if (val.value == -999) {
+ pixiShuttleLockPathMap.set(this.getLocNoByXYZ(index + 1, idx, this.currentLev), sprite);
+ objectsContainer3.addChild(sprite);
+ }else {
+ objectsContainer.addChild(sprite);
+ }
pixiStageList[index][idx] = sprite
}
});
+
+ //瑙嗚灞呬腑
+ let containerWidth = (pixiApp.view.width - objectsContainer.width) / 2;
+ let containerHeight = (pixiApp.view.height - objectsContainer.height) / 2;
+ pixiApp.stage.position.set(containerWidth, containerHeight);
}else {
let diff = this.findDiffList(this.map, map);
diff.forEach((item, index) => {
//鑾峰彇old鍏冪礌
let oldSprite = pixiStageList[item.x][item.y]
- //绉婚櫎old鍏冪礌
- objectsContainer.removeChild(oldSprite)
+ if (item.originData == -999) {
+ //绉婚櫎old璺緞鍏冪礌
+ objectsContainer3.removeChild(oldSprite);
+ }else {
+ //绉婚櫎old鍏冪礌
+ objectsContainer.removeChild(oldSprite);
+ }
let sprite = getSprite(item.data, item.y * width, item.x * height, (e) => {
- this.rightEvent(item.x, item.y, e);
+ this.rightEvent(item.x + 1, item.y, e);
updateColor(sprite, 0x9900ff);
});
- objectsContainer.addChild(sprite);
+ if (item.data == -999) {
+ //娣诲姞璺緞鍏冪礌
+ objectsContainer3.addChild(sprite);
+ }else {
+ //娣诲姞鍏冪礌
+ objectsContainer.addChild(sprite);
+ }
//淇濆瓨鏂板厓绱�
pixiStageList[item.x][item.y] = sprite
@@ -527,7 +563,8 @@
diff.push({
x: index,
y: idx,
- data: arr2[index][idx].value
+ data: arr2[index][idx].value,
+ originData: val.value
})
}
})
@@ -544,15 +581,17 @@
return false;//涓や釜闆嗗悎闀垮害涓嶄竴鑷�
}
+ let flag = false;
list1.forEach((item,index) => {
for (var i = 0; i < list2.length; i++) {
- if (item.shuttleNo != list2[i].shuttleNo) {
- return false;//鎵句笉鍒板皬杞﹀彿
+ if (item.shuttleNo == list2[i].shuttleNo) {
+ flag = true;
+ break;
}
}
});
- return true;
+ return flag;
},
findShuttlePathDiffList(list1, list2) {
//妫�娴嬮泦鍚�1閲岄潰鐨勫皬杞﹂璁¤矾寰勬槸鍚﹀湪闆嗗悎2涓湁鍙樺姩
@@ -567,7 +606,7 @@
let item = list1[index];
for (var i = 0; i < list2.length; i++) {
if (item.shuttleNo != list2[i].shuttleNo) {
- return false;//鎵句笉鍒板皬杞﹀彿
+ continue;//鎵句笉鍒板皬杞﹀彿
}
if (item.moveAdvancePath == null) {
@@ -578,7 +617,7 @@
list2[i].moveAdvancePath = [];
}
- if (item.moveAdvancePath.length != list2[i].moveAdvancePath.length) {
+ if (!(item.moveAdvancePath.length == list2[i].moveAdvancePath.length)) {
return false;//灏忚溅棰勮璺緞闀垮害涓嶄竴鑷�
}
}
@@ -653,12 +692,12 @@
if (shuttle.updateMoveStatus) {//鍔ㄧ敾鎵ц瀹屾垚鎵嶅彲缁х画鎵ц鍔ㄧ敾
shuttle.updateMoveStatus = false;//鍔ㄧ敾鎵ц涓�
// 璁$畻涓ょ偣涔嬮棿鐨勮窛绂�1
- const distance = Math.sqrt(Math.pow((item.point.x * width) - shuttle.x, 2) + Math.pow((item.point.y * height) - shuttle.y, 2));
+ const distance = Math.sqrt(Math.pow((item.wcsPoint.x * width) - shuttle.x, 2) + Math.pow((item.wcsPoint.y * height) - shuttle.y, 2));
gsap.killTweensOf(shuttle); // 鏉�姝绘墍鏈夐拡瀵�".class"鐨勫姩鐢�
gsap.to(shuttle, {
- x: item.point.x * width, // 鐩爣浣嶇疆
- y: item.point.y * height, // 鐩爣浣嶇疆
- duration: distance / 100, // 鍔ㄧ敾鎸佺画鏃堕棿锛堢锛�
+ x: (item.wcsPoint.y - 0) * width, // 鐩爣浣嶇疆
+ y: (item.wcsPoint.x - 1) * height, // 鐩爣浣嶇疆
+ duration: 0.2, // 鍔ㄧ敾鎸佺画鏃堕棿锛堢锛�
ease: "power1.inOut", // 缂撳姩绫诲瀷
onComplete: () => {
shuttle.updateMoveStatus = true;//鍔ㄧ敾鎵ц瀹屾垚
@@ -674,10 +713,8 @@
}))
},
setSiteInfo(res) {
-
- var test = "{\"msg\":\"鎿嶄綔鎴愬姛\",\"code\":200,\"data\":[{\"siteId\":\"300\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"301\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"302\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"303\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"304\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"305\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"306\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"307\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"308\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"309\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"310\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"311\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"312\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"313\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"314\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"315\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"316\",\"siteStatus\":\"site-auto-run\",\"workNo\":0},{\"siteId\":\"317\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"318\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"319\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"320\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"321\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"322\",\"siteStatus\":\"site-auto-run\",\"workNo\":0},{\"siteId\":\"323\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"324\",\"siteStatus\":\"site-auto-run\",\"workNo\":0},{\"siteId\":\"325\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"326\",\"siteStatus\":\"site-auto-id\",\"workNo\":5451},{\"siteId\":\"327\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"200\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"328\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"201\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"329\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"202\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"330\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"203\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"331\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"204\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"332\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"205\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"333\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"334\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"335\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"336\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"337\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"338\",\"siteStatus\":\"site-auto-run\",\"workNo\":0},{\"siteId\":\"339\",\"siteStatus\":\"site-auto-run-id\",\"workNo\":5447},{\"siteId\":\"340\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"341\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"342\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"343\",\"siteStatus\":\"site-auto-run\",\"workNo\":0},{\"siteId\":\"344\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"345\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"346\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"100\",\"siteStatus\":\"site-auto-run-id\",\"workNo\":8851},{\"siteId\":\"101\",\"siteStatus\":\"site-auto-run-id\",\"workNo\":8855},{\"siteId\":\"102\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"103\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"104\",\"siteStatus\":\"site-auto-run\",\"workNo\":0},{\"siteId\":\"105\",\"siteStatus\":\"site-auto\",\"workNo\":0}]}";
- res = JSON.parse(test)
-
+ // var test = "{\"msg\":\"鎿嶄綔鎴愬姛\",\"code\":200,\"data\":[{\"siteId\":\"300\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"301\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"302\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"303\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"304\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"305\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"306\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"307\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"308\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"309\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"310\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"311\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"312\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"313\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"314\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"315\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"316\",\"siteStatus\":\"site-auto-run\",\"workNo\":0},{\"siteId\":\"317\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"318\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"319\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"320\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"321\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"322\",\"siteStatus\":\"site-auto-run\",\"workNo\":0},{\"siteId\":\"323\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"324\",\"siteStatus\":\"site-auto-run\",\"workNo\":0},{\"siteId\":\"325\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"326\",\"siteStatus\":\"site-auto-id\",\"workNo\":5451},{\"siteId\":\"327\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"200\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"328\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"201\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"329\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"202\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"330\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"203\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"331\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"204\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"332\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"205\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"333\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"334\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"335\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"336\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"337\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"338\",\"siteStatus\":\"site-auto-run\",\"workNo\":0},{\"siteId\":\"339\",\"siteStatus\":\"site-auto-run-id\",\"workNo\":5447},{\"siteId\":\"340\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"341\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"342\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"343\",\"siteStatus\":\"site-auto-run\",\"workNo\":0},{\"siteId\":\"344\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"345\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"346\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"100\",\"siteStatus\":\"site-auto-run-id\",\"workNo\":8851},{\"siteId\":\"101\",\"siteStatus\":\"site-auto-run-id\",\"workNo\":8855},{\"siteId\":\"102\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"103\",\"siteStatus\":\"site-auto\",\"workNo\":0},{\"siteId\":\"104\",\"siteStatus\":\"site-auto-run\",\"workNo\":0},{\"siteId\":\"105\",\"siteStatus\":\"site-auto\",\"workNo\":0}]}";
+ // res = JSON.parse(test)
//鑾峰彇杈撻�佺珯鐐规暟鎹�
if (res.code === 200){
var sites = res.data;
@@ -699,7 +736,7 @@
objectsContainer.removeChild(sta.statusObj)
sta.statusObj = null;
}
- }else if (item.siteStatus == "site-auto-run") {
+ }else if (item.siteStatus == "site-auto-run" || item.siteStatus == "site-auto-run-id") {
//鑷姩鏈夌墿
let graphics = getGraphics(0xfa51f6, width, height, sta.x, sta.y);
graphics.addChild(sta.textObj);//缁ф壙鏂囧瓧淇℃伅
@@ -822,7 +859,7 @@
moveAdvancePath.forEach((path, idx) => {
let locNo = that.getLocNoByXYZ(path.x, path.y, path.z);
if (!pixiShuttleMoveAdvancePathMap.has(locNo)) {
- let graphics = getGraphics(0x9966ff, width, height, path.y * width, path.x * height);
+ let graphics = getGraphics(0x9966ff, width, height, path.y * width, (path.x - 1) * height);
let shuttleNos = [shuttleNo];
// 鍒涘缓鏂囨湰瀵硅薄
const style = new PIXI.TextStyle({
@@ -845,36 +882,71 @@
})
if (pixiShuttleMoveAdvancePathList[shuttleNo] == null) {
- pixiShuttleMoveAdvancePathList[shuttleNo] = [locNo];
- } else {
- pixiShuttleMoveAdvancePathList[shuttleNo].push(locNo);
+ let locNos = new Set()
+ locNos.add(locNo);
+ pixiShuttleMoveAdvancePathList[shuttleNo] = locNos;
+ }else {
+ pixiShuttleMoveAdvancePathList[shuttleNo].add(locNo);
+ }
+ }else {
+ let pathMap = pixiShuttleMoveAdvancePathMap.get(locNo)
+ let shuttleNos = pathMap.shuttleNos;
+ shuttleNos.push(shuttleNo);
+ pathMap.textObj.text = JSON.stringify(shuttleNos);
+ pixiShuttleMoveAdvancePathMap.set(locNo, pathMap);
+ if (pixiShuttleMoveAdvancePathList[shuttleNo] == null) {
+ let locNos = new Set()
+ locNos.add(locNo);
+ pixiShuttleMoveAdvancePathList[shuttleNo] = locNos;
+ }else {
+ pixiShuttleMoveAdvancePathList[shuttleNo].add(locNo);
}
}
});
},
removeMoveAdvancePath(shuttleNo) {//鍒犻櫎棰勮璺緞
let locNos = pixiShuttleMoveAdvancePathList[shuttleNo];
- locNos.forEach((locNo,index) => {
- let pathMap = pixiShuttleMoveAdvancePathMap.get(locNo);
- if (pathMap != null) {
- let shuttleNos = pathMap.shuttleNos;
- let shuttleNosNew = [];
- shuttleNos.forEach((shuttle, idx) => {
- if (shuttle != shuttleNo) {
- shuttleNosNew.push(shuttle);
- }
- });
+ if (locNos != null) {
+ locNos.forEach((locNo,index) => {
+ let pathMap = pixiShuttleMoveAdvancePathMap.get(locNo);
+ if (pathMap != null) {
+ let shuttleNos = pathMap.shuttleNos;
+ let shuttleNosNew = [];
+ shuttleNos.forEach((shuttle, idx) => {
+ if (shuttle != shuttleNo) {
+ shuttleNosNew.push(shuttle);
+ }
+ });
- if (shuttleNosNew.length === 0) {
- //棰勮璺緞娌℃湁灏忚溅锛岀洿鎺ュ垹闄よ矾寰�
- objectsContainer2.removeChild(pathMap.sprite);
- pixiShuttleMoveAdvancePathMap.delete(locNo)
- }else {
- //棰勮璺緞瀛樺湪鍏朵粬灏忚溅锛屾洿鏂版枃瀛椾俊鎭�
- pathMap.textObj.text = JSON.stringify(shuttleNosNew);
- pathMap.shuttleNos = shuttleNosNew;
- pixiShuttleMoveAdvancePathMap.set(locNo, pathMap);
+ if (shuttleNosNew.length === 0) {
+ //棰勮璺緞娌℃湁灏忚溅锛岀洿鎺ュ垹闄よ矾寰�
+ objectsContainer2.removeChild(pathMap.sprite);
+ pixiShuttleMoveAdvancePathMap.delete(locNo)
+ }else {
+ //棰勮璺緞瀛樺湪鍏朵粬灏忚溅锛屾洿鏂版枃瀛椾俊鎭�
+ pathMap.textObj.text = JSON.stringify(shuttleNosNew);
+ pathMap.shuttleNos = shuttleNosNew;
+ pixiShuttleMoveAdvancePathMap.set(locNo, pathMap);
+ }
}
+ })
+ }
+ },
+ resetMap() {
+ //閲嶇疆鍦板浘
+ let that = this
+ $.ajax({
+ url:baseUrl+"/console/map/resetMap/" + this.currentLev,
+ headers:{
+ 'token': localStorage.getItem('token')
+ },
+ data:{},
+ method:'get',
+ success:function (res) {
+ that.$message({
+ message: that.currentLev + '灞傚湴鍥鹃噸缃畬鎴�',
+ type: 'success'
+ });
}
})
},
--
Gitblit v1.9.1