From be6b68271ecf276905bacd12d5d610ffd66011ce Mon Sep 17 00:00:00 2001 From: shidongli Date: Thu, 26 Dec 2024 15:51:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E5=8D=B7=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/TaskStatistics/index.vue | 33 ++++++++++++++--------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/views/system/TaskStatistics/index.vue b/src/views/system/TaskStatistics/index.vue index 6ffa7e4..d8588b1 100644 --- a/src/views/system/TaskStatistics/index.vue +++ b/src/views/system/TaskStatistics/index.vue @@ -289,14 +289,24 @@ export default { console.log(startDate, endDate); this.dischargeTime[0] = startDate; this.dischargeTime[1] = endDate; + if(this.dischargeTime[0]){ this.queryParams.taskStartTime = this.formatDate(this.dischargeTime[0]); + } + if(this.dischargeTime[1]){ this.queryParams.taskEndTime = this.formatDate(this.dischargeTime[1]); + + + } }, formatDate(date) { - const year = date.getFullYear(); + if(date){ + const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1 const day = String(date.getDate()).padStart(2, '0'); return `${year}-${month}-${day}`; + + } + }, // 查看 handleUpdate(row) { @@ -383,7 +393,6 @@ export default { } this.getlist(); }, - changeTime() { }, // 获取表格最高高度 getMaxTableHeight() { const windowInnerHeight = window.innerHeight // 屏幕可视高度 @@ -408,18 +417,18 @@ export default {