From e4c7bca105e64c047fbcd6bbb53ff5d32b0c5fd6 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 10 Jun 2025 14:19:29 +0800
Subject: [PATCH] feat:日历去掉今日
---
src/views/wel/components/calendarBox.vue | 35 +++++++++++++++++++++++++++--------
1 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/src/views/wel/components/calendarBox.vue b/src/views/wel/components/calendarBox.vue
index 2d19ee1..5788267 100644
--- a/src/views/wel/components/calendarBox.vue
+++ b/src/views/wel/components/calendarBox.vue
@@ -26,8 +26,9 @@
import dayjs from 'dayjs';
import { jobEventBar, getCalen } from '@/api/home/index';
import { useRouter } from 'vue-router';
-import ev1 from '@/assets/images/workbench/ev1.png';
-import ev2 from '@/assets/images/workbench/ev2.png';
+import ev1 from '@/assets/images/workbench/ev1.svg';
+import ev2 from '@/assets/images/workbench/ev2.svg';
+import { ElMessage } from 'element-plus';
const router = useRouter();
const events = ref({});
const params = ref({
@@ -53,7 +54,6 @@
(newV, oldV) => {
if (newV && oldV) {
const newDate = dayjs(newV);
- const oldDate = dayjs(oldV);
params.value = {
start_date: newDate.startOf('month').format('YYYY-MM-DD HH:mm:ss'),
end_date: newDate.endOf('month').format('YYYY-MM-DD HH:mm:ss'),
@@ -68,17 +68,19 @@
const getDate = date => {
return date.getDate();
};
+console.log('getDate', getDate);
+
// 获取对应日期的事件
const getEvents = dateString => {
return events.value[dateString] || [];
};
const monthRange = getCurrentMonthRange();
params.value = monthRange;
+console.log('params.value', params.value);
+
const getJobEventBar = () => {
getCalen(params.value).then(res => {
if (res.data.code !== 0) return;
- console.log('rili', res.data.data);
-
events.value = res.data.data;
});
};
@@ -86,6 +88,13 @@
if (event.name === '工单') {
router.push({
path: '/tickets/ticket',
+ query: {
+ day: day,
+ },
+ });
+ } else {
+ router.push({
+ path: '/job/jobstatistics',
query: {
day: day,
},
@@ -99,8 +108,18 @@
<style lang="scss">
.calenBox {
+ .el-button-group>.el-button:not(:first-child):not(:last-child) {
+ border-radius: 0;
+ display: none;
+}
+ .el-calendar__title {
+ font-weight: bold;
+ font-size: 14px;
+ color: #363636;
+ }
+
.el-calendar-table td.is-selected {
- background-color: #f0f7ff;
+ background-color: #f0f7ff;
border: 2px solid #409eff;
border-radius: 4px;
}
@@ -116,8 +135,8 @@
</style>
<style lang="scss" scoped>
.calenBox {
- margin-top: 10px;
- height: 546px;
+ margin-top: 17px;
+ height: 567px;
overflow: hidden;
.event-item {
font-size: 12px;
--
Gitblit v1.9.3