Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/visual/modules/bigScreen_processData.jsp

198 lines
10 KiB
Plaintext
Raw Permalink Normal View History

2026-01-16 14:13:44 +08:00
<%@ 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 table1Html1="";
var table2Html1="";
var table1Html2="";
var table2Html2="";
var table3Html2="";
var table4Html2="";
for(var i=0;i<data.length;i++){
if(data[i].elementCode=="DO"){
if(data[i].getValueType=="getText"){
table1Html1+="<td style=\"color: #ffffff;\">"+numOutput(data[i].valueUrl)+"</td>";
}else if(data[i].getValueType=="getValue"){
table1Html1+="<td style=\"color: #ffffff;\">"+numOutput(data[i].mPoint.parmvalue)+"</td>";
}
}else if(data[i].elementCode=="MLSS"){
if(data[i].getValueType=="getText"){
table2Html1+="<td style=\"color: #ffffff;\">"+numOutput(data[i].valueUrl)+"</td>";
}else{
table2Html1+="<td style=\"color: #ffffff;\">"+numOutput(data[i].mPoint.parmvalue)+"</td>";
}
}else if(data[i].elementCode=="PAC"){
if(data[i].getValueType=="getText"){
table1Html2+="<td style=\"color: #ffffff;\">"+numOutput(data[i].valueUrl)+"</td>";
}else{
table1Html2+="<td style=\"color: #ffffff;\">"+numOutput(data[i].mPoint.parmvalue)+"</td>";
}
}else if(data[i].elementCode=="PAM"){
if(data[i].getValueType=="getText"){
table2Html2+="<td style=\"color: #ffffff;\">"+numOutput(data[i].valueUrl)+"</td>";
}else{
table2Html2+="<td style=\"color: #ffffff;\">"+numOutput(data[i].mPoint.parmvalue)+"</td>";
}
}else if(data[i].elementCode=="含氯杀菌剂"){
if(data[i].getValueType=="getText"){
table3Html2+="<td style=\"color: #ffffff;\">"+numOutput(data[i].valueUrl)+"</td>";
}else{
table3Html2+="<td style=\"color: #ffffff;\">"+numOutput(data[i].mPoint.parmvalue)+"</td>";
}
}else if(data[i].elementCode=="脱水药剂"){
if(data[i].getValueType=="getText"){
table4Html2+="<td style=\"color: #ffffff;\">"+numOutput(data[i].valueUrl)+"</td>";
}else{
table4Html2+="<td style=\"color: #ffffff;\">"+numOutput(data[i].mPoint.parmvalue)+"</td>";
}
}
}
}
var tableHtml1="";
tableHtml1+="<tr style=\"font-size: 16px;color: #dbeeff;text-align: center;height:30px;\">";
tableHtml1+="<td style=\"width:40px;\"></td>";
tableHtml1+="<td style=\"width:128px;\">1#生反池</td>";
tableHtml1+="<td style=\"width:128px;\">2#生反池</td>";
tableHtml1+="</tr>";
tableHtml1+="<tr style=\"font-size: 16px;text-align: center;height:30px;\">";
tableHtml1+="<td style=\"color: #1CBEC5;\">DO\</td>";
tableHtml1+=table1Html1;
tableHtml1+="</tr>";
tableHtml1+="<tr style=\"font-size: 16px;text-align: center;height:30px;\">";
tableHtml1+="<td style=\"color: #1CBEC5;\">MLSS\</td>";
tableHtml1+=table2Html1;
tableHtml1+="</tr>";
tableHtml1+="<tr style=\"font-size: 16px;color: #1CBEC5;text-align: center;height:30px;\">";
tableHtml1+="<td >\</td>";
tableHtml1+="<td >\</td>";
tableHtml1+="</tr>";
tableHtml1+="<tr style=\"font-size: 16px;color: #1CBEC5;text-align: center;height:30px;\">";
tableHtml1+="<td >\</td>";
tableHtml1+="<td >\</td>";
tableHtml1+="</tr>";
tableHtml1+="<tr style=\"font-size: 16px;color: #1CBEC5;text-align: center;height:30px;\">";
tableHtml1+="<td >\</td>";
tableHtml1+="<td >\</td>";
tableHtml1+="</tr>";
$('#table1').html(tableHtml1);
var tableHtml2="";
tableHtml2+="<tr style=\"font-size: 16px;color: #dbeeff;text-align: center;height:30px;\">";
tableHtml2+="<td style=\"width:60px;\"></td>";
tableHtml2+="<td style=\"width:128px;\">当前投加量</td>";
tableHtml2+="<td style=\"width:128px;\">平均投加量</td>";
tableHtml2+="</tr>";
tableHtml2+="<tr style=\"font-size: 16px;color: #1CBEC5;text-align: center;height:30px;\">";
tableHtml2+="<td >PAC\</td>";
tableHtml2+=table1Html2;
tableHtml2+="</tr>";
tableHtml2+="<tr style=\"font-size: 16px;color: #1CBEC5;text-align: center;height:30px;\">";
tableHtml2+="<td >PAM\</td>";
tableHtml2+=table2Html2;
tableHtml2+="</tr>";
tableHtml2+="<tr style=\"font-size: 16px;color: #1CBEC5;text-align: center;height:30px;\">";
tableHtml2+="<td >含氯杀菌剂\</td>";
tableHtml2+=table3Html2;
tableHtml2+="</tr>";
tableHtml2+="<tr style=\"font-size: 16px;color: #1CBEC5;text-align: center;height:30px;\">";
tableHtml2+="<td >脱水药剂\</td>";
tableHtml2+=table4Html2;
tableHtml2+="</tr>";
tableHtml2+="<tr style=\"font-size: 16px;color: #1CBEC5;text-align: center;height:30px;\">";
tableHtml2+="<td >\</td>";
tableHtml2+="<td >\</td>";
tableHtml2+="</tr>";
$('#table2').html(tableHtml2);
}, 'json');
}
/* 定时器 */
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/大屏/js/标题logo1.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:20px;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;position:absolute;">
<div style="position:absolute;top:-4px;left:50px;z-index:999;opacity: 1;font-size: 21px;color:#d9f6fb;font-family:Source Han Sans CN, Source Han Sans CN-Regular;text-shadow:1.5px 1.5px 0 #174749, 1.5px -1.5px 0 #174749, -1.5px -1.5px 0 #174749, -1.5px 1.5px 0 #174749, 1.5px 1px 0 #174749, 1.5px -1px 0 #174749, -1.5px -1px 0 #174749, -1.5px 1px 0 #174749, 1.5px 0px 0 #174749, 1.5px 0px 0 #174749, -1.5px 0px 0 #174749, -1.5px 0px 0 #174749,1px 1.5px 0 #174749, 1px -1.5px 0 #174749, -1px -1.5px 0 #174749, -1px 1.5px 0 #174749, 1px 1px 0 #174749, 1px -1px 0 #174749, -1px -1px 0 #174749, -1px 1px 0 #174749, 1px 0px 0 #174749, 1px 0px 0 #174749, -1px 0px 0 #174749, -1px 0px 0 #174749, 0px 1.5px 0 #174749, 0px -1.5px 0 #174749, 0px -1.5px 0 #174749, 0px 1.5px 0 #174749, 0px 1px 0 #174749, 0px -1px 0 #174749, 0px -1px 0 #174749, 0px 1px 0 #174749;">运行数据</div>
<img id="titleImage" src="" style="z-index:998;position:relative;"/>
</div>
</div>
<div style="float:left;width:100%;height:calc(100% - 35px);padding-left: 20px;padding-top: 50px;padding-bottom: 20px;">
<div style="float:left;width:40%;height:100%;border-right:1px solid #DCDCDC;">
<table id="table1" style="width:100%;height:100%;">
</table>
</div>
<div style="float:left;width:60%;height:100%;border-right:1px solid #DCDCDC;padding-left:5px;">
<table id="table2" style="width:100%;height:100%;">
</table>
</div>
</div>
</div>
</div>
</body>
</html>