#
luxiaotao1123
2024-12-02 4dea82b666afb89121e4628eafc26a4598eabc3b
#
2个文件已修改
43 ■■■■ 已修改文件
zy-acs-flow/src/map/constants.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/map/tool.js 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/map/constants.js
@@ -34,12 +34,12 @@
})
export const DEVICE_SPRITE_TINT = Object.freeze({
    SHELF: null,
    SHELF: 0xffffff,
    STATION: null,
    CHARGE: null,
    DIRECTION: null,
    AGV: null,
    AGV: 0xffffff,
    POINT: 0xCACDCF,
})
@@ -49,8 +49,8 @@
    CHARGE: null,
    DIRECTION: null,
    AGV: null,
    POINT: 0xf1f2f6,
    AGV: 0xb2bec3,
    POINT: 0xdfe6e9,
})
export const DEVICE_SELECTED_EFFECT_PADDING = Object.freeze({
zy-acs-flow/src/map/tool.js
@@ -6,10 +6,10 @@
    DEVICE_Z_INDEX,
    AGV_STATUS_MODE,
    DEVICE_SPRITE_TINT,
    DEVICE_SPRITE_TINT_DARK,
    DEVICE_SELECTED_EFFECT_PADDING,
    DEVICE_SELECTED_EFFECT_COLOR,
    POINT_ROUTE_DIRECTION,
    DEVICE_SPRITE_TINT_DARK,
    ANIMATE_DURING_TIME,
} from './constants';
import { getRouteList } from './http';
@@ -55,19 +55,16 @@
export function setThemeMode(param) {
    themeMode = param;
    if (mapContainer) {
        // mapContainer.children.forEach(child => {
        //     const deviceType = child.data?.type;
        //     if (deviceType) {
        //         if (themeMode === 'dark') {
        //             const tint = DEVICE_SPRITE_TINT_DARK[deviceType]
        //             if (tint) {
        //                 child.tint = tint;
        //             }
        //         } else {
        //             DEVICE_SPRITE_TINT[deviceType] != null && (child.tint = DEVICE_SPRITE_TINT[deviceType]);
        //         }
        //     }
        // })
        mapContainer.children.forEach(child => {
            const deviceType = child.data?.type;
            if (deviceType) {
                if (themeMode === 'dark') {
                    DEVICE_SPRITE_TINT_DARK[deviceType] != null && (child.tint = DEVICE_SPRITE_TINT_DARK[deviceType]);
                } else {
                    DEVICE_SPRITE_TINT[deviceType] != null && (child.tint = DEVICE_SPRITE_TINT[deviceType]);
                }
            }
        })
    }
}
@@ -691,7 +688,7 @@
            fill: 0x000000,
        });
        agvText.anchor.set(0.5, 0.5);
        agvText.position.set(0, 5);
        agvText.position.set(0, 8);
        agvSprite.addChild(agvText);
        agvSprite.updateTextRotation = () => {
@@ -720,7 +717,9 @@
    if (error) {
        agvSprite.tint = 0xff3f34;
    } else {
        agvSprite.tint = 0xffffff;
        agvSprite.tint = themeMode === 'dark'
            ? DEVICE_SPRITE_TINT_DARK[DEVICE_TYPE.AGV]
            : DEVICE_SPRITE_TINT[DEVICE_TYPE.AGV];
    }
    beInsight(agvSprite, setCurSprite);
@@ -747,7 +746,9 @@
    }
    agvPath = new PIXI.Graphics();
    agvPath.name = agvPathName;
    agvPath.lineStyle(Math.max(20, 4 * (1 / mapContainer?.scale.x || 1)), 0x2f68ac, 0.8);
    agvPath.lineStyle(Math.max(20, 4 * (1 / mapContainer?.scale.x || 1))
        , themeMode === 'dark' ? 0x40739e : 0x2f68ac
        , 0.8);
    agvPath.zIndex = DEVICE_Z_INDEX.DYNAMIC_ROUTE;
    // agvPath.blendMode = PIXI.BLEND_MODES.NORMAL;