788 lines
35 KiB
Plaintext
788 lines
35 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
|||
|
|
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
|||
|
|
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
|||
|
|
<%@page import="com.sipai.entity.visual.JspElement"%>
|
|||
|
|
<%request.setAttribute("Type_GetValue", JspElement.Type_GetValue); %>
|
|||
|
|
<%request.setAttribute("Type_Get7dayHistory", JspElement.Type_GetHourHistory); %>
|
|||
|
|
<%request.setAttribute("Type_Get7dayHistory", JspElement.Type_Get7dayHistory); %>
|
|||
|
|
<%request.setAttribute("Type_GetModbus", JspElement.Type_GetModbus); %>
|
|||
|
|
<%request.setAttribute("Type_GetHttp", JspElement.Type_GetHttp); %>
|
|||
|
|
<!DOCTYPE html>
|
|||
|
|
<!-- <html lang="zh-CN"> -->
|
|||
|
|
<!-- BEGIN HEAD -->
|
|||
|
|
|
|||
|
|
<head>
|
|||
|
|
<title></title>
|
|||
|
|
<!-- 引用页头及CSS页-->
|
|||
|
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
|
|||
|
|
/* 请求数据 */
|
|||
|
|
function getValue() {
|
|||
|
|
$.post(ext.contextPath + '/plan/getJspWholeInfoByPlanLayoutId.do', { planLayoutId: "${param.planLayoutId}" }, function (data) {
|
|||
|
|
// console.log(data);
|
|||
|
|
if(data!=''){
|
|||
|
|
var nowHourP=0;
|
|||
|
|
var lastHourP=0;
|
|||
|
|
var nowdayP=0;
|
|||
|
|
var lastdayP=0;
|
|||
|
|
|
|||
|
|
var handlingLoadNum=1;
|
|||
|
|
var handlingLoadColorNum=0;
|
|||
|
|
var handlingLoadDatas=[];
|
|||
|
|
var handlingLoadHtml="";
|
|||
|
|
var handlingLoadColor=['#0263FF','#24DEFF','#8E30FF','#CC24F2','#D4249F'];
|
|||
|
|
|
|||
|
|
var lineDatas=[];
|
|||
|
|
var lineXDatas=[];
|
|||
|
|
var lineXDDatas1=[];
|
|||
|
|
var lineXDDatas2=[];
|
|||
|
|
var lineXDDatas3=[];
|
|||
|
|
var lineDatasNum=0;
|
|||
|
|
|
|||
|
|
var barDatas=[];
|
|||
|
|
|
|||
|
|
var cqControlDataHtml="";
|
|||
|
|
var xhControlDataHtml="";
|
|||
|
|
var bzControlDataHtml="";
|
|||
|
|
var cjzControlDataHtml="";
|
|||
|
|
var cxControlDataHtml="";
|
|||
|
|
|
|||
|
|
for(var i=0;i<data.length;i++){
|
|||
|
|
if(data[i].elementCode=="evaluate"){
|
|||
|
|
getBarchart('chart1',data[i].mPoint.parmvalue.toFixed(0),'','#36FFF9');
|
|||
|
|
}else if(data[i].elementCode=="hourWater"){
|
|||
|
|
if(data[i].name=="当前小时水量"){
|
|||
|
|
if(data[i].mPoint.parmvalue!=null){
|
|||
|
|
nowHourP=data[i].mPoint.parmvalue;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
// else if(data[i].name=="上小时水量"){
|
|||
|
|
// if(data[i].mPointHistory.length>0&&data[i].mPointHistory[0]!=null){
|
|||
|
|
// lastHourP=data[i].mPointHistory[0].parmvalue;
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
}else if(data[i].elementCode=="dayWater"){
|
|||
|
|
if(data[i].name=="今天累计水量"){
|
|||
|
|
if(data[i].mPoint!=null){
|
|||
|
|
nowdayP=data[i].mPoint.parmvalue;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
// else if(data[i].name=="昨日累计水量"){
|
|||
|
|
// if(data[i].mPointHistory.length>0&&data[i].mPointHistory[0]!=null){
|
|||
|
|
// lastdayP=data[i].mPointHistory[0].parmvalue;
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
}else if(data[i].elementCode=="companyWater"){
|
|||
|
|
if(handlingLoadNum%3==1){
|
|||
|
|
var sj=0;
|
|||
|
|
if(data[i].mPoint!=null){
|
|||
|
|
sj=((data[i].mPoint.parmvalue)).toFixed(2);
|
|||
|
|
}
|
|||
|
|
// handlingLoadDatas.push({
|
|||
|
|
// value:sj,
|
|||
|
|
// name:data[i].name
|
|||
|
|
// })
|
|||
|
|
lineXDatas.push(data[i].name);
|
|||
|
|
lineXDDatas1.push(sj);
|
|||
|
|
}else if(handlingLoadNum%3==2){
|
|||
|
|
// var sj=((data[i].mPointHistory[0].parmvalue)).toFixed(2);
|
|||
|
|
var sj=0;
|
|||
|
|
if(data[i].mPoint!=null){
|
|||
|
|
sj=((data[i].mPoint.parmvalue)).toFixed(2);
|
|||
|
|
}
|
|||
|
|
lineXDDatas2.push(sj);
|
|||
|
|
}else if(handlingLoadNum%3==0){
|
|||
|
|
var mb=Number(data[i].valueUrl).toFixed(2);
|
|||
|
|
lineXDDatas3.push(mb);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
handlingLoadNum++;
|
|||
|
|
}else if(data[i].elementCode=="evaluateCompany"){
|
|||
|
|
// data[i].mPoint.parmvalue
|
|||
|
|
handlingLoadHtml+="<div style=\"float: left;width: 100%;height: 52px;padding-left: 25px;\">";
|
|||
|
|
handlingLoadHtml+="<div style=\"float: left;width: 60%;height: 100%;\">";
|
|||
|
|
handlingLoadHtml+="<div style=\"float: left;width:40px;height:20px;background:"+handlingLoadColor[handlingLoadColorNum]+";margin-top: 16px;border-radius: 4px;\"></div>";
|
|||
|
|
handlingLoadHtml+="<div style=\"float: left;height:100%;padding-left: 15px;color: #ffffff;font-size: 20px;line-height:52px;\">"+data[i].name+"</div>";
|
|||
|
|
handlingLoadHtml+="</div>";
|
|||
|
|
handlingLoadHtml+="<div style=\"float: left;width: 40%;height: 100%;font-size: 30px;color: #36fff9;line-height: 52px;\">";
|
|||
|
|
handlingLoadHtml+="<div style=\"float: left;width: 40%;height: 100%;font-size: 30px;color: #36fff9;line-height: 52px;\">"+data[i].valueUrl+"%</div>";
|
|||
|
|
handlingLoadHtml+="</div>";
|
|||
|
|
handlingLoadHtml+="</div>";
|
|||
|
|
handlingLoadColorNum++;
|
|||
|
|
}else if(data[i].elementCode=="line"){
|
|||
|
|
if(data[i].getValueType!="getText"){
|
|||
|
|
var datas=new Array();
|
|||
|
|
for(var j=0;j<data[i].mPointHistory.length;j++){
|
|||
|
|
const his=data[i].mPointHistory[j];
|
|||
|
|
var ddata=new Array();
|
|||
|
|
ddata.push(his.measuredt.substring(11,13));
|
|||
|
|
ddata.push((his.parmvalue).toFixed(2));
|
|||
|
|
datas.push(ddata);
|
|||
|
|
}
|
|||
|
|
if(lineDatasNum==0){
|
|||
|
|
lineDatas.push({
|
|||
|
|
data: datas,
|
|||
|
|
name: data[i].name,
|
|||
|
|
type: 'line',
|
|||
|
|
symbol:'none',
|
|||
|
|
smooth: true,
|
|||
|
|
markPoint: {
|
|||
|
|
symbolSize:'40',
|
|||
|
|
label:{
|
|||
|
|
fontSize:10
|
|||
|
|
},
|
|||
|
|
data: [
|
|||
|
|
{type: 'max', name: '最大值'},
|
|||
|
|
{type: 'min', name: '最小值'}
|
|||
|
|
]
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}else{
|
|||
|
|
lineDatas.push({
|
|||
|
|
data: datas,
|
|||
|
|
name: data[i].name,
|
|||
|
|
type: 'line',
|
|||
|
|
symbol:'none',
|
|||
|
|
smooth: true
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
lineDatasNum++;
|
|||
|
|
}else if(data[i].getValueType=="getText"){
|
|||
|
|
if(lineDatas!=''&&lineDatas.length>0){
|
|||
|
|
var datas=new Array();
|
|||
|
|
for (let j = 0; j < lineDatas[1].data.length; j++) {
|
|||
|
|
const element = lineDatas[1].data[j];
|
|||
|
|
var ddata=new Array();
|
|||
|
|
ddata.push(element[0]);
|
|||
|
|
ddata.push(data[i].valueUrl);
|
|||
|
|
datas.push(ddata);
|
|||
|
|
}
|
|||
|
|
lineDatas.push({
|
|||
|
|
data: datas,
|
|||
|
|
name: data[i].name,
|
|||
|
|
type: 'line',
|
|||
|
|
symbol:'none',
|
|||
|
|
smooth: true,
|
|||
|
|
itemStyle:{
|
|||
|
|
normal:{
|
|||
|
|
lineStyle:{
|
|||
|
|
type:'dotted' //'dotted'虚线 'solid'实线
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}else if(data[i].elementCode=="cqControlData"){
|
|||
|
|
var value=0;
|
|||
|
|
var color="#36FFF9";
|
|||
|
|
if(data[i].mPoint!=null){
|
|||
|
|
value=data[i].mPoint.parmvalue;
|
|||
|
|
if(data[i].mPoint.alarmmax!=null){
|
|||
|
|
if(value>data[i].mPoint.alarmmax){
|
|||
|
|
color="red";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if(data[i].mPoint.alarmmin!=null){
|
|||
|
|
if(value<data[i].mPoint.alarmmin){
|
|||
|
|
color="red";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
cqControlDataHtml+="<div style=\"float: left;width: 50%;height: 100%;line-height: 45px;font-size: 20px;font-family: Microsoft YaHei, Microsoft YaHei-Regular;font-weight: 400;text-align: center;color: #ffffff;\">";
|
|||
|
|
cqControlDataHtml+=""+data[i].name+"";
|
|||
|
|
cqControlDataHtml+="</div>";
|
|||
|
|
cqControlDataHtml+="<div style=\"float: left;width: 50%;height: 100%;line-height: 45px;font-size: 20px;font-family: Microsoft YaHei, Microsoft YaHei-Regular;font-weight: 400;text-align: center;color: "+color+";\">";
|
|||
|
|
cqControlDataHtml+=""+numOutput(value)+"";
|
|||
|
|
cqControlDataHtml+="</div>";
|
|||
|
|
|
|||
|
|
}else if(data[i].elementCode=="xhControlData"){
|
|||
|
|
var value=0;
|
|||
|
|
var color="#36FFF9";
|
|||
|
|
if(data[i].mPoint!=null){
|
|||
|
|
value=data[i].mPoint.parmvalue;
|
|||
|
|
if(data[i].mPoint.alarmmax!=null){
|
|||
|
|
if(value>data[i].mPoint.alarmmax){
|
|||
|
|
color="red";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if(data[i].mPoint.alarmmin!=null){
|
|||
|
|
if(value<data[i].mPoint.alarmmin){
|
|||
|
|
color="red";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
xhControlDataHtml+="<div style=\"float: left;width: 50%;height: 100%;line-height: 45px;font-size: 20px;font-family: Microsoft YaHei, Microsoft YaHei-Regular;font-weight: 400;text-align: center;color: #ffffff;\">";
|
|||
|
|
xhControlDataHtml+=""+data[i].name+"";
|
|||
|
|
xhControlDataHtml+="</div>";
|
|||
|
|
xhControlDataHtml+="<div style=\"float: left;width: 50%;height: 100%;line-height: 45px;font-size: 20px;font-family: Microsoft YaHei, Microsoft YaHei-Regular;font-weight: 400;text-align: center;color: "+color+";\">";
|
|||
|
|
xhControlDataHtml+=""+numOutput(value)+"";
|
|||
|
|
xhControlDataHtml+="</div>";
|
|||
|
|
|
|||
|
|
}else if(data[i].elementCode=="bzControlData"){
|
|||
|
|
var value=0;
|
|||
|
|
var color="#36FFF9";
|
|||
|
|
if(data[i].mPoint!=null){
|
|||
|
|
value=data[i].mPoint.parmvalue;
|
|||
|
|
if(data[i].mPoint.alarmmax!=null){
|
|||
|
|
if(value>data[i].mPoint.alarmmax){
|
|||
|
|
color="red";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if(data[i].mPoint.alarmmin!=null){
|
|||
|
|
if(value<data[i].mPoint.alarmmin){
|
|||
|
|
color="red";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
bzControlDataHtml+="<div style=\"float: left;width: 50%;height: 100%;line-height: 45px;font-size: 20px;font-family: Microsoft YaHei, Microsoft YaHei-Regular;font-weight: 400;text-align: center;color: #ffffff;\">";
|
|||
|
|
bzControlDataHtml+=""+data[i].name+"";
|
|||
|
|
bzControlDataHtml+="</div>";
|
|||
|
|
bzControlDataHtml+="<div style=\"float: left;width: 50%;height: 100%;line-height: 45px;font-size: 20px;font-family: Microsoft YaHei, Microsoft YaHei-Regular;font-weight: 400;text-align: center;color: "+color+";\">";
|
|||
|
|
bzControlDataHtml+=""+numOutput(value)+"";
|
|||
|
|
bzControlDataHtml+="</div>";
|
|||
|
|
|
|||
|
|
}else if(data[i].elementCode=="cjzControlData"){
|
|||
|
|
var value=0;
|
|||
|
|
var color="#36FFF9";
|
|||
|
|
if(data[i].mPoint!=null){
|
|||
|
|
value=data[i].mPoint.parmvalue;
|
|||
|
|
if(data[i].mPoint.alarmmax!=null){
|
|||
|
|
if(value>data[i].mPoint.alarmmax){
|
|||
|
|
color="red";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if(data[i].mPoint.alarmmin!=null){
|
|||
|
|
if(value<data[i].mPoint.alarmmin){
|
|||
|
|
color="red";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
cjzControlDataHtml+="<div style=\"float: left;width: 50%;height: 100%;line-height: 45px;font-size: 20px;font-family: Microsoft YaHei, Microsoft YaHei-Regular;font-weight: 400;text-align: center;color: #ffffff;\">";
|
|||
|
|
cjzControlDataHtml+=""+data[i].name+"";
|
|||
|
|
cjzControlDataHtml+="</div>";
|
|||
|
|
cjzControlDataHtml+="<div style=\"float: left;width: 50%;height: 100%;line-height: 45px;font-size: 20px;font-family: Microsoft YaHei, Microsoft YaHei-Regular;font-weight: 400;text-align: center;color: "+color+";\">";
|
|||
|
|
cjzControlDataHtml+=""+numOutput(value)+"";
|
|||
|
|
cjzControlDataHtml+="</div>";
|
|||
|
|
|
|||
|
|
}else if(data[i].elementCode=="cxControlData"){
|
|||
|
|
var value=0;
|
|||
|
|
var color="#36FFF9";
|
|||
|
|
if(data[i].mPoint!=null){
|
|||
|
|
value=data[i].mPoint.parmvalue;
|
|||
|
|
if(data[i].mPoint.alarmmax!=null){
|
|||
|
|
if(value>data[i].mPoint.alarmmax){
|
|||
|
|
color="red";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if(data[i].mPoint.alarmmin!=null){
|
|||
|
|
if(value<data[i].mPoint.alarmmin){
|
|||
|
|
color="red";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
cxControlDataHtml+="<div style=\"float: left;width: 50%;height: 100%;line-height: 45px;font-size: 20px;font-family: Microsoft YaHei, Microsoft YaHei-Regular;font-weight: 400;text-align: center;color: #ffffff;\">";
|
|||
|
|
cxControlDataHtml+=""+data[i].name+"";
|
|||
|
|
cxControlDataHtml+="</div>";
|
|||
|
|
cxControlDataHtml+="<div style=\"float: left;width: 50%;height: 100%;line-height: 45px;font-size: 20px;font-family: Microsoft YaHei, Microsoft YaHei-Regular;font-weight: 400;text-align: center;color: "+color+";\">";
|
|||
|
|
cxControlDataHtml+=""+numOutput(value)+"";
|
|||
|
|
cxControlDataHtml+="</div>";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// var hourhb=(nowHourP-lastHourP)/lastHourP*100;
|
|||
|
|
// hourhb=hourhb;
|
|||
|
|
$('#hourWaterP').text((nowHourP));
|
|||
|
|
// if(Number(hourhb)<0){
|
|||
|
|
// $('#hourWaterH').css("color","red");
|
|||
|
|
// $('#hourWaterH').text("⬇ 环比"+hourhb+"%");
|
|||
|
|
// }else{
|
|||
|
|
// $('#hourWaterH').css("color","#3fff00");
|
|||
|
|
// $('#hourWaterH').text("⬆ 环比"+hourhb+"%");
|
|||
|
|
// }
|
|||
|
|
|
|||
|
|
// var dayhb=(nowdayP-lastdayP)/lastdayP*100;
|
|||
|
|
// dayhb=dayhb;
|
|||
|
|
$('#dayWaterP').text((nowdayP));
|
|||
|
|
// if(Number(dayhb)<0){
|
|||
|
|
// $('#dayWaterH').css("color","red");
|
|||
|
|
// $('#dayWaterH').text("⬇ 环比"+dayhb+"%");
|
|||
|
|
// }else{
|
|||
|
|
// $('#dayWaterH').css("color","#3fff00");
|
|||
|
|
// $('#dayWaterH').text("⬆ 环比"+dayhb+"%");
|
|||
|
|
// }
|
|||
|
|
|
|||
|
|
handlingLoadDatas.push({
|
|||
|
|
value:5,
|
|||
|
|
name:'城桥'
|
|||
|
|
})
|
|||
|
|
handlingLoadDatas.push({
|
|||
|
|
value:0.5,
|
|||
|
|
name:'新河'
|
|||
|
|
})
|
|||
|
|
handlingLoadDatas.push({
|
|||
|
|
value:1.25,
|
|||
|
|
name:'堡镇'
|
|||
|
|
})
|
|||
|
|
handlingLoadDatas.push({
|
|||
|
|
value:1.75,
|
|||
|
|
name:'陈家镇'
|
|||
|
|
})
|
|||
|
|
handlingLoadDatas.push({
|
|||
|
|
value:2.5,
|
|||
|
|
name:'长兴'
|
|||
|
|
})
|
|||
|
|
getPiechart('chart2',handlingLoadDatas,handlingLoadColor);
|
|||
|
|
$('#companyhandlingLoad').html(handlingLoadHtml);
|
|||
|
|
|
|||
|
|
getLinechart('chart3',lineDatas);
|
|||
|
|
|
|||
|
|
barDatas.push({
|
|||
|
|
name:"实际",
|
|||
|
|
type: 'bar',
|
|||
|
|
data: lineXDDatas1
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
barDatas.push({
|
|||
|
|
name:"昨日",
|
|||
|
|
type: 'bar',
|
|||
|
|
data: lineXDDatas2
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
barDatas.push({
|
|||
|
|
name:"考核",
|
|||
|
|
type: 'line',
|
|||
|
|
data: lineXDDatas3
|
|||
|
|
})
|
|||
|
|
getBarchart2('chart4',barDatas,lineXDatas);
|
|||
|
|
|
|||
|
|
$('#cqControlData').html(cqControlDataHtml);
|
|||
|
|
$('#xhControlData').html(xhControlDataHtml);
|
|||
|
|
$('#bzControlData').html(bzControlDataHtml);
|
|||
|
|
$('#cjzControlData').html(cjzControlDataHtml);
|
|||
|
|
$('#cxControlData').html(cxControlDataHtml);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}, 'json');
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function numOutput(num){
|
|||
|
|
var numpart=String(num).split(".");//将数字通过jq split用小数点分隔为数组对象
|
|||
|
|
numpart[0]=numpart[0].replace(new RegExp('(\\d)(?=(\\d{3})+$)','ig'),"$1,");
|
|||
|
|
//将数组对象第一个数据(整数部分)通过正则表达式每三位用逗号分隔
|
|||
|
|
return numpart.join(".");//把数组通过join方法用.进行拼接
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function getBarchart(id,value,title,color){
|
|||
|
|
var myChart = echarts.init(document.getElementById(id));
|
|||
|
|
var option = {
|
|||
|
|
title: {
|
|||
|
|
text: value,
|
|||
|
|
textStyle: {
|
|||
|
|
color: '#36FFF9',
|
|||
|
|
fontSize: 50
|
|||
|
|
},
|
|||
|
|
subtext: "%",
|
|||
|
|
subtextStyle: {
|
|||
|
|
color: '#36FFF9',
|
|||
|
|
fontSize: 19
|
|||
|
|
},
|
|||
|
|
itemGap: 0, // 主副标题距离
|
|||
|
|
left: 'center',
|
|||
|
|
top: '35%'
|
|||
|
|
},
|
|||
|
|
angleAxis: {
|
|||
|
|
max: 100, // 满分
|
|||
|
|
clockwise: true, // 逆时针
|
|||
|
|
// 隐藏刻度线
|
|||
|
|
axisLine: {
|
|||
|
|
show: false
|
|||
|
|
},
|
|||
|
|
axisTick: {
|
|||
|
|
show: false
|
|||
|
|
},
|
|||
|
|
axisLabel: {
|
|||
|
|
show: false
|
|||
|
|
},
|
|||
|
|
splitLine: {
|
|||
|
|
show: false
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
radiusAxis: {
|
|||
|
|
type: 'category',
|
|||
|
|
// 隐藏刻度线
|
|||
|
|
axisLine: {
|
|||
|
|
show: false
|
|||
|
|
},
|
|||
|
|
axisTick: {
|
|||
|
|
show: false
|
|||
|
|
},
|
|||
|
|
axisLabel: {
|
|||
|
|
show: false
|
|||
|
|
},
|
|||
|
|
splitLine: {
|
|||
|
|
show: false
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
polar: {
|
|||
|
|
center: ['50%', '50%'],
|
|||
|
|
radius: '120%' //图形大小
|
|||
|
|
},
|
|||
|
|
series: [{
|
|||
|
|
type: 'bar',
|
|||
|
|
data: [{
|
|||
|
|
name: '百分比',
|
|||
|
|
value: value,
|
|||
|
|
itemStyle: {
|
|||
|
|
color: color
|
|||
|
|
},
|
|||
|
|
}],
|
|||
|
|
coordinateSystem: 'polar',
|
|||
|
|
roundCap: true,
|
|||
|
|
barWidth: 10,
|
|||
|
|
barGap: '-100%', // 两环重叠
|
|||
|
|
z: 2
|
|||
|
|
},{ // 灰色环
|
|||
|
|
type: 'bar',
|
|||
|
|
data: [{
|
|||
|
|
value: 100,
|
|||
|
|
itemStyle: {
|
|||
|
|
color: '#1D4F6D',
|
|||
|
|
shadowColor: 'rgba(0, 0, 0, 0.2)',
|
|||
|
|
shadowBlur: 2,
|
|||
|
|
shadowOffsetY: 2
|
|||
|
|
}
|
|||
|
|
}],
|
|||
|
|
coordinateSystem: 'polar',
|
|||
|
|
roundCap: true,
|
|||
|
|
barWidth: 12,
|
|||
|
|
barGap: '-100%', // 两环重叠
|
|||
|
|
z: 1
|
|||
|
|
}]
|
|||
|
|
};
|
|||
|
|
myChart.setOption(option, true);
|
|||
|
|
// window.addEventListener("resize", function () {
|
|||
|
|
// myChart.resize();
|
|||
|
|
// });
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function getPiechart(id,datas,colors){
|
|||
|
|
var myChart = echarts.init(document.getElementById(id));
|
|||
|
|
var option = {
|
|||
|
|
color:colors,
|
|||
|
|
tooltip: {
|
|||
|
|
trigger: 'item'
|
|||
|
|
},
|
|||
|
|
series: [
|
|||
|
|
{
|
|||
|
|
name: '',
|
|||
|
|
type: 'pie',
|
|||
|
|
center: ['50%', '45%'],
|
|||
|
|
radius: ['40%', '70%'],
|
|||
|
|
avoidLabelOverlap: false,
|
|||
|
|
label: {
|
|||
|
|
show: true,
|
|||
|
|
position: 'outside',
|
|||
|
|
formatter: function (d) {
|
|||
|
|
return parseFloat(d.percent).toFixed(0)+"%"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
labelLine:{
|
|||
|
|
show:true,
|
|||
|
|
length:6,
|
|||
|
|
length2:6
|
|||
|
|
},
|
|||
|
|
data: datas
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
};
|
|||
|
|
myChart.setOption(option, true);
|
|||
|
|
// window.addEventListener("resize", function () {
|
|||
|
|
// myChart.resize();
|
|||
|
|
// });
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function getLinechart(id,datas){
|
|||
|
|
var myChart = echarts.init(document.getElementById(id));
|
|||
|
|
var option = {
|
|||
|
|
color:['#20E9F2','#815DB7','#08A3A3'],
|
|||
|
|
title: {
|
|||
|
|
text: '水量处理曲线',
|
|||
|
|
top:10,
|
|||
|
|
left:20,
|
|||
|
|
textStyle:{
|
|||
|
|
color:'#FFFFFF'
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
legend: {
|
|||
|
|
data: ['实际', '昨日', '考核'],
|
|||
|
|
top:10,
|
|||
|
|
right:20,
|
|||
|
|
textStyle:{
|
|||
|
|
color:'#FFFFFF'
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
tooltip: {
|
|||
|
|
trigger: 'axis'
|
|||
|
|
},
|
|||
|
|
grid:{
|
|||
|
|
left: '4%', // 与容器左侧的距离
|
|||
|
|
right: '4%', // 与容器右侧的距离
|
|||
|
|
// top: '10%', // 与容器顶部的距离
|
|||
|
|
bottom: '10%', // 与容器底部的距离
|
|||
|
|
containLabel:true
|
|||
|
|
},
|
|||
|
|
xAxis: {
|
|||
|
|
type:"category",
|
|||
|
|
axisLine:{
|
|||
|
|
lineStyle:{
|
|||
|
|
color:'#ffffff',
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
axisTick: {
|
|||
|
|
show: false
|
|||
|
|
},
|
|||
|
|
splitLine: {
|
|||
|
|
show: false
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
yAxis: {
|
|||
|
|
type : 'value',
|
|||
|
|
axisLine:{
|
|||
|
|
lineStyle:{
|
|||
|
|
color:'#ffffff',
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
splitLine: {
|
|||
|
|
show: true,
|
|||
|
|
lineStyle:{
|
|||
|
|
color: '#8C8C8C'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
series: datas
|
|||
|
|
};
|
|||
|
|
myChart.setOption(option, true);
|
|||
|
|
// window.addEventListener("resize", function () {
|
|||
|
|
// myChart.resize();
|
|||
|
|
// });
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function getBarchart2(id,datas,xdatas){
|
|||
|
|
var myChart = echarts.init(document.getElementById(id));
|
|||
|
|
var option = {
|
|||
|
|
color:['#20E9F2','#815DB7','#08A3A3'],
|
|||
|
|
title: {
|
|||
|
|
text: '各厂处理情况',
|
|||
|
|
top:10,
|
|||
|
|
left:20,
|
|||
|
|
textStyle:{
|
|||
|
|
color:'#FFFFFF'
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
tooltip: {
|
|||
|
|
trigger: 'axis'
|
|||
|
|
},
|
|||
|
|
legend: {
|
|||
|
|
data: ['实际','昨日','考核'],
|
|||
|
|
top:10,
|
|||
|
|
right:20,
|
|||
|
|
textStyle:{
|
|||
|
|
color:'#FFFFFF'
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
grid:{
|
|||
|
|
left: '4%', // 与容器左侧的距离
|
|||
|
|
right: '4%', // 与容器右侧的距离
|
|||
|
|
// top: '10%', // 与容器顶部的距离
|
|||
|
|
bottom: '10%', // 与容器底部的距离
|
|||
|
|
containLabel:true
|
|||
|
|
},
|
|||
|
|
xAxis: {
|
|||
|
|
type:"category",
|
|||
|
|
data:xdatas,
|
|||
|
|
axisLine:{
|
|||
|
|
lineStyle:{
|
|||
|
|
color:'#ffffff',
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
axisTick: {
|
|||
|
|
show: false
|
|||
|
|
},
|
|||
|
|
splitLine: {
|
|||
|
|
show: false
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
yAxis: {
|
|||
|
|
type : 'value',
|
|||
|
|
axisLine:{
|
|||
|
|
lineStyle:{
|
|||
|
|
color:'#ffffff',
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
splitLine: {
|
|||
|
|
show: true,
|
|||
|
|
lineStyle:{
|
|||
|
|
color: '#8C8C8C'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
series: datas
|
|||
|
|
};
|
|||
|
|
myChart.setOption(option, true);
|
|||
|
|
// window.addEventListener("resize", function () {
|
|||
|
|
// myChart.resize();
|
|||
|
|
// });
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* 定时器 */
|
|||
|
|
setInterval(getValue, 300000); //每1分钟切换
|
|||
|
|
// setInterval(getValue, 3600000); //每一小时切换
|
|||
|
|
|
|||
|
|
/* 初始化 */
|
|||
|
|
$(function () {
|
|||
|
|
if('${param.backgroundColor}'=='transparent'){
|
|||
|
|
document.body.style.backgroundColor = '${param.backgroundColor}';
|
|||
|
|
}else{
|
|||
|
|
document.body.style.backgroundColor = "#" + '${param.backgroundColor}';
|
|||
|
|
}
|
|||
|
|
document.getElementById("main").style.width = document.documentElement.clientWidth + "px";
|
|||
|
|
document.getElementById("main").style.height = (document.documentElement.clientHeight) + "px";
|
|||
|
|
|
|||
|
|
document.getElementById("titleImage").src = ""+getRootPath()+"/images/大屏/大屏标题文字背景.png";
|
|||
|
|
|
|||
|
|
getValue();
|
|||
|
|
//console.log("height",document.body.scrollHeight);
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
//获取url地址根目录 当前taomcat下路径
|
|||
|
|
function getRootPath(){
|
|||
|
|
var pathName = window.location.pathname.substring(1);
|
|||
|
|
// var webName = pathName == '' ? '' : pathName.substring(0, pathName.indexOf('/'));
|
|||
|
|
return window.location.protocol + '//' + window.location.host;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
</script>
|
|||
|
|
|
|||
|
|
</head>
|
|||
|
|
|
|||
|
|
<body style="width:100%;height:100%;margin:0;padding:0;overflow-x:hidden;overflow-y:hidden;">
|
|||
|
|
<div id="main" style="height:100%;width:100%;padding-top:10px;padding-left:10px;padding-right:10px;">
|
|||
|
|
<div style="height:100%;width:100%;">
|
|||
|
|
<div style="float:left;width:100%;height:35px;padding-left: 20px;">
|
|||
|
|
<div style="float:left;width:100%;height:34px;">
|
|||
|
|
<div style="position:absolute;top:12px;left:50px;z-index:999;opacity: 1;font-size: 20px;font-family: Microsoft YaHei, Microsoft YaHei-Regular;margin-left:38px;">运行概览</div>
|
|||
|
|
<img id="titleImage" src="" style="z-index:998;position:relative;"/>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div style="float:left;width: 100%;height: calc((100% - 35px)/3);">
|
|||
|
|
<div style="float: left;width: 50%;height: 100%;">
|
|||
|
|
<div style="float: left;width: 45%;height: 100%;">
|
|||
|
|
<div style="float: left;width: 100%;height: 60px;color: #ffffff;text-align: center;line-height: 100px;font-size: 24px;font-family: Source Han Sans CN, Source Han Sans CN-Medium;">运行评价</div>
|
|||
|
|
<div id="chart1" style="float: left;width: 100%;height: calc(100% - 60px);"></div>
|
|||
|
|
</div>
|
|||
|
|
<div style="float: left;width: 55%;height: 100%;padding-top: 30px;">
|
|||
|
|
<div style="float: left;width: 100%;height:calc((100% - 30px)/2);">
|
|||
|
|
<div style="float: left;width: 100%;height: 40%;font-size: 20px;font-family: MicrosoftYaHei;text-align: left;color: #ffffff;line-height: 60px;">当前处理量(m3/h)</div>
|
|||
|
|
<div style="float: left;width: 100%;height: 60%;">
|
|||
|
|
<div id="hourWaterP" style="float:left;width: 50%;height:100%;line-height: 80px;color: #69f6f9;font-size: 40px;">
|
|||
|
|
</div>
|
|||
|
|
<div id="hourWaterH" style="float:left;width: 50%;height:100%;line-height: 80px;font-size: 20px;padding-left: 10px;">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div style="float: left;width: 100%;height:calc((100% - 30px)/2);">
|
|||
|
|
<div style="float: left;width: 100%;height: 40%;font-size: 20px;font-family: MicrosoftYaHei;text-align: left;color: #ffffff;line-height: 60px;">今日累计处理量(m3)</div>
|
|||
|
|
<div style="float: left;width: 100%;height: 60%;">
|
|||
|
|
<div id="dayWaterP" style="float:left;width: 50%;height:100%;line-height: 80px;color: #69f6f9;font-size: 40px;">
|
|||
|
|
</div>
|
|||
|
|
<div id="dayWaterH" style="float:left;width: 50%;height:100%;line-height: 80px;font-size: 20px;padding-left: 10px;">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div style="float: left;width: 45%;height: 100%;">
|
|||
|
|
<div style="float: left;width: 45%;height: 100%;">
|
|||
|
|
<div style="float: left;width: 100%;height: 40px;color: #ffffff;text-align: center;line-height: 40px;font-size: 24px;font-family: Source Han Sans CN, Source Han Sans CN-Medium;">各厂处理量占比</div>
|
|||
|
|
<div id="chart2" style="float: left;width: 100%;height: calc(100% - 40px);"></div>
|
|||
|
|
</div>
|
|||
|
|
<div style="float: left;width: 55%;height: 100%;">
|
|||
|
|
<div style="float: left;width: 100%;height: 40px;color: #ffffff;text-align: center;line-height: 40px;font-size: 24px;font-family: Source Han Sans CN, Source Han Sans CN-Medium;">各厂处理负荷</div>
|
|||
|
|
<div id="companyhandlingLoad" style="float: left;width: 100%;height: calc(100% - 40px);"></div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<div style="float:left;width: 100%;height: calc((100% - 35px)/3);">
|
|||
|
|
<div style="float:left;width:50%;height:100%;padding: 10px;">
|
|||
|
|
<div id="chart3" style="float:left;width: 100%;height: 100%;background: #16314c;"></div>
|
|||
|
|
</div>
|
|||
|
|
<div style="float:left;width:50%;height:100%;padding: 10px;">
|
|||
|
|
<div id="chart4" style="float:left;width: 100%;height: 100%;background: #16314c;"></div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div style="float:left;width: 100%;height: calc((100% - 35px)/3);padding-left: 20px;">
|
|||
|
|
<div style="float: left;width: 20%;height: 100%;">
|
|||
|
|
<div style="float: left;width: 100%;height: 50px;font-size: 24px;font-family: Source Han Sans CN, Source Han Sans CN-Medium;font-weight: 500;text-align: center;color: #ffffff;line-height: 50px;">
|
|||
|
|
城桥污水处理厂
|
|||
|
|
</div>
|
|||
|
|
<div style="float: left;width: 100%;height: calc(100% - 50px);">
|
|||
|
|
<div id="cqControlData" style="float: left;width: 100%;height: 45px;">
|
|||
|
|
<!-- <div style="float: left;width: 50%;height: 100%;line-height: 45px;font-size: 20px;font-family: Microsoft YaHei, Microsoft YaHei-Regular;font-weight: 400;text-align: center;color: #ffffff;">
|
|||
|
|
COD
|
|||
|
|
</div>
|
|||
|
|
<div style="float: left;width: 50%;height: 100%;line-height: 45px;font-size: 20px;font-family: Microsoft YaHei, Microsoft YaHei-Regular;font-weight: 400;text-align: center;color: #36fff9;">
|
|||
|
|
8.6
|
|||
|
|
</div> -->
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div style="float: left;width: 20%;height: 100%;">
|
|||
|
|
<div style="float: left;width: 100%;height: 50px;font-size: 24px;font-family: Source Han Sans CN, Source Han Sans CN-Medium;font-weight: 500;text-align: center;color: #ffffff;line-height: 50px;">
|
|||
|
|
新河污水处理厂
|
|||
|
|
</div>
|
|||
|
|
<div style="float: left;width: 100%;height: calc(100% - 50px);">
|
|||
|
|
<div id="xhControlData" style="float: left;width: 100%;height: 45px;"></div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div style="float: left;width: 20%;height: 100%;">
|
|||
|
|
<div style="float: left;width: 100%;height: 50px;font-size: 24px;font-family: Source Han Sans CN, Source Han Sans CN-Medium;font-weight: 500;text-align: center;color: #ffffff;line-height: 50px;">
|
|||
|
|
堡镇污水处理厂
|
|||
|
|
</div>
|
|||
|
|
<div style="float: left;width: 100%;height: calc(100% - 50px);">
|
|||
|
|
<div id="bzControlData" style="float: left;width: 100%;height: 45px;"></div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div style="float: left;width: 20%;height: 100%;">
|
|||
|
|
<div style="float: left;width: 100%;height: 50px;font-size: 24px;font-family: Source Han Sans CN, Source Han Sans CN-Medium;font-weight: 500;text-align: center;color: #ffffff;line-height: 50px;">
|
|||
|
|
陈家镇污水处理厂
|
|||
|
|
</div>
|
|||
|
|
<div style="float: left;width: 100%;height: calc(100% - 50px);">
|
|||
|
|
<div id="cjzControlData" style="float: left;width: 100%;height: 45px;"></div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div style="float: left;width: 20%;height: 100%;">
|
|||
|
|
<div style="float: left;width: 100%;height: 50px;font-size: 24px;font-family: Source Han Sans CN, Source Han Sans CN-Medium;font-weight: 500;text-align: center;color: #ffffff;line-height: 50px;">
|
|||
|
|
长兴污水处理厂
|
|||
|
|
</div>
|
|||
|
|
<div style="float: left;width: 100%;height: calc(100% - 50px);">
|
|||
|
|
<div id="cxControlData" style="float: left;width: 100%;height: 45px;"></div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</body>
|
|||
|
|
|
|||
|
|
</html>
|