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,7 +18,7 @@
<u-tag text="9:00~12:00" type="info" border-color="transparent" /> <u-tag text="9:00~12:00" type="info" border-color="transparent" />
</view> </view>
</view> --> </view> -->
<view v-if="!isLoading && planList.length != 0">
<view <view
class="task-item" class="task-item"
v-for="item in planList" v-for="item in planList"
@ -50,6 +50,13 @@
</view> </view>
</view> </view>
</view> </view>
<u-empty
v-if="!isLoading && planList.length == 0"
text="暂无计划"
mode="list"
></u-empty>
</view>
</view> </view>
<view v-if="isToday" class="area-schedule"> <view v-if="isToday" class="area-schedule">
<view class="finish"> <view class="finish">
@ -95,6 +102,8 @@
<view class="bottom">23:59:00</view> <view class="bottom">23:59:00</view>
</view> </view>
</view> --> </view> -->
<view v-if="!isLoading && planList.length != 0">
<view class="cleaning-plan" v-for="item in planList" :key="item.id"> <view class="cleaning-plan" v-for="item in planList" :key="item.id">
<view class="title">{{ item.name }}</view> <view class="title">{{ item.name }}</view>
<view class="time"> <view class="time">
@ -103,6 +112,18 @@
</view> </view>
</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> <u-tabbar :list="vuex_tabbar" :border-top="false"></u-tabbar>
</view> </view>
</template> </template>
@ -128,6 +149,7 @@ export default {
completed: 0, completed: 0,
notCompleted: 0, notCompleted: 0,
}, },
isLoading: false,
}; };
}, },
@ -209,10 +231,12 @@ export default {
// //
async getPlanByDate() { async getPlanByDate() {
this.planList = []; // this.planList = [];
this.isLoading = true;
const res = await GetPlanByDate({ Date: this.currentDate }); const res = await GetPlanByDate({ Date: this.currentDate });
if (res.succeed) { if (res.succeed) {
this.planList = res.data; this.planList = res.data;
this.isLoading = false;
} }
}, },

View File

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