diff --git a/src/api/sponeScreen/syntherticData.js b/src/api/sponeScreen/syntherticData.js index c7fcabe..e39da2f 100644 --- a/src/api/sponeScreen/syntherticData.js +++ b/src/api/sponeScreen/syntherticData.js @@ -233,3 +233,11 @@ method: 'get', }); } +// 天气效果——降雨量判断 +export function querySiteFiveMinuteRain(query) { + return request({ + url: '/business//preventFlood/oneMap/querySiteFiveMinuteRain', + method: 'get', + params: query, + }); +} diff --git a/src/api/sponeScreen/syntherticData.js b/src/api/sponeScreen/syntherticData.js index c7fcabe..e39da2f 100644 --- a/src/api/sponeScreen/syntherticData.js +++ b/src/api/sponeScreen/syntherticData.js @@ -233,3 +233,11 @@ method: 'get', }); } +// 天气效果——降雨量判断 +export function querySiteFiveMinuteRain(query) { + return request({ + url: '/business//preventFlood/oneMap/querySiteFiveMinuteRain', + method: 'get', + params: query, + }); +} diff --git a/src/views/sponeScreen/cityGK/rainfall.vue b/src/views/sponeScreen/cityGK/rainfall.vue index 86baa6d..f17aee4 100644 --- a/src/views/sponeScreen/cityGK/rainfall.vue +++ b/src/views/sponeScreen/cityGK/rainfall.vue @@ -31,6 +31,7 @@ import RainfallLegend from '@/views/sponeScreen/Echarts/RainfallLegend.vue'; //年内降雨量 import { onBeforeUnmount } from 'vue'; +import newfiberVectorLayer from '@/views/sponeScreen/gisMF/newfiberVectorLayer.js'; const chartData2 = ref({ xAxis: [1985, 1990, 1995, 2000, 2005, 2010, 2015, 2020, 2021], @@ -76,6 +77,10 @@ activedname.value = val.name; console.log(activedname.value, 'activedname.value '); if (val.name == '年内降雨量') { + //消除实时天气效果 + clearInterval(window.currentWeatherTimer); + window.currentWeatherTimer = null; + newfiberMap.weatherRemove(); let mounthIndex = 0; weatherTimer.value = setInterval(() => { if (mounthIndex == 0) { @@ -122,6 +127,13 @@ clearInterval(weatherTimer.value); weatherTimer.value = null; newfiberMap.weatherRemove(); + //恢复实时天气效果 + window.currentWeatherTimer = null; + + newfiberVectorLayer.setCurrentWeather(); + window.currentWeatherTimer = setInterval(() => { + newfiberVectorLayer.setCurrentWeather(); + }, 300000); } } diff --git a/src/api/sponeScreen/syntherticData.js b/src/api/sponeScreen/syntherticData.js index c7fcabe..e39da2f 100644 --- a/src/api/sponeScreen/syntherticData.js +++ b/src/api/sponeScreen/syntherticData.js @@ -233,3 +233,11 @@ method: 'get', }); } +// 天气效果——降雨量判断 +export function querySiteFiveMinuteRain(query) { + return request({ + url: '/business//preventFlood/oneMap/querySiteFiveMinuteRain', + method: 'get', + params: query, + }); +} diff --git a/src/views/sponeScreen/cityGK/rainfall.vue b/src/views/sponeScreen/cityGK/rainfall.vue index 86baa6d..f17aee4 100644 --- a/src/views/sponeScreen/cityGK/rainfall.vue +++ b/src/views/sponeScreen/cityGK/rainfall.vue @@ -31,6 +31,7 @@ import RainfallLegend from '@/views/sponeScreen/Echarts/RainfallLegend.vue'; //年内降雨量 import { onBeforeUnmount } from 'vue'; +import newfiberVectorLayer from '@/views/sponeScreen/gisMF/newfiberVectorLayer.js'; const chartData2 = ref({ xAxis: [1985, 1990, 1995, 2000, 2005, 2010, 2015, 2020, 2021], @@ -76,6 +77,10 @@ activedname.value = val.name; console.log(activedname.value, 'activedname.value '); if (val.name == '年内降雨量') { + //消除实时天气效果 + clearInterval(window.currentWeatherTimer); + window.currentWeatherTimer = null; + newfiberMap.weatherRemove(); let mounthIndex = 0; weatherTimer.value = setInterval(() => { if (mounthIndex == 0) { @@ -122,6 +127,13 @@ clearInterval(weatherTimer.value); weatherTimer.value = null; newfiberMap.weatherRemove(); + //恢复实时天气效果 + window.currentWeatherTimer = null; + + newfiberVectorLayer.setCurrentWeather(); + window.currentWeatherTimer = setInterval(() => { + newfiberVectorLayer.setCurrentWeather(); + }, 300000); } } diff --git a/src/views/sponeScreen/gisMF/cesiumMap.vue b/src/views/sponeScreen/gisMF/cesiumMap.vue index fd6397c..594c70b 100644 --- a/src/views/sponeScreen/gisMF/cesiumMap.vue +++ b/src/views/sponeScreen/gisMF/cesiumMap.vue @@ -9,7 +9,9 @@ import blue_vector from './mapStyle.js'; import cesiumPopup from '@/views/sponeScreen/gisMF/cesiumPopup.vue'; import NewFiberMapUtils from '@/utils/gis/NewFiberMapUtils'; +import newfiberVectorLayer from '@/views/sponeScreen/gisMF/newfiberVectorLayer.js'; import bus from '@/bus/index'; +import { onBeforeUnmount } from 'vue'; const { proxy } = getCurrentInstance(); const dataList = ref({}); const popupShow = ref(false); @@ -71,12 +73,23 @@ onMounted(() => { createIniteMap(); + window.currentWeatherTimer = null; + newfiberVectorLayer.setCurrentWeather(); + window.currentWeatherTimer = setInterval(() => { + newfiberVectorLayer.setCurrentWeather(); + }, 5000); + bus.on('closeCesiumPopup', () => { popupShow.value = false; window.PopupInfo && window.PopupInfo.hide(); window.PopupInfo = null; }); }); +onBeforeUnmount(() => { + clearInterval(window.currentWeatherTimer); + window.currentWeatherTimer = null; + newfiberMap.weatherRemove(); +});