“wangyihan” пре 1 година
родитељ
комит
f785efbd5b

+ 1 - 1
src/store/modules/settings.js

@@ -13,7 +13,7 @@ const state = {
   fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader,
   sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo,
   dynamicTitle: storageSetting.dynamicTitle === undefined ? dynamicTitle : storageSetting.dynamicTitle,
-  echartsAutoTime:3000,//echarts 图自动请求接口时间
+  echartsAutoTime:5000,//echarts 图自动请求接口时间
   sbtxSwiper: true,//设备提醒轮播
   defaultOption: {
     step: 4.4, // 数值越大速度滚动越快

+ 2 - 3
src/views/equBigData/equ.vue

@@ -144,12 +144,12 @@ export default {
             ...this.activeconfig,
             number: [res.data.deviceOnline],
           };
-          // this.switper();
+          this.switper();
         } else {
           this.pageflag = false;
           this.$Message.warning(res.msg);
         }
-        // this.switper();
+        this.switper();
       });
     },
     //轮询
@@ -159,7 +159,6 @@ export default {
         return;
       }
       let looper = (a) => {
-        console.log(a, "aa");
         this.deviceView();
       };
       this.timer = setInterval(

+ 1 - 14
src/views/equBigData/index.vue

@@ -6,7 +6,7 @@
         <div class="left-top">
           <dv-border-box-13>
             <Border-Item title="设备总览">
-              <leftTop :data="equTotalData" />
+              <leftTop/>
             </Border-Item>
           </dv-border-box-13>
         </div>
@@ -203,19 +203,6 @@ export default {
         this.xylistFlag = true;
       });
     },
-    //轮询
-    // swiper() {
-    //   if (this.timer) {
-    //     return;
-    //   }
-    //   let looper = (a) => {
-    //     this.deviceView();
-    //   };
-    //   this.timer = setInterval(
-    //     looper,
-    //     this.$store.state.settings.echartsAutoTime
-    //   );
-    // },
     userTotal() {
       count().then((res) => {
         this.userTotalData = res.data;

+ 4 - 11
src/views/equBigData/left-top.vue

@@ -136,29 +136,22 @@ export default {
             ...this.laramnumconfig,
             number: [res.data.alarmCount],
           };
-          // this.switper();
+          this.switper();
         } else {
           this.pageflag = false;
           this.$Message.warning(res.msg);
         }
 
-        // this.switper();
+        this.switper();
       });
     },
     //轮询
     switper() {
       if (this.timer) {
-        console.log(this.timer, "1212");
-        // return;
-      }else{
-        console.log('我在else', this.onlineconfig.number);
-        // this.onlineconfig = {
-        //   ...this.onlineconfig,
-        //   number: [0],
-        // };
+        return;
       }
       let looper = (a) => {
-        // this.deviceView();
+        this.deviceView();
       };
       this.timer = setInterval(
         looper,