cyy 3 лет назад
Родитель
Сommit
32a746b2ff
1 измененных файлов с 36 добавлено и 1 удалено
  1. 36 1
      src/views/statistics/index.vue

+ 36 - 1
src/views/statistics/index.vue

@@ -30,11 +30,24 @@
             <el-button type="primary" size="mini" plain @click="selectAll">
               查询
             </el-button>
+            <el-button class="aaa" type="primary" size="mini" plain @click="rollstop" v-if="rollup">
+              暂停
+            </el-button>
+            <el-button class="aaa" type="primary" size="mini" plain @click="rollcontinue" v-else>
+              继续
+            </el-button>
           </div>
 
           <div class="goBackButton" @click.prevent="goBack()" >
             返回
           </div>
+<!-- 
+          <div class="rollButton" @click.prevent="rollstop()" v-if="rollup">
+            暂停
+          </div>
+          <div class="rollButton" @click.prevent="rollcontinue()" v-else>
+            继续
+          </div> -->
 
         </div>
         <div v-if="pageOT">
@@ -180,7 +193,7 @@
       this.timer1 = setInterval(()=>{
         this.pageOT = !this.pageOT
         console.log(this.pageOT)
-      },300000)
+      },5000)
     },
     data() {
       return {
@@ -201,6 +214,7 @@
         showComponents:{},//显示全部统计子组件 , 若有新增,往后累计。 供动态表单进行查阅使用。
         dataScope: [],
         pageOT: true,
+        rollup:true,
         quality:[
           {name: '任务完成及时率' ,val: ''},
           {name: '报告差错率' ,val: ''},
@@ -373,6 +387,17 @@
       goBack(){
         this.$router.back(-1)
         clearInterval(this.timer1);
+      },
+      rollcontinue(){
+        this.timer1 = setInterval(()=>{
+          this.pageOT = !this.pageOT
+          console.log(this.pageOT)
+        },5000)
+        this.rollup=true
+      },
+      rollstop(){
+        clearInterval(this.timer1);
+        this.rollup=false
       }
     },
     created() {
@@ -427,6 +452,11 @@
     position: absolute;
     right: 0;
   }
+  .rollButton{
+    width: 2%;
+    position: absolute;
+    right: 20%;
+  }
   #dv-border-box-8{
     border: none;
   }
@@ -446,6 +476,11 @@
     height: 90%;
   }
   .clear{ clear: both; }
+  .aaa{
+    background: #409EFF !important;
+    border-color: #409EFF !important;
+    color: #FFF !important;
+  }
 </style>
 <style lang="scss">
 .el-year-table .today .cell {