From aa6f20d98b5d8e18ae56f9562a78d403a5417b48 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期三, 08 一月 2025 16:32:28 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/tool.js | 48 +++++++++++++++++++++++++++++------------------- 1 files changed, 29 insertions(+), 19 deletions(-) diff --git a/zy-acs-flow/src/map/tool.js b/zy-acs-flow/src/map/tool.js index 09d3ded..e219ded 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) => { @@ -746,9 +754,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