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

175 lines
8.7 KiB
Plaintext
Raw 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) {
if(data!=''){
var table1Html="";
var table2Html="";
for(var i=0;i<data.length;i++){
if(data[i].elementCode=="img"){
document.getElementById("Image3").src = ""+getRootPath()+""+data[i].valueUrl+"";
}else if(data[i].elementCode=="table1"){
if(data[i].getValueType=="getText"){
table1Html+="<td >"+data[i].valueUrl+"</td>";
}else if(data[i].getValueType=="getValue"){
table1Html+="<td >"+data[i].mPoint.parmvalue+"</td>";
}
}else if(data[i].elementCode=="table2"){
if(data[i].getValueType=="getText"){
table2Html+="<td >"+data[i].valueUrl+"</td>";
}else{
table2Html+="<td >"+data[i].mPoint.parmvalue+"</td>";
}
}
}
var tableHtml="";
tableHtml+="<tr style=\"font-size: 16px;color: #dbeeff;text-align: center;\">";
tableHtml+="<td style=\"width:40px;\"></td>";
tableHtml+="<td style=\"width:128px;\">瞬时流量(m3/h)</td>";
tableHtml+="<td style=\"width:128px;\">昨日累计(m3)</td>";
tableHtml+="<td style=\"width:128px;\">今日累计(m3)</td>";
tableHtml+="<td style=\"width:128px;\">COD(m3/h)</td>";
tableHtml+="<td style=\"width:128px;\">PH</td>";
tableHtml+="<td style=\"width:128px;\">氨氮(mg/l)</td>";
tableHtml+="<td style=\"width:128px;\">TN(mg/l)</td>";
tableHtml+="<td style=\"width:128px;\">TP(mg/l)</td>";
tableHtml+="</tr>";
tableHtml+="<tr style=\"font-size: 16px;color: #b584ff;text-align: center;\">";
tableHtml+="<td >进水</td>";
tableHtml+=table1Html;
tableHtml+="</tr>";
tableHtml+="<tr style=\"font-size: 16px;color: #69F6F9;text-align: center;\">";
tableHtml+="<td >出水</td>";
tableHtml+=table2Html;
tableHtml+="</tr>";
$('#table').html(tableHtml);
// <tr style="font-size: 16px;color: #dbeeff;text-align: center;">
// <td style="width:40px;"></td>
// <td style="width:128px;">瞬时流量(m3/h)</td>
// <td style="width:128px;">昨日累计(m3)</td>
// <td style="width:128px;">今日累计(m3)</td>
// <td style="width:128px;">COD(mg/l)</td>
// <td style="width:128px;">PH</td>
// <td style="width:128px;">氨氮(mg/l)</td>
// <td style="width:128px;">TN(mg/l)</td>
// <td style="width:128px;">TP(mg/l)</td>
// </tr>
// <tr style="font-size: 16px;color: #b584ff;text-align: center;">
// <td >进水</td>
// </tr>
// <tr style="font-size: 16px;color: #69F6F9;text-align: center;">
// <td >出水</td>
// </tr>
}
}, '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方法用.进行拼接
}
/* 定时器 */
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("Image").src = ""+getRootPath()+"/images/大屏/水质logo.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:30px;padding-left:10px;padding-right:10px;">
<div style="height:100%;width:100%;">
<div style="float:left;width:100%;height:92px;background: #023354;border-radius: 10px;">
<!-- <div style="float:left;width:80px;height:100%;">
<div style="float:left;width:80px;height:60px;padding-left: 18px;padding-right: 18px;padding-top: 19px;">
<img id="Image1" src="" style="z-index:998;position:relative;height:100%;width:100%;"/>
</div>
<div style="float:left;width:80px;height:32px;padding-top:5px;text-align: center;color: #dbeeff;font-size: 16px;">
原水水质
</div>
</div>
<div style="float:left;width:calc((100% - 160px)*0.5);height:100%;">
<table id="table1" style="width: 100%;height: 100%;">
</table>
</div>
<div style="float:left;width:80px;height:100%;">
<div style="float:left;width:80px;height:60px;padding-left: 18px;padding-right: 18px;padding-top: 19px;">
<img id="Image2" src="" style="z-index:998;position:relative;height:100%;width:100%;"/>
</div>
<div style="float:left;width:80px;height:32px;padding-top:5px;text-align: center;color: #dbeeff;font-size: 16px;">
出水水质
</div>
</div>
<div style="float:left;width:calc((100% - 160px)*0.5);height:100%;">
<table id="table2" style="width: 100%;height: 100%;">
</table>
</div> -->
<div style="float:left;width:100px;height:100%;padding-left: 18px;padding-right: 18px;padding-top: 19px;">
<img id="Image" src="" style="z-index:998;position:relative;"/>
</div>
<div style="float:left;width:calc(100% - 100px);height:100%;">
<table id="table" style="width:100%;height:100%;">
</table>
</div>
</div>
<div style="float:left;width:100%;height:500px;margin-top: 10px;">
<img id="Image3" src="" style="z-index:998;position:relative;width:100%;height:100%"/>
</div>
</div>
</div>
</body>
</html>