Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/visual/modules/bigScreen_waterTreatment.jsp
2026-01-16 14:13:44 +08:00

276 lines
11 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ 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 series=[];
var nowHourP=0;
var lastHourP=0;
var nowdayP=0;
var lastdayP=0;
for(var i=0;i<data.length;i++){
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(0,10));
ddata.push(his.parmvalue);
datas.push(ddata);
}
series.push({
data: datas,
name: data[i].name,
type: 'line',
symbol:'none',
smooth: true
});
}else if(data[i].getValueType=="getText"){
if(series!=''&&series.length>0){
var datas=new Array();
for (let j = 0; j < series[0].data.length; j++) {
const element = series[0].data[j];
var ddata=new Array();
ddata.push(element[0]);
ddata.push(data[i].valueUrl);
datas.push(ddata);
}
series.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=="hourWater"){
// if(data[i].getValueType=="getNowHourFirst"){
nowHourP = data[i].mPoint.parmvalue;
// if(data[i].mPointHistory.length>0){
// if(data[i].mPointHistory[0]!=null){
// nowHourP=data[i].mPointHistory[0].parmvalue;
// }
// }
// }
// else if(data[i].getValueType=="getLastHourFirst"){
// if(data[i].mPointHistory.length>0){
// if(data[i].mPointHistory[0]!=null){
// lastHourP=data[i].mPointHistory[0].parmvalue;
// }
// }
// }
}else if(data[i].elementCode=="dayWater"){
// if(data[i].getValueType=="getTodaySumValue"){
nowdayP = data[i].mPoint.parmvalue;
// if(data[i].mPointHistory.length>0){
// if(data[i].mPointHistory[0]!=null){
// nowdayP=data[i].mPointHistory[0].parmvalue;
// }
// }
// }
// else if(data[i].getValueType=="getYesterdaySumValue"){
// if(data[i].mPointHistory.length>0){
// if(data[i].mPointHistory[0]!=null){
// lastdayP=data[i].mPointHistory[0].parmvalue;
// }
// }
//
// }
}
}
// var hourhb=(nowHourP-lastHourP)/lastHourP*100;
// hourhb=hourhb.toFixed(2);
$('#hourWaterP').text((nowHourP).toFixed(2));
// 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.toFixed(2);
$('#dayWaterP').text((nowdayP/10000).toFixed(2));
// if(Number(dayhb)<0){
// $('#dayWaterH').css("color","red");
// $('#dayWaterH').text("⬇ 环比"+dayhb+"%");
// }else{
// $('#dayWaterH').css("color","#3fff00");
// $('#dayWaterH').text("⬆ 环比"+dayhb+"%");
// }
var mychart=echarts.init(document.getElementById('chart'));
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: series
};
// console.log(option);
mychart.setOption(option,true);
}
}, 'json');
}
/* 定时器 */
//setInterval(change, 60000); //每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";
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:30px;padding-left:10px;padding-right:10px;">
<div style="height:100%;width:100%;">
<div style="float:left;width:100%;height:26px;margin-left: 20px;">
<div style="float:left;width:50%;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:50%;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:50%;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:50%;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:280px;margin-left: 20px;background: #16314c;">
<div id="chart" style="float:left;width: 100%;height: 100%;"></div>
</div>
</div>
</div>
</body>
</html>