73 lines
3.1 KiB
Plaintext
73 lines
3.1 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>
|
|
<script type="text/javascript">
|
|
//获取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;
|
|
}
|
|
|
|
function getValue() {
|
|
$.post(ext.contextPath + '/plan/getJspWholeInfoByPlanLayoutId.do', { planLayoutId: "${param.planLayoutId}" }, function (data) {
|
|
//每一条循环判断
|
|
console.log("data", 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 != "") {
|
|
// //背景图
|
|
// $('#backImage').css("background","url("+getRootPath()+""+data[i].style+") no-repeat");
|
|
// $('#backImage').css("background-size","cover");
|
|
document.getElementById("backImage").src = getRootPath()+ 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;
|
|
}
|
|
}
|
|
}
|
|
}, 'json');
|
|
}
|
|
/* 定时器 */
|
|
// setInterval(getValue, 300000); //<!--每隔5分钟刷新一次-->
|
|
|
|
$(function () {
|
|
document.body.style.backgroundColor = "#" + '${param.backgroundColor}';
|
|
document.getElementById("backImage").style.width = document.documentElement.clientWidth + "px";
|
|
document.getElementById("backImage").style.height = document.documentElement.clientHeight + "px";
|
|
|
|
getValue();
|
|
// console.log(document.documentElement.offsetHeight);
|
|
// console.log(document.documentElement.clientHeight);
|
|
});
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body style="width:100%;height:100%;margin:0;padding:0;">
|
|
<!-- <div id="backImage" style="width:100%;height:100%;margin:0;padding:0;overflow-x: hidden;
|
|
overflow-y: hidden;"></div> -->
|
|
<img id="backImage" src="" style="z-index:-1;positon:relative;" alt="" />
|
|
</body>
|
|
|
|
</html> |