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.

95 lines
2.2 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' }
2 months ago
] as StatusDictItem[],
batteryStatus: [
2 months ago
{ value: '0', label: '正常', cssClass: '#67c23a' },
{ value: '1', label: '低电量报警', cssClass: '#e6a23c' }
2 months ago
] as StatusDictItem[],
fenceStatus: [
2 months ago
{ value: '0', label: '正常', cssClass: '#67c23a' },
{ value: '1', label: '围栏报警', cssClass: '#e6a23c' }
2 months ago
] as StatusDictItem[]
}
// 状态优先级定义 (数字越小优先级越高)
export const STATUS_PRIORITY = {
gasStatus_2: 1,
gasStatus_1: 2,
batteryStatus_1: 4,
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],
1 week ago
zoom: 16,
2 months ago
maxZoom: 18,
1 week ago
minZoom: 2,
2 months ago
enableCluster: true,
1 week ago
2 months ago
}
// 动画配置
export const ANIMATION_CONFIG = {
/**
*
*/
duration: 3,
/**
*
*/
rippleCount: 5,
/**
*
*/
phaseOffset: 0.6,
/**
*
*/
targetFPS: 60,
/**
1 week ago
*
*/
1 week ago
clusterThreshold: 18,
/**
*
*/
minRadius: 6,
/**
*
*/
maxRadius: 31,
/**
*
*/
2 months ago
minOpacity: 0.05 // 最小透明度阈值
}
export const DEFAULT_FENCES = [] as FenceData[]