From f2c649d65b8352afcefe7d52c0bf41a36a608210 Mon Sep 17 00:00:00 2001 From: lanrenwo Date: Thu, 15 Sep 2022 14:15:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=9B=BE=E8=A1=A8=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E7=9A=84=E5=8D=A1=E9=A1=BF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pages/Home.vue | 65 ++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/web/src/pages/Home.vue b/web/src/pages/Home.vue index e66a75a..40a179f 100644 --- a/web/src/pages/Home.vue +++ b/web/src/pages/Home.vue @@ -217,51 +217,62 @@ export default { }); }, formatOnline(data) { - let timeFormat = data.scope == "rt" || data.scope == "1h" || data.scope == "24h" ? "h:i:s" : "m/d h:i:s" - let datas = data.datas - this.lineChart.online.xname = [] - this.lineChart.online.xdata["在线人数"] = [] + let timeFormat = this.getTimeFormat(data.scope) + let chartData = this.lineChart[data.action] + let datas = data.datas + chartData.xname = [] + chartData.xdata["在线人数"] = [] for(var i=0; i