Commit 10d1c236 by 胡悦

修改日历样式、考勤弹窗无照片样式

1 parent 2f52b154

2.34 MB | W: | H:

2.34 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
}, },
computed: { computed: {
dates() { dates() {
// 获取当前日期 now.getMonth() // 获取当前日期
const now = new Date(); const now = new Date();
const year = now.getFullYear(); const year = now.getFullYear();
const month = now.getMonth(); const month = now.getMonth();
...@@ -104,10 +104,17 @@ export default { ...@@ -104,10 +104,17 @@ export default {
for (let i = 0; i < (firstDayWeekday === 0 ? 6 : firstDayWeekday - 1); i++) { for (let i = 0; i < (firstDayWeekday === 0 ? 6 : firstDayWeekday - 1); i++) {
daysArray.push(null); daysArray.push(null);
} }
// 填充当月的日期
for (let day = 1; day <= totalDays; day++) { for (let day = 1; day <= totalDays; day++) {
daysArray.push(day); daysArray.push(day);
} }
// 用null补足最后一行
const lastDayWeekday = lastDayOfMonth.getDay();
const remainingDays = lastDayWeekday === 0 ? 0 : 7 - lastDayWeekday;
for (let i = 0; i < remainingDays; i++) {
daysArray.push(null);
}
return daysArray; return daysArray;
}, },
getMaxLen() { getMaxLen() {
...@@ -285,6 +292,18 @@ export default { ...@@ -285,6 +292,18 @@ export default {
&:nth-child(-n + 7) { &:nth-child(-n + 7) {
border-top: toRpx(2) solid #DEEAFC; border-top: toRpx(2) solid #DEEAFC;
} }
&:first-child {
border-radius: toRpx(24) 0 0 0;
}
&:nth-child(7) {
border-radius: 0 toRpx(24) 0 0;
}
&:nth-last-child(7) {
border-radius: 0 0 0 toRpx(24);
}
&:last-child {
border-radius: 0 0 toRpx(24) 0;
}
.tag { .tag {
position: absolute; position: absolute;
......
...@@ -23,7 +23,15 @@ ...@@ -23,7 +23,15 @@
<text class="status" :class="[getClockInStateClass]">{{ CLOCK_STATE[detailInfo.data.clockInState] }}</text> <text class="status" :class="[getClockInStateClass]">{{ CLOCK_STATE[detailInfo.data.clockInState] }}</text>
</view> </view>
<view :class="['extra-info', clockInAbnormalAttire ? 'red':'']">{{clockInAbnormalAttire ? '着装异常':'着装正常'}}</view> <view :class="['extra-info', clockInAbnormalAttire ? 'red':'']">{{clockInAbnormalAttire ? '着装异常':'着装正常'}}</view>
<image v-if="abnormalAttire" class="dress-code" @click="openImg('上班', detailInfo.data.clockInPhotoUrl)" :src="detailInfo.data.clockInPhotoUrl" mode="scaleToFill" /> <view v-if="abnormalAttire" class="clock-img">
<template v-if="detailInfo.data.clockInPhotoUrl"><image class="dress-code" @click="openImg('上班', detailInfo.data.clockInPhotoUrl)" :src="detailInfo.data.clockInPhotoUrl" mode="scaleToFill" /></template>
<template v-else>
<view class="no-url">
<view class="sprite-icon icon-no-picture"></view>
暂无记录</view>
</template>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -38,7 +46,16 @@ ...@@ -38,7 +46,16 @@
<text class="status" :class="[getClockOutStateClass]">{{ CLOCK_STATE[detailInfo.data.clockOutState] }}</text> <text class="status" :class="[getClockOutStateClass]">{{ CLOCK_STATE[detailInfo.data.clockOutState] }}</text>
</view> </view>
<view :class="['extra-info', clockOutAbnormalAttire ? 'red':'']">{{clockOutAbnormalAttire ? '着装异常':'着装正常'}}</view> <view :class="['extra-info', clockOutAbnormalAttire ? 'red':'']">{{clockOutAbnormalAttire ? '着装异常':'着装正常'}}</view>
<image v-if="abnormalAttire" class="dress-code" @click="openImg('下班', detailInfo.data.clockOutPhotoUrl)" :src="detailInfo.data.clockOutPhotoUrl" mode="scaleToFill" /> <view v-if="abnormalAttire" class="clock-img">
<template v-if="detailInfo.data.clockOutPhotoUrl">
<image class="dress-code" @click="openImg('下班', detailInfo.data.clockOutPhotoUrl)" :src="detailInfo.data.clockOutPhotoUrl" mode="scaleToFill" />
</template>
<template v-else>
<view class="no-url">
<view class="sprite-icon icon-no-picture"></view>
暂无记录</view>
</template>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -318,6 +335,21 @@ export default { ...@@ -318,6 +335,21 @@ export default {
.time-right { .time-right {
margin-left: toRpx(40); margin-left: toRpx(40);
.clock-img {
margin-top: toRpx(24);
width: toRpx(144);
height: toRpx(192);
border-radius: toRpx(10);
background-color: #F7F8FA;
.no-url {
display: flex;
flex-direction: column;
align-items: center;
padding-top: toRpx(56);
color: #B6BAC2;
font-size: toRpx(24);
}
}
} }
.time-label { .time-label {
...@@ -366,7 +398,6 @@ export default { ...@@ -366,7 +398,6 @@ export default {
} }
.dress-code { .dress-code {
margin-top: toRpx(24);
width: toRpx(144); width: toRpx(144);
height: toRpx(192); height: toRpx(192);
border-radius: toRpx(10); border-radius: toRpx(10);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!