From 9cc9d6ed30599a1ecb3e34f57e3cad99adf950f6 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Thu, 21 Jul 2022 10:03:11 +0800 Subject: [PATCH] bug --- .../saas/AppPropagandaStatistics/calendarInfo.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/project/saas/AppPropagandaStatistics/calendarInfo.vue b/src/project/saas/AppPropagandaStatistics/calendarInfo.vue index d7eb8b71..896d7c29 100644 --- a/src/project/saas/AppPropagandaStatistics/calendarInfo.vue +++ b/src/project/saas/AppPropagandaStatistics/calendarInfo.vue @@ -30,7 +30,7 @@ export default { data() { return { date: '', - selected: [], + selected: [{date: ''}], list: [], show: false, calendarList: {}, @@ -81,19 +81,28 @@ export default { 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)) + console.log(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 { + return { + date: this.year + '-' + 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 + } + } } }) }