|
|
@@ -13,6 +13,11 @@
|
|
|
@click="switchCloudLayer"
|
|
|
>{{ cloudLayer ? "关闭" : "显示" }}云图</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ :type="rainLayer ? 'danger' : 'primary'"
|
|
|
+ @click="switchRainLayer"
|
|
|
+ >{{ rainLayer ? "关闭" : "显示" }}降雨图</el-button
|
|
|
+ >
|
|
|
<el-tooltip
|
|
|
class="box-item"
|
|
|
effect="dark"
|
|
|
@@ -55,6 +60,7 @@ export default {
|
|
|
windLayer: null, // 风场图
|
|
|
windLayerTimmer: null, // 风场图计时器
|
|
|
cloudLayer: null, // 卫星云图
|
|
|
+ rainLayer: null //
|
|
|
};
|
|
|
},
|
|
|
|
|
|
@@ -63,9 +69,11 @@ export default {
|
|
|
},
|
|
|
|
|
|
unmounted() {
|
|
|
- clearInterval(this.windLayerTimmer);
|
|
|
- this.windLayer.removeLines();
|
|
|
- this.windLayer = null;
|
|
|
+ if (this.windLayer !== null) {
|
|
|
+ clearInterval(this.windLayerTimmer);
|
|
|
+ this.windLayer.removeLines();
|
|
|
+ this.windLayer = null;
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
@@ -323,6 +331,12 @@ export default {
|
|
|
this.showCloudLayer();
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
+ switchRainLayer() {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/satellitecloudchart'
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|