fix: 保洁空状态

This commit is contained in:
yangzhe 2025-05-08 13:47:54 +08:00
parent be579b08c6
commit aa6e761bf6
2 changed files with 59 additions and 35 deletions

View File

@ -18,37 +18,44 @@
<u-tag text="9:00~12:00" type="info" border-color="transparent" />
</view>
</view> -->
<view v-if="!isLoading && planList.length != 0">
<view
class="task-item"
v-for="item in planList"
:key="item.id"
@click="handleTaskClick(item)"
>
<view class="name-state">
<view class="name">{{ item.name }}</view>
<u-tag
v-if="item.isCompleted == 0"
text="待保洁"
type="info"
border-color="transparent"
/>
<u-tag
v-else
text="已完成"
type="success"
border-color="transparent"
/>
</view>
<view
class="task-item"
v-for="item in planList"
:key="item.id"
@click="handleTaskClick(item)"
>
<view class="name-state">
<view class="name">{{ item.name }}</view>
<u-tag
v-if="item.isCompleted == 0"
text="待保洁"
type="info"
border-color="transparent"
/>
<u-tag
v-else
text="已完成"
type="success"
border-color="transparent"
/>
</view>
<view class="time">
<u-tag
:text="item.beginTime + '~' + item.endTime"
type="info"
border-color="transparent"
/>
<view class="time">
<u-tag
:text="item.beginTime + '~' + item.endTime"
type="info"
border-color="transparent"
/>
</view>
</view>
</view>
<u-empty
v-if="!isLoading && planList.length == 0"
text="暂无计划"
mode="list"
></u-empty>
</view>
</view>
<view v-if="isToday" class="area-schedule">
@ -95,13 +102,27 @@
<view class="bottom">23:59:00</view>
</view>
</view> -->
<view class="cleaning-plan" v-for="item in planList" :key="item.id">
<view class="title">{{ item.name }}</view>
<view class="time">
<view class="top">{{ item.beginTime }}</view>
<view class="bottom">{{ item.endTime }}</view>
<view v-if="!isLoading && planList.length != 0">
<view class="cleaning-plan" v-for="item in planList" :key="item.id">
<view class="title">{{ item.name }}</view>
<view class="time">
<view class="top">{{ item.beginTime }}</view>
<view class="bottom">{{ item.endTime }}</view>
</view>
</view>
</view>
<view
v-if="!isLoading && planList.length == 0"
style="display: flex; justify-content: center"
>
<image
src="/static/images/empty-image.png"
mode="scaleToFill"
style="width: 592rpx; height: 678rpx"
/>
</view>
</view>
<u-tabbar :list="vuex_tabbar" :border-top="false"></u-tabbar>
</view>
@ -128,6 +149,7 @@ export default {
completed: 0,
notCompleted: 0,
},
isLoading: false,
};
},
@ -209,10 +231,12 @@ export default {
//
async getPlanByDate() {
this.planList = [];
// this.planList = [];
this.isLoading = true;
const res = await GetPlanByDate({ Date: this.currentDate });
if (res.succeed) {
this.planList = res.data;
this.isLoading = false;
}
},

View File

@ -96,7 +96,7 @@
((activeTab === 'completed' && completedPlanList.length === 0) ||
(activeTab === 'incomplete' && incompletePlanList.length === 0))
"
text="暂无内容"
text="暂无计划"
mode="list"
></u-empty>
</view>