更改日程表
This commit is contained in:
parent
15cd752877
commit
e3c97db099
@ -8,7 +8,7 @@
|
|||||||
<el-calendar
|
<el-calendar
|
||||||
ref="calendar"
|
ref="calendar"
|
||||||
class="custom-calendar"
|
class="custom-calendar"
|
||||||
:model-value="new Date(currentYear,currentMonth,currentDay)"
|
:model-value="new Date(currentYear,currentMonth)"
|
||||||
>
|
>
|
||||||
<template #header="{ date }">
|
<template #header="{ date }">
|
||||||
<el-row style="width: 100%;">
|
<el-row style="width: 100%;">
|
||||||
@ -29,7 +29,9 @@
|
|||||||
<div
|
<div
|
||||||
class='holiday'
|
class='holiday'
|
||||||
>
|
>
|
||||||
<span style="font-size: 14px">{{ data.date.getDate()}}</span>
|
<span style="font-size: 14px">
|
||||||
|
{{ data.date.getDate() === currentDay? data.date.getDate()+'(今天)':data.date.getDate() }}
|
||||||
|
</span>
|
||||||
<br/>
|
<br/>
|
||||||
<span
|
<span
|
||||||
v-for="item in (holidays2[data.day] || [])"
|
v-for="item in (holidays2[data.day] || [])"
|
||||||
@ -40,11 +42,10 @@
|
|||||||
<template #reference>
|
<template #reference>
|
||||||
<span @click="openForm(item.id)">{{item.title}}</span>
|
<span @click="openForm(item.id)">{{item.title}}</span>
|
||||||
</template>
|
</template>
|
||||||
<el-descriptions :title="item.title" :column="2" border>
|
<el-descriptions :title="item.title" :column="2">
|
||||||
<el-descriptions-item label="状态">{{item.status}}</el-descriptions-item>
|
<el-descriptions-item label="开始时间">{{item.startTime}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="结束时间">{{item.endTime}}</el-descriptions-item>
|
<el-descriptions-item label="结束时间">{{item.endTime}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="地点">{{item.location}}</el-descriptions-item>
|
<el-descriptions-item label="地点">{{item.location}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="备注">{{item.remarks}}</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
<br/>
|
<br/>
|
||||||
@ -61,7 +62,6 @@
|
|||||||
import { CalendarInstance} from 'element-plus';
|
import { CalendarInstance} from 'element-plus';
|
||||||
import {RcglApi, RcglVO} from "@/api/home/rcgl";
|
import {RcglApi, RcglVO} from "@/api/home/rcgl";
|
||||||
import RcglInfoForm from './RcglInfoForm.vue'
|
import RcglInfoForm from './RcglInfoForm.vue'
|
||||||
import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
|
|
||||||
|
|
||||||
defineOptions({ name: 'RcInfo' })
|
defineOptions({ name: 'RcInfo' })
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ const formRef = ref()
|
|||||||
const openForm = (id: number) => {
|
const openForm = (id: number) => {
|
||||||
formRef.value.open(id)
|
formRef.value.open(id)
|
||||||
}
|
}
|
||||||
|
//自定义头部需要使用
|
||||||
const calendar = ref<CalendarInstance>()
|
const calendar = ref<CalendarInstance>()
|
||||||
|
|
||||||
// 获取当前日期和14天前的日期
|
// 获取当前日期和14天前的日期
|
||||||
@ -133,8 +133,8 @@ const getList = async () => {
|
|||||||
holidays2[formattedDate].push({
|
holidays2[formattedDate].push({
|
||||||
id:item.id,
|
id:item.id,
|
||||||
title:item.title,
|
title:item.title,
|
||||||
|
startTime:formatDate2(item.startTime),
|
||||||
endTime:formatDate2(item.endTime),
|
endTime:formatDate2(item.endTime),
|
||||||
status:getStatus(item.status),
|
|
||||||
location:item.location,
|
location:item.location,
|
||||||
remarks:item.remarks
|
remarks:item.remarks
|
||||||
}
|
}
|
||||||
@ -143,14 +143,6 @@ const getList = async () => {
|
|||||||
} finally {
|
} finally {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const getStatus = (status:number)=>{
|
|
||||||
const dict = getIntDictOptions(DICT_TYPE.RCGL_RC_STATUS);
|
|
||||||
for (let item of dict){
|
|
||||||
if (item.value === status){
|
|
||||||
return item.label
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//获取详细日期时间
|
//获取详细日期时间
|
||||||
function formatDate(date: Date,time:boolean) {
|
function formatDate(date: Date,time:boolean) {
|
||||||
@ -180,17 +172,21 @@ onMounted(()=> {
|
|||||||
.holiday::-webkit-scrollbar {
|
.holiday::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
/*今天显示为其他颜色*/
|
||||||
.custom-calendar .is-today {
|
.custom-calendar .is-today {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
background-color: #FFE6E6 ;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
/*设置日历组件边框大小圆角*/
|
||||||
.custom-calendar {
|
.custom-calendar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border: 1px solid #1f1f1f !important; /* 使用 !important 确保样式生效 */
|
border: 1px solid #1f1f1f !important; /* 使用 !important 确保样式生效 */
|
||||||
border-radius: 5px; /* 可选:添加圆角 */
|
border-radius: 5px; /* 可选:添加圆角 */
|
||||||
}
|
}
|
||||||
|
/*每个小各自大小*/
|
||||||
.el-calendar-table .el-calendar-day {
|
.el-calendar-table .el-calendar-day {
|
||||||
height: 105px/*这个覆盖了原组件宽度*/
|
height: 105px/*这个覆盖了原组件宽度*/
|
||||||
}
|
}
|
||||||
@ -200,6 +196,7 @@ onMounted(()=> {
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
//每个各自展示的内容
|
||||||
.holiday {
|
.holiday {
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
@ -221,13 +218,15 @@ onMounted(()=> {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
|
//border: 1px solid var(--el-color-primary);
|
||||||
|
//展示的小标题样式
|
||||||
.seSpan {
|
.seSpan {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: var(--el-color-primary);
|
color: var(--el-color-primary);
|
||||||
border: 1px solid var(--el-color-primary);
|
|
||||||
border-radius: 2px; /* 可选:添加圆角 */
|
border-radius: 2px; /* 可选:添加圆角 */
|
||||||
padding: 0 2px 0 2px;
|
padding: 0 2px 0 2px;
|
||||||
}
|
}
|
||||||
|
//悬浮信息展示的数据
|
||||||
.el-descriptions-item__content {
|
.el-descriptions-item__content {
|
||||||
white-space: normal !important; /* 允许换行 */
|
white-space: normal !important; /* 允许换行 */
|
||||||
word-wrap: break-word; /* 长单词换行 */
|
word-wrap: break-word; /* 长单词换行 */
|
||||||
|
Loading…
Reference in New Issue
Block a user