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

112 lines
4.4 KiB
Plaintext
Raw 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_Get7dayHistory", JspElement.Type_GetHourHistory); %>
<%request.setAttribute("Type_Get7dayHistory", JspElement.Type_Get7dayHistory); %>
<%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>
<script type="text/javascript">
/* 请求数据 */
function getValue() {
$.post(ext.contextPath + '/plan/getJspWholeInfoByPlanLayoutId.do', { planLayoutId: "${param.planLayoutId}" }, function (data) {
// console.log(data);
var html="";
html+="<tr style=\"font-size: 22px;color: #69f6f9;text-align:center;\">";
html+="<td>类别</td>";
html+="<td>内容</td>";
html+="<td>发布时间</td>";
html+="</tr>";
if(data!=''){
$.ajax({
type: "POST",
url: ext.contextPath+data[0].valueUrl,
dataType: "json",
async: false, // 同步
success: function(datas){
// console.log(datas);
var num=datas.length;
for(var i=0;i<num;i++){
html+="<tr style=\"font-size: 22px;color: #ffffff;text-align:center;height:45px\">";
html+="<td>"+datas[i].alarmlvl+"级报警</td>";
html+="<td>"+datas[i].describe+"</td>";
html+="<td>"+datas[i].alarmtime.substring(0,16)+"</td>";
html+="</tr>";
}
// if(5-num>0){
// }
}
});
}
$('#table').html(html);
}, 'json');
}
/* 定时器 */
setInterval(getValue, 300000); //每5分钟切换
// setInterval(getValue, 3600000); //每一小时切换
/* 初始化 */
$(function () {
if('${param.backgroundColor}'=='transparent'){
document.body.style.backgroundColor = '${param.backgroundColor}';
}else{
document.body.style.backgroundColor = "#" + '${param.backgroundColor}';
}
// document.getElementById("main").style.width = document.documentElement.clientWidth + "px";
// document.getElementById("main").style.height = (document.documentElement.clientHeight) + "px";
document.getElementById("titleImage").src = ""+getRootPath()+"/images/大屏/大屏标题文字背景2.png";
getValue();
//console.log("height",document.body.scrollHeight);
});
//获取url地址根目录 当前taomcat下路径
function getRootPath(){
var pathName = window.location.pathname.substring(1);
// var webName = pathName == '' ? '' : pathName.substring(0, pathName.indexOf('/'));
return window.location.protocol + '//' + window.location.host;
}
</script>
</head>
<body style="width:100%;height:100%;margin:0;padding:0;overflow-x:hidden;overflow-y:hidden;">
<div id="main" style="height:100%;width:100%;padding-top:10px;padding-left:10px;padding-right:10px;">
<div style="height:100%;width:100%;">
<div style="float:left;width:100%;height:57px;margin-left: 20px;">
<div style="float:left;width:100%;height:34px;">
<div style="position:absolute;top:24px;left:50px;z-index:999;opacity: 1;font-size: 20px;font-family: Microsoft YaHei, Microsoft YaHei-Regular;margin-left:55px;">事件告警</div>
<img id="titleImage" src="" style="z-index:998;position:relative;"/>
</div>
</div>
<div style="float:left;width:100%;height:calc(100% - 57px);padding-left: 20px;">
<table id="table" style="width: 100%;height: 100%;">
</table>
</div>
</div>
</div>
</body>
</html>