MrShi
2024-12-03 bbcade0aa73354bf775fe91f88dd618bab6ea4a4
h5/pages/polling/task.vue
@@ -26,6 +26,7 @@
         </view>
      </view>
      <!--  -->
      <scroll-view scroll-y="true" class="scroll_Y" @scrolltolower="scrolltolower">
      <view class="list">
         <view class="item" v-for="item in list" @click="itemClick(item)">
            <image v-if="item.status == 0 || item.status == 1" src="@/static/side/xunjianed.png" class="icon"></image>
@@ -51,12 +52,16 @@
            </view>
         </view>
      </view>
      </scroll-view>
      <!--  -->
   </view>
</template>
<script>
   import { ywPatrolTaskPost } from '@/api'
   import {
      ywPatrolTaskPost
   } from '@/api'
   export default {
      data() {
         return {
@@ -80,8 +85,12 @@
      onLoad() {
         this.getList()
      },
      onReachBottom() {
         const {total,list} = this
      methods: {
         scrolltolower() {
            const {
               total,
               list
            } = this
         if (list.length < total) {
            this.page = this.page + 1
            this.getList()
@@ -89,9 +98,8 @@
            this.showToast('暂无更多数据')
         }
      },
      methods: {
         tabsClick(val) {
            this.param.status = val
            this.param.queryStatus = val
            this.page = 1
            this.list = []
            this.getList()
@@ -108,9 +116,16 @@
            })
         },
         getList() {
            const { page, param, selectAll } = this
            const {
               page,
               param,
               selectAll
            } = this
            ywPatrolTaskPost({
               model: {...param, dealUserId: selectAll ? '' : uni.getStorageSync('userInfo').id, },
               model: {
                  ...param,
                  dealUserId: selectAll ? '' : uni.getStorageSync('userInfo').id,
               },
               page,
               capacity: 10
            }).then(res => {
@@ -126,11 +141,13 @@
   .main_app{
      padding: 0 30rpx;
   }
   .tabs{
      display: flex;
      width: 750rpx;
      margin: 12rpx -30rpx 0;
      border-bottom: 1rpx solid #E5E5E5;
      .tab{
         font-size: 30rpx;
         color: #666666;
@@ -140,15 +157,18 @@
         align-items: center;
         justify-content: flex-end;
         height: 88rpx;
         .name{
            display: flex;
            align-items: center;
         }
         .icon{
            width: 28rpx;
            height: 28rpx;
            margin-right: 10rpx;
         }
         .border{
            width: 54rpx;
            height: 6rpx;
@@ -157,10 +177,12 @@
            margin-top: 24rpx;
         }
      }
      .active{
         font-weight: 600;
         font-size: 32rpx;
         color: #222222;
         .border{
            background-color: $primaryColor;
         }
@@ -168,6 +190,7 @@
      }
      
   }
   .head_wrap {
      display: flex;
      align-items: center;
@@ -180,9 +203,11 @@
         background: #F7F7F7;
         border-radius: 38rpx;
         padding-left: 30rpx;
         input{
            flex: 1;
         }
         .search {
            width: 28rpx;
            height: 28rpx;
@@ -191,12 +216,19 @@
   }
   .scroll_Y {
      height: calc(100vh - 230rpx);
   }
   .list {
      .item {
         display: flex;
         // height: 290rpx;
         padding: 30rpx 0;
         border-bottom: 2rpx solid #E5E5E5;
         &:nth-last-child(1){
            border: none;
         }
         .icon {
            width: 80rpx;
            height: 80rpx;
@@ -209,11 +241,13 @@
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            .line{
               margin-bottom: 20rpx;
               display: flex;
               justify-content: space-between;
               align-items: center;
               .btn{
                  display: flex;
                  align-items: center;
@@ -225,20 +259,24 @@
                  font-size: 26rpx;
                  box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(0,104,255,0.3);
                  border-radius: 30rpx;
                  .saoma{
                     width: 28rpx;
                     height: 28rpx;
                     margin-right: 8rpx;
                  }
               }
               &:nth-last-child(1){
                  margin-bottom: 0;
               }
            }
            .name_wrap{
               display: flex;
               justify-content: space-between;
               align-items: center;
               .name{
                  display: flex;
                  align-items: flex-end;
@@ -246,12 +284,15 @@
                  font-size: 34rpx;
                  color: #222222;
               }
               .status{
                  color: $primaryColor;
               }
               .green{
                  color: #0ADE79;
               }
               .gray{
                  color: #999999;
               }