From f15358ad1ccf071a0a6f2bb3c1ad789f196e2f53 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Mon, 1 Aug 2022 17:15:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E4=B8=AAsetTimeout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppPropagandaStatistics/calendarInfo.vue | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/src/project/saas/AppPropagandaStatistics/calendarInfo.vue b/src/project/saas/AppPropagandaStatistics/calendarInfo.vue index 1d39becd..a5b175cc 100644 --- a/src/project/saas/AppPropagandaStatistics/calendarInfo.vue +++ b/src/project/saas/AppPropagandaStatistics/calendarInfo.vue @@ -92,32 +92,34 @@ export default { .then((res) => { if (res?.data) { this.calendarList = res.data; - 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 + 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 + } } - } 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 + } } } - } 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 - } - } - } - }) + }) + },1000) } }); },