From 28dfce304e4cacf5a339a61c6fdec56dfa9edabf Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 22 三月 2026 09:37:10 +0800
Subject: [PATCH] #

---
 src/main/webapp/components/MapCanvas.js |   43 +++++++++++++++++++++++++++++++++----------
 1 files changed, 33 insertions(+), 10 deletions(-)

diff --git a/src/main/webapp/components/MapCanvas.js b/src/main/webapp/components/MapCanvas.js
index 06c06d3..a4c0a7d 100644
--- a/src/main/webapp/components/MapCanvas.js
+++ b/src/main/webapp/components/MapCanvas.js
@@ -12,6 +12,7 @@
             鍦坽{ item.loopNo }} |
             绔欑偣: {{ item.stationCount || 0 }} |
             浠诲姟: {{ item.taskCount || 0 }} |
+            鎵嬪姩: {{ item.manualStationCount || 0 }} |
             鎵胯浇: {{ formatLoadPercent(item.currentLoad) }}
           </div>
         </div>
@@ -76,6 +77,8 @@
       },
       pixiShelfMap: new Map(),
       pixiTrackMap: new Map(),
+      pixiCrnTextureMap: new Map(),
+      pixiRgvTextureMap: new Map(),
       pixiDevpTextureMap: new Map(),
       pixiCrnColorTextureMap: new Map(),
       pixiDevpTextureMap: new Map(),
@@ -129,6 +132,8 @@
         loopList: [],
         totalStationCount: 0,
         taskStationCount: 0,
+        manualStationCount: 0,
+        occupiedStationCount: 0,
         currentLoad: 0
       },
       showMapToolPanel: false,
@@ -784,8 +789,7 @@
       });
 
       this.crnList.forEach((item) => {
-        if (this.graphicsCrn == null) { this.graphicsCrn = this.createCrnTexture(item.width * 0.9, item.height * 0.9); }
-        let sprite = new PIXI.Sprite(this.graphicsCrn);
+        let sprite = this.createCrnSprite(item.width * 0.9, item.height * 0.9);
         const deviceNo = this.getDeviceNo(item.value);
         const taskNo = this.getTaskNo(item.value);
         const style = new PIXI.TextStyle({ fontFamily: 'Arial', fontSize: 12, fill: '#000000', stroke: '#ffffff', strokeThickness: 1 });
@@ -817,8 +821,7 @@
       });
       
       this.dualCrnList.forEach((item) => {
-        if (this.graphicsCrn == null) { this.graphicsCrn = this.createCrnTexture(item.width * 0.9, item.height * 0.9); }
-        let sprite = new PIXI.Sprite(this.graphicsCrn);
+        let sprite = this.createCrnSprite(item.width * 0.9, item.height * 0.9);
         const deviceNo = this.getDeviceNo(item.value);
         const taskNo = this.getTaskNo(item.value);
         const style = new PIXI.TextStyle({ fontFamily: 'Arial', fontSize: 12, fill: '#000000', stroke: '#ffffff', strokeThickness: 1 });
@@ -850,8 +853,7 @@
       });
       
       this.rgvList.forEach((item) => {
-        if (this.graphicsRgv == null) { this.graphicsRgv = this.createRgvTexture(item.width * 0.9, item.height * 0.9); }
-        let sprite = new PIXI.Sprite(this.graphicsRgv);
+        let sprite = this.createRgvSprite(item.width * 0.9, item.height * 0.9);
         const deviceNo = this.getDeviceNo(item.value);
         const taskNo = this.getTaskNo(item.value);
         const style = new PIXI.TextStyle({ fontFamily: 'Arial', fontSize: 12, fill: '#000000', stroke: '#ffffff', strokeThickness: 1 });
@@ -984,6 +986,8 @@
         loopList: loopList,
         totalStationCount: payload.totalStationCount || 0,
         taskStationCount: payload.taskStationCount || 0,
+        manualStationCount: payload.manualStationCount || 0,
+        occupiedStationCount: payload.occupiedStationCount || 0,
         currentLoad: typeof payload.currentLoad === 'number' ? payload.currentLoad : parseFloat(payload.currentLoad || 0)
       };
       if (this.hoverLoopNo != null) {
@@ -1222,6 +1226,28 @@
       if (texture == undefined) {
         texture = this.createTrackTexture(width, height, trackMask);
         this.pixiTrackMap.set(idx, texture);
+      }
+      return new PIXI.Sprite(texture);
+    },
+    createCrnSprite(width, height) {
+      const w = Math.max(1, Math.round(width));
+      const h = Math.max(1, Math.round(height));
+      const key = w + "-" + h;
+      let texture = this.pixiCrnTextureMap.get(key);
+      if (texture == undefined) {
+        texture = this.createCrnTexture(w, h);
+        this.pixiCrnTextureMap.set(key, texture);
+      }
+      return new PIXI.Sprite(texture);
+    },
+    createRgvSprite(width, height) {
+      const w = Math.max(1, Math.round(width));
+      const h = Math.max(1, Math.round(height));
+      const key = w + "-" + h;
+      let texture = this.pixiRgvTextureMap.get(key);
+      if (texture == undefined) {
+        texture = this.createRgvTexture(w, h);
+        this.pixiRgvTextureMap.set(key, texture);
       }
       return new PIXI.Sprite(texture);
     },
@@ -1854,7 +1880,7 @@
         blockedStationId: this.parseStationTaskNo(trace.blockedStationId),
         passedStationIds: this.normalizeTraceStationIds(trace.passedStationIds),
         pendingStationIds: this.normalizeTraceStationIds(trace.pendingStationIds),
-        latestAppendedPath: this.normalizeTraceStationIds(trace.latestAppendedPath)
+        latestAppendedPath: this.normalizeTraceStationIds(trace.latestIssuedSegmentPath || trace.latestAppendedPath)
       };
     },
     normalizeTraceStationIds(list) {
@@ -2794,9 +2820,6 @@
     }
   }
 });
-
-
-
 
 
 

--
Gitblit v1.9.1