From 68214b4b6d8b04a84f23410e77afa02b63428a32 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期一, 20 一月 2025 16:30:39 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/map/tool.js | 51 ++++++++++++++++++++++++++++++++-------------------
1 files changed, 32 insertions(+), 19 deletions(-)
diff --git a/zy-acs-flow/src/map/tool.js b/zy-acs-flow/src/map/tool.js
index 09d3ded..c64b332 100644
--- a/zy-acs-flow/src/map/tool.js
+++ b/zy-acs-flow/src/map/tool.js
@@ -489,22 +489,30 @@
effectCircle.position.set(selectedSprite.x, selectedSprite.y);
};
-export const showRoutes = (curZone, setShowRoutes) => {
- setShowRoutes(true);
- getRouteList(curZone, (routeList) => {
- routeList.forEach(route => {
- const startPoint = querySprite(DEVICE_TYPE.POINT, route.startCodeStr);
- const endPoint = querySprite(DEVICE_TYPE.POINT, route.endCodeStr);
- const pointRoute = new PointRoute(POINT_ROUTE_DIRECTION[route.direction]);
- pointRoute.setPoint(startPoint, endPoint);
- pointRoute.clear();
- pointRoute.lineStyle(Math.max(7, 2 * (1 / mapContainer.scale.x)), themeMode === 'light' ? '#ced6e0' : '#535c68');
- pointRoute.moveTo(startPoint.position.x, startPoint.position.y);
- pointRoute.lineTo(endPoint.position.x, endPoint.position.y);
- pointRoute.alpha = 1;
- mapContainer.addChild(pointRoute);
- })
- })
+export const showRoutes = (curZone, setShowRoutes, setLoading) => {
+ setLoading(true);
+ getRouteList(
+ curZone,
+ (routeList) => {
+ routeList.forEach(route => {
+ const startPoint = querySprite(DEVICE_TYPE.POINT, route.startCodeStr);
+ const endPoint = querySprite(DEVICE_TYPE.POINT, route.endCodeStr);
+ const pointRoute = new PointRoute(POINT_ROUTE_DIRECTION[route.direction]);
+ pointRoute.setPoint(startPoint, endPoint);
+ pointRoute.clear();
+ pointRoute.lineStyle(Math.max(7, 2 * (1 / mapContainer.scale.x)), themeMode === 'light' ? '#ced6e0' : '#535c68');
+ pointRoute.moveTo(startPoint.position.x, startPoint.position.y);
+ pointRoute.lineTo(endPoint.position.x, endPoint.position.y);
+ pointRoute.alpha = 1;
+ mapContainer.addChild(pointRoute);
+ })
+ setLoading(false);
+ setShowRoutes(true);
+ },
+ () => {
+ setLoading(false);
+ },
+ )
};
export const hideRoutes = (curZone, setShowRoutes) => {
@@ -738,6 +746,9 @@
return;
}
const { agvNo, code: curCode, dynamicRoute } = agvVo;
+ if (!dynamicRoute || dynamicRoute.indexOf(curCode) === -1) {
+ return;
+ }
const agvPathName = 'agvPath-' + agvNo;
let agvPath = mapContainer.getChildByName(agvPathName);
@@ -746,9 +757,11 @@
}
agvPath = new PIXI.Graphics();
agvPath.name = agvPathName;
- agvPath.lineStyle(Math.max(20, 4 * (1 / mapContainer?.scale.x || 1))
- , themeMode === 'dark' ? 0x40739e : 0x2f68ac
- , 0.8);
+ agvPath.lineStyle(
+ Math.max(200, 4 * (1 / mapContainer?.scale.x || 1)),
+ themeMode === 'dark' ? 0x40739e : 0x2f68ac,
+ 0.8,
+ );
agvPath.zIndex = DEVICE_Z_INDEX.DYNAMIC_ROUTE;
// agvPath.blendMode = PIXI.BLEND_MODES.NORMAL;
--
Gitblit v1.9.1