style: 样式调整

This commit is contained in:
yangzhe 2025-04-08 16:34:34 +08:00
parent 8425d0d7a2
commit f2e65f2fc5
2 changed files with 74 additions and 27 deletions

View File

@ -50,6 +50,9 @@ export default {
const firstDay = this.dayList[0]; const firstDay = this.dayList[0];
this.currentYear = firstDay.year; this.currentYear = firstDay.year;
this.currentMonth = firstDay.month; // dayList this.currentMonth = firstDay.month; // dayList
//
this.emitDateInfo(0);
}, },
methods: { methods: {
// //
@ -63,6 +66,23 @@ export default {
this.dayList[index].day; this.dayList[index].day;
date = common.GetNowTime(new Date(date)); date = common.GetNowTime(new Date(date));
this.xzTime = date; this.xzTime = date;
//
this.emitDateInfo(index);
},
//
emitDateInfo(index) {
const selectedDay = this.dayList[index];
const isToday = index === 0; //
this.$emit("dateChange", {
date: this.xzTime, //
year: selectedDay.year,
month: selectedDay.month,
day: selectedDay.day,
isToday: isToday,
});
}, },
}, },
}; };

View File

@ -1,8 +1,9 @@
<template> <template>
<view class="content"> <view class="content">
<daySelect /> <daySelect @dateChange="onDateChange" />
<view class="task-info"> <view v-show="isToday" class="task-info">
<view class="title">今日任务</view> <view class="title">今日任务</view>
<!-- 当日计划 点击跳转 -->
<view class="task-list"> <view class="task-list">
<view class="task-item"> <view class="task-item">
<view class="name-state"> <view class="name-state">
@ -16,7 +17,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="area-schedule"> <view v-show="isToday" class="area-schedule">
<view class="finish"> <view class="finish">
<view class="point"></view> <view class="point"></view>
<view class="title">已保洁区域</view> <view class="title">已保洁区域</view>
@ -42,11 +43,21 @@
></u-line-progress> ></u-line-progress>
</view> </view>
</view> </view>
<view class="cleaning-plan"> <!-- 非当日计划 仅展示 -->
<view class="title">今日保洁计划名称</view> <view v-show="!isToday" class="cleaning-plan-box">
<view class="time"> <view class="cleaning-plan">
<view class="top">00:00:00</view> <view class="title">今日保洁计划名称</view>
<view class="bottom">23:59:00</view> <view class="time">
<view class="top">00:00:00</view>
<view class="bottom">23:59:00</view>
</view>
</view>
<view class="cleaning-plan">
<view class="title">今日保洁计划名称</view>
<view class="time">
<view class="top">00:00:00</view>
<view class="bottom">23:59:00</view>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -57,6 +68,20 @@ export default {
components: { components: {
daySelect, daySelect,
}, },
data() {
return {
isToday: true,
currentDate: "",
};
},
methods: {
onDateChange({ date, isToday }) {
this.isToday = isToday;
this.currentDate = date;
},
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -151,24 +176,26 @@ export default {
} }
} }
.cleaning-plan { .cleaning-plan-box {
margin: 0 32rpx; .cleaning-plan {
margin-top: 36rpx; margin: 0 32rpx;
padding: 42rpx 52rpx; margin-bottom: 36rpx;
display: flex; padding: 42rpx 52rpx;
justify-content: space-between; display: flex;
align-items: center; justify-content: space-between;
background: url("@/static/images/plan-bg.png") no-repeat 100% 100%; align-items: center;
background-size: 100% 100%; background: url("@/static/images/plan-bg.png") no-repeat 100% 100%;
.title { background-size: 100% 100%;
font-weight: 500; .title {
font-size: 36rpx; font-weight: 500;
color: #334a65; font-size: 36rpx;
} color: #334a65;
.time{ }
font-weight: 500; .time {
font-size: 36rpx; font-weight: 500;
color: #334A65; font-size: 36rpx;
color: #334a65;
}
} }
} }
</style> </style>