From 172a419362d86bec6fa62ce61d9830ac7c10b7d8 Mon Sep 17 00:00:00 2001 From: douzhuo <17611323298@163.com> Date: Thu, 7 Jul 2022 18:30:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/wel.vue | 34 ++++++++++++++++++- src/views/ReceivingRecords/index.vue | 4 +-- src/views/Statistics/ReceptionStatistical.vue | 8 ++--- src/views/building/index.vue | 6 ++++ 4 files changed, 45 insertions(+), 7 deletions(-) diff --git a/src/page/wel.vue b/src/page/wel.vue index a2dfcf6..d626583 100644 --- a/src/page/wel.vue +++ b/src/page/wel.vue @@ -541,7 +541,7 @@
-
+
@@ -1630,6 +1630,38 @@ export default { } }); }, + // 获取时间段 + getTimes() { + let str = '' + let time = new Date().getTime() + if (this.TimetoAhoose == 0) { + str = `${new Date(time).getFullYear()}-${new Date(time).getMonth()+1}-${new Date(time).getDate()}` + } + if (this.TimetoAhoose == 1) { + let starTime = new Date().getTime() - 24 * 60 * 60 * 1000 * 7; + let startDate = `${new Date(starTime).getFullYear()}-${ + new Date(starTime).getMonth() + 1 + }-${new Date(starTime).getDate()}`; + let endTime = new Date().getTime() - 24 * 60 * 60 * 1000; + let endDate = `${new Date(endTime).getFullYear()}-${ + new Date(endTime).getMonth() + 1 + }-${new Date(endTime).getDate()}`; + str = `${startDate},${endDate}` + } + if(this.TimetoAhoose == 2) { + let starTime = new Date().getTime() - 24 * 60 * 60 * 1000 * 30; + let startDate = `${new Date(starTime).getFullYear()}-${ + new Date(starTime).getMonth() + 1 + }-${new Date(starTime).getDate()}`; + let endTime = new Date().getTime() - 24 * 60 * 60 * 1000; + let endDate = `${new Date(endTime).getFullYear()}-${ + new Date(endTime).getMonth() + 1 + }-${new Date(endTime).getDate()}`; + str = `${startDate},${endDate}` + } + return str + }, + jumpto(ind) { let num = 24 * 3600 * 1000 * 29; let dang = this.getCurrentTime(); diff --git a/src/views/ReceivingRecords/index.vue b/src/views/ReceivingRecords/index.vue index 6785316..4faa4ed 100644 --- a/src/views/ReceivingRecords/index.vue +++ b/src/views/ReceivingRecords/index.vue @@ -372,11 +372,11 @@ - +