dedsudiyu 5 miesięcy temu
rodzic
commit
a15c99776d
1 zmienionych plików z 7 dodań i 2 usunięć
  1. 7 2
      src/views/components/mapComponent.vue

+ 7 - 2
src/views/components/mapComponent.vue

@@ -105,8 +105,13 @@
     },
     methods: {
       checkSub(index){
-        this.$set(this,'checkIndex',index);
-        this.getSubData({alarmType:false});
+        if(this.checkIndex != index){
+          clearInterval(this.subTimer);
+          this.$set(this,'checkIndex',index);
+          this.getSubData({alarmType:false});
+          //开启实验室轮播
+          this.subTimerFunction();
+        }
       },
       //初始化
       initialize(type) {