riku
2024-11-07 5036880fc037e5d112206b93a729f60be12bf8ab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<view class="page">
  <t-loading
    wx:if="{{pageLoading}}"
    theme="circular"
    size="40rpx"
    text="加载中..."
    loading
    t-class="fy-loading"
    t-class-indicator="fy-loading-indicator"
    t-class-text="fy-loading-text"
  >
  </t-loading>
  <view class="page-header">
    <filter
      scene="{{searchOptions.sceneType}}"
      time="{{searchOptions.period}}"
      bind:scenePickerChange="handleSceneChange"
      bind:timePickerChange="handleTimeChange"
      bind:showFilterPopup="showFilterPopup"
    >
      <filter-popup-2
        slot="filterPopup"
        show="{{show}}"
        bind:showFilterPopupClose="showFilterPopupClose"
        bind:reset="reset"
        bind:confirm="confirm"
      >
      </filter-popup-2>
    </filter>
    <view class="patrol-flex">
      <text>总计: {{unfinishedList.length + finishedList.length}}</text>
      <text>未完成: {{unfinishedList.length}}</text>
      <text>完成: {{finishedList.length}}</text>
    </view>
  </view>
  <t-tabs defaultValue="{{0}}" sticky>
    <t-tab-panel
      label="待完成"
      value="0"
      badge-props="{{ { count: unfinishedList.length, offset: ['-16rpx', '8rpx'] } }}"
    >
      <view slot="panel" class="panel-wrap">
        <block wx:if="{{unfinishedList.length > 0}}">
          <patrol-task
            wx:for="{{unfinishedList}}"
            wx:key="index"
            item="{{item}}"
          ></patrol-task>
          <view class="page-footer"></view>
        </block>
        <t-empty-page wx:else description="无相关记录" />
        <load-more
          list-is-empty="{{!unfinishedList.length}}"
          status="{{loadStatus}}"
          bind:retry="_startLoad"
        />
      </view>
    </t-tab-panel>
    <t-tab-panel label="已完成" value="1">
      <view slot="panel" class="panel-wrap">
        <block wx:if="{{finishedList.length > 0}}">
          <patrol-task
            wx:for="{{finishedList}}"
            wx:key="index"
            item="{{item}}"
          ></patrol-task>
          <view class="page-footer"></view>
        </block>
        <t-empty-page wx:else description="无相关记录" />
        <load-more
          list-is-empty="{{!finished.length}}"
          status="{{loadStatus}}"
          bind:retry="_startLoad"
        />
      </view>
    </t-tab-panel>
  </t-tabs>
  <t-fab
    icon="add"
    style="right: 16px; bottom: 128px"
    bind:click="navToPublishTask"
    aria-label="发布任务"
    text=""
  ></t-fab>
</view>