#
whycq
2024-10-16 e86569f4b1b756b04871477a33911ed7a13ca7af
#
2个文件已修改
57 ■■■■■ 已修改文件
src/main/webapp/views/wcsmap/mapData.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/wcsmap/wcsmap.html 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 },
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);