You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.3 KiB

2 months ago
/**
*
*/
1 month ago
2 months ago
import type { StatusDictItem, FenceData } from '../types/map.types'
// 状态字典配置
export const STATUS_DICT = {
onlineStatus: [
2 months ago
{ value: '0', label: '离线', cssClass: '#909399' },
{ value: '1', label: '在线', cssClass: '#67c23a' }
] as StatusDictItem[],
gasStatus: [
2 months ago
{ value: '0', label: '正常', cssClass: '#67c23a' },
{ value: '1', label: '气体报警', cssClass: '#e6a23c' }
// { value: '2', label: '二级气体告警', cssClass: '#f56c6c' }
2 months ago
] as StatusDictItem[],
batteryStatus: [
2 months ago
{ value: '0', label: '正常', cssClass: '#67c23a' },
{ value: '1', label: '低电量报警', cssClass: '#e6a23c' }
// { value: '2', label: '二级低电量报警', cssClass: '#f56c6c' }
2 months ago
] as StatusDictItem[],
fenceStatus: [
2 months ago
{ value: '0', label: '正常', cssClass: '#67c23a' },
{ value: '1', label: '围栏报警', cssClass: '#e6a23c' }
// { value: '2', label: '二级围栏报警', cssClass: '#f56c6c' }
2 months ago
] as StatusDictItem[]
}
// 状态优先级定义 (数字越小优先级越高)
export const STATUS_PRIORITY = {
1 month ago
gasStatus_2: 1,
gasStatus_1: 2,
// battery_2: 3,
batteryStatus_1: 4,
// fence_2: 5,
1 month ago
fenceStatus_1: 6,
2 months ago
offline: 7,
normal: 8
} as const
// 状态顺序数组
export const STATUS_ORDER = Object.keys(STATUS_PRIORITY) as Array<keyof typeof STATUS_PRIORITY>
// 默认标记数据
export const DEFAULT_MARKERS = []
// 地图默认配置
export const MAP_DEFAULTS = {
1 month ago
tileUrl: import.meta.env.VITE_APP_MAP_TILE_URL,
// tileUrl: 'https://webrd04.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}',
2 months ago
// tileUrl: 'http://qtbj.icpcdev.site/roadmap/{z}/{x}/{y}.png',
1 month ago
// tileUrl: 'http://192.168.43.94:8080/{z}/{x}/{y}.png',
2 months ago
center: [116.3912757, 39.906217] as [number, number],
zoom: 10,
maxZoom: 18,
minZoom: 3,
2 months ago
enableCluster: true,
clusterDistance: 1
2 months ago
}
// 动画配置
export const ANIMATION_CONFIG = {
duration: 3, // 动画周期(秒)
rippleCount: 5, // 波纹圈数量
phaseOffset: 0.6, // 波纹圈错开时间(秒)
targetFPS: 60, // 目标帧率
clusterThreshold: 12, // 聚合阈值
minRadius: 6, // 最小半径
maxRadius: 31, // 最大半径
minOpacity: 0.05 // 最小透明度阈值
}
export const DEFAULT_FENCES = [] as FenceData[]