Explorar o código

大屏预警增加定时器

zhangsijie hai 1 ano
pai
achega
51746542fa
Modificáronse 1 ficheiros con 8 adicións e 4 borrados
  1. 8 4
      minggao/src/page/home/newHome/newHome.vue

+ 8 - 4
minggao/src/page/home/newHome/newHome.vue

@@ -3,7 +3,7 @@
  * @Autor: lin
  * @Date: 2024-04-09 14:26:07
  * @LastEditors: lin
- * @LastEditTime: 2024-04-29 15:39:58
+ * @LastEditTime: 2024-04-29 16:17:06
 -->
 <template>
   <div class="box">
@@ -466,11 +466,15 @@ export default {
     this.getPestLineInfo();
     this.getTaskInfo(this.taskYear);
     this.getWatchInfo();
-    this.getWarningList();
+    // this.getWarningList();
     this.getTaskWarningInfo();
   },
   watch: {},
   methods: {
+    startTimeInterval() {
+      this.getWarningList();
+      this.getGroupDeviceFun();
+    },
     // 测报灯设备详情跳转到对应测报灯轮播页面
     goDeviceLink(id) {
       this.$router.push({
@@ -1113,8 +1117,8 @@ export default {
       });
       this.map = map;
       this.map.on('complete', function () {
-        _this.getGroupDeviceFun();
-        let getGroupTimmer = setInterval(_this.getGroupDeviceFun, 60000);
+        _this.startTimeInterval();
+        let getGroupTimmer = setInterval(_this.startTimeInterval, 60000);
         _this.getFunTimmer.push(getGroupTimmer);
         import(`./geo.json`).then((res) => {
           addGeo(res, map);