See999 4 years ago
parent
commit
4161d8bc30
1 changed files with 12 additions and 2 deletions
  1. 12 2
      src/xt_pages/dialysis/details/index.vue

+ 12 - 2
src/xt_pages/dialysis/details/index.vue View File

20
       element-loading-spinner="el-icon-loading"
20
       element-loading-spinner="el-icon-loading"
21
       element-loading-background="rgba(0, 0, 0, 0.8)"
21
       element-loading-background="rgba(0, 0, 0, 0.8)"
22
     >
22
     >
23
-    <div class="patientBox" style="width:25%;padding-left:10px;">
23
+    <div class="patientBox" style="width:25%;padding-left:10px;position: relative;">
24
+      <el-button
25
+          style="position: absolute;right:0;top:2px;z-index:10"
26
+          size="small"
27
+          type="primary"
28
+          @click="refresh"
29
+          >刷新</el-button>
24
       <el-tabs v-model="activeName" @tab-click="handleClick">
30
       <el-tabs v-model="activeName" @tab-click="handleClick">
25
         <el-tab-pane label="候诊区" name="first">
31
         <el-tab-pane label="候诊区" name="first">
26
           <div class="cell clearfix" style="margin-bottom:10px;">
32
           <div class="cell clearfix" style="margin-bottom:10px;">
678
     const timer = setInterval(() => {
684
     const timer = setInterval(() => {
679
       // this.getInitData();
685
       // this.getInitData();
680
       this.requestDialysisSchedules()
686
       this.requestDialysisSchedules()
681
-    }, 1000 * 60)
687
+    }, 1000 * 30)
682
     // 通过$once来监听定时器,在beforeDestroy钩子可以被清除。
688
     // 通过$once来监听定时器,在beforeDestroy钩子可以被清除。
683
     this.$once('hook:beforeDestroy', () => {
689
     this.$once('hook:beforeDestroy', () => {
684
       clearInterval(timer)
690
       clearInterval(timer)
1483
       
1489
       
1484
       let strDate = h  + ':' + m;
1490
       let strDate = h  + ':' + m;
1485
       return strDate;
1491
       return strDate;
1492
+    },
1493
+    refresh(){
1494
+      console.log('1111111')
1495
+      this.requestDialysisSchedules()
1486
     }
1496
     }
1487
   }
1497
   }
1488
 }
1498
 }