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

400 lines
13 KiB
Plaintext
Raw Permalink 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_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>
.q22Div {
position: relative;
z-index: 1;
top: 19%;
left: 7%;
width: 48%;
height: 29%;
border-bottom: 2px solid #7285A0;
border-right: 2px solid #7285A0;
margin: 0
}
.q22LeftLine {
height: 0px;
border: 1px solid #7285A0;
width: 36.5%;
transform: rotate(111deg);
-o-transform: rotate(111deg);
-moz-transform: rotate(111deg);
-webkit-transform: rotate(111deg);
position: absolute;
z-index: 2;
float: left;
margin-top: 16.7%;
left: -11.8%;
}
.q22TopLine {
width: 87%;
border-top: 2px solid #7285A0;
float: right;
}
.q21Div {
position: relative;
z-index: 1;
top: 21%;
left: 1.5%;
width: 53.5%;
height: 37%;
border-bottom: 2px solid #7285A0;
border-right: 2px solid #7285A0;
}
.q21TopRightLine {
width: 19%;
border-top: 2px solid #7285A0;
float: right;
}
.q21TopMiddleLine {
width: 28.5%;
height: 40%;
border-bottom: 2px solid #7285A0;
border-right: 2px solid #7285A0;
float: right;
}
.q21TopLeftLine {
width: 42.3%;
border-top: 2px solid #7285A0;
float: left;
position: absolute;
z-index: 2;
left: 12.7%
}
.q21TopSlatLine {
height: 0px;
border: 1px solid #7285A0;
width: 15.5%;
transform: rotate(99deg);
-o-transform: rotate(99deg);
-moz-transform: rotate(99deg);
-webkit-transform: rotate(99deg);
position: absolute;
z-index: 2;
margin-top: 7.8%;
left: 46%
}
.q21LeftLine {
height: 0px;
border: 1px solid #7285A0;
width: 41.1%;
transform: rotate(108deg);
-o-transform: rotate(108deg);
-moz-transform: rotate(108deg);
-webkit-transform: rotate(108deg);
position: absolute;
z-index: 2;
float: left;
margin-top: 19.5%;
left: -14%
}
.q23Div {
position: relative;
z-index: 1;
top: -12%;
right: 1.5%;
width: 30%;
height: 75%;
float: right;
}
.q23TopLine {
width: 72.3%;
height: 52%;
border-top: 2px solid #7285A0;
position: relative;
}
.q23LeftLine {
height: 0px;
border: 1px solid #7285A0;
width: 121%;
transform: rotate(82deg);
-o-transform: rotate(82deg);
-moz-transform: rotate(82deg);
-webkit-transform: rotate(82deg);
position: absolute;
z-index: 2;
float: left;
top: 42.4%;
left: -52.1%;
}
.q23RightLine {
height: 0px;
border: 1px solid #7285A0;
width: 122.5%;
transform: rotate(77deg);
-o-transform: rotate(77deg);
-moz-transform: rotate(77deg);
-webkit-transform: rotate(77deg);
position: absolute;
z-index: 2;
float: left;
top: 42.3%;
left: 25%;
}
.q23BottomAndRightLine {
width: 83.5%;
height: 33%;
border-bottom: 2px solid #7285A0;
float: right;
}
.titleDiv {
border-radius: 30px;
border: 3px solid #fff;
background-color: #1BB3DC;
}
.q21Line {
display: inline-block;
background-color: #5AD8FF;
-webkit-mask: url(../../../IMG/material/Q21Line.svg) no-repeat;
mask: url(../../../IMG/material/Q21Line.svg) no-repeat;
-webkit-mask-size: 100% 100%;
mask-size: 100% 100%;
}
.q22Line {
display: inline-block;
background-color: #FFDF58;
-webkit-mask: url(../../../IMG/material/Q22Line.svg) no-repeat;
mask: url(../../../IMG/material/Q22Line.svg) no-repeat;
-webkit-mask-size: 100% 100%;
mask-size: 100% 100%;
}
.q23Line {
display: inline-block;
background-color: #5DFF5C;
-webkit-mask: url(../../../IMG/material/Q23Line.svg) no-repeat;
mask: url(../../../IMG/material/Q23Line.svg) no-repeat;
-webkit-mask-size: 100% 100%;
mask-size: 100% 100%;
}
</style>
<script type="text/javascript">
/* 请求数据 */
var timeflash = 0;
function clock() {
var time = new Date();
var week;
switch (time.getDay()) {
case 1: week = "星期一"; break;
case 2: week = "星期二"; break;
case 3: week = "星期三"; break;
case 4: week = "星期四"; break;
case 5: week = "星期五"; break;
case 6: week = "星期六"; break;
default: week = "星期日";
}
var year = time.getFullYear();
var month = time.getMonth()+1;
var date = time.getDate();
var hour = time.getHours();
var minute = time.getMinutes();
if (minute < 10) {
minute = "0" + minute;
}
if (month < 10) {
month = "0" + month;
}
var apm = "上午";
if (hour < 6 && hour >= 0) {
apm = "凌晨";
} else if (hour == 12) {
apm = "中午";
} else if (hour > 12 && hour < 18) {
apm = "下午";
} else if (hour >= 18 && hour < 24) {
apm = "晚上";
}
var maohao = "";
if (timeflash == 0) {
maohao = "<font color='#4972B4'>:</font>";
timeflash = 1;
} else {
maohao = "<font color='#1A2D58'>:</font>";
timeflash = 0;
}
if(document.getElementById("clock")){
document.getElementById("clock").innerHTML = hour + maohao + minute;
}
if(document.getElementById("apm")){
document.getElementById("apm").innerHTML = apm;
}
if(document.getElementById("date")){
document.getElementById("date").innerHTML = year + "." + month + "." + date;
}
if(document.getElementById("week")){
document.getElementById("week").innerHTML = week;
}
if(document.getElementById("lunar")){
document.getElementById("lunar").innerHTML = showCal();
}
}
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)) {//判断存不存在
//赋值
document.getElementById(code).innerHTML = data[i].name;
}
} else {
//获取值 和 获取Modbus
if (data[i].getValueType == '${Type_GetValue}' || data[i].getValueType == '${Type_GetModbus}') {
if (data[i].elementCode == 'Q21') {
if (data[i].mPoint.parmvalue != '1') {
document.getElementById("q21Line").style.backgroundColor = "#7285A0";
}
} else if (data[i].elementCode == 'Q22') {
if (data[i].mPoint.parmvalue != '1') {
document.getElementById("q22Line").style.backgroundColor = "#7285A0";
}
} else if (data[i].elementCode == 'Q23') {
if (data[i].mPoint.parmvalue != '1') {
document.getElementById("q23Line").style.backgroundColor = "#7285A0";
}
}
} 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分钟刷新一次-->
setInterval(clock, 1000); //每隔1秒显示一次
$(function () {
clock();
getValue();
document.body.style.backgroundColor = "#" + '${param.backgroundColor}';
$("#clock").css("font-size", (document.documentElement.clientWidth * 0.03 + "px"));
// $("#lunar").css("font-size", (document.documentElement.clientWidth * 0.03 + "px"));
$("#date").css("font-size", (document.documentElement.clientWidth * 0.03 + "px"));
$("#week").css("font-size", (document.documentElement.clientWidth * 0.03 + "px"));
$("#title1").css("font-size", (document.documentElement.clientWidth * 0.02 + "px"));
document.getElementById("titleDiv").style.width = document.documentElement.clientWidth * 0.23 + "px";
document.getElementById("titleDiv").style.height = document.documentElement.clientHeight * 0.058 + "px";
document.getElementById("titleDiv").style.borderWidth = document.documentElement.clientHeight * 0.003 + "px";
document.getElementById("backImage").style.width = document.documentElement.clientWidth + "px";
document.getElementById("backImage").style.height = document.documentElement.clientHeight + "px";
document.getElementById("q21Line").style.width = document.documentElement.clientWidth + "px";
document.getElementById("q21Line").style.height = document.documentElement.clientHeight + "px";
document.getElementById("q22Line").style.width = document.documentElement.clientWidth + "px";
document.getElementById("q22Line").style.height = document.documentElement.clientHeight + "px";
document.getElementById("q23Line").style.width = document.documentElement.clientWidth + "px";
document.getElementById("q23Line").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="width:96%;height:10%;padding-top:0.5%;padding-left:2%;position: absolute;z-index:2;text-align: center;">
<table style="width:100%;height:100%;padding:5%;">
<tr>
<td width="47%">
<div id="titleDiv" class="titleDiv" style="height:60px;text-align: center;">
<span id="title1" style="font-size:30px;color:#fff;"></span>
</div>
</td>
<td><span id="date" style="font-size:25px;color:#4972B4;font-family:Microsoft YaHei;font-weight:bold"></span>
</td>
<td><span id="week" style="font-size:25px;color:#4972B4;font-family:Microsoft YaHei;font-weight:bold"></span>
</td>
<!-- <td><span id="lunar" style="font-size:25px;color:#4972B4;font-family:Microsoft YaHei;font-weight: bold;"></span></td> -->
<td><span id="clock"
style="font-size:70px;color:#4972B4;font-family:Microsoft YaHei;font-weight: bold;"></span></td>
</tr>
</table>
</div>
<i id="q21Line" class="q21Line" style="position: absolute;z-index:2;"></i>
<i id="q22Line" class="q22Line" style="position: absolute;z-index:2;"></i>
<i id="q23Line" class="q23Line" style="position: absolute;z-index:2;"></i>
<!-- <div id="Q22Div" class="q22Div"> -->
<!-- 左侧斜线 -->
<!-- <div class="q22LeftLine"></div> -->
<!-- 上边 -->
<!-- <div class="q22TopLine"></div>
</div> -->
<!-- <div id="Q23Div" class="q23Div"> -->
<!-- 上边 -->
<!-- <div class="q23TopLine"></div> -->
<!-- 左侧斜线 -->
<!-- <div class="q23LeftLine"></div> -->
<!-- 右侧斜线 -->
<!-- <div class="q23RightLine"></div> -->
<!-- 下右两边直线 -->
<!-- <div class="q23BottomAndRightLine"></div>
</div> -->
<!-- <div id="Q21Div" class="q21Div"> -->
<!-- 左侧斜线 -->
<!-- <div class="q21LeftLine"></div>
<div class="q21TopSlatLine"></div> -->
<!-- 上边 -->
<!-- <div class="q21TopLeftLine"></div>
<div class="q21TopRightLine"></div>
<div class="q21TopMiddleLine"></div>
</div> -->
</div>
<img id="backImage" src="" style="z-index:-1;positon:relative;" alt="" />
</body>
</html>