From 1667f0240858b916275ae88d2206f0a175c0c7f3 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 14 May 2024 13:41:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=94=B5=E9=87=8F=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/enm_energy/day_base.vue | 6 ++---- src/views/enm_energy/hour_base.vue | 8 +++----- src/views/enm_energy/month_base.vue | 2 -- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/views/enm_energy/day_base.vue b/src/views/enm_energy/day_base.vue index 6ac4b368..3fe73129 100644 --- a/src/views/enm_energy/day_base.vue +++ b/src/views/enm_energy/day_base.vue @@ -247,10 +247,10 @@ export default { var nowDate = new Date(); let year = nowDate.getFullYear(); let month = nowDate.getMonth() + 1; - month = month > 9 ? month : "0" + month; - that.search_date = year + "-" + month; + let month_s = month > 9 ? month : "0" + month; that.year = year; that.month = month; + that.search_date = year + "-" + month_s; that.days = new Date(year, month, 0).getDate(); that.timeStamp = nowDate.getTime(); that.headerLength = that.days + 4; @@ -313,8 +313,6 @@ export default { obj.type = "day"; obj.year = that.year; obj.month = that.month; - obj.mpoint__material__code = "elec"; - obj.mpoint__need_display = 1; obj.mpoint = id; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((res) => { diff --git a/src/views/enm_energy/hour_base.vue b/src/views/enm_energy/hour_base.vue index 01d75cef..05d01804 100644 --- a/src/views/enm_energy/hour_base.vue +++ b/src/views/enm_energy/hour_base.vue @@ -293,12 +293,12 @@ export default { let month = nowDate.getMonth() + 1; let day = nowDate.getDate(); that.timeStamp = nowDate.getTime(); - month = month > 9 ? month : "0" + month; - day = day > 9 ? day : "0" + day; + let month_s = month > 9 ? month : "0" + month; + let day_s = day > 9 ? day : "0" + day; that.day = day; that.year = year; that.month = month; - that.search_date = year + "-" + month + "-" + day; + that.search_date = year + "-" + month_s + "-" + day_s; for (let i = 0; i < that.tableDatas.length; i++) { for (let j = 0; j < 24; j++) { let k = 3 + j; @@ -380,8 +380,6 @@ export default { obj.year = that.year; obj.month = that.month; obj.day = that.day; - obj.mpoint__material__code = "elec"; - obj.mpoint__need_display = 1; obj.mpoint = id; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((res) => { diff --git a/src/views/enm_energy/month_base.vue b/src/views/enm_energy/month_base.vue index a2f298eb..cd4592f0 100644 --- a/src/views/enm_energy/month_base.vue +++ b/src/views/enm_energy/month_base.vue @@ -298,8 +298,6 @@ export default { let obj = {}; obj.type = "month"; obj.year = that.year; - obj.mpoint__material__code = "elec"; - obj.mpoint__need_display = 1; obj.mpoint = id; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((res) => {