|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="OaCalendar">
|
|
|
- <el-calendar ref="calendar" v-model="todayValue">
|
|
|
+ <el-calendar ref="calendar" v-model="todayValue" v-loading="isLoading">
|
|
|
<template #header="{ date }">
|
|
|
<div class="selectBox">
|
|
|
<el-icon class="icon1" @click="selectDate('prev-month')"><ArrowLeftBold /></el-icon>
|
|
@@ -58,6 +58,8 @@ const $emit = defineEmits<{
|
|
|
const calendar = ref<any>(null)
|
|
|
const todayValue = ref(new Date())
|
|
|
|
|
|
+const isLoading = ref<boolean>(false)
|
|
|
+
|
|
|
watch(todayValue, () => {
|
|
|
// 1、如果请假,则不进行跳转
|
|
|
const today = moment(todayValue.value).format('YYYY-MM-DD')
|
|
@@ -179,6 +181,7 @@ const getLogList = async (): Promise<any> => {
|
|
|
|
|
|
const dayReportMap: any = ref({})
|
|
|
const initDailyReportData = async (): Promise<any> => {
|
|
|
+ isLoading.value = true
|
|
|
// 获取已填写的日志
|
|
|
const logList = await getLogList()
|
|
|
const logObj = {}
|
|
@@ -248,6 +251,7 @@ const initDailyReportData = async (): Promise<any> => {
|
|
|
dailyReportList.forEach((item) => {
|
|
|
dayReportMap.value[item.date] = { ...item, show: item.date.split('-')[2] }
|
|
|
})
|
|
|
+ isLoading.value = false
|
|
|
}
|
|
|
|
|
|
/**
|