#
luxiaotao1123
2024-10-19 8487c082f85aea83a03e81279f668687f5c8555d
#
3个文件已修改
37 ■■■■ 已修改文件
zy-acs-flow/src/map/constants.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/map/http.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/map/tool.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/map/constants.js
@@ -26,6 +26,16 @@
    POINT: 2,
})
export const DEVICE_SPRITE_TINT = Object.freeze({
    SHELF: null,
    STATION: null,
    CHARGE: null,
    DIRECTION: null,
    AGV: null,
    POINT: 0xCACDCF,
})
export const DEVICE_SELECTED_EFFECT_PADDING = Object.freeze({
    SHELF: 10,
    STATION: 10,
@@ -36,6 +46,16 @@
    POINT: 100,
})
export const DEVICE_SELECTED_EFFECT_COLOR = Object.freeze({
    SHELF: 0xdcdde1,
    STATION: 0xdcdde1,
    CHARGE: 0xdcdde1,
    DIRECTION: 0xdcdde1,
    AGV: 0x74b9ff,
    POINT: 0xC9E6DA,
})
export const AGV_STATUS_MODE = Object.freeze({
    EMPTY_NO_BATTERY: 1,
    EMPTY_HALF_BATTERY: 2,
zy-acs-flow/src/map/http.js
@@ -45,7 +45,6 @@
                            // support
                            switch (item.type) {
                                case DEVICE_TYPE.POINT:
                                    sprite.tint = 0xCACDCF;
                                    sprite.scale.set(0.65, 0.65);
                                    break
                                default:
zy-acs-flow/src/map/tool.js
@@ -4,7 +4,9 @@
    DEVICE_TYPE,
    DEVICE_Z_INDEX,
    AGV_STATUS_MODE,
    DEVICE_SPRITE_TINT,
    DEVICE_SELECTED_EFFECT_PADDING,
    DEVICE_SELECTED_EFFECT_COLOR,
} from './constants';
import shelf from '/map/shelf.svg';
@@ -102,8 +104,10 @@
        default:
            break;
    }
    DEVICE_SPRITE_TINT[deviceType] != null && (sprite.tint = DEVICE_SPRITE_TINT[deviceType]);
    if (sprite && deviceType !== DEVICE_TYPE.AGV) {
        // sprite.blendMode = PIXI.BLEND_MODES.MULTIPLY;
        sprite.blendMode = PIXI.BLEND_MODES.MULTIPLY;
    }
    return sprite;
}
@@ -340,7 +344,14 @@
    const maxDimension = Math.max(width, height);
    const radius = (maxDimension / 2) + (DEVICE_SELECTED_EFFECT_PADDING[sprite.data?.type] || 10);
    const color = themeMode === 'light' ? '#40739e' : '#718093';
    let color;
    const spriteEffectColor = DEVICE_SELECTED_EFFECT_COLOR[sprite.data?.type];
    if (spriteEffectColor) {
        color = spriteEffectColor;
    } else {
        color = themeMode === 'light' ? '#747d8c' : '#718093';
    }
    const alpha = 1;
    effectCircle = new PIXI.Graphics();
@@ -394,7 +405,6 @@
    if (!selectedSprite || !effectCircle) {
        return;
    }
    // 更新圆的位置,确保跟随sprite
    effectCircle.position.set(selectedSprite.x, selectedSprite.y);
};