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

115 lines
5.3 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_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>
<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;
}
/* 请求数据 */
function getbulletinBoardValue() {
$.post(ext.contextPath + '/info/getJson.do', function (data) {
if(data!=''){
var html="<table style=\"width:100%;height:100%;table-layout:fixed;\">";
for(var i=0;i<data.length;i++){
var tetitlext=data[i].title;
var modifydt=data[i].modifydt;
html+="<tr style=\"height:12.5%;font-size: 16px;cursor: pointer;\" onclick=\"bulletinBoardviewFun('"+data[i].id+"');\">";
html+="<td style=\"white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:5px;\"><span style=\"font-weight: bold;\"> · </span>"+tetitlext+"</td>";
html+="<td style=\"width:90px;\">"+modifydt.substring(0,10)+"</td>";
html+="</tr>";
}
if(8-data.length>0){
for(var i=0;i<(8-data.length);i++){
html+="<tr style=\"height:12.5%;\">";
html+="<td ><span style=\"font-weight: bold;\"></td>";
html+="<td style=\"width:90px;\"></td>";
html+="</tr>";
}
}
html+="</table>";
$('#bulletinBoardcontent').html(html);
}else{
$('#bulletinBoardcontent').text("无数据");
}
}, 'json');
}
var bulletinBoardviewFun = function(id) {
$.post(ext.contextPath + '/info/view.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var bulletinBoardMore = function() {
$.post(ext.contextPath + '/info/showOpenlist.do' , function(data) {
$("#topsubDiv").html(data);
openModal('infoOpenListsubModal');
});
};
/* 定时器 */
//setInterval(change, 60000); //每1分钟切换
// 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";
getbulletinBoardValue();
//console.log("height",document.body.scrollHeight);
});
</script>
</head>
<body style="width:100%;height:100%;margin:0;padding:0;overflow-x:hidden;overflow-y:hidden">
<div id="bulletinBoardmain" style="height:100%;width:100%;padding-top:10px;padding-left:10px;padding-right:10px;">
<div style="height:100%;width:100%;background:#ffffff;border: 1px solid #E1E1E1;border-radius: 4px;box-shadow: 2px 2px 4px 0px #696969, 0px 0px 4px 0px #696969;padding:10px;">
<div style="float: left;width: 100%;height:30px;">
<div style="float: left;width:5px;height:100%;margin-left: 15px;padding-top:5px;padding-bottom:5px;"><div style="width: 100%;height: 100%;background-color:skyblue;"></div></div>
<div style="float: left;height:100%;margin-left: 10px;line-height: 30px;">公告栏</div>
<div style="float: right;height:100%;margin-right: 10px;line-height: 30px;cursor: pointer;" onclick="bulletinBoardMore();">更多<span class="fa fa-angle-double-right"></span></div>
</div>
<div style="float: left;width: 100%;height:calc(100% - 30px);">
<div id="bulletinBoardcontent" style="width:100%;height:100%;padding: 15px;padding-left:30px;"></div>
</div>
</div>
</div>
</body>
</html>