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