bug
This commit is contained in:
@@ -30,7 +30,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
date: '',
|
date: '',
|
||||||
selected: [],
|
selected: [{date: ''}],
|
||||||
list: [],
|
list: [],
|
||||||
show: false,
|
show: false,
|
||||||
calendarList: {},
|
calendarList: {},
|
||||||
@@ -81,19 +81,28 @@ export default {
|
|||||||
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
|
||||||
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);
|
||||||
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) {
|
||||||
return {
|
return {
|
||||||
date: this.year + '-' + '0' + this.month + '-' + '0' + item.day
|
date: this.year + '-' + '0' + this.month + '-' + '0' + item.day
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
return {
|
||||||
|
date: this.year + '-' + this.month + '-' + '0' + item.day
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if(item.day> 9) {
|
} else if(item.day> 9) {
|
||||||
if(this.month > 9) {
|
if(this.month > 9) {
|
||||||
return {
|
return {
|
||||||
date: this.year + '-' + this.month + '-' + item.day
|
date: this.year + '-' + this.month + '-' + item.day
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
return {
|
||||||
|
date: this.year + '-' + '0' + this.month + '-' + item.day
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user