领导日程展示
This commit is contained in:
parent
a0e88e9831
commit
de42899819
@ -121,7 +121,7 @@ const queryParamsHygl = reactive({
|
||||
userId: undefined,
|
||||
deptName: undefined,
|
||||
deptId: undefined,
|
||||
time: [] as string[],
|
||||
time: [],
|
||||
depict: undefined,
|
||||
type: undefined,
|
||||
theme: undefined,
|
||||
@ -150,7 +150,7 @@ const getList = async () => {
|
||||
|
||||
listHygl.value = hyglData.list
|
||||
for(let item of listHygl.value){
|
||||
const formattedDate = formatDate2(item.time);
|
||||
const formattedDate = formatDate2(item.createTime);
|
||||
// 如果 holidays2[formattedDate] 不存在或不是数组,初始化为数组
|
||||
if (!Array.isArray(holidays2[formattedDate])) {
|
||||
holidays2[formattedDate] = [];
|
||||
|
@ -1,10 +1,15 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<el-button-group style="display: flex; justify-content: space-between;">
|
||||
<el-button size="large" @click="selectDate(-1)">上月</el-button>
|
||||
<el-button size="large" @click="today()">今天</el-button>
|
||||
<el-button size="large" @click="selectDate(1)">下月</el-button>
|
||||
</el-button-group>
|
||||
<el-form-item label="领导日程展示" prop="createTime"/>
|
||||
<el-calendar
|
||||
ref="calendar"
|
||||
class="custom-calendar"
|
||||
:model-value="new Date()"
|
||||
:model-value="new Date(currentYear,currentMonth,currentDay)"
|
||||
>
|
||||
<template #header="{ date }">
|
||||
<el-row>
|
||||
@ -62,6 +67,21 @@ const queryParamsRcgl = reactive({
|
||||
createTime: [] as string[],
|
||||
})
|
||||
|
||||
const currentDay = ref(new Date().getDate()) // 获取当前天份
|
||||
const currentMonth = ref(new Date().getMonth()) // 获取当前年份
|
||||
const currentYear = ref(new Date().getFullYear()) // 获取当前年份
|
||||
//改变月份
|
||||
const selectDate = (val:number) => {
|
||||
if (!val){
|
||||
return
|
||||
}
|
||||
currentMonth.value+=val
|
||||
console.log("today",currentYear.value,currentMonth.value,currentDay.value)
|
||||
}
|
||||
//回到今天
|
||||
const today = () => {
|
||||
currentMonth.value = new Date().getMonth() // 获取当前月份
|
||||
}
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (id: number) => {
|
||||
|
Loading…
Reference in New Issue
Block a user