会议室信息

This commit is contained in:
XaoLi717 2024-11-15 09:29:03 +08:00
parent a4a72f6952
commit 45695d62a2

View File

@ -16,7 +16,7 @@
<template #date-cell="{ data }">
<div
:class="'holiday'"
class='holiday'
style="max-height: 100%; overflow-y: auto; width: 100%;"
>
<span style="font-size: 12px">{{ data.date.getDate()}}</span>
@ -40,8 +40,9 @@
<script setup lang="ts">
import { CalendarInstance} from 'element-plus';
import { HyglApi, HyglVO } from '@/api/home/hygl'
import HyInfoForm from "@/views/Home/hysgl/hysinfo/HyInfoForm.vue";
defineOptions({ name: 'CalendarAgendaIndex' })
defineOptions({ name: 'HyInfo' })
/** 添加/修改操作 */
const formRef = ref()
@ -56,6 +57,7 @@ const endDate2 = new Date();
const startDate2 = new Date();
startDate2.setDate(endDate2.getDate() - 14); // 14
//
function formatDate(date: Date,time:boolean) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 01
@ -65,6 +67,7 @@ function formatDate(date: Date,time:boolean) {
const seconds =time? '59' : '00';
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
//
function formatDate2(dat: number) {
const date = new Date(dat)
const year = date.getFullYear();
@ -81,11 +84,12 @@ function formatDate2(dat: number) {
// const seconds =time? String(date.getSeconds()).padStart(2, '0') : '00';
// return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
// }
/** 搜索按钮操作 */
/** 获取数据 */
const handleQuery = () => {
queryParamsHygl.pageNo = 1
queryParamsHygl.createTime = [formatDate(startDate2,false),formatDate(endDate2,true)]
getList()
queryParamsHygl.createTime = [formatDate(startDate2,false),formatDate(endDate2,true)]//
getList() //
}
const listHygl = ref<HyglVO[]>([]) //
@ -123,8 +127,11 @@ const holidays2 = reactive({});
const getList = async () => {
try {
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])) {