From 073439011d95a377ec2ccee5aeab77425249aa7e Mon Sep 17 00:00:00 2001
From: jinna
Date: Wed, 6 Nov 2024 10:38:56 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=8E=86=E7=82=B9?=
=?UTF-8?q?=E5=87=BB=E6=8C=89=E9=92=AE=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/inspection/calendar.vue | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/views/inspection/calendar.vue b/src/views/inspection/calendar.vue
index 26643f3..edc098d 100644
--- a/src/views/inspection/calendar.vue
+++ b/src/views/inspection/calendar.vue
@@ -33,7 +33,7 @@
{{ data.day.slice(-2) }}
-
+
{{item.start == data.day ? item.title : ''}}
@@ -63,12 +63,16 @@ export default {
let lastDay = new Date(fullYear,fullMonth,0).getDate()
this.today = fullYear + '-' + fullMonth + '-' + fullDay
this.getData(fullYear + '-' + fullMonth + '-01',fullYear + '-' + fullMonth + '-' + lastDay)
- this.$nextTick(() =>{
+
+ },
+ mounted(){
+ this.$nextTick(() =>{
// console.log(document.querySelector('.el-calendar__title'))
// 点击前一个月
let prevBtn = document.querySelector(
".el-calendar__button-group .el-button-group>button:nth-child(1)"
);
+ console.log('prevBtn------------------->',prevBtn)
prevBtn.addEventListener("click", e => {
let year = this.dateValue.getFullYear()
let month = (this.dateValue.getMonth() + 1) < 10 ? '0' + (this.dateValue.getMonth() + 1) : this.dateValue.getMonth() + 1;
@@ -111,8 +115,9 @@ export default {
},
methods: {
getData(startTime,endTime){
- // console.log('date ====>',date)
+
getCalendarData({startDate:startTime,endDate:endTime}).then(res =>{
+ console.log('date ====>',res.data.data)
this.calcData = res.data.data
})
},