From 6a1546c0d0e56675b4b0cc936d8f2308f6fb2378 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 08 四月 2024 16:28:18 +0800
Subject: [PATCH] Merge branch 'Four-Way-Rack' of http://47.97.1.152:5880/r/zy-asrs-master into Four-Way-Rack

---
 zy-asrs-flow/src/pages/map/utils.js |   38 ++++++++++++++++++++++----------------
 1 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/utils.js b/zy-asrs-flow/src/pages/map/utils.js
index 64df894..bbf26ab 100644
--- a/zy-asrs-flow/src/pages/map/utils.js
+++ b/zy-asrs-flow/src/pages/map/utils.js
@@ -44,6 +44,7 @@
 export const SENSOR_ZINDEX = Object.freeze({
     SHELF: 1,
     POINT: 1,
+    TRAVEL_PATH: 80,
     SHUTTLE: 100,
     AGV: 100,
 })
@@ -479,20 +480,25 @@
     mapContainer?.children.forEach(child => {
         if (child.data?.uuid) {
             const { type, uuid, no, ...property } = child.data;
-            mapItemList.push({
-                // data
-                type: type,
-                uuid: uuid,
-                no: no,
-                property: property,
+            if (!(
+                type === SENSOR_TYPE.SHUTTLE
+                || type === SENSOR_TYPE.AGV
+            )) {
+                mapItemList.push({
+                    // data
+                    type: type,
+                    uuid: uuid,
+                    no: no,
+                    property: property,
 
-                // graph
-                positionX: child.position.x,
-                positionY: child.position.y,
-                scaleX: child.scale.x,
-                scaleY: child.scale.y,
-                rotation: rotationToNum(child.rotation)
-            })
+                    // graph
+                    positionX: child.position.x,
+                    positionY: child.position.y,
+                    scaleX: child.scale.x,
+                    scaleY: child.scale.y,
+                    rotation: rotationToNum(child.rotation)
+                })
+            }
         }
     })
 
@@ -625,13 +631,13 @@
     // shuttleVo
     for (const shuttleVo of mapVo.shuttleVos) {
         // path
-        drawPreTravelPath(shuttleVo.preTravelPath, shuttleVo.shuttleNo, curFloor);
+        drawTravelPath(shuttleVo.travelPath, shuttleVo.shuttleNo, curFloor);
         // shuttle
         showShuttle(shuttleVo.shuttleNo, shuttleVo.curLocNo, curFloor, setCurSPrite);
     }
 }
 
-export const drawPreTravelPath = (path, shuttleNo, curFloor) => {
+export const drawTravelPath = (path, shuttleNo, curFloor) => {
     if (!mapContainer) {
         return;
     }
@@ -642,7 +648,7 @@
     pathLine = new PIXI.Graphics();
     pathLine.name = pathLineName;
     pathLine.lineStyle(3 * (1 / mapContainer.scale.x), 0x3498db, 1);
-    pathLine.zIndex = 9999;
+    pathLine.zIndex = SENSOR_ZINDEX.TRAVEL_PATH;
     let firstNode = true;
     for (let i = 0; i < path.length; i++) {
         const { row, bay, lev } = parseLocNo(path[i]);

--
Gitblit v1.9.1