first commit
This commit is contained in:
225
WebRoot/jsp/visual/modules/areaInfo1_1.jsp
Normal file
225
WebRoot/jsp/visual/modules/areaInfo1_1.jsp
Normal file
@ -0,0 +1,225 @@
|
||||
<%@ 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/inc.jsp"></jsp:include>
|
||||
<style>
|
||||
.blueSpanLargeFont {
|
||||
color: #437099;
|
||||
font-family: Microsoft YaHei;
|
||||
}
|
||||
|
||||
.blueSpanMediumFont {
|
||||
color: #74D5FF;
|
||||
font-family: Microsoft YaHei;
|
||||
}
|
||||
|
||||
.titleSpanFont {
|
||||
color: #437099;
|
||||
font-family: Microsoft YaHei;
|
||||
}
|
||||
|
||||
.blueSpanSmallFont {
|
||||
color: #437099;
|
||||
font-family: Microsoft YaHei;
|
||||
}
|
||||
|
||||
.whiteSpanLargeFont {
|
||||
color: white;
|
||||
font-family: Microsoft YaHei;
|
||||
}
|
||||
|
||||
.whiteSpanMediumFont {
|
||||
color: white;
|
||||
font-family: Microsoft YaHei;
|
||||
}
|
||||
|
||||
.whiteSpanSmallFont {
|
||||
color: white;
|
||||
font-family: Microsoft YaHei;
|
||||
}
|
||||
|
||||
.deepBlueSpanLargeFont {
|
||||
color: #4069B2;
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
.lightBlueSpanSmallFont {
|
||||
color: #74D5FF;
|
||||
font-family: Microsoft YaHei;
|
||||
}
|
||||
|
||||
.UserPanel {
|
||||
background: #182F52;
|
||||
border-radius: 20px;
|
||||
border: 4px solid #426AB2;
|
||||
}
|
||||
|
||||
.userNumTable {
|
||||
width: 100%;
|
||||
height: 80%;
|
||||
padding-left: 5%;
|
||||
padding-right: 5%;
|
||||
padding-top: 2%;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0px 6px;
|
||||
text-align: left;
|
||||
}
|
||||
</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++) {
|
||||
//获取值 和 获取Modbus
|
||||
if (data[i].getValueType == '${Type_GetValue}' || data[i].getValueType == '${Type_GetModbus}') {
|
||||
if (data[i].elementCode.indexOf("Status") != -1) {//获取车间状态关键字
|
||||
var code = data[i].elementCode;
|
||||
if (document.getElementById(code) && data[i].mPoint.parmvalue) {//判断存不存在
|
||||
//赋值
|
||||
var src = "";
|
||||
if (data[i].mPoint.parmvalue == '生产中') {
|
||||
src = "../../../IMG/material/生产中.jpg"
|
||||
} else if (data[i].mPoint.parmvalue == '停产') {
|
||||
src = "../../../IMG/material/停产.jpg"
|
||||
} else if (data[i].mPoint.parmvalue == '未清场') {
|
||||
src = "../../../IMG/material/未清场.jpg"
|
||||
} else if (data[i].mPoint.parmvalue == '已清场') {
|
||||
src = "../../../IMG/material/已清场.jpg"
|
||||
}
|
||||
document.getElementById(code).src = src;
|
||||
document.getElementById(code).style.width = document.documentElement.clientWidth * 0.25 + "px";
|
||||
document.getElementById(code).style.height = document.documentElement.clientHeight * 0.13 + "px";
|
||||
}
|
||||
} else {
|
||||
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 {
|
||||
if (data[i].elementCode.indexOf("Name") != -1) {//获取车间名称关键字
|
||||
var code = data[i].elementCode;
|
||||
if (document.getElementById(code)) {//判断存不存在
|
||||
//赋值
|
||||
document.getElementById(code).innerHTML = data[i].name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
/* 定时器 */
|
||||
setInterval(getValue, 300000); //<!--每隔5分钟刷新一次-->
|
||||
|
||||
/* 初始化 */
|
||||
$(function () {
|
||||
getValue();
|
||||
//console.log("height",document.body.scrollHeight);
|
||||
document.body.style.backgroundColor = "#" + '${param.backgroundColor}';
|
||||
$(".blueSpanSmallFont").css("font-size", (document.body.offsetWidth * 0.057 + "px"));
|
||||
$(".lightBlueSpanSmallFont").css("font-size", (document.body.offsetWidth * 0.065 + "px"));
|
||||
$(".titleSpanFont").css("font-size", (document.body.offsetWidth * 0.045 + "px"));
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body style="width:100%;height:100%;margin:0;padding:0;overflow-x:hidden;overflow-y:hidden">
|
||||
<div style="width:100%;height:100%;">
|
||||
<table
|
||||
style="width:100%;height:100%;border-collapse:separate;border-spacing:0px 6px;padding-left:5%;padding-right:5%;padding-right:2%;text-align: left;">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="titleSpanFont" style="font-weight: bold;">区域名称</span>
|
||||
</td>
|
||||
<td align="center">
|
||||
<span class="titleSpanFont" style="font-weight: bold;">区域状态</span>
|
||||
</td>
|
||||
<td align="right">
|
||||
<span class="titleSpanFont" style="font-weight: bold;">当前P/最大P</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<span id="area1Name" class="blueSpanSmallFont" style="font-weight: bold;"></span>
|
||||
</td>
|
||||
<td>
|
||||
<img id="area1Status" src="" style="width:100%;height:100%;" alt="" />
|
||||
</td>
|
||||
<td align="right">
|
||||
<span id="area1ActUserNum" class="lightBlueSpanSmallFont" style="font-weight: bold;"></span>
|
||||
<span class="blueSpanSmallFont" style="font-weight: bold;">/</span>
|
||||
<span id="area1TotalUserNum" class="blueSpanSmallFont" style="font-weight: bold;"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<span id="area2Name" class="blueSpanSmallFont" style="font-weight: bold;"></span>
|
||||
</td>
|
||||
<td>
|
||||
<img id="area2Status" src="" alt="" />
|
||||
</td>
|
||||
<td align="right">
|
||||
<span id="area2ActUserNum" class="lightBlueSpanSmallFont" style="font-weight: bold;"></span>
|
||||
<span class="blueSpanSmallFont" style="font-weight: bold;">/</span>
|
||||
<span id="area2TotalUserNum" class="blueSpanSmallFont" style="font-weight: bold;"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<span id="area3Name" class="blueSpanSmallFont" style="font-weight: bold;"></span>
|
||||
</td>
|
||||
<td>
|
||||
<img id="area3Status" src="" alt="" />
|
||||
</td>
|
||||
<td align="right">
|
||||
<span id="area3ActUserNum" class="lightBlueSpanSmallFont" style="font-weight: bold;"></span>
|
||||
<span class="blueSpanSmallFont" style="font-weight: bold;">/</span>
|
||||
<span id="area3TotalUserNum" class="blueSpanSmallFont" style="font-weight: bold;"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<span id="area4Name" class="blueSpanSmallFont" style="font-weight: bold;"></span>
|
||||
</td>
|
||||
<td>
|
||||
<img id="area4Status" src="" alt="" />
|
||||
</td>
|
||||
<td align="right">
|
||||
<span id="area4ActUserNum" class="lightBlueSpanSmallFont" style="font-weight: bold;"></span>
|
||||
<span class="blueSpanSmallFont" style="font-weight: bold;">/</span>
|
||||
<span id="area4TotalUserNum" class="blueSpanSmallFont" style="font-weight: bold;"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user