512 lines
23 KiB
Plaintext
512 lines
23 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 lineDatasNum=0;
|
||
var lineDatas=[];
|
||
|
||
for(var i=0;i<data.length;i++){
|
||
if(data[i].elementCode=="thisYearWater"){
|
||
$('#thisYearWater').text(numOutput((data[i].mPointHistory[0].parmvalue/10000).toFixed(2)));
|
||
}else if(data[i].elementCode=="thisYearCOD"){
|
||
$('#thisYearCOD').text(numOutput((data[i].mPoint.parmvalue).toFixed(2)));
|
||
}else if(data[i].elementCode=="waterQuantityRate"){
|
||
getBarChart('chart1',data[i].mPoint.parmvalue.toFixed(0),'%',data[i].name,'#69F6F9');
|
||
}else if(data[i].elementCode=="waterQualityRate"){
|
||
getBarChart('chart3',data[i].mPoint.parmvalue.toFixed(0),'%',data[i].name,'#69F6F9');
|
||
}else if(data[i].elementCode=="EqRate"){
|
||
getBarChart('chart2',data[i].mPoint.parmvalue.toFixed(0),'%',data[i].name,'#347EFB');
|
||
}else if(data[i].elementCode=="healthEvaluate"){
|
||
getBarChart('chart4',data[i].mPoint.parmvalue.toFixed(0),'分',data[i].name,'#347EFB');
|
||
}else if(data[i].elementCode=="hourWater"){
|
||
if(data[i].name=="当前小时水量"){
|
||
// if(data[i].mPointHistory.length>0&&data[i].mPointHistory[0]!=null){
|
||
// nowHourP=data[i].mPointHistory[0].parmvalue;
|
||
// }
|
||
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){
|
||
// 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=="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'实线
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
// 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+"%");
|
||
// }
|
||
|
||
getLineChart('chart5',lineDatas);
|
||
|
||
}
|
||
}, '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,unit,subtext,color){
|
||
var myChart = echarts.init(document.getElementById(id));
|
||
var option = {
|
||
title: {
|
||
text: ['{a|'+value+'}','{b| '+unit+'}'].join(''),
|
||
subtext: subtext,
|
||
x: 'center',
|
||
y: '60%',
|
||
textStyle: {
|
||
rich: {
|
||
a: {
|
||
color: color,
|
||
fontSize: '40',
|
||
},
|
||
b: {
|
||
color: color,
|
||
fontSize: '25',
|
||
}
|
||
}
|
||
},
|
||
subtextStyle: {
|
||
color: '#FFFFFF',
|
||
fontSize: '20'
|
||
}
|
||
},
|
||
angleAxis: {
|
||
axisLine: {
|
||
show: false
|
||
},
|
||
axisLabel: {
|
||
show: false
|
||
},
|
||
splitLine: {
|
||
show: false
|
||
},
|
||
axisTick: {
|
||
show: false
|
||
},
|
||
min: 0,
|
||
max: 200,
|
||
boundaryGap: ['0', '100'],
|
||
startAngle: 180
|
||
},
|
||
radiusAxis: {
|
||
type: 'category',
|
||
axisLine: {
|
||
show: false
|
||
},
|
||
axisTick: {
|
||
show: false
|
||
},
|
||
axisLabel: {
|
||
show: false
|
||
},
|
||
data: ['a'],
|
||
z: 10
|
||
},
|
||
polar: {
|
||
radius: '230%',
|
||
center: ['50%', '80%'],
|
||
},
|
||
series: [{
|
||
type: 'bar',
|
||
data: [value],
|
||
coordinateSystem: 'polar',
|
||
barMaxWidth: 15,
|
||
z: 2,
|
||
// name: '抢修项目',
|
||
roundCap: true,
|
||
color: color,
|
||
barGap: '-100%',
|
||
},
|
||
{
|
||
type: 'bar',
|
||
data: [100],
|
||
z: 0,
|
||
silent: true,
|
||
coordinateSystem: 'polar',
|
||
barMaxWidth: 23,
|
||
// name: 'C',
|
||
roundCap: true,
|
||
color: '#1A4C96',
|
||
barGap: '-125%',
|
||
}
|
||
],
|
||
|
||
tooltip: {
|
||
show: false
|
||
},
|
||
|
||
};
|
||
myChart.setOption(option, true);
|
||
}
|
||
|
||
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();
|
||
// });
|
||
}
|
||
|
||
|
||
|
||
/* 定时器 */
|
||
setInterval(getValue, 300000); //每5分钟切换
|
||
// 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";
|
||
document.getElementById("waterImg").src = ""+getRootPath()+"/images/大屏/水量2.png";
|
||
document.getElementById("areaImg").src = ""+getRootPath()+"/images/大屏/服务面积.png";
|
||
document.getElementById("peopleImg").src = ""+getRootPath()+"/images/大屏/服务人口.png";
|
||
document.getElementById("standardImg").src = ""+getRootPath()+"/images/大屏/标准.png";
|
||
document.getElementById("processImg").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="float:left;height:50%;width:50%;">
|
||
<div style="float:left;width:100%;height:35px;margin-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:50px;padding-left: 20px;margin-top: 60px;">
|
||
<div style="float:left;width:50px;height:50px;text-align:center;">
|
||
<img id="areaImg" src="" style="z-index:999;position:relative;"/>
|
||
</div>
|
||
<div style="float:left;width:150px;height:50px;color: #2b9dd8;padding-left: 15px;">
|
||
<div style="float:left;width: 100%;height: 30px;font-size: 20px;line-height: 30px;">服务面积</div>
|
||
<div style="float:left;width: 100%;height: 20px;font-size: 14px;line-height: 20px;">平方公里</div>
|
||
</div>
|
||
<div style="float:left;width:120px;height:50px;line-height: 50px;font-size: 35px;color: #FFFFFF;">
|
||
77
|
||
</div>
|
||
<div style="float:left;width:50px;height:50px;text-align:center;">
|
||
<img id="peopleImg" src="" style="z-index:999;position:relative;"/>
|
||
</div>
|
||
<div style="float:left;width:150px;height:50px;color: #2b9dd8;padding-left: 15px;">
|
||
<div style="float:left;width: 100%;height: 30px;font-size: 20px;line-height: 30px;">服务人口</div>
|
||
<div style="float:left;width: 100%;height: 20px;font-size: 14px;line-height: 20px;">万人</div>
|
||
</div>
|
||
<div style="float:left;width:120px;height:50px;line-height: 50px;font-size: 35px;color: #FFFFFF;">
|
||
27
|
||
</div>
|
||
</div>
|
||
<div style="float:left;width:100%;height:50px;padding-left: 20px;margin-top: 60px;">
|
||
<div style="float:left;width:50px;height:50px;text-align:center;">
|
||
<img id="waterImg" src="" style="z-index:999;position:relative;"/>
|
||
</div>
|
||
<div style="float:left;width:150px;height:50px;color: #2b9dd8;padding-left: 15px;font-weight: 1000;">
|
||
<div style="float:left;width: 100%;height: 30px;font-size: 20px;line-height: 30px;">处理规格</div>
|
||
<div style="float:left;width: 100%;height: 20px;font-size: 14px;line-height: 20px;">万m³/d</div>
|
||
</div>
|
||
<div style="float:left;width:120px;height:50px;line-height: 50px;font-size: 35px;color: #FFFFFF;">
|
||
5
|
||
</div>
|
||
<div style="float:left;width:50px;height:50px;text-align:center;">
|
||
<img id="standardImg" src="" style="z-index:999;position:relative;"/>
|
||
</div>
|
||
<div style="float:left;width:150px;height:50px;color: #2b9dd8;padding-left: 15px;">
|
||
<div style="float:left;width: 100%;height: 30px;font-size: 20px;line-height: 30px;">出水执行</div>
|
||
<div style="float:left;width: 100%;height: 20px;font-size: 14px;line-height: 20px;">标准</div>
|
||
</div>
|
||
<div style="float:left;width:120px;height:50px;line-height: 50px;font-size: 35px;color: #FFFFFF;">
|
||
一级A
|
||
</div>
|
||
</div>
|
||
<div style="float:left;width:100%;height:50px;padding-left: 20px;margin-top: 60px;">
|
||
<div style="float:left;width:50px;height:50px;text-align:center;">
|
||
<img id="processImg" src="" style="z-index:999;position:relative;"/>
|
||
</div>
|
||
<div style="float:left;width:150px;height:50px;color: #2b9dd8;padding-left: 15px;font-weight: 1000;">
|
||
<div style="float:left;width: 100%;height: 30px;font-size: 20px;line-height: 30px;">处理工艺</div>
|
||
</div>
|
||
<div style="float:left;height:50px;line-height: 50px;font-size: 35px;color: #FFFFFF;">
|
||
AAO+深度处理+混合消毒
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div style="float:left;height:50%;width:1px;padding-top: 60px;padding-bottom: 60px;">
|
||
<div style="float:left;height:100%;width:100%;background-color: #83A3AA;"></div>
|
||
</div>
|
||
<div style="float:left;height:50%;width:calc(50% - 1px);">
|
||
<div style="float: left;width: 50%;height: 100%;padding-left: 30px;">
|
||
<div style="float: left;width: 100%;height: 23.3%;padding-left: 20px;">
|
||
<div style="float: left;width: 100%;height:30%;font-size: 22px;color: #69F6F9;">
|
||
今年累计
|
||
</div>
|
||
<div style="float: left;width: 100%;height:30%;font-size: 22px;color: #69F6F9;">
|
||
处理水量(万吨)
|
||
</div>
|
||
<div id="thisYearWater" style="float: left;width: 100%;height:40%;font-size: 39px;color: #FFFFFF;"></div>
|
||
</div>
|
||
<div id="chart1" style="float: left;width: 100%;height: 38.3%;"></div>
|
||
<div id="chart2" style="float: left;width: 100%;height: 38.3%;"></div>
|
||
</div>
|
||
<div style="float: left;width: 50%;height: 100%;padding-left: 30px;">
|
||
<div style="float: left;width: 100%;height: 23.3%;padding-left: 20px;">
|
||
<div style="float: left;width: 100%;height:30%;font-size: 22px;color: #69F6F9;">
|
||
今年累计
|
||
</div>
|
||
<div style="float: left;width: 100%;height:30%;font-size: 22px;color: #69F6F9;">
|
||
COD消减量(吨)
|
||
</div>
|
||
<div id="thisYearCOD" style="float: left;width: 100%;height:40%;font-size: 39px;color: #FFFFFF;"></div>
|
||
</div>
|
||
<div id="chart3" style="float: left;width: 100%;height: 38.3%;"></div>
|
||
<div id="chart4" style="float: left;width: 100%;height: 38.3%;"></div>
|
||
</div>
|
||
</div>
|
||
<div style="float:left;height:50%;width:100%;padding-top: 20px;">
|
||
<div style="float:left;width:100%;height:26px;margin-left: 20px;">
|
||
<div style="float:left;width:30%;height:26px;">
|
||
<div style="float:left;width:100px;height:26px;line-height: 26px;color: #ffffff;font-size: 20px;">
|
||
当前处理量
|
||
</div>
|
||
<div style="float:left;width:100px;height:26px;line-height: 26px;color: #ffffff;font-size: 16px;">
|
||
(m3/h)
|
||
</div>
|
||
</div>
|
||
<div style="float:left;width:30%;height:26px;">
|
||
<div style="float:left;width:140px;height:26px;line-height: 26px;color: #ffffff;font-size: 20px;">
|
||
今日累计处理量
|
||
</div>
|
||
<div style="float:left;width:100px;height:26px;line-height: 26px;color: #ffffff;font-size: 16px;">
|
||
(m3)
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div style="float:left;width:100%;height:80px;margin-left: 20px;">
|
||
<div style="float:left;width:30%;height:80px;">
|
||
<div id="hourWaterP" style="float:left;height:80px;line-height: 80px;color: #69f6f9;font-size: 40px;">
|
||
</div>
|
||
<div id="hourWaterH" style="float:left;height:80px;line-height: 80px;font-size: 20px;padding-left: 10px;">
|
||
</div>
|
||
</div>
|
||
<div style="float:left;width:30%;height:80px;">
|
||
<div id="dayWaterP" style="float:left;height:80px;line-height: 80px;color: #69f6f9;font-size: 40px;">
|
||
</div>
|
||
<div id="dayWaterH" style="float:left;height:80px;line-height: 80px;font-size: 20px;padding-left: 10px;">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div style="float:left;width:100%;height:320px;margin-left: 20px;background: #16314c;">
|
||
<div id="chart5" style="float:left;width: 100%;height: 100%;"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
|
||
</html> |