From b621bb1034544a8c3c90257c96e4a1460747aa6d Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 17 十一月 2020 09:35:39 +0800
Subject: [PATCH] #
---
src/main/webapp/views/monitor/monitor.html | 46 +++++++++++++++++++++++++++++++++++-----------
1 files changed, 35 insertions(+), 11 deletions(-)
diff --git a/src/main/webapp/views/monitor/monitor.html b/src/main/webapp/views/monitor/monitor.html
index ca55311..7bdb4b6 100644
--- a/src/main/webapp/views/monitor/monitor.html
+++ b/src/main/webapp/views/monitor/monitor.html
@@ -368,9 +368,12 @@
var data = [];
- // 鎶樼嚎鍥�
+ /***********************************************************************************/
+ /************************************* 鎶樼嚎鍥� ***************************************/
+ /***********************************************************************************/
+
var lineCharts = echarts.init(document.getElementById('line-charts'));
- lineChartOption = {
+ var lineChartOption = {
// animation: false,
grid: {
top: '0%',
@@ -436,7 +439,7 @@
};
// 璁块棶閲忔姤琛ㄥ姞杞�
- function initVisits() {
+ function initlinChart() {
var reportView = lineChartOption;
var xAxisDate = [];
var seriesDate=[];
@@ -462,9 +465,12 @@
});
}
-// 楗煎浘
- let pieCharts = echarts.init(document.getElementById('pie-charts'));
- pieChartOption = {
+ /***********************************************************************************/
+ /************************************* 楗煎浘 *****************************************/
+ /***********************************************************************************/
+
+ var pieCharts = echarts.init(document.getElementById('pie-charts'));
+ var pieChartOption = {
// animation: false,
grid: {
top: '0%',
@@ -480,7 +486,7 @@
legend: {
orient: 'vertical',
left: 10,
- data: ['1', '2', '3']
+ data: ['鍦ㄥ簱搴撲綅', '绌哄簱浣�', '浣跨敤搴撲綅', '绂佺敤搴撲綅']
},
series: [
{
@@ -503,9 +509,10 @@
show: false
},
data: [
- {value: 335, name: '1'},
- {value: 310, name: '2'},
- {value: 234, name: '3'},
+ {value: 1, name: '鍦ㄥ簱搴撲綅'},
+ {value: 1, name: '绌哄簱浣�'},
+ {value: 1, name: '浣跨敤搴撲綅'},
+ {value: 1, name: '绂佺敤搴撲綅'},
],
itemStyle: {
emphasis: {
@@ -526,7 +533,24 @@
}
]
};
- pieCharts.setOption(pieChartOption);
+ // pieCharts.setOption(pieChartOption)
+ // 楗煎浘鍔犺浇
+ function initPieChart() {
+ $.ajax({
+ url: baseUrl+"/monitor/loc/rep",
+ method: 'GET',
+ success: function (res) {
+ if (res.code === 200){
+ pieChartOption.series[0].data = res.data;
+ pieCharts.setOption(pieChartOption)
+ } else if (res.code === 403){
+ top.location.href = "/";
+ } else {
+ layer.msg(res.msg);
+ }
+ }
+ });
+ }
</script>
</html>
--
Gitblit v1.9.1