#
luxiaotao1123
2024-03-27 0f223f1ad700b62b7dc060e0e9de33844388dc85
zy-asrs-flow/src/pages/map/utils.js
@@ -35,10 +35,17 @@
})
export const SENSOR_TYPE = Object.freeze({
    SHUTTLE: "SHUTTLE",
    SHELF: "SHELF",
    SHUTTLE: "SHUTTLE",
    POINT: "POINT",
    AGV: "AGV",
})
export const SENSOR_ZINDEX = Object.freeze({
    SHELF: 1,
    POINT: 1,
    SHUTTLE: 100,
    AGV: 100,
})
export const SHELF_TYPE = Object.freeze({
@@ -70,25 +77,25 @@
            sprite = new PIXI.Sprite(PIXI.Texture.from(shuttle, { resourceOptions: { scale: 5 } }));
            sprite.width = 50;
            sprite.height = 50;
            sprite.zIndex = 100;
            sprite.zIndex = SENSOR_ZINDEX.SHUTTLE;
            break;
        case SENSOR_TYPE.AGV:
            sprite = new PIXI.Sprite(PIXI.Texture.from(agv, { resourceOptions: { scale: 5 } }));
            sprite.width = 50;
            sprite.height = 50;
            sprite.zIndex = 100;
            sprite.zIndex = SENSOR_ZINDEX.AGV;
            break;
        case SENSOR_TYPE.SHELF:
            sprite = new PIXI.Sprite(PIXI.Texture.from(shelf, { resourceOptions: { scale: 1 } }));
            sprite.width = 60;
            sprite.height = 60;
            sprite.zIndex = 1;
            sprite.zIndex = SENSOR_ZINDEX.SHELF;
            break;
        case SENSOR_TYPE.POINT:
            sprite = new PIXI.Sprite(PIXI.Texture.from(point, { resourceOptions: { scale: 5 } }));
            sprite.width = 10;
            sprite.height = 10;
            sprite.zIndex = 1;
            sprite.zIndex = SENSOR_ZINDEX.POINT;
            break;
        default:
            break;
@@ -253,12 +260,14 @@
    effectHalfCircle.endFill();
    effectHalfCircle.position.set(sprite.x, sprite.y);
    effectHalfCircle.scale.set(1 / scale);
    effectHalfCircle.zIndex = 9999;
    effectRectangle = new PIXI.Graphics();
    effectRectangle.lineStyle(5 * scale, color, 1);
    effectRectangle.drawRoundedRect(0, 0, sideLen, sideLen, 16 * scale);
    effectRectangle.endFill();
    effectRectangle.mask = effectHalfCircle;
    effectRectangle.zIndex = 9999;
    const scaledWidth = sideLen * (1 / scale);
    const scaledHeight = sideLen * (1 / scale);
@@ -303,7 +312,9 @@
    copiedSprite.rotation = sprite.rotation;
    copiedSprite.data = deepCopy(sprite.data);
    copiedSprite.data.uuid = generateID();
    showSheflType(copiedSprite);
    if (copiedSprite.data.type === SENSOR_TYPE.SHELF) {
        showSheflType(copiedSprite);
    }
    return copiedSprite;
}
@@ -359,6 +370,12 @@
                    label: intl.formatMessage({ id: 'map.sensor.type.shelf', defaultMessage: '货架' })
                })
                break;
            case SENSOR_TYPE.SHUTTLE:
                options.push({
                    value: value,
                    label: intl.formatMessage({ id: 'map.sensor.type.shuttle', defaultMessage: '穿梭车' })
                })
                break;
            case SENSOR_TYPE.AGV:
                options.push({
                    value: value,