领导日程展示
This commit is contained in:
parent
57453a63b0
commit
11e5fc4e57
@ -8,7 +8,7 @@ export interface HyglVO {
|
|||||||
userId: number // 申请人id
|
userId: number // 申请人id
|
||||||
deptName: string // 申请部门名字
|
deptName: string // 申请部门名字
|
||||||
deptId: number // 申请部门id
|
deptId: number // 申请部门id
|
||||||
time: Date // 申请时间
|
time: Date | number // 申请时间
|
||||||
depict: string // 描述
|
depict: string // 描述
|
||||||
type: number // 会议类型
|
type: number // 会议类型
|
||||||
theme: string // 会议主题
|
theme: string // 会议主题
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<ContentWrap>
|
<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-form-item label="会议申请历史" prop="createTime"/>
|
||||||
<el-calendar
|
<el-calendar
|
||||||
ref="calendar"
|
ref="calendar"
|
||||||
class="custom-calendar"
|
class="custom-calendar"
|
||||||
:model-value="new Date()"
|
:model-value="new Date(currentYear,currentMonth,currentDay)"
|
||||||
>
|
>
|
||||||
<template #header="{ date }">
|
<template #header="{ date }">
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -44,6 +49,21 @@ import HyInfoForm from "@/views/Home/hygl/hyinfo/HyInfoForm.vue";
|
|||||||
|
|
||||||
defineOptions({ name: 'HyInfo' })
|
defineOptions({ name: 'HyInfo' })
|
||||||
|
|
||||||
|
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 formRef = ref()
|
||||||
//根据id获取数据
|
//根据id获取数据
|
||||||
@ -101,7 +121,7 @@ const queryParamsHygl = reactive({
|
|||||||
userId: undefined,
|
userId: undefined,
|
||||||
deptName: undefined,
|
deptName: undefined,
|
||||||
deptId: undefined,
|
deptId: undefined,
|
||||||
time: [],
|
time: [] as string[],
|
||||||
depict: undefined,
|
depict: undefined,
|
||||||
type: undefined,
|
type: undefined,
|
||||||
theme: undefined,
|
theme: undefined,
|
||||||
@ -129,10 +149,8 @@ const getList = async () => {
|
|||||||
const hyglData = await HyglApi.getHyglPage(queryParamsHygl)
|
const hyglData = await HyglApi.getHyglPage(queryParamsHygl)
|
||||||
|
|
||||||
listHygl.value = hyglData.list
|
listHygl.value = hyglData.list
|
||||||
|
|
||||||
for(let item of listHygl.value){
|
for(let item of listHygl.value){
|
||||||
|
const formattedDate = formatDate2(item.time);
|
||||||
const formattedDate = formatDate2(item.createTime);
|
|
||||||
// 如果 holidays2[formattedDate] 不存在或不是数组,初始化为数组
|
// 如果 holidays2[formattedDate] 不存在或不是数组,初始化为数组
|
||||||
if (!Array.isArray(holidays2[formattedDate])) {
|
if (!Array.isArray(holidays2[formattedDate])) {
|
||||||
holidays2[formattedDate] = [];
|
holidays2[formattedDate] = [];
|
||||||
@ -140,6 +158,7 @@ const getList = async () => {
|
|||||||
// 将 title 添加到数组中
|
// 将 title 添加到数组中
|
||||||
holidays2[formattedDate].push({id:item.id,title:item.title});
|
holidays2[formattedDate].push({id:item.id,title:item.title});
|
||||||
}
|
}
|
||||||
|
// console.log("holidays2",holidays2)
|
||||||
} finally {
|
} finally {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user