打印
This commit is contained in:
@@ -92,34 +92,35 @@ export default {
|
||||
.then((res) => {
|
||||
if (res?.data) {
|
||||
this.calendarList = res.data;
|
||||
setTimeout(()=>{
|
||||
let arr = Object.keys(res.data).map(key => (res.data[key]))
|
||||
this.list = arr[this.day - 1]?.taskList
|
||||
let calList = arr.filter(item=> (item.taskList && item.taskList.length > 0))
|
||||
this.selected = calList.map(item=> {
|
||||
if(item.day>=1 && item.day<=9) {
|
||||
if(this.month>=1 && this.month <=9) {
|
||||
return {
|
||||
date: this.year + '-' + '0' + this.month + '-' + '0' + item.day
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
date: this.year + '-' + this.month + '-' + '0' + item.day
|
||||
}
|
||||
let arr = Object.keys(res.data).map(key => (res.data[key]))
|
||||
this.list = arr[this.day - 1]?.taskList
|
||||
console.log(this.list,'this.list');
|
||||
let calList = arr.filter(item=> (item.taskList && item.taskList.length > 0))
|
||||
console.log(calList,'calList');
|
||||
this.selected = calList.map(item=> {
|
||||
if(item.day>=1 && item.day<=9) {
|
||||
if(this.month>=1 && this.month <=9) {
|
||||
return {
|
||||
date: this.year + '-' + '0' + this.month + '-' + '0' + item.day
|
||||
}
|
||||
} else if(item.day> 9) {
|
||||
if(this.month > 9) {
|
||||
return {
|
||||
date: this.year + '-' + this.month + '-' + item.day
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
date: this.year + '-' + '0' + this.month + '-' + item.day
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
date: this.year + '-' + this.month + '-' + '0' + item.day
|
||||
}
|
||||
}
|
||||
})
|
||||
},1000)
|
||||
} else if(item.day> 9) {
|
||||
if(this.month > 9) {
|
||||
return {
|
||||
date: this.year + '-' + this.month + '-' + item.day
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
date: this.year + '-' + '0' + this.month + '-' + item.day
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(this.selected, 'this.selected');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user