From 92e0fa0f8a56c55655f94c6622e73fa10dc1e948 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 16 十一月 2020 19:51:17 +0800
Subject: [PATCH] #
---
src/main/webapp/views/monitor/monitor.html | 32 +++++++++++++++++++++++++++++---
1 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/src/main/webapp/views/monitor/monitor.html b/src/main/webapp/views/monitor/monitor.html
index 37cf403..ca55311 100644
--- a/src/main/webapp/views/monitor/monitor.html
+++ b/src/main/webapp/views/monitor/monitor.html
@@ -367,8 +367,9 @@
};
var data = [];
-// 鎶樼嚎鍥�
- let lineCharts = echarts.init(document.getElementById('line-charts'));
+
+ // 鎶樼嚎鍥�
+ var lineCharts = echarts.init(document.getElementById('line-charts'));
lineChartOption = {
// animation: false,
grid: {
@@ -434,7 +435,32 @@
}]
};
- lineCharts.setOption(lineChartOption);
+ // 璁块棶閲忔姤琛ㄥ姞杞�
+ function initVisits() {
+ var reportView = lineChartOption;
+ var xAxisDate = [];
+ var seriesDate=[];
+ $.ajax({
+ url: baseUrl+"/monitor/pakin/rep",
+ method: 'GET',
+ success: function (res) {
+ if (res.code === 200){
+ var json = res.data;
+ for (var i = 0; i < json.length; i++) {
+ xAxisDate[i]=json[i].node;
+ seriesDate[i]=json[i].val;
+ }
+ reportView.xAxis.data=xAxisDate;
+ reportView.series[0].data=seriesDate;
+ lineCharts.setOption(reportView)
+ } else if (res.code === 403){
+ top.location.href = "/";
+ } else {
+ layer.msg(res.msg);
+ }
+ }
+ });
+ }
// 楗煎浘
let pieCharts = echarts.init(document.getElementById('pie-charts'));
--
Gitblit v1.9.1