|
@@ -86,7 +86,13 @@
|
|
<div class="day-item-label">签到打卡<span>{{dataInfoCpt.sign.signStartTime}}</span></div>
|
|
<div class="day-item-label">签到打卡<span>{{dataInfoCpt.sign.signStartTime}}</span></div>
|
|
<div class="day-item-value">
|
|
<div class="day-item-value">
|
|
<template v-if="dataInfoCpt.sign.signStartTimeReal">
|
|
<template v-if="dataInfoCpt.sign.signStartTimeReal">
|
|
- <SvgIcon name="true" color="#02fff1"/><span>{{dataInfoCpt.sign.signStartTimeReal}}</span><span>已打卡</span>
|
|
|
|
|
|
+ <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>
|
|
<template v-else>
|
|
<template v-else>
|
|
<SvgIcon name="true" color="#04495c"/><span>未打卡</span>
|
|
<SvgIcon name="true" color="#04495c"/><span>未打卡</span>
|
|
@@ -174,30 +180,41 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
- <div class="content-item">
|
|
|
|
|
|
+ <div class="content-item" :style="`opacity: ${$store.getters['app/isWeeklyDay'] ? 1 : 0.3};`">
|
|
<div class="label">
|
|
<div class="label">
|
|
<img src="@/assets/images/business/center-statistics-icon.png"/>
|
|
<img src="@/assets/images/business/center-statistics-icon.png"/>
|
|
周报
|
|
周报
|
|
</div>
|
|
</div>
|
|
<template v-if="dateType === 'day'">
|
|
<template v-if="dateType === 'day'">
|
|
<div class="value value-day">
|
|
<div class="value value-day">
|
|
- <div class="block day-item">
|
|
|
|
- <div class="day-item-label">{{dataInfoCpt.weekly.submitTime ? '已提交' : '未提交'}}<img v-if="dataInfoCpt.weekly.submitTime" class="download" src="@/assets/images/business/download.png"/></div>
|
|
|
|
- <div class="day-item-value">
|
|
|
|
- <template v-if="dataInfoCpt.weekly.submitTime">
|
|
|
|
- <SvgIcon name="true" color="#02fff1"/>
|
|
|
|
- <span>{{$util.Hms(dataInfoCpt.weekly.submitTime)}}</span>
|
|
|
|
- <span class="blue">{{dataInfoCpt.weekly.username}}</span>
|
|
|
|
- <span>已提交</span>
|
|
|
|
- </template>
|
|
|
|
- <template v-else>
|
|
|
|
|
|
+ <template v-if="$store.getters['app/isWeeklyDay']">
|
|
|
|
+ <div class="block day-item">
|
|
|
|
+ <div class="day-item-label">{{dataInfoCpt.weekly.submitTime ? '已提交' : '未提交'}}<img v-if="dataInfoCpt.weekly.submitTime" class="download" src="@/assets/images/business/download.png"/></div>
|
|
|
|
+ <div class="day-item-value">
|
|
|
|
+ <template v-if="dataInfoCpt.weekly.submitTime">
|
|
|
|
+ <SvgIcon name="true" color="#02fff1"/>
|
|
|
|
+ <span>{{$util.Hms(dataInfoCpt.weekly.submitTime)}}</span>
|
|
|
|
+ <span class="blue">{{dataInfoCpt.weekly.username}}</span>
|
|
|
|
+ <span>已提交</span>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <SvgIcon name="true" color="#04495c"/>
|
|
|
|
+ <span>请于</span>
|
|
|
|
+ <span class="blue">{{dataInfoCpt.weekly.submitEndTime}}</span>
|
|
|
|
+ <span>前尽快提交</span>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <div class="block day-item">
|
|
|
|
+ <div class="day-item-label">无需提交</div>
|
|
|
|
+ <div class="day-item-value">
|
|
<SvgIcon name="true" color="#04495c"/>
|
|
<SvgIcon name="true" color="#04495c"/>
|
|
- <span>请于</span>
|
|
|
|
- <span class="blue">{{dataInfoCpt.weekly.submitEndTime}}</span>
|
|
|
|
- <span>前尽快提交</span>
|
|
|
|
- </template>
|
|
|
|
|
|
+ <span>未提交</span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </template>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
@@ -238,6 +255,8 @@ import {useStore} from 'vuex'
|
|
import {useRouter, useRoute} from 'vue-router'
|
|
import {useRouter, useRoute} from 'vue-router'
|
|
import ButtonSwitchCom from '../../common/button-switch.vue'
|
|
import ButtonSwitchCom from '../../common/button-switch.vue'
|
|
import * as Handle from '../../common/handle'
|
|
import * as Handle from '../../common/handle'
|
|
|
|
+import {zbyWorkbenchCheckDay} from "@/api/modules/workbench";
|
|
|
|
+import {ElMessage} from "element-plus";
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: '',
|
|
name: '',
|
|
@@ -254,21 +273,21 @@ export default defineComponent({
|
|
dataInfo: {
|
|
dataInfo: {
|
|
day: {
|
|
day: {
|
|
sign: {
|
|
sign: {
|
|
- signStartTime: '8:30',
|
|
|
|
- signStartTimeReal: '07:59',
|
|
|
|
- signStartStatus: '1',
|
|
|
|
- signEndTime: '15:30',
|
|
|
|
|
|
+ signStartTime: '',
|
|
|
|
+ signStartTimeReal: '',
|
|
|
|
+ signStartStatus: '',
|
|
|
|
+ signEndTime: '',
|
|
signEndTimeReal: '',
|
|
signEndTimeReal: '',
|
|
- signEndStatus: '0',
|
|
|
|
|
|
+ signEndStatus: '',
|
|
},
|
|
},
|
|
daily: {
|
|
daily: {
|
|
- username: '陈述婷',
|
|
|
|
- submitTime: '2023-11-01 13:22:01',
|
|
|
|
- submitEndTime: '23:12:35'
|
|
|
|
|
|
+ username: '',
|
|
|
|
+ submitTime: '',
|
|
|
|
+ submitEndTime: ''
|
|
},
|
|
},
|
|
weekly: {
|
|
weekly: {
|
|
submitTime: '',
|
|
submitTime: '',
|
|
- submitEndTime: '23:12:35'
|
|
|
|
|
|
+ submitEndTime: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
week: {
|
|
week: {
|
|
@@ -454,6 +473,7 @@ export default defineComponent({
|
|
}
|
|
}
|
|
const onDayClick = (item) => {
|
|
const onDayClick = (item) => {
|
|
state.dateValue.selectDay = item.selectValue
|
|
state.dateValue.selectDay = item.selectValue
|
|
|
|
+ getDayInfo()
|
|
}
|
|
}
|
|
const onWeekClick = (item) => {
|
|
const onWeekClick = (item) => {
|
|
state.dateValue.selectWeek = item.id
|
|
state.dateValue.selectWeek = item.id
|
|
@@ -476,8 +496,32 @@ export default defineComponent({
|
|
const ld = new Date(new Date(d).getFullYear(), new Date(d).getMonth() + diff, 1)
|
|
const ld = new Date(new Date(d).getFullYear(), new Date(d).getMonth() + diff, 1)
|
|
initStaticMonth(ld)
|
|
initStaticMonth(ld)
|
|
}
|
|
}
|
|
|
|
+ const getDayInfo = () => {
|
|
|
|
+ that.$api.zbyWorkbenchCheckDay({
|
|
|
|
+ deptId: store.state.app.userInfo.dept.id,
|
|
|
|
+ time: state.dateValue.selectDay
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ const signCome = res.data.signInRecords?.filter(v => v.type === '1')?.[0]
|
|
|
|
+ const signExit = res.data.signInRecords?.filter(v => v.type === '2')?.[0]
|
|
|
|
+ if (signCome) {
|
|
|
|
+ state.dataInfo.day.sign.signStartTime = signCome.signTime
|
|
|
|
+ state.dataInfo.day.sign.signStartTimeReal = signCome.time
|
|
|
|
+ state.dataInfo.day.sign.signStartStatus = signCome.status
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ ElMessage.error(res.message)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ const initDictionary = () => {
|
|
|
|
+ store.dispatch('dictionary/LOAD_DICT_LIST', 'sign_type')
|
|
|
|
+ store.dispatch('dictionary/LOAD_DICT_LIST', 'sign_status')
|
|
|
|
+ }
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
|
+ initDictionary()
|
|
initStatic()
|
|
initStatic()
|
|
|
|
+ getDayInfo()
|
|
})
|
|
})
|
|
return {
|
|
return {
|
|
...toRefs(state),
|
|
...toRefs(state),
|