From f4ba65a25fcad26e3a67542f691fd0286ede9161 Mon Sep 17 00:00:00 2001 From: lb Date: Fri, 2 Dec 2022 16:44:12 +0800 Subject: [PATCH 1/4] =?UTF-8?q?update=20=E5=AE=9E=E6=97=B6=E4=BA=A7?= =?UTF-8?q?=E9=87=8F=E5=92=8C=E8=83=BD=E8=80=97=E6=97=B6=E9=97=B4=E4=B8=BA?= =?UTF-8?q?=E8=BF=917=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/LeftContentPublicConsume.vue | 5 ++--- .../components/RightContentRealtimeProduction.vue | 13 +++++++++---- src/views/3DOverview/index.vue | 6 +++--- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/views/3DOverview/components/LeftContentPublicConsume.vue b/src/views/3DOverview/components/LeftContentPublicConsume.vue index b3595c5..5c306d3 100644 --- a/src/views/3DOverview/components/LeftContentPublicConsume.vue +++ b/src/views/3DOverview/components/LeftContentPublicConsume.vue @@ -79,18 +79,17 @@ -
+
- + --> diff --git a/src/views/3DOverview/components/RightContentRealtimeProduction.vue b/src/views/3DOverview/components/RightContentRealtimeProduction.vue index f6d299b..8c7f222 100644 --- a/src/views/3DOverview/components/RightContentRealtimeProduction.vue +++ b/src/views/3DOverview/components/RightContentRealtimeProduction.vue @@ -16,6 +16,7 @@ import echarts from 'echarts' import resize from '@/views/OperationalOverview/components/mixins/resize' import { Random } from 'mockjs' +import moment from 'moment' class ChartOption { constructor() { @@ -59,7 +60,9 @@ class ChartOption { formatter: params => { return `
-

${params[0].axisValue}

+

${ + params[0].axisValue + }

${params[0].seriesName}: ${params[0].value} @@ -77,14 +80,16 @@ class ChartOption { } } - let d = new Date() this.xAxis = { type: 'category', data: Array(7) .fill(1) .map((_, idx) => { - return d.getMonth() + 1 + '-' + (d.getDate() + idx) - }), + let d = new moment() + const day = idx ? d.subtract(idx, 'd') : d + return day.format('M-DD') + }) + .reverse(), axisTick: { show: false }, axisLabel: { color: '#fff9', diff --git a/src/views/3DOverview/index.vue b/src/views/3DOverview/index.vue index ac37b12..033d7f5 100644 --- a/src/views/3DOverview/index.vue +++ b/src/views/3DOverview/index.vue @@ -1,9 +1,9 @@