Files
2026-01-16 14:13:44 +08:00

209 lines
7.9 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_GetHistory", JspElement.Type_GetHistory); %>
<%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/incVisual.jsp"></jsp:include>
<style>
.qtitle {
font-family: Microsoft YaHei;
}
.qcontent {
font-family: Microsoft YaHei;
color: #fff
}
.title1Div {
border-bottom: 5px solid #5AD8FF;
width:95%;
height:18%;
padding-bottom:1%;
}
.title2Div {
border-bottom: 5px solid #FFDF58;
width:95%;
height:18%;
padding-bottom:1%
}
.title3Div {
border-bottom: 5px solid #5DFF5C;
width:95%;
height:18%;
padding-bottom:1%;
}
.productSpan {
padding-top:3%;
float:right;
font-size: 18px;
color:#4972B4;
font-family:Microsoft YaHei;
}
</style>
<script type="text/javascript">
/* 请求数据 */
function getValue() {
$.post(ext.contextPath + '/plan/getJspWholeInfoByPlanLayoutId.do', { planLayoutId: "${param.planLayoutId}" }, function (data) {
//每一条循环判断
//console.log("data", data);
for (var i = 0; i < data.length; i++) {
if (data[i].elementCode == 'background') {
if (data[i].style != null && data[i].style != "") {
document.getElementById("backImage").src = "../../.." + data[i].style;
}
} else if (data[i].elementCode.indexOf("title") != -1) {//获取车间名
var code = data[i].elementCode;
if(document.getElementById(code)){//判断存不存在
//颜色
$('.'+code+'Div').css("border-color","#"+data[i].style);
document.getElementById(code).style.color = "#"+data[i].style;
//赋值
document.getElementById(code).innerHTML = data[i].name;
}
} else {
//获取值 和 获取Modbus
if (data[i].getValueType == '${Type_GetValue}' || data[i].getValueType == '${Type_GetModbus}') {
var code = data[i].elementCode;
if(data[i].mPoint.unit!=null && data[i].mPoint.unit!=""){
document.getElementById(code).innerHTML = data[i].mPoint.parmvalue + "/32" + data[i].mPoint.unit;
}else{
document.getElementById(code).innerHTML = data[i].mPoint.parmvalue + data[i].mPoint.unit;
}
} else if (data[i].getValueType == '${Type_GetHttp}') {
var code = data[i].elementCode;
document.getElementById(code).innerHTML = data[i].value;
} else {
}
}
}
}, 'json');
}
/* 定时器 */
setInterval(getValue, 300000); //<!--每隔5分钟刷新一次-->
/* 初始化 */
$(function () {
getValue();
// console.log("height",document.documentElement.clientWidth);
document.body.style.backgroundColor = "#" + '${param.backgroundColor}';
$(".qtitle").css("font-size", (document.body.offsetWidth * 0.05 + "px"));
$(".qcontent").css("font-size", (document.body.offsetWidth * 0.03 + "px"));
$(".productSpan").css("font-size", (document.body.offsetWidth * 0.028 + "px"));
});
</script>
</head>
<body style="width:100%;height:100%;margin:0;padding:0;overflow-x:hidden;overflow-y:hidden">
<div style="width:93%;height:32%;margin:0 auto;margin-top:5%">
<div id="title1Div" class="title1Div">
<span id="title1" class="qtitle"></span>
<span id="product1" class="productSpan"></span>
</div>
<table style="width:80%;height:70%;margin:0 auto;border-collapse:separate;border-spacing:0px 6px;">
<tr>
<td width="60%"><span class="qcontent">批次</span><span id="batch11" class="qcontent">-</span></td>
<td><span id="produceDay11" class="qcontent">-</span></td>
</tr>
<tr>
<td><span class="qcontent">批次</span><span id="batch12" class="qcontent">-</span></td>
<td><span id="produceDay12" class="qcontent">-</span></td>
</tr>
<tr>
<td><span class="qcontent">批次</span><span id="batch13" class="qcontent">-</span></td>
<td><span id="produceDay13" class="qcontent">-</span></td>
</tr>
<tr>
<td><span class="qcontent">批次</span><span id="batch14" class="qcontent">-</span></td>
<td><span id="produceDay14" class="qcontent">-</span></td>
</tr>
<tr>
<td><span class="qcontent">批次</span><span id="batch15" class="qcontent">-</span></td>
<td><span id="produceDay15" class="qcontent">-</span></td>
</tr>
</table>
</div>
<div style="width:93%;height:32%;margin:0 auto;margin-top:3%">
<div id="title2Div" class="title2Div">
<span id="title2" class="qtitle"></span>
<span id="product2" class="productSpan"></span>
</div>
<table style="width:80%;height:70%;margin:0 auto;border-collapse:separate;border-spacing:0px 6px;">
<tr>
<td width="60%"><span class="qcontent">批次</span><span id="batch21" class="qcontent">-</span></td>
<td><span id="produceDay21" class="qcontent">-</span></td>
</tr>
<tr>
<td><span class="qcontent">批次</span><span id="batch22" class="qcontent">-</span></td>
<td><span id="produceDay22" class="qcontent">-</span></td>
</tr>
<tr>
<td><span class="qcontent">批次</span><span id="batch23" class="qcontent">-</span></td>
<td><span id="produceDay23" class="qcontent">-</span></td>
</tr>
<tr>
<td><span class="qcontent">批次</span><span id="batch24" class="qcontent">-</span></td>
<td><span id="produceDay24" class="qcontent">-</span></td>
</tr>
<tr>
<td><span class="qcontent">批次</span><span id="batch25" class="qcontent">-</span></td>
<td><span id="produceDay25" class="qcontent">-</span></td>
</tr>
</table>
</div>
<div style="width:93%;height:32%;margin:0 auto;margin-top:3%">
<div id="title3Div" class="title3Div" >
<span id="title3" class="qtitle"></span>
<span id="product3" class="productSpan"></span>
</div>
<table style="width:80%;height:70%;margin:0 auto;border-collapse:separate;border-spacing:0px 6px;">
<tr>
<td width="60%"><span class="qcontent">批次</span><span id="batch31" class="qcontent">-</span></td>
<td><span id="produceDay31" class="qcontent">-</span></td>
</tr>
<tr>
<td><span class="qcontent">批次</span><span id="batch32" class="qcontent">-</span></td>
<td><span id="produceDay32" class="qcontent">-</span></td>
</tr>
<tr>
<td><span class="qcontent">批次</span><span id="batch33" class="qcontent">-</span></td>
<td><span id="produceDay33" class="qcontent">-</span></td>
</tr>
<tr>
<td><span class="qcontent">批次</span><span id="batch34" class="qcontent">-</span></td>
<td><span id="produceDay34" class="qcontent">-</span></td>
</tr>
<tr>
<td><span class="qcontent">批次</span><span id="batch35" class="qcontent">-</span></td>
<td><span id="produceDay35" class="qcontent">-</span></td>
</tr>
</table>
</div>
</body>
</html>