diff --git a/src/components/Map/MapBox.vue b/src/components/Map/MapBox.vue index 7335434..fee3cc1 100644 --- a/src/components/Map/MapBox.vue +++ b/src/components/Map/MapBox.vue @@ -41,6 +41,7 @@ import { LineLayer, GeoJsonLayer } from "@deck.gl/layers"; import { TripsLayer, Tile3DLayer } from "@deck.gl/geo-layers"; import { Tiles3DLoader } from "@loaders.gl/3d-tiles"; +const baseUrl = import.meta.env.VITE_APP_MAP_BASE_API || ""; const appStore = useUserStore(); const MapShow = ref(true); const props = defineProps({ @@ -817,6 +818,7 @@ const { setLayerVisible, beansToMap } = events_params; const fullnessColor = (value) => { value = Number(value); + if(!baseUrl) value = _.random(60,100); const colors = [{value:0,color:"rgba(52,176,0,0)"},{value:60,color:"rgba(254,203,0,1)"},{value:70,color:"rgba(223,1,0,1)"},{value:90,color:"rgba(142,14,11,1)"}]; return (colors.filter((i,idx) => idx!= colors.length-1 && i.value _.groupBy(data.filter(k => k.pipelineGeometry).map(o => ({...o,width:4,type:`fullness_${o.pipeSystem}`,name:`管径:${o.pipelineDiameter}\n充满度:${o.fullness}`,color:fullnessColor(o.fullness)})),(v)=>v.type) + groupMethod:(data)=> _.groupBy(data.filter(k => k.pipelineGeometry).map(o => ({...o,width:8,type:`fullness_${o.pipeSystem}`,name:`管径:${o.pipelineDiameter}\n充满度:${o.fullness}`,color:fullnessColor(o.fullness)})),(v)=>v.type) } }; const other_data_params = {};