92 lines
3.5 KiB
Plaintext
92 lines
3.5 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_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">
|
|
|
|
//获取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;
|
|
}
|
|
//获取url地址根目录 当前taomcat下路径
|
|
function getRootPath2(){
|
|
var pathName = window.location.pathname.substring(1);
|
|
var webName = pathName == '' ? '' : pathName.substring(0, pathName.indexOf('/'));
|
|
return window.location.protocol + '//' + window.location.host +"/"+webName;
|
|
}
|
|
|
|
var mychart="";
|
|
/* 请求数据 */
|
|
function getValue() {
|
|
$.post(ext.contextPath + '/plan/getJspWholeInfoByPlanLayoutId.do', { planLayoutId: "${param.planLayoutId}" }, function (data) {
|
|
if(data!=''){
|
|
for(var i=0;i<data.length;i++){
|
|
if(data[i].elementCode=="text"){
|
|
$('#text').text(data[i].valueUrl);
|
|
$('#text').attr("style",data[i].style);
|
|
}else if(data[i].elementCode=="planid"){
|
|
$('#text').attr("onclick","doGo('"+data[i].valueUrl+"');");
|
|
}
|
|
}
|
|
}
|
|
}, 'json');
|
|
}
|
|
|
|
/* 定时器 */
|
|
// setInterval(getValue, 300000); //<!--每隔5分钟刷新一次-->
|
|
//setInterval(change, 60000); //每1分钟切换
|
|
|
|
/* 初始化 */
|
|
$(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";
|
|
|
|
getValue();
|
|
//console.log("height",document.body.scrollHeight);
|
|
});
|
|
|
|
var websocket = new WebSocket('ws://' + window.location.host + ext.contextPath + '/chat?userName=大屏');
|
|
function doGo(planId){
|
|
//清除交互
|
|
var clearInterationJsonStr = "[{'type':'clearInteraction'}]";
|
|
websocket.send(clearInterationJsonStr);
|
|
var jsonstr = "[{'type':'plan','id':'" + planId + "'}]";
|
|
websocket.send(jsonstr);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body style="width:100%;height:100%;margin:0;padding:0;overflow-x:hidden;overflow-y:hidden">
|
|
<div style="height:100%;width:100%;">
|
|
<div id="main" style="height:100%;width:100%;padding:0px;">
|
|
<div id="text" style="cursor: pointer;"></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
</html> |