From 301532b5c1cad2c1d45080bfef86579b20486bf5 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期三, 25 十二月 2024 10:33:23 +0800 Subject: [PATCH] 首页调整、考核结果页面调整 --- src/views/system/check/result/detail/index.vue | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/views/system/check/result/detail/index.vue b/src/views/system/check/result/detail/index.vue index 0c1dd20..1001197 100644 --- a/src/views/system/check/result/detail/index.vue +++ b/src/views/system/check/result/detail/index.vue @@ -344,11 +344,14 @@ }, getAllDay() { - // const date = new Date(); - // const year = date.getFullYear(); - // const month = (date.getMonth() + 1) >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1); - // this.date = year + '-' + month; - const currentDate = this.date.split('-'); + let date = this.date + if(!this.date) { + date = new Date(); + const year = date.getFullYear(); + const month = (date.getMonth() + 1) >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1); + date = year + '-' + month; + } + const currentDate = date.split('-'); const currentYear = currentDate[0]; const currentMonth = currentDate[1]; const daysInMonth = new Date(currentYear, currentMonth, 0).getDate(); -- Gitblit v1.8.0