|
|
|
|
@ -33,7 +33,7 @@ |
|
|
|
|
{{ data.day.slice(-2) }} |
|
|
|
|
</p> |
|
|
|
|
<div style="display:flex;align-items:center;flex-direction: column;height:74%;overflow:auto;"> |
|
|
|
|
<span class="txt_box right_txt" v-for="item in calcData" :key="item.title"> |
|
|
|
|
<span class="txt_box right_txt" v-for="item in calcData" :key="item.planCode"> |
|
|
|
|
{{item.start == data.day ? item.title : ''}} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
@ -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 |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|