<!--pages/task/index/index.wxml-->
<title-bar title="工作任务"></title-bar>
<!-- 筛选 -->
<scroll-view scroll-x class="bg-white nav">
  <view class="flex text-center">
    <view class="cu-item flex-sub {{index==curTab?'text-blue cur':''}}" wx:for="{{tabs}}" wx:key catchtap="tabSelect" data-index="{{index}}">
      {{item.lab}}
    </view>
  </view>
</scroll-view>
<!-- 搜索 -->
<view class="cu-bar search">
  <view class="search-form round">
    <text class="cuIcon-search"></text>
    <input bindinput="inputContent" data-name="condition" type="text" placeholder="请输入关键字" confirm-type="search"></input>
  </view>
</view>
<view class="filter">
  <picker mode="date" value="{{dateFilter}}" bindchange="bindDateChange" data-name="startTime">
    <view class="picker">
      开始时间: {{startTime}}
    </view>
  </picker>
  <view class="line"></view>
  <picker mode="date" value="{{dateFilter}}" bindchange="bindDateChange" data-name="endTime">
    <view class="picker">
      结束时间: {{endTime}}
    </view>
  </picker>
</view>
<scroll-view scroll-y style="height: calc(100vh - 280rpx - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="getList" lower-threshold="300" refresher-triggered="{{freshIng}}">
  <!-- 列表 -->
  <view class="item-bg" wx:for="{{list}}">
    <view class="item">
      <view class="head h-div v-center">
        <view class="single"></view>
        <view class="title ellipsis flex">{{item.typeName}}</view>
        <view catchtap="toUp" data-item="{{item}}" data-detail="{{0}}" class="done" wx:if="{{item.workState !=3}}">前往完成</view>
        <view catchtap="toUp" data-item="{{item}}" data-detail="{{1}}" class="done" wx:else>查看详情</view>
      </view>
      <view class="tv">{{item.title}}</view>
      <view class="time">任务周期：{{item.startTime}} 至 {{item.endTime}}</view>
      <view class="time">接收时间：{{item.createTime}}</view>
      <image class="bottom-img" src="/images/task/icon-bottom-line.png" mode="aspectFill" />
    </view>
  </view>
  <empty wx:if="{{list.length==0}}" />
  <view class="space"></view>
</scroll-view>