|
@@ -85,29 +85,35 @@
|
|
|
<div class="block day-item">
|
|
|
<div class="day-item-label">签到打卡<span>{{dataInfoCpt.sign.signStartTime}}</span></div>
|
|
|
<div class="day-item-value">
|
|
|
- <template v-if="dataInfoCpt.sign.signStartTimeReal">
|
|
|
+<!-- <template v-if="dataInfoCpt.sign.signStartTimeReal">-->
|
|
|
<template v-if="dataInfoCpt.sign.signStartStatus === '1'">
|
|
|
<SvgIcon name="true" :color="$store.state.dictionary.signStatusColor.get(dataInfoCpt.sign.signStartStatus)"/>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<SvgIcon name="tips" :color="$store.state.dictionary.signStatusColor.get(dataInfoCpt.sign.signStartStatus)"/>
|
|
|
</template>
|
|
|
- <span>{{$util.Hms(dataInfoCpt.sign.signStartTimeReal)}}</span><span :style="`color: ${$store.state.dictionary.signStatusColor.get(dataInfoCpt.sign.signStartStatus)};`">{{$store.state.dictionary.signStatusMap.get(dataInfoCpt.sign.signStartStatus) || dataInfoCpt.sign.signStartStatus}}</span>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <SvgIcon name="true" color="#04495c"/><span>未打卡</span>
|
|
|
- </template>
|
|
|
+ <span>{{dataInfoCpt.sign.signStartTimeReal ? $util.Hms(dataInfoCpt.sign.signStartTimeReal) : ''}}</span><span :style="`color: ${$store.state.dictionary.signStatusColor.get(dataInfoCpt.sign.signStartStatus)};`">{{$store.state.dictionary.signStatusMap.get(dataInfoCpt.sign.signStartStatus) || dataInfoCpt.sign.signStartStatus}}</span>
|
|
|
+<!-- </template>-->
|
|
|
+<!-- <template v-else>-->
|
|
|
+<!-- <SvgIcon name="true" color="#04495c"/><span>未打卡</span>-->
|
|
|
+<!-- </template>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="block day-item">
|
|
|
<div class="day-item-label">签退打卡<span>{{dataInfoCpt.sign.signEndTime}}</span></div>
|
|
|
<div class="day-item-value">
|
|
|
- <template v-if="dataInfoCpt.sign.signEndTimeReal">
|
|
|
- <SvgIcon name="tips" color="#02fff1"/><span>{{dataInfoCpt.sign.signEndTimeReal}}</span><span>已打卡</span>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <SvgIcon name="true" color="#04495c"/><span>未打卡</span>
|
|
|
- </template>
|
|
|
+<!-- <template v-if="dataInfoCpt.sign.signEndTimeReal">-->
|
|
|
+ <template v-if="dataInfoCpt.sign.signEndStatus === '1'">
|
|
|
+ <SvgIcon name="true" :color="$store.state.dictionary.signStatusColor.get(dataInfoCpt.sign.signEndStatus)"/>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <SvgIcon name="tips" :color="$store.state.dictionary.signStatusColor.get(dataInfoCpt.sign.signEndStatus)"/>
|
|
|
+ </template>
|
|
|
+ <span>{{dataInfoCpt.sign.signEndTimeReal ? $util.Hms(dataInfoCpt.sign.signEndTimeReal) : ''}}</span><span :style="`color: ${$store.state.dictionary.signStatusColor.get(dataInfoCpt.sign.signEndStatus)};`">{{$store.state.dictionary.signStatusMap.get(dataInfoCpt.sign.signEndStatus) || dataInfoCpt.sign.signEndStatus}}</span>
|
|
|
+<!-- </template>-->
|
|
|
+<!-- <template v-else>-->
|
|
|
+<!-- <SvgIcon name="true" color="#04495c"/><span>未打卡</span>-->
|
|
|
+<!-- </template>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -473,7 +479,6 @@ export default defineComponent({
|
|
|
}
|
|
|
const onDayClick = (item) => {
|
|
|
state.dateValue.selectDay = item.selectValue
|
|
|
- getDayInfo()
|
|
|
}
|
|
|
const onWeekClick = (item) => {
|
|
|
state.dateValue.selectWeek = item.id
|
|
@@ -497,6 +502,14 @@ export default defineComponent({
|
|
|
initStaticMonth(ld)
|
|
|
}
|
|
|
const getDayInfo = () => {
|
|
|
+ state.dataInfo.day.sign = {
|
|
|
+ signStartTime: '',
|
|
|
+ signStartTimeReal: '',
|
|
|
+ signStartStatus: '',
|
|
|
+ signEndTime: '',
|
|
|
+ signEndTimeReal: '',
|
|
|
+ signEndStatus: '',
|
|
|
+ }
|
|
|
that.$api.zbyWorkbenchCheckDay({
|
|
|
deptId: store.state.app.userInfo.dept.id,
|
|
|
time: state.dateValue.selectDay
|
|
@@ -509,6 +522,11 @@ export default defineComponent({
|
|
|
state.dataInfo.day.sign.signStartTimeReal = signCome.time
|
|
|
state.dataInfo.day.sign.signStartStatus = signCome.status
|
|
|
}
|
|
|
+ if (signExit) {
|
|
|
+ state.dataInfo.day.sign.signEndTime = signExit.signTime
|
|
|
+ state.dataInfo.day.sign.signEndTimeReal = signExit.time
|
|
|
+ state.dataInfo.day.sign.signEndStatus = signExit.status
|
|
|
+ }
|
|
|
} else {
|
|
|
ElMessage.error(res.message)
|
|
|
}
|
|
@@ -518,10 +536,12 @@ export default defineComponent({
|
|
|
store.dispatch('dictionary/LOAD_DICT_LIST', 'sign_type')
|
|
|
store.dispatch('dictionary/LOAD_DICT_LIST', 'sign_status')
|
|
|
}
|
|
|
+ watch(() => state.dateValue.selectDay, () => {
|
|
|
+ getDayInfo()
|
|
|
+ })
|
|
|
onMounted(() => {
|
|
|
initDictionary()
|
|
|
initStatic()
|
|
|
- getDayInfo()
|
|
|
})
|
|
|
return {
|
|
|
...toRefs(state),
|