sunran 3 жил өмнө
parent
commit
d4352c0f97

+ 24 - 10
src/views/zhulao/views/healthAssessmen/estimate.vue

@@ -13,13 +13,13 @@
             </div>
           </div>
         </div>
-        <div class="search">查询</div>
+        <van-button class="search" :disabled="searchloading" @click="pageNum=1,queryaction()">查询</van-button>
       </div>
       <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
         <van-list v-model="loading" :immediate-check="false" :finished="finished" finished-text="没有更多了" @load="onLoad">
           <div class="list" v-for="item in healths" :key="item.id">
             <div>
-              <img src="../../assets/img/listg.png" alt="">
+              <img class="listg" :src="require('../../assets/img/listg.png')" alt="">
             </div>
             <div class="list_box">
               <div>
@@ -33,7 +33,6 @@
             </div>
           </div>
         </van-list>
-
       </van-pull-refresh>
     </div>
   </div>
@@ -44,6 +43,7 @@ import { queryaction } from '../../api/index.js'
 export default {
   data() {
     return {
+      searchloading: false,
       select: true,
       selectValue: '近一年',
       healths: [],
@@ -88,6 +88,8 @@ export default {
       return strYear + '-' + strMonth + '-' + strDay
     },
     async queryaction() {
+      this.searchloading = true
+      if (!this.searchloading) return
       var startTime = ''
       var endTime = this.getStartTimeStr(-1)
       switch (this.selectValue) {
@@ -110,6 +112,7 @@ export default {
         pageNum: this.pageNum,
         pageSize: 20,
       })
+      console.log(this.pageNum)
       if (this.pageNum == 1) {
         this.healths = res.healths
       } else {
@@ -119,10 +122,10 @@ export default {
         this.finished = true
         this.pageNum--
       }
+
       this.loading = false
       this.pageNum++
-
-      console.log(res)
+      this.searchloading = false
     },
     onLoad() {
       this.queryaction()
@@ -153,18 +156,19 @@ export default {
   line-height: 80px;
 }
 .selectBox {
-  position: absolute;
+  position: relative;
 }
 .select {
-  position: relative;
+  position: absolute;
   width: 100%;
-  top: 0;
+  top: 80px;
   right: 0;
   transition: all 0.5s;
   height: 0;
   overflow: hidden;
   z-index: 900;
   background-color: #eee;
+  //   background-color: #000;
   font-size: 28px;
   div {
     height: 60px;
@@ -181,11 +185,12 @@ export default {
   display: flex;
   padding: 0 30px;
   justify-content: space-between;
-  border-bottom: 1px solid #ddd;
+  //   border-bottom: 1px solid #ddd;
   padding-bottom: 16px;
   margin-top: 100px;
   width: calc(100% - 60px);
   background-color: #fff;
+  z-index: 9;
 }
 .search {
   width: 120px;
@@ -195,8 +200,11 @@ export default {
   line-height: 80px;
   text-align: center;
   font-size: 30px;
+  padding: 0;
 }
 .list {
+  height: 196px;
+
   border-bottom: 1px solid #ddd;
   padding-left: 30px;
   display: flex;
@@ -231,12 +239,18 @@ export default {
   }
 }
 .van-pull-refresh {
-  margin-top: 110px;
+  margin-top: 116px;
   z-index: 1;
   height: calc(100% - 110px);
   overflow: hidden;
 }
 .van-list {
   height: 100%;
+  .list:first-child {
+    border-top: 1px solid #ddd;
+  }
+}
+.listg {
+  height: 196px;
 }
 </style>