From eb04b3b9ad98d68f9aff7fd30c6abe019efb91ac Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 19 十一月 2020 14:30:09 +0800
Subject: [PATCH] #
---
src/main/webapp/views/monitor/monitor.html | 114 +++++++++++++++++++++++++++++---------------------------
1 files changed, 59 insertions(+), 55 deletions(-)
diff --git a/src/main/webapp/views/monitor/monitor.html b/src/main/webapp/views/monitor/monitor.html
index 6c0748d..b2be8fb 100644
--- a/src/main/webapp/views/monitor/monitor.html
+++ b/src/main/webapp/views/monitor/monitor.html
@@ -271,7 +271,7 @@
<div class="image-border image-border4"></div>
<div class="line-chart-title">
<div class="order-report">
- <span class="order-report-left" >鍏ュ簱鍗曠粺璁�</span>
+ <span class="order-report-left" >鍏ュ嚭搴撶粺璁�</span>
<span class="order-report-right">31</span>
</div>
<div class="order-report-english english">
@@ -366,12 +366,12 @@
layui.use(['element', 'carousel'], function(){
var carousel = layui.carousel;
var element = layui.element;
- //寤洪�犲疄渚�
+ // 杞挱鍥�
carousel.render({
elem: '#test1'
,width: '100%' //璁剧疆瀹瑰櫒瀹藉害
- ,arrow: 'always' //濮嬬粓鏄剧ず绠ご
- //,anim: 'updown' //鍒囨崲鍔ㄧ敾鏂瑰紡
+ ,arrow: 'hover' // 鍒囨崲绠ご榛樿鏄剧ず鐘舵�侊紝鍙�夊�间负 hover锛堟偓鍋滄樉绀猴級 always锛堝缁堟樉绀猴級 none锛堝缁堜笉鏄剧ず锛�
+ ,interval: '3000' // 鑷姩鍒囨崲鐨勬椂闂撮棿闅旓紝鍗曚綅锛歮s锛堟绉掞級锛屼笉鑳戒綆浜�800
});
});
@@ -531,7 +531,6 @@
},
data: [{value: 1.5, name: 'm/min'}]
},
- // 璐у弶鏈�澶ч�熷害锛�3.鍑犵背
{
name: '璐у弶閫熷害',
type: 'gauge',
@@ -558,19 +557,19 @@
shadowBlur: 10
}
},
- axisLabel: {
- fontWeight: 'bolder',
- color: '#fff',
- shadowColor: '#fff', //榛樿閫忔槑
- shadowBlur: 10,
- formatter: function (v){
- switch (v + '') {
- case '0': return 'E';
- case '1': return 'Gas';
- case '2': return 'F';
- }
- }
- },
+ // axisLabel: {
+ // fontWeight: 'bolder',
+ // color: '#fff',
+ // shadowColor: '#fff', //榛樿閫忔槑
+ // shadowBlur: 10,
+ // formatter: function (v){
+ // switch (v + '') {
+ // case '0': return 'E';
+ // case '1': return 'Gas';
+ // case '2': return 'F';
+ // }
+ // }
+ // },
splitLine: { // 鍒嗛殧绾�
length:15, // 灞炴�ength鎺у埗绾块暱
lineStyle: { // 灞炴�ineStyle锛堣瑙乴ineStyle锛夋帶鍒剁嚎鏉℃牱寮�
@@ -591,10 +590,10 @@
detail: {
show: false
},
- data: [{value: 0.5, name: 'gas'}]
+ data: [{value: 0.5, name: 'm/min'}]
},
{
- name: '姘磋〃',
+ name: '璐у弶浣嶇疆',
type: 'gauge',
center: ['75%', '50%'], // 榛樿鍏ㄥ眬灞呬腑
radius: '30%',
@@ -621,9 +620,9 @@
shadowBlur: 10,
formatter: function(v){
switch (v + '') {
- case '0': return 'H';
- case '1': return 'Water';
- case '2': return 'C';
+ case '0': return '鍙�';
+ case '1': return '涓�';
+ case '2': return '宸�';
}
}
},
@@ -651,13 +650,6 @@
}
]
};
- setInterval(function (){
- crnChartOption.series[0].data[0].value = (Math.random()*100).toFixed(2) - 0;
- crnChartOption.series[1].data[0].value = (Math.random()*7).toFixed(2) - 0;
- crnChartOption.series[2].data[0].value = (Math.random()*2).toFixed(2) - 0;
- crnChartOption.series[3].data[0].value = (Math.random()*2).toFixed(2) - 0;
- crnChart.setOption(crnChartOption);
- }, 1000);
/***********************************************************************************/
@@ -679,7 +671,7 @@
xAxis: {
type: 'category',
boundaryGap: false,
- data: ['1', '2', '3', '4', '5', '6', '7'],
+ data: ['1', '2', '3', '4', '5', '6', '7'],
axisLabel: {
textStyle:{
color:'#aaa', //鍧愭爣鐨勫瓧浣撻鑹�
@@ -713,45 +705,57 @@
}
},
- series: [{
- data: [820, 932, 901, 934, 1290, 1330, 1320],
- type: 'line',
- areaStyle: {
- color: '#7494ae' // 鎶樼嚎鍖哄煙棰滆壊
+ series: [
+ {
+ data: [820, 932, 901, 934, 1290, 1330, 1320],
+ type: 'line',
+ // areaStyle: {
+ // color: '#7494ae' // 鎶樼嚎鍖哄煙棰滆壊
+ // },
+ itemStyle:{
+ normal:{
+ color:'#3590ac', //鎶樼偣棰滆壊
+ lineStyle:{
+ color:'#3590ac' //鎶樼嚎棰滆壊
+ }
+ }
+ }
},
- itemStyle:{
- normal:{
- color:'#3590ac', //鎶樼偣棰滆壊
- lineStyle:{
- color:'#3590ac' //鎶樼嚎棰滆壊
+ {
+ data: [820, 932, 901, 934, 1290, 1330, 1320],
+ type: 'line',
+ // areaStyle: {
+ // color: '#d55b35' // 鎶樼嚎鍖哄煙棰滆壊
+ // },
+ itemStyle:{
+ normal:{
+ color:'#0cbad9', //鎶樼偣棰滆壊
+ lineStyle:{
+ color:'#07a093' //鎶樼嚎棰滆壊
+ }
}
}
}
- }]
+ ]
};
- // 璁块棶閲忔姤琛ㄥ姞杞�
- function initlinChart() {
+ function initlineChart() {
var reportView = lineChartOption;
- var xAxisDate = [];
- var seriesDate=[];
$.ajax({
- url: baseUrl+"/monitor/pakin/rep",
+ url: baseUrl+"/monitor/line/charts",
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;
+ var json = res.data.rows;
+ reportView.xAxis.data=[getDateFormat(-11), getDateFormat(-10), getDateFormat(-9), getDateFormat(-8), getDateFormat(-7), getDateFormat(-6),
+ getDateFormat(-5), getDateFormat(-4), getDateFormat(-3), getDateFormat(-2), getDateFormat(-1), getDateFormat(-0)];
+ reportView.series[0].data=res.data.rows[0].data;
+ reportView.series[1].data=res.data.rows[1].data;
lineCharts.setOption(reportView)
} else if (res.code === 403){
top.location.href = "/";
} else {
- layer.msg(res.msg);
+ console.log(res.msg);
}
}
});
--
Gitblit v1.9.1