diff --git a/src/views/sponeScreen/gisMF/cesiumMapLegend.js b/src/views/sponeScreen/gisMF/cesiumMapLegend.js index 35cf086..4b7e32a 100644 --- a/src/views/sponeScreen/gisMF/cesiumMapLegend.js +++ b/src/views/sponeScreen/gisMF/cesiumMapLegend.js @@ -21,6 +21,7 @@ ysArea, wsArea, hsArea, + wscArea, rainStationData, rainStationArea, riverSuperVise, @@ -44,12 +45,10 @@ let stationDataList = results[2]; let waterFactoryDatalist = results[3]; let spongeFacilityDataList = results[4]; - console.log('spongeFacilityDataList--', spongeFacilityDataList); //雨水泵站 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 riverDataList = stationDataList.data.filter(data => data.monitorTargetType == 'river'); //河道监测 let spongeFacilityList = spongeFacilityDataList.data.filter(data => data.monitorTargetType == 'drain_outlet'); //海绵设施 let origineList = spongeFacilityDataList.data.filter(data => data.monitorTargetType == 'typical_land'); //典型项目 diff --git a/src/views/sponeScreen/gisMF/cesiumMapLegend.js b/src/views/sponeScreen/gisMF/cesiumMapLegend.js index 35cf086..4b7e32a 100644 --- a/src/views/sponeScreen/gisMF/cesiumMapLegend.js +++ b/src/views/sponeScreen/gisMF/cesiumMapLegend.js @@ -21,6 +21,7 @@ ysArea, wsArea, hsArea, + wscArea, rainStationData, rainStationArea, riverSuperVise, @@ -44,12 +45,10 @@ let stationDataList = results[2]; let waterFactoryDatalist = results[3]; let spongeFacilityDataList = results[4]; - console.log('spongeFacilityDataList--', spongeFacilityDataList); //雨水泵站 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 riverDataList = stationDataList.data.filter(data => data.monitorTargetType == 'river'); //河道监测 let spongeFacilityList = spongeFacilityDataList.data.filter(data => data.monitorTargetType == 'drain_outlet'); //海绵设施 let origineList = spongeFacilityDataList.data.filter(data => data.monitorTargetType == 'typical_land'); //典型项目 diff --git a/src/views/sponeScreen/gisMF/legendKF.vue b/src/views/sponeScreen/gisMF/legendKF.vue index 6e525de..c1fb08d 100644 --- a/src/views/sponeScreen/gisMF/legendKF.vue +++ b/src/views/sponeScreen/gisMF/legendKF.vue @@ -293,15 +293,17 @@ allMapList.value = legendList.value[1].children.concat(legendList.value[2].children).concat(legendList.value[0].children).flat(); bus.emit('setLegendData', allMapList.value); }); - nextTick(() => { + setTimeout(() => { bus.on('setIniteLayer', data => { if (!data.length) { + if (legendList.value.length == 0) return; let legendList_1 = legendList.value[1]['children'].concat(legendList.value[2]['children']).flat(); legendList_1.forEach(layer => { layer.isCheck = true; changeLegend(layer); }); } else { + if (legendList.value.length == 0) return; let legendList_1 = legendList.value[0]['children'] .concat(legendList.value[1]['children']) .concat(legendList.value[2]['children']) diff --git a/src/views/sponeScreen/gisMF/cesiumMapLegend.js b/src/views/sponeScreen/gisMF/cesiumMapLegend.js index 35cf086..4b7e32a 100644 --- a/src/views/sponeScreen/gisMF/cesiumMapLegend.js +++ b/src/views/sponeScreen/gisMF/cesiumMapLegend.js @@ -21,6 +21,7 @@ ysArea, wsArea, hsArea, + wscArea, rainStationData, rainStationArea, riverSuperVise, @@ -44,12 +45,10 @@ let stationDataList = results[2]; let waterFactoryDatalist = results[3]; let spongeFacilityDataList = results[4]; - console.log('spongeFacilityDataList--', spongeFacilityDataList); //雨水泵站 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 riverDataList = stationDataList.data.filter(data => data.monitorTargetType == 'river'); //河道监测 let spongeFacilityList = spongeFacilityDataList.data.filter(data => data.monitorTargetType == 'drain_outlet'); //海绵设施 let origineList = spongeFacilityDataList.data.filter(data => data.monitorTargetType == 'typical_land'); //典型项目 diff --git a/src/views/sponeScreen/gisMF/legendKF.vue b/src/views/sponeScreen/gisMF/legendKF.vue index 6e525de..c1fb08d 100644 --- a/src/views/sponeScreen/gisMF/legendKF.vue +++ b/src/views/sponeScreen/gisMF/legendKF.vue @@ -293,15 +293,17 @@ allMapList.value = legendList.value[1].children.concat(legendList.value[2].children).concat(legendList.value[0].children).flat(); bus.emit('setLegendData', allMapList.value); }); - nextTick(() => { + setTimeout(() => { bus.on('setIniteLayer', data => { if (!data.length) { + if (legendList.value.length == 0) return; let legendList_1 = legendList.value[1]['children'].concat(legendList.value[2]['children']).flat(); legendList_1.forEach(layer => { layer.isCheck = true; changeLegend(layer); }); } else { + if (legendList.value.length == 0) return; let legendList_1 = legendList.value[0]['children'] .concat(legendList.value[1]['children']) .concat(legendList.value[2]['children']) diff --git a/src/views/sponeScreen/waterFlood/index.vue b/src/views/sponeScreen/waterFlood/index.vue index ef1b58b..38e6c6b 100644 --- a/src/views/sponeScreen/waterFlood/index.vue +++ b/src/views/sponeScreen/waterFlood/index.vue @@ -134,14 +134,6 @@ showPipe.value = true; }); setTimeout(() => { - // newfiberMap.setView({ - // lng: 114.342, - // lat: 34.702, - // heading: 2.281299097855777, - // zoom: 6358.12942752382, - // pitch: -25.2508969308367, - // roll: 0.005453465256790101, - // }); //河流流向 let layer = new mapboxL7.LineLayer({ name: 'waterFlow', @@ -171,44 +163,18 @@ pitch: 30, }); bus.emit('setIniteLayer', [ - { - layername: 'YSBZ', //雨水泵站 - show: false, - }, - { - layername: 'combineBengZhan', //合流泵站 - show: false, - }, - { - layername: 'sewageFactory', //污水处理厂 - show: false, - }, - { - layername: 'ysLine1', //雨水管网 - show: false, - }, - { - layername: 'hsLine1', //合流管网 - show: false, - }, - { - layername: 'pipeline_info_flow', //管网流向 - show: false, - }, - { - layername: 'waterCourse', //河道水位计 - show: false, - }, - // { - // layername: 'waterLoging', //内涝积水点 - // show: false, - // }, - { - layername: 'pipeMonitor', //管网监测点 - show: false, - }, + { layername: 'YSBZ', show: false }, //雨水泵站 + { layername: 'combineBengZhan', show: false }, //合流泵站 + { layername: 'sewageFactory', show: false }, //污水处理厂 + { layername: 'ysLine1', show: false }, //雨水管网 + { layername: 'hsLine1', show: false }, //合流管网 + { layername: 'pipeline_info_flow', show: false }, //管网流向 + { layername: 'waterCourse', show: false }, //河道水位计 + { layername: 'pipeMonitor', show: false }, //管网监测点 + { layername: 'spongeFacility', show: false }, //海绵设施图层 + { layername: 'origine', show: false }, //典型项目图层 ]); - }, 1200); + }, 1500); // 实时报警 realDataWarn(); warnTimer.value = setInterval(() => { @@ -230,46 +196,16 @@ newfiberMapBoxVectorLayer.removeByIds(['materialFeatures']); } bus.emit('setIniteLayer', [ - { - layername: 'YSBZ', //雨水泵站 - show: true, - }, - { - layername: 'combineBengZhan', //合流泵站 - show: true, - }, - { - layername: 'sewageFactory', //污水处理厂 - show: true, - }, - { - layername: 'ysLine1', //雨水管网 - show: true, - }, - { - layername: 'hsLine1', //合流管网 - show: true, - }, - { - layername: 'pipeline_info_flow', //管网流向 - show: true, - }, - { - layername: 'pipeMonitor', //管网监测点,测试 - show: true, - }, - { - layername: 'waterCourse', //河道水位计 - show: true, - }, - { - layername: 'waterLoging', //内涝积水点 - show: true, - }, - { - layername: 'pipeMonitor', //管网监测点 - show: true, - }, + { layername: 'YSBZ', show: true }, //雨水泵站 + { layername: 'combineBengZhan', show: true }, //合流泵站 + { layername: 'sewageFactory', show: true }, //污水处理厂 + { layername: 'ysLine1', show: true }, //雨水管网 + { layername: 'hsLine1', show: true }, //合流管网 + { layername: 'pipeline_info_flow', show: true }, //管网流向 + { layername: 'waterCourse', show: true }, //河道水位计 + { layername: 'pipeMonitor', show: true }, //管网监测点 + { layername: 'spongeFacility', show: true }, //海绵设施图层 + { layername: 'origine', show: true }, //典型项目图层 ]); });