From 71227bf0a95447fa0162a19e76d4d2c3b1f39520 Mon Sep 17 00:00:00 2001 From: wuhongjian Date: Tue, 2 Aug 2022 14:35:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/construction/components/ComplaintEvent.vue | 3 ++- src/views/pages/roadGovernance/components/RoadMain.vue | 9 +++++---- .../pages/waterPoints/components/ComplaintEvent.vue | 7 +++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/views/pages/construction/components/ComplaintEvent.vue b/src/views/pages/construction/components/ComplaintEvent.vue index 5d1dd3e..3fa7ec1 100644 --- a/src/views/pages/construction/components/ComplaintEvent.vue +++ b/src/views/pages/construction/components/ComplaintEvent.vue @@ -132,12 +132,13 @@ export default { const currentDate = new Date(); currentDate.setTime(currentDate.getTime()); currentDate.setTime(currentDate.getTime() - 24 * 60 * 60 * 1000); + const yDate = currentDate.getDate() > 9 ? currentDate.getDate(): '0' + currentDate.getDate() this.preTime = currentDate.getFullYear() + "-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + - currentDate.getDate() + + yDate + " " + "00:00:00"; }, diff --git a/src/views/pages/roadGovernance/components/RoadMain.vue b/src/views/pages/roadGovernance/components/RoadMain.vue index 853e42f..af7059f 100644 --- a/src/views/pages/roadGovernance/components/RoadMain.vue +++ b/src/views/pages/roadGovernance/components/RoadMain.vue @@ -2,7 +2,7 @@ * @Author: hisense.wuhongjian * @Date: 2022-03-08 14:10:05 * @LastEditors: hisense.wuhongjian - * @LastEditTime: 2022-05-12 18:24:51 + * @LastEditTime: 2022-08-02 14:31:25 * @Description: 道路治理专题 --> @@ -243,11 +243,12 @@ export default { const currentDate = new Date(); currentDate.setTime(currentDate.getTime()); this.monthTime = currentDate.getFullYear() + "-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + "01" + " " + "00:00:00"; - this.currentTime = currentDate.getFullYear() + "-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + currentDate.getDate() + " " + "00:00:00"; + this.currentTime = currentDate.getFullYear() + "-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + yDate + " " + "00:00:00"; currentDate.setTime(currentDate.getTime() - 24 * 60 * 60 * 1000); - this.preTime =currentDate.getFullYear() +"-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + currentDate.getDate() + " " +"00:00:00"; + const yDate = currentDate.getDate() > 9 ? currentDate.getDate(): '0' + currentDate.getDate() + this.preTime =currentDate.getFullYear() +"-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + yDate + " " +"00:00:00"; currentDate.setDate(currentDate.getDate() - currentDate.getDay() + 1); - this.weekTime =currentDate.getFullYear() + "-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + currentDate.getDate() + " " + "00:00:00"; + this.weekTime =currentDate.getFullYear() + "-" + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : "0" + (currentDate.getMonth() + 1)) + "-" + yDate + " " + "00:00:00"; }, // 生命周期 - 挂载完成(访问DOM元素) mounted() { diff --git a/src/views/pages/waterPoints/components/ComplaintEvent.vue b/src/views/pages/waterPoints/components/ComplaintEvent.vue index 5db200c..01600bb 100644 --- a/src/views/pages/waterPoints/components/ComplaintEvent.vue +++ b/src/views/pages/waterPoints/components/ComplaintEvent.vue @@ -58,6 +58,7 @@