ll
liukangdong
2024-12-23 5c53a09ff28e5be90af9c1bc0534a4320fc5aec0
h5/pages/polling/task.vue
@@ -44,13 +44,17 @@
                  <view class="line" @click="itemClick(item)">执行时间:{{ item.startDate.slice(11, 16) }} 至 {{ item.endDate.slice(11, 16) }}</view>
                  <view class="line">
                     <view @click="itemClick(item)">完成情况:{{item.finishNum || 0}}/{{item.patrolNum}}</view>
                     <view v-if="param.queryStatus == '0,1'" class="btn" @click="openSc(item)">
                     <view v-if="param.queryStatus == '0,1' && item.flag && (item.status == 0 || item.status == 1)" class="btn" @click="openSc(item)">
                        <image src="@/static/side/ic_saoma@2x.png" class="saoma" mode=""></image>
                        <view>扫码巡检</view>
                     </view>
                  </view>
               </view>
            </view>
            <view v-if="list.length == 0" class="empty_wrap">
               <image src="@/static/empty.png" mode=""></image>
               <view class="">暂无数据</view>
            </view>
         </view>
      </scroll-view>
@@ -93,7 +97,9 @@
            // activeItem: {}
         };
      },
      onLoad() {
      onShow() {
         this.page = 1
         this.list = []
         this.getList()
      },
      methods: {
@@ -184,7 +190,11 @@
               page,
               capacity: 10
            }).then(res => {
               this.list = [...this.list, ...res.data.records]
               this.list = [...this.list, ...res.data.records]
               this.list.forEach(item => {
               let time = new Date(item.startDate).getTime()
               item.flag = new Date().getTime() > time
               })
               this.total = res.data.total
            })
         }
@@ -272,10 +282,11 @@
   }
   .scroll_Y {
      height: calc(100vh - 230rpx);
      height: calc(100vh - 130rpx);
   }
   .list {
   .list {
      .item {
         display: flex;
         // height: 290rpx;