diff --git a/src/views/sponeScreen/HaiMianScreen/index.vue b/src/views/sponeScreen/HaiMianScreen/index.vue index 29c9ddb..e093969 100644 --- a/src/views/sponeScreen/HaiMianScreen/index.vue +++ b/src/views/sponeScreen/HaiMianScreen/index.vue @@ -335,7 +335,8 @@ const moveOn = (point, properties) => { // console.log('鼠标移入--', properties); // 雨水泵站收水范围 - if (properties.type == 'YSBZ' && properties.geometrys) { + if (properties.type == 'YSBZ' || properties.type == 'WSBZ' || properties.type == 'combineBengZhan') { + if (!properties.geometrys) return; let geometrysToMap = turf.featureCollection([turf.feature(Terraformer.WKT.parse(properties.geometrys), properties)]); newfiberMapBoxVectorLayer.addGeojsonPolygon('bengzhan_Area', geometrysToMap); } @@ -343,7 +344,8 @@ //鼠标移出 const moveLeave = (point, properties) => { // console.log('鼠标移出--', properties); - if (properties.type == 'YSBZ' && properties.geometrys) { + if (properties.type == 'YSBZ' || properties.type == 'WSBZ' || properties.type == 'combineBengZhan') { + if (!properties.geometrys) return; newfiberMapBoxVectorLayer.removeByIds(['bengzhan_Area']); //清除泵站范围 } };