diff --git a/src/views/sponeScreen/gisMF/cesiumMapLegend.js b/src/views/sponeScreen/gisMF/cesiumMapLegend.js index 89a7f72..38be617 100644 --- a/src/views/sponeScreen/gisMF/cesiumMapLegend.js +++ b/src/views/sponeScreen/gisMF/cesiumMapLegend.js @@ -6,31 +6,40 @@ import { oneMapFacilityPumpList } from '@/api/scada/pumpStationInformation'; import { haiMianfacilitySewagePage } from '@/api/scada/sewage'; import { waterloggingPointList, queryProjectStation } from '@/api/sponeScreen/syntherticData.js'; +import { getStationList } from '@/api/sponeScreen/syntherticData'; import bus from '@/bus'; -let YSBZ, WSBZ, HLBZ, WSCLC, waterLogingPoint, projectStation, ysArea, wsArea, hsArea, wscArea; +let YSBZ, WSBZ, HLBZ, WSCLC, waterLogingPoint, projectStation, ysArea, wsArea, hsArea, wscArea, rainStationData, rainStationArea; let legendDataList; export default class cesiumMapCommonLegend { //获取站点数据 static async getStationData() { - let results = await Promise.all([oneMapFacilityPumpList(), haiMianfacilitySewagePage()]); + let results = await Promise.all([oneMapFacilityPumpList(), haiMianfacilitySewagePage(), getStationList()]); let resRainwater = results[0]; let resWSCLC = results[1]; + let rainStation = results[2]; //雨水泵站 - let YSBZDataList = resRainwater.data.filter(data => data.pumpType == 'rain_water'); - let WSBZDataList = resRainwater.data.filter(data => data.pumpType == 'sewage_water'); - let HLBZDataList = resRainwater.data.filter(data => data.pumpType == 'confluence'); + let YSBZDataList = resRainwater.data.filter(data => data.pumpType == 'rain_water'); //雨水泵站 + let WSBZDataList = resRainwater.data.filter(data => data.pumpType == 'sewage_water'); //污水泵站 + let HLBZDataList = resRainwater.data.filter(data => data.pumpType == 'confluence'); //合流泵站 + let rainDataList = rainStation.data.filter(data => data.monitorTargetType == 'rainfall'); //雨量站 YSBZ = this.getGeojsonData(YSBZDataList); WSBZ = this.getGeojsonData(WSBZDataList); HLBZ = this.getGeojsonData(HLBZDataList); - ysArea = this.getPolygonGeojson(YSBZDataList); - wsArea = this.getPolygonGeojson(WSBZDataList); - hsArea = this.getPolygonGeojson(HLBZDataList); + ysArea = this.getPolygonGeojson(YSBZDataList); //雨水泵站范围 + wsArea = this.getPolygonGeojson(WSBZDataList); //污水泵站范围 + hsArea = this.getPolygonGeojson(HLBZDataList); //合流泵站范围 + rainStationData = this.getGeojsonData(rainDataList); + rainStationArea = this.getPolygonGeojson(rainDataList); //雨量站范围 + rainStationArea.features.forEach(feature => { + feature.properties.fillcolor = 'rgba(41, 184, 219,0.7)'; + }); + let WSCLCDataList = resWSCLC.data; - WSCLC = this.getGeojsonData(WSCLCDataList); - wscArea = this.getPolygonGeojson(WSCLCDataList); + WSCLC = this.getGeojsonData(WSCLCDataList); //污水处理厂 + wscArea = this.getPolygonGeojson(WSCLCDataList); //污水处理厂范围 let waterLogingRes = await waterloggingPointList(); if (waterLogingRes && waterLogingRes.code == 200) { - waterLogingPoint = this.getGeojsonData(waterLogingRes.data); + waterLogingPoint = this.getGeojsonData(waterLogingRes.data); //内涝点 } let params = {}; let projectStationRes = await queryProjectStation(params); @@ -370,7 +379,8 @@ url: 'rainStation_icon.png', //图层+json √ mapUrl: 'yuanTou.png', type: 'point', - //data: waterSectionInfo, + data: rainStationData, + dataArea: rainStationArea, }, { isCheck: false,