diff --git a/src/views/sponeScreen/cityGK/index.vue b/src/views/sponeScreen/cityGK/index.vue
index e85962e..b97f08c 100644
--- a/src/views/sponeScreen/cityGK/index.vue
+++ b/src/views/sponeScreen/cityGK/index.vue
@@ -28,6 +28,7 @@
import headHMAimg from '@/views/sponeScreen/cityGK/headHMAimg.vue'; //头部
import PhysicalGeography from '@/views/sponeScreen/cityGK/PhysicalGeography.vue'; //头部
import bus from '@/bus/index';
+import { onBeforeUnmount } from 'vue';
const { proxy } = getCurrentInstance();
const showPanel = ref(true); //面板展开收起
@@ -60,6 +61,22 @@
]);
}, 5000);
});
+onBeforeUnmount(() => {
+ bus.emit('setIniteLayer', [
+ {
+ layername: 'topography',
+ show: true,
+ },
+ {
+ layername: 'builtCity',
+ show: true,
+ },
+ {
+ layername: 'centerCity',
+ show: true,
+ },
+ ]);
+});
diff --git a/src/views/sponeScreen/cityGK/index.vue b/src/views/sponeScreen/cityGK/index.vue
index e85962e..b97f08c 100644
--- a/src/views/sponeScreen/cityGK/index.vue
+++ b/src/views/sponeScreen/cityGK/index.vue
@@ -28,6 +28,7 @@
import headHMAimg from '@/views/sponeScreen/cityGK/headHMAimg.vue'; //头部
import PhysicalGeography from '@/views/sponeScreen/cityGK/PhysicalGeography.vue'; //头部
import bus from '@/bus/index';
+import { onBeforeUnmount } from 'vue';
const { proxy } = getCurrentInstance();
const showPanel = ref(true); //面板展开收起
@@ -60,6 +61,22 @@
]);
}, 5000);
});
+onBeforeUnmount(() => {
+ bus.emit('setIniteLayer', [
+ {
+ layername: 'topography',
+ show: true,
+ },
+ {
+ layername: 'builtCity',
+ show: true,
+ },
+ {
+ layername: 'centerCity',
+ show: true,
+ },
+ ]);
+});
diff --git a/src/views/sponeScreen/cityGK/rainfall.vue b/src/views/sponeScreen/cityGK/rainfall.vue
index 6169afe..26c14e1 100644
--- a/src/views/sponeScreen/cityGK/rainfall.vue
+++ b/src/views/sponeScreen/cityGK/rainfall.vue
@@ -30,6 +30,7 @@
import RainfallEcharts from '@/views/sponeScreen/Echarts/RainfallEcharts.vue'; //年际降雨变化
import RainfallLegend from '@/views/sponeScreen/Echarts/RainfallLegend.vue'; //年内降雨量
+import { onBeforeUnmount } from 'vue';
const chartData2 = ref({
xAxis: [1985, 1990, 1995, 2000, 2005, 2010, 2015, 2020, 2021],
@@ -126,6 +127,11 @@
const refresh = ref(1);
const refresh1 = ref(1);
+onBeforeUnmount(() => {
+ clearInterval(weatherTimer.value);
+ weatherTimer.value = null;
+ newfiberMap.weatherRemove();
+});
diff --git a/src/views/sponeScreen/cityGK/rainfall.vue b/src/views/sponeScreen/cityGK/rainfall.vue
index 6169afe..26c14e1 100644
--- a/src/views/sponeScreen/cityGK/rainfall.vue
+++ b/src/views/sponeScreen/cityGK/rainfall.vue
@@ -30,6 +30,7 @@
import RainfallEcharts from '@/views/sponeScreen/Echarts/RainfallEcharts.vue'; //年际降雨变化
import RainfallLegend from '@/views/sponeScreen/Echarts/RainfallLegend.vue'; //年内降雨量
+import { onBeforeUnmount } from 'vue';
const chartData2 = ref({
xAxis: [1985, 1990, 1995, 2000, 2005, 2010, 2015, 2020, 2021],
@@ -126,6 +127,11 @@
const refresh = ref(1);
const refresh1 = ref(1);
+onBeforeUnmount(() => {
+ clearInterval(weatherTimer.value);
+ weatherTimer.value = null;
+ newfiberMap.weatherRemove();
+});
diff --git a/src/views/sponeScreen/cityGK/rainfall.vue b/src/views/sponeScreen/cityGK/rainfall.vue
index 6169afe..26c14e1 100644
--- a/src/views/sponeScreen/cityGK/rainfall.vue
+++ b/src/views/sponeScreen/cityGK/rainfall.vue
@@ -30,6 +30,7 @@
import RainfallEcharts from '@/views/sponeScreen/Echarts/RainfallEcharts.vue'; //年际降雨变化
import RainfallLegend from '@/views/sponeScreen/Echarts/RainfallLegend.vue'; //年内降雨量
+import { onBeforeUnmount } from 'vue';
const chartData2 = ref({
xAxis: [1985, 1990, 1995, 2000, 2005, 2010, 2015, 2020, 2021],
@@ -126,6 +127,11 @@
const refresh = ref(1);
const refresh1 = ref(1);
+onBeforeUnmount(() => {
+ clearInterval(weatherTimer.value);
+ weatherTimer.value = null;
+ newfiberMap.weatherRemove();
+});
diff --git a/src/views/sponeScreen/cityGK/rainfall.vue b/src/views/sponeScreen/cityGK/rainfall.vue
index 6169afe..26c14e1 100644
--- a/src/views/sponeScreen/cityGK/rainfall.vue
+++ b/src/views/sponeScreen/cityGK/rainfall.vue
@@ -30,6 +30,7 @@
import RainfallEcharts from '@/views/sponeScreen/Echarts/RainfallEcharts.vue'; //年际降雨变化
import RainfallLegend from '@/views/sponeScreen/Echarts/RainfallLegend.vue'; //年内降雨量
+import { onBeforeUnmount } from 'vue';
const chartData2 = ref({
xAxis: [1985, 1990, 1995, 2000, 2005, 2010, 2015, 2020, 2021],
@@ -126,6 +127,11 @@
const refresh = ref(1);
const refresh1 = ref(1);
+onBeforeUnmount(() => {
+ clearInterval(weatherTimer.value);
+ weatherTimer.value = null;
+ newfiberMap.weatherRemove();
+});
diff --git a/src/views/sponeScreen/cityGK/rainfall.vue b/src/views/sponeScreen/cityGK/rainfall.vue
index 6169afe..26c14e1 100644
--- a/src/views/sponeScreen/cityGK/rainfall.vue
+++ b/src/views/sponeScreen/cityGK/rainfall.vue
@@ -30,6 +30,7 @@
import RainfallEcharts from '@/views/sponeScreen/Echarts/RainfallEcharts.vue'; //年际降雨变化
import RainfallLegend from '@/views/sponeScreen/Echarts/RainfallLegend.vue'; //年内降雨量
+import { onBeforeUnmount } from 'vue';
const chartData2 = ref({
xAxis: [1985, 1990, 1995, 2000, 2005, 2010, 2015, 2020, 2021],
@@ -126,6 +127,11 @@
const refresh = ref(1);
const refresh1 = ref(1);
+onBeforeUnmount(() => {
+ clearInterval(weatherTimer.value);
+ weatherTimer.value = null;
+ newfiberMap.weatherRemove();
+});