|
@@ -9,7 +9,7 @@
|
|
|
:options="$store.state.dictionary.deptList"/>
|
|
|
<!-- <div class="more">查看更多》</div>-->
|
|
|
</template>
|
|
|
- <div class="main">
|
|
|
+ <div class="main" v-loading="loading">
|
|
|
<div class="week-head">
|
|
|
<div class="month-select">
|
|
|
<div class="show-block __hover" @click="ref_date.handleOpen()">
|
|
@@ -125,6 +125,13 @@ export default defineComponent({
|
|
|
startWeek: store.state.app.weekStart,
|
|
|
timestamp: JSON.parse(JSON.stringify(store.state.app.timestamp)),
|
|
|
selectMonth: JSON.parse(JSON.stringify(store.state.app.timestamp)),
|
|
|
+ loading: false,
|
|
|
+ calendarInfo: {
|
|
|
+ signIn: new Map(),
|
|
|
+ signOut: new Map(),
|
|
|
+ daily: new Map(),
|
|
|
+ weekly: new Map(),
|
|
|
+ }
|
|
|
})
|
|
|
const calendarCpt = computed(() => {
|
|
|
return Handle.getMonthCalendarData(state.timestamp, state.startWeek, state.selectMonth)
|
|
@@ -179,8 +186,8 @@ export default defineComponent({
|
|
|
daily: new Map(),
|
|
|
weekly: new Map(),
|
|
|
}
|
|
|
- that.$api.zbyWorkbenchCheckCalendar({
|
|
|
- deptId: store.state.app.userInfo.dept.id,
|
|
|
+ that.$api.zbglyWorkbenchAdminCalendar({
|
|
|
+ deptId: state.deptId,
|
|
|
times: calendarCpt.value.map(v => {
|
|
|
return {
|
|
|
beginTime: v.calendar[0].dateStr,
|
|
@@ -188,32 +195,32 @@ export default defineComponent({
|
|
|
}
|
|
|
})
|
|
|
}).then(res => {
|
|
|
- if (res.code === 200 && res.data) {
|
|
|
- res.data.dateList?.forEach(v => {
|
|
|
- if (new Date(that.$util.YMD(v.date)) <= new Date(that.$util.YMD(store.state.app.timestamp)) && new Date(that.$util.YMD(v.date)) >= new Date(that.$util.YMD(store.state.app.projectFirstDate))) {
|
|
|
- // 日志提交情况
|
|
|
- state.calendarInfo.daily.set(v.date, v.logStatus)
|
|
|
- // 签到情况
|
|
|
- if (v.signInfoStatus?.inStatus) {
|
|
|
- state.calendarInfo.signIn.set(v.date, v.signInfoStatus.inStatus)
|
|
|
- }
|
|
|
- // 签退情况
|
|
|
- if (v.signInfoStatus?.outStatus) {
|
|
|
- state.calendarInfo.signOut.set(v.date, v.signInfoStatus.outStatus)
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- // 周报提交情况
|
|
|
- for (const [k, v] of Object.entries(res.data?.weekMap)) {
|
|
|
- if (that.$util.isValue(v)) {
|
|
|
- if (new Date(that.$util.YMD(k)) <= new Date(that.$util.YMD(store.state.app.timestamp)) && new Date(that.$util.YMD(k)) >= new Date(that.$util.YMD(store.state.app.projectFirstDate))) {
|
|
|
- state.calendarInfo.weekly.set(k, v)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- ElMessage.error(res.message)
|
|
|
- }
|
|
|
+ // if (res.code === 200 && res.data) {
|
|
|
+ // res.data.dateList?.forEach(v => {
|
|
|
+ // if (new Date(that.$util.YMD(v.date)) <= new Date(that.$util.YMD(store.state.app.timestamp)) && new Date(that.$util.YMD(v.date)) >= new Date(that.$util.YMD(store.state.app.projectFirstDate))) {
|
|
|
+ // // 日志提交情况
|
|
|
+ // state.calendarInfo.daily.set(v.date, v.logStatus)
|
|
|
+ // // 签到情况
|
|
|
+ // if (v.signInfoStatus?.inStatus) {
|
|
|
+ // state.calendarInfo.signIn.set(v.date, v.signInfoStatus.inStatus)
|
|
|
+ // }
|
|
|
+ // // 签退情况
|
|
|
+ // if (v.signInfoStatus?.outStatus) {
|
|
|
+ // state.calendarInfo.signOut.set(v.date, v.signInfoStatus.outStatus)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // // 周报提交情况
|
|
|
+ // for (const [k, v] of Object.entries(res.data?.weekMap)) {
|
|
|
+ // if (that.$util.isValue(v)) {
|
|
|
+ // if (new Date(that.$util.YMD(k)) <= new Date(that.$util.YMD(store.state.app.timestamp)) && new Date(that.$util.YMD(k)) >= new Date(that.$util.YMD(store.state.app.projectFirstDate))) {
|
|
|
+ // state.calendarInfo.weekly.set(k, v)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // ElMessage.error(res.message)
|
|
|
+ // }
|
|
|
state.loading = false
|
|
|
}).catch(() => {
|
|
|
state.loading = false
|
|
@@ -224,6 +231,9 @@ export default defineComponent({
|
|
|
}, {
|
|
|
immediate: true
|
|
|
})
|
|
|
+ watch(() => state.deptId, (n) => {
|
|
|
+ getCalendarInfo()
|
|
|
+ })
|
|
|
onMounted(() => {
|
|
|
initDictionary()
|
|
|
})
|