From e86569f4b1b756b04871477a33911ed7a13ca7af Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期三, 16 十月 2024 16:36:27 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/wcsmap/mapData.js  |   18 ++++++++++++++++++
 src/main/webapp/views/wcsmap/wcsmap.html |   39 ++++++++++++++++++++++++++++++++++++++-
 2 files changed, 56 insertions(+), 1 deletions(-)

diff --git a/src/main/webapp/views/wcsmap/mapData.js b/src/main/webapp/views/wcsmap/mapData.js
index 1410534..552087a 100644
--- a/src/main/webapp/views/wcsmap/mapData.js
+++ b/src/main/webapp/views/wcsmap/mapData.js
@@ -11,8 +11,26 @@
         { "title": "鑷姩", "width": "40", "height": "20", "background": "0x78FF81", "x": 1460, "y": 790 ,"titleX": 1520,"titleY": 790},
         { "title": "闈炶嚜鍔�", "width": "40", "height": "20", "background": "0xB8B8B8", "x": 1460, "y": 820 ,"titleX": 1520,"titleY": 820},
     ],
+    "track": [
+        {"id": "1", "unitX": 60, "unitY": 3, "anfme": 2, "background": "0x000000", "x": 125, "y": 737},
+        {"id": "2", "unitX": 60, "unitY": 3, "anfme": 2, "background": "0x000000", "x": 227, "y": 737},
+        {"id": "3", "unitX": 60, "unitY": 3, "anfme": 2, "background": "0x000000", "x": 125, "y": 977},
+        {"id": "4", "unitX": 60, "unitY": 3, "anfme": 2, "background": "0x000000", "x": 227, "y": 977},
+
+    ],
+    "jar": [
+        { "id": "1", "width": 15, "height": 15, "background": "0xb8db7c", "x": 142, "y": 733 },
+        { "id": "1", "width": 15, "height": 15, "background": "0xb8db7c", "x": 142, "y": 733 },
+        { "id": "1", "width": 15, "height": 15, "background": "0xb8db7c", "x": 142, "y": 733 },
+        { "id": "1", "width": 15, "height": 15, "background": "0xb8db7c", "x": 142, "y": 733 },
+    ],
     "conveyor": [
 
+        { "id": "1", "title": "623", "width": 15, "height": 15, "background": "0xb8db7c", "x": 142, "y": 733 },
+        { "id": "1", "title": "624", "width": 15, "height": 15, "background": "0xb8db7c", "x": 255, "y": 733 },
+        { "id": "1", "title": "625", "width": 15, "height": 15, "background": "0xb8db7c", "x": 142, "y": 974 },
+        { "id": "1", "title": "626", "width": 15, "height": 15, "background": "0xb8db7c", "x": 255, "y": 974 },
+
         { "id": "1", "title": "652", "width": 15, "height": 58, "background": "0xb8db7c", "x": 87, "y": 129 },
         { "id": "1", "title": "651", "width": 15, "height": 58, "background": "0xb8db7c", "x": 87, "y": 188 },
         { "id": "1", "title": "650", "width": 15, "height": 58, "background": "0xb8db7c", "x": 87, "y": 247 },
diff --git a/src/main/webapp/views/wcsmap/wcsmap.html b/src/main/webapp/views/wcsmap/wcsmap.html
index b5db182..20c9382 100644
--- a/src/main/webapp/views/wcsmap/wcsmap.html
+++ b/src/main/webapp/views/wcsmap/wcsmap.html
@@ -293,7 +293,44 @@
                     text.resolution = pixiApp.renderer.resolution;
                     pixiApp.stage.addChild(text);
                 }
-
+                let track = mapData.track
+                for (let j in track) {
+                    let k = track[j]
+                    let x = k.x
+                    for (let i = 0; i < k.anfme; i++) {
+                        let rectangle = new PIXI.Graphics();
+                        rectangle.beginFill(0xa6a6a6);
+                        // rectangle.lineStyle(1, 0xffffff);
+                        rectangle.drawRect(0, 0, k.unitX - 1, k.unitY - 1);
+                        rectangle.y = k.y + 6 * i;
+                        rectangle.x = x;
+                        objectsContainer.addChild(rectangle);
+                    }
+                }
+                for (let k of mapData.legend) {
+                    let rectangle = new PIXI.Graphics();
+                    rectangle.beginFill(k.background);
+                    rectangle.originColor = k.background;
+                    rectangle.drawRect(0, 0, k.width, k.height);
+                    rectangle.x = k.x;
+                    rectangle.y = k.y;
+                    objectsContainer.addChild(rectangle);
+                    var hel = `${k.title}`
+                    var text = new PIXI.Text(hel, {
+                        fontFamily: 'Arial',
+                        fontSize: 18,
+                        fill: '#FFFFFF', // 鐧借壊
+                        align: 'center',
+                    })
+                    text.x = k.titleX;
+                    text.y = k.titleY;
+                    // pixiApp.stage.addChild(text)
+                    // let text = new PIXI.Text('Hello!', { fontFamily: 'Arial', fontSize: 20, fill: 0x000000 ,resolution: pixiApp.renderer.resolution,antialias: true});
+                    // text.x = 1000;
+                    // text.y = 2000;
+                    text.resolution = pixiApp.renderer.resolution;
+                    pixiApp.stage.addChild(text);
+                }
                 for (let k of mapData.legend) {
                     let rectangle = new PIXI.Graphics();
                     rectangle.beginFill(k.background);

--
Gitblit v1.9.1