132 lines
5.0 KiB
Plaintext
132 lines
5.0 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%;
|
|
}
|
|
|
|
.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;
|
|
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:98%;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><span class="qcontent">批次</span><span id="batch1" class="qcontent">-</span></td>
|
|
<td><span class="qcontent">生产第</span><span id="produceDay1" class="qcontent">-</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="qcontent">批次</span><span id="batch2" class="qcontent">-</span></td>
|
|
<td><span class="qcontent">生产第</span><span id="produceDay2" class="qcontent">-</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="qcontent">批次</span><span id="batch3" class="qcontent">-</span></td>
|
|
<td><span class="qcontent">生产第</span><span id="produceDay3" class="qcontent">-</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="qcontent">批次</span><span id="batch4" class="qcontent">-</span></td>
|
|
<td><span class="qcontent">生产第</span><span id="produceDay4" class="qcontent">-</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="qcontent">批次</span><span id="batch5" class="qcontent">-</span></td>
|
|
<td><span class="qcontent">生产第</span><span id="produceDay5" class="qcontent">-</span></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</body>
|
|
|
|
</html> |