luxiaotao1123
2024-04-08 6a1546c0d0e56675b4b0cc936d8f2308f6fb2378
zy-asrs-flow/src/pages/map/utils.js
@@ -44,6 +44,7 @@
export const SENSOR_ZINDEX = Object.freeze({
    SHELF: 1,
    POINT: 1,
    TRAVEL_PATH: 80,
    SHUTTLE: 100,
    AGV: 100,
})
@@ -479,20 +480,25 @@
    mapContainer?.children.forEach(child => {
        if (child.data?.uuid) {
            const { type, uuid, no, ...property } = child.data;
            mapItemList.push({
                // data
                type: type,
                uuid: uuid,
                no: no,
                property: property,
            if (!(
                type === SENSOR_TYPE.SHUTTLE
                || type === SENSOR_TYPE.AGV
            )) {
                mapItemList.push({
                    // data
                    type: type,
                    uuid: uuid,
                    no: no,
                    property: property,
                // graph
                positionX: child.position.x,
                positionY: child.position.y,
                scaleX: child.scale.x,
                scaleY: child.scale.y,
                rotation: rotationToNum(child.rotation)
            })
                    // graph
                    positionX: child.position.x,
                    positionY: child.position.y,
                    scaleX: child.scale.x,
                    scaleY: child.scale.y,
                    rotation: rotationToNum(child.rotation)
                })
            }
        }
    })
@@ -625,13 +631,13 @@
    // shuttleVo
    for (const shuttleVo of mapVo.shuttleVos) {
        // path
        drawPreTravelPath(shuttleVo.preTravelPath, shuttleVo.shuttleNo, curFloor);
        drawTravelPath(shuttleVo.travelPath, shuttleVo.shuttleNo, curFloor);
        // shuttle
        showShuttle(shuttleVo.shuttleNo, shuttleVo.curLocNo, curFloor, setCurSPrite);
    }
}
export const drawPreTravelPath = (path, shuttleNo, curFloor) => {
export const drawTravelPath = (path, shuttleNo, curFloor) => {
    if (!mapContainer) {
        return;
    }
@@ -642,7 +648,7 @@
    pathLine = new PIXI.Graphics();
    pathLine.name = pathLineName;
    pathLine.lineStyle(3 * (1 / mapContainer.scale.x), 0x3498db, 1);
    pathLine.zIndex = 9999;
    pathLine.zIndex = SENSOR_ZINDEX.TRAVEL_PATH;
    let firstNode = true;
    for (let i = 0; i < path.length; i++) {
        const { row, bay, lev } = parseLocNo(path[i]);