Compare commits
4 Commits
0413ae4eb2
...
de42899819
Author | SHA1 | Date | |
---|---|---|---|
![]() |
de42899819 | ||
![]() |
a0e88e9831 | ||
![]() |
11e5fc4e57 | ||
![]() |
57453a63b0 |
@ -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>
|
||||
@ -44,6 +49,21 @@ import HyInfoForm from "@/views/Home/hygl/hyinfo/HyInfoForm.vue";
|
||||
|
||||
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()
|
||||
//根据id获取数据
|
||||
@ -129,9 +149,7 @@ const getList = async () => {
|
||||
const hyglData = await HyglApi.getHyglPage(queryParamsHygl)
|
||||
|
||||
listHygl.value = hyglData.list
|
||||
|
||||
for(let item of listHygl.value){
|
||||
|
||||
const formattedDate = formatDate2(item.createTime);
|
||||
// 如果 holidays2[formattedDate] 不存在或不是数组,初始化为数组
|
||||
if (!Array.isArray(holidays2[formattedDate])) {
|
||||
@ -140,6 +158,7 @@ const getList = async () => {
|
||||
// 将 title 添加到数组中
|
||||
holidays2[formattedDate].push({id:item.id,title:item.title});
|
||||
}
|
||||
// console.log("holidays2",holidays2)
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="日程状态" prop="status">
|
||||
<el-select v-model="formData.status" placeholder="请选择日程状态类型">
|
||||
<el-select v-model="formData.status" placeholder="请选择日程状态">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.RCGL_RC_STATUS)"
|
||||
:key="dict.value"
|
||||
@ -37,14 +37,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="开始日期" prop="date">
|
||||
<el-date-picker
|
||||
v-model="formData.date"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择开始日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预计开始时间" prop="startTime">
|
||||
@ -107,7 +99,7 @@ const formData = ref({
|
||||
title: undefined,
|
||||
location: undefined,
|
||||
videoLink: undefined,
|
||||
content: undefined,
|
||||
content: "<p><br></p>",
|
||||
date: undefined,
|
||||
startTime: undefined,
|
||||
endTime: undefined,
|
||||
@ -117,7 +109,6 @@ const formData = ref({
|
||||
})
|
||||
const formRules = reactive({
|
||||
title: [{ required: true, message: '日程标题不能为空', trigger: 'blur' }],
|
||||
date: [{ required: true, message: '开始日期不能为空', trigger: 'blur' }],
|
||||
startTime: [{ required: true, message: '日程开始时间不能为空', trigger: 'blur' }],
|
||||
ispublic: [{ required: true, message: '日程是否公开不能为空', trigger: 'blur' }],
|
||||
endTime: [{ required: true, message: '日程结束时间不能为空', trigger: 'blur' }],
|
||||
@ -186,7 +177,7 @@ const resetForm = () => {
|
||||
title: undefined,
|
||||
location: undefined,
|
||||
videoLink: undefined,
|
||||
content: undefined,
|
||||
content: "<p><br></p>",
|
||||
date: undefined,
|
||||
startTime: undefined,
|
||||
endTime: undefined,
|
||||
|
@ -138,7 +138,7 @@
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||
<el-table-column label="日程标题" align="center" prop="title" />
|
||||
<el-table-column label="日程地点" align="center" prop="location" />
|
||||
<!-- <el-table-column label="日程地点" align="center" prop="location" />-->
|
||||
<!-- <el-table-column label="日程相关链接" align="center" prop="videoLink" />-->
|
||||
<!-- <el-table-column label="日程内容" align="center" prop="content" />-->
|
||||
<el-table-column
|
||||
|
@ -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