<!--pages/t-j/g-z/index/index.wxml-->
<title-bar title="工作统计"></title-bar>
<scroll-view scroll-y style="height: calc(100vh - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="dropDown" refresher-triggered="{{freshIng}}">
  <view class="content">
    <view class="filter">
      <picker mode="date" value="{{startTime}}" bindchange="startTimeChange">
        <view class="picker">
          开始时间: {{startTime}}
        </view>
      </picker>
      <view class="line"></view>
      <picker mode="date" value="{{endTime}}" bindchange="endTimeChange">
        <view class="picker">
          结束时间: {{endTime}}
        </view>
      </picker>
    </view>
    <view class="table">
      <view catchtap="changeItem" data-item="{{item}}" data-index="{{index}}" class="tab-item {{currentIndex==index?'tab-item-checked':''}}" wx:for="{{tab}}" wx:key="{{item.typeId}}">
        <text class="lab">{{item.typeName}}</text>
        <text class="val">{{item.count}}</text>
        <text class="flex">条记录</text>
        <image wx:if="{{currentIndex==index}}" class="arrow" src="/images/icon-checked.png" />
      </view>
    </view>
    <!-- 列表 -->
    <view catchtap="toDetail" data-item="{{item}}" class="item h-div" wx:for="{{list}}">
      <view class="content">
        <view class="title">{{item.chinaName}}</view>
        <view class="des">{{item.title}}</view>
        <view class="time">时间：{{item.createTime}}</view>
      </view>
    </view>
    <view class="space"></view>
  </view>
</scroll-view>