This commit is contained in:
shijingjing
2022-08-02 15:32:52 +08:00
parent ea9a966286
commit 0775105b18

View File

@@ -92,10 +92,11 @@ export default {
.then((res) => { .then((res) => {
if (res?.data) { if (res?.data) {
this.calendarList = res.data; this.calendarList = res.data;
setTimeout(()=>{
let arr = Object.keys(res.data).map(key => (res.data[key])) let arr = Object.keys(res.data).map(key => (res.data[key]))
this.list = arr[this.day - 1]?.taskList this.list = arr[this.day - 1]?.taskList
console.log(this.list,'this.list');
let calList = arr.filter(item=> (item.taskList && item.taskList.length > 0)) let calList = arr.filter(item=> (item.taskList && item.taskList.length > 0))
console.log(calList,'calList');
this.selected = calList.map(item=> { this.selected = calList.map(item=> {
if(item.day>=1 && item.day<=9) { if(item.day>=1 && item.day<=9) {
if(this.month>=1 && this.month <=9) { if(this.month>=1 && this.month <=9) {
@@ -119,7 +120,7 @@ export default {
} }
} }
}) })
},1000) console.log(this.selected, 'this.selected');
} }
}); });
}, },