diff --git a/src/views/pictureOnMap/page/FloodControlAndDrainage/Pailaohuigu/index.vue b/src/views/pictureOnMap/page/FloodControlAndDrainage/Pailaohuigu/index.vue index 69002b7..77d2585 100644 --- a/src/views/pictureOnMap/page/FloodControlAndDrainage/Pailaohuigu/index.vue +++ b/src/views/pictureOnMap/page/FloodControlAndDrainage/Pailaohuigu/index.vue @@ -201,6 +201,7 @@ let hgEngPlay = ref(false); let stepLin = ref("0"); let stepNum = ref(0); +let rainPicture = ref([]); // 降雨日历代码 function getRainTime() { @@ -275,7 +276,7 @@ hoursList.value = res.data; hoursList.value.activeIndex = 0; let array = []; - let picture = []; + rainPicture.value = []; let list = JSON.parse(JSON.stringify(hoursList.value.rainTrend)); list.forEach((e, i) => { let obj = { @@ -287,7 +288,7 @@ array.push(obj); }); hoursList.value.resultList.forEach(e=>{ - picture.push(e.url) + rainPicture.value.push(e.url) }) hoursScale.value = array; refresh.value = Math.random(); @@ -296,7 +297,7 @@ !(newfiberMap.RainsLayer) && (newfiberMap.RainsLayer = new mapboxgl1.RainsLayer( [114.359445, 30.26976, 114.635417, 30.578213], - picture, + rainPicture.value, self => { self.addTo(newfiberMap.map); self.hide(); @@ -304,12 +305,11 @@ console.log('8888888888888888',dataLoad.value); } )); - newfiberMap.RainsLayer.init(picture); + newfiberMap.RainsLayer.init(rainPicture.value); } }) } function runDayTime() { - // newfiberMap.map.easeTo(newfiberMap.config_.params.init); bus.emit('clearTrajectory') hgEndActive.value = ""; showRainLegend.value = true; @@ -323,7 +323,7 @@ hgEngPlay.value = false; clearInterval(runDayInterval.value); } - newfiberMap.RainsLayer.show() + newfiberMap.RainsLayer.init(rainPicture.value,(self)=> self.show()) } function timeLoop() {