You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
2.9 KiB
Plaintext

2 years ago
<!--pages/index/index.wxml-->
<view class="index">
<view class="search">
<t-search t-class="search-input" model:value="{{keyword}}" shape="round" placeholder="输入任务名称或说明搜索" bind:submit="handleSearch" bind:clear="handleSearch" />
<t-icon t-class="view-icon" name="calendar" size="80rpx" bindtap="handleCalendar" />
<t-calendar visible="{{visible}}" minDate="{{minDate}}" maxDate="{{maxDate}}" value="{{selectDate}}" bind:confirm="handleConfirm" type="range" />
</view>
<t-tabs value="{{tab}}" bind:change="onTabsChange">
<t-tab-panel wx:for="{{tabs}}" label="{{item}}" value="{{index}}" wx:key="index" />
</t-tabs>
<scroll-view style="height: calc(100vh - 192rpx - env(safe-area-inset-bottom) - {{statusBarHeight}}px)" class="list" scroll-y="true" bindscrolltolower="bindscrolltolower" refresher-enabled="true"
refresher-triggered="{{refreshing}}" bindrefresherrefresh="handleRefresherRefresh">
<view class="base-card" style="height: {{role != 'user' ? 270 : 170}}rpx;" wx:for="{{sendList}}" wx:key="index" data-id="{{item.id}}" data-submit="{{0}}" data-done="{{item.taskDoneId}}" bindtap="goDetail">
<view class="data">
<view class="operate" wx:if="{{role == 'admin'}}">
<t-icon name="ellipsis" size="40rpx" data-id="{{item.id}}" catchtap="handleAction"></t-icon>
</view>
<view class="title">{{item.jtTaskName}}</view>
<text class="detail">管理员 发布于{{item.createDateTime}}</text>
<text class="txt">要求完成时间:{{item.jtTaskDeadline}}</text>
<text class="txt" wx:if="{{tab == 1 && role != 'user'}}">未完成人数:{{item.totalCount - item.finishCount}}人</text>
<text class="txt" wx:if="{{tab != 1 && role != 'user'}}">总人数/未完成人数 {{item.totalCount}}/<text class="red">{{item.totalCount - item.finishCount}}</text></text>
<t-progress wx:if="{{tab != 1 && role != 'user'}}" style="width: {{role == 'admin' ? 90 : 70}}%;" theme="plump" percentage="{{item.completeRate}}" status="success" />
<view class="btn" wx:if="{{tab == 0 && role != 'admin'}}">
<t-button theme="primary" shape="round" data-id="{{item.id}}" data-submit="{{1}}" data-done="{{item.taskDoneId}}" bindtap="goDetail">去完成</t-button>
</view>
</view>
</view>
<!-- file -->
<view wx:if="{{sendList.length == 0}}">
<t-empty icon="file" description="暂无任务" />
</view>
<view class="no-data" wx:elif="{{select.isEnd}}">
没有更多数据了
</view>
</scroll-view>
<view class="add" wx:if="{{role == 'admin'}}">
<t-icon name="add" color="#fff" size="100rpx" bindtap="add"></t-icon>
</view>
<t-action-sheet id="t-action-sheet" show-cancel="{{false}}" bind:selected="handleSelected" />
</view>