91 lines
3.6 KiB
Plaintext
91 lines
3.6 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"%>
|
||
<!DOCTYPE html>
|
||
<!-- <html lang="zh-CN"> -->
|
||
<!-- BEGIN HEAD -->
|
||
|
||
<head>
|
||
<title></title>
|
||
<!-- 引用页头及CSS页-->
|
||
<jsp:include page="/jsp/incVisual.jsp"></jsp:include>
|
||
|
||
<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;
|
||
//document.getElementById('lineSpan').innerHTML = data[i].dataType + '原液生产车间';
|
||
}
|
||
} 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;
|
||
} else if (data[i].getValueType == '${Type_GetHistory}') {
|
||
|
||
} 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();
|
||
document.body.style.backgroundColor = "#" + '${param.backgroundColor}';
|
||
document.getElementById("backImage").style.width = document.documentElement.clientWidth + "px";
|
||
document.getElementById("backImage").style.height = document.documentElement.clientHeight + "px";
|
||
// document.getElementById("floatDiv").style.width = document.documentElement.clientWidth + "px";
|
||
// document.getElementById("floatDiv").style.height = document.documentElement.clientHeight + "px";
|
||
});
|
||
</script>
|
||
|
||
</head>
|
||
|
||
<body style="width:100%;height:100%;margin:0;padding:0;">
|
||
<!-- <div id="floatDiv" style="position: absolute;z-index:1;">
|
||
|
||
<div style="position: absolute;z-index:1;bottom:66%;left:25%">
|
||
<div style="width:50px;height:80px;margin:0;padding:0;float:left">
|
||
<div style="height:13px;margin-top:60px;">
|
||
<div class="slopingside" style="margin-left:6px"></div>
|
||
</div>
|
||
<div style="height:60px;width:20px;border-left: 2px solid #5AD8FF;margin-left:9px;"></div>
|
||
<div class="circle"></div>
|
||
</div>
|
||
<div style="float:left;margin-top:30px;">
|
||
<div>
|
||
<span style="color: #A759C7;font-size: 18px;">H</span>
|
||
<input type="text" readonly
|
||
style="border-radius:4px;border:0;background-color: #A759C7;width:80px;text-align:right;" value="40.2%" />
|
||
</div>
|
||
<div>
|
||
<span style="color: #B9A551;font-size: 18px;">T</span>
|
||
<input type="text" readonly
|
||
style="border-radius:4px;border:0;background-color: #B9A551;width:80px;text-align:right;" value="20.2℃" />
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div> -->
|
||
|
||
<img id="backImage" src="" style="z-index:-1;positon:relative;"
|
||
alt="" />
|
||
|
||
</body>
|
||
|
||
</html> |