|
@@ -144,6 +144,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 定时器
|
|
|
+ timer: null,
|
|
|
riskList: [],
|
|
|
// 传参
|
|
|
qy: "重庆市",
|
|
@@ -364,16 +366,19 @@ export default {
|
|
|
this.loadMapData();
|
|
|
},
|
|
|
mounted(){
|
|
|
- setInterval(() => {
|
|
|
+ this.timer = setInterval(() => {
|
|
|
// 获取通知
|
|
|
getJqdt(this.params).then((res) => {
|
|
|
// console.log("通知", res);
|
|
|
this.PoliceList = res.data.rows;
|
|
|
});
|
|
|
}, 6000 );
|
|
|
-
|
|
|
+ },
|
|
|
+ destroyed() {
|
|
|
+ if (this.timer) {
|
|
|
+ clearInterval(this.timer)
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|