first commit
This commit is contained in:
184
WebRoot/jsp/visual/modules/bigScreen_waterQuality.jsp
Normal file
184
WebRoot/jsp/visual/modules/bigScreen_waterQuality.jsp
Normal file
@ -0,0 +1,184 @@
|
||||
<%@ 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;
|
||||
}
|
||||
|
||||
var mychart="";
|
||||
/* 请求数据 */
|
||||
function getValue() {
|
||||
$.post(ext.contextPath + '/plan/getJspWholeInfoByPlanLayoutId.do', { planLayoutId: "${param.planLayoutId}" }, function (data) {
|
||||
// console.log(data);
|
||||
var textdata=[];
|
||||
var designValuedata=[];
|
||||
if(data!=null&&data.length>0){
|
||||
for(var i=0;i<data.length;i++){
|
||||
if(data[i].elementCode=="text"){
|
||||
textdata.push(data[i]);
|
||||
}else if(data[i].elementCode=="designValue"){
|
||||
designValuedata.push(data[i]);
|
||||
}
|
||||
}
|
||||
|
||||
var html1="";
|
||||
var html2="";
|
||||
for(var i=0;i<textdata.length;i++){
|
||||
if(i<=2){
|
||||
html1+="<div style='float:left;width:33%;height:100%;' >"
|
||||
|
||||
if(i==0){
|
||||
html1+="<div style='float:left;width:100%;height:25%;' >";
|
||||
}else if(i==2){
|
||||
html1+="<div style='float:left;width:100%;height:25%;' >";
|
||||
}else{
|
||||
html1+="<div style='float:left;width:100%;height:25%;' >";
|
||||
}
|
||||
html1+="<div style='float:left;width:100%;height:100%;line-height: calc((100vh - 60px - 15px)/2*0.25);border-radius: 1px;font-size: 26px;font-family: PingFangSC, PingFangSC-Semibold;font-weight: 500;text-align: center;color: #ffffff;padding-left:5px;' >"+textdata[i].name+"</div>";
|
||||
html1+="</div>";
|
||||
|
||||
if(i==0){
|
||||
html1+="<div style='float:left;width:100%;height:50%;padding-left:30px;padding-right:30px;' >";
|
||||
}else if(i==2){
|
||||
html1+="<div style='float:left;width:100%;height:50%;padding-left:30px;padding-right:30px;' >";
|
||||
}else{
|
||||
html1+="<div style='float:left;width:100%;height:50%;padding-left:30px;padding-right:30px;' >";
|
||||
}
|
||||
html1+="<div style='float:left;width:100%;height:100%;line-height: calc((100vh - 60px - 30px)/2*0.5);background: linear-gradient(180deg,rgba(68,110,210,0.59), rgba(30,162,184,0));border-radius: 9px;font-size: 26px;font-family: Helvetica, Helvetica-Bold;font-weight: 500;text-align: center;color: #ffffff;' >"+textdata[i].mPoint.parmvalue.toFixed(2)+"</div>";
|
||||
html1+="</div>";
|
||||
|
||||
if(i==0){
|
||||
html1+="<div style='float:left;width:100%;height:25%;padding-left:5px;' >";
|
||||
}else if(i==2){
|
||||
html1+="<div style='float:left;width:100%;height:25%;padding-right:5px;' >";
|
||||
}else{
|
||||
html1+="<div style='float:left;width:100%;height:25%;' >";
|
||||
}
|
||||
if(i==0){
|
||||
html1+="<div style='float:left;width:100%;height:100%;line-height: calc((100vh - 60px - 15px)/2*0.25);background: rgba(30,162,184,0.22);border-radius: 1px;font-size: 24px;font-family: PingFangSC, PingFangSC-Semibold;font-weight: 500;text-align: center;color: #ffffff;' >"+designValuedata[i].valueUrl+"</div>";
|
||||
}else{
|
||||
html1+="<div style='float:left;width:100%;height:100%;line-height: calc((100vh - 60px - 15px)/2*0.25);background: rgba(30,162,184,0.22);border-radius: 1px;font-size: 24px;font-family: PingFangSC, PingFangSC-Semibold;font-weight: 500;text-align: center;color: #ffffff;' >"+designValuedata[i].valueUrl+"</div>";
|
||||
}
|
||||
html1+="</div>";
|
||||
|
||||
html1+="</div>";
|
||||
}
|
||||
|
||||
if(i<=5&&i>2){
|
||||
html2+="<div style='float:left;width:33%;height:100%;' >"
|
||||
|
||||
if(i==3){
|
||||
html2+="<div style='float:left;width:100%;height:25%;' >";
|
||||
}else if(i==5){
|
||||
html2+="<div style='float:left;width:100%;height:25%;' >";
|
||||
}else{
|
||||
html2+="<div style='float:left;width:100%;height:25%;' >";
|
||||
}
|
||||
html2+="<div style='float:left;width:100%;height:100%;line-height: calc((100vh - 60px - 15px)/2*0.25);border-radius: 1px;font-size: 26px;font-family: PingFangSC, PingFangSC-Semibold;font-weight: 500;text-align: center;color: #ffffff;padding-left:5px;' >"+textdata[i].name+"</div>";
|
||||
html2+="</div>";
|
||||
|
||||
if(i==3){
|
||||
html2+="<div style='float:left;width:100%;height:50%;padding-left:30px;padding-right:30px;' >";
|
||||
}else if(i==5){
|
||||
html2+="<div style='float:left;width:100%;height:50%;padding-left:30px;padding-right:30px;' >";
|
||||
}else{
|
||||
html2+="<div style='float:left;width:100%;height:50%;padding-left:30px;padding-right:30px;' >";
|
||||
}
|
||||
html2+="<div style='float:left;width:100%;height:100%;line-height: calc((100vh - 60px - 30px)/2*0.5);background: linear-gradient(180deg,rgba(68,110,210,0.59), rgba(30,162,184,0));border-radius: 9px;font-size: 26px;font-family: Helvetica, Helvetica-Bold;font-weight: 500;text-align: center;color: #ffffff;' >"+textdata[i].mPoint.parmvalue.toFixed(2)+"</div>";
|
||||
html2+="</div>";
|
||||
if(i==3){
|
||||
html2+="<div style='float:left;width:100%;height:25%;padding-left:5px;' >";
|
||||
}else if(i==5){
|
||||
html2+="<div style='float:left;width:100%;height:25%;padding-right:5px;' >";
|
||||
}else{
|
||||
html2+="<div style='float:left;width:100%;height:25%;' >";
|
||||
}
|
||||
if(i==3){
|
||||
html2+="<div style='float:left;width:100%;height:100%;line-height: calc((100vh - 60px - 15px)/2*0.25);background: rgba(30,162,184,0.22);border-radius: 1px;font-size: 24px;font-family: PingFangSC, PingFangSC-Semibold;font-weight: 500;text-align: center;color: #ffffff;' >"+designValuedata[i].valueUrl+"</div>";
|
||||
}else{
|
||||
html2+="<div style='float:left;width:100%;height:100%;line-height: calc((100vh - 60px - 15px)/2*0.25);background: rgba(30,162,184,0.22);border-radius: 1px;font-size: 24px;font-family: PingFangSC, PingFangSC-Semibold;font-weight: 500;text-align: center;color: #ffffff;' >"+designValuedata[i].valueUrl+"</div>";
|
||||
}
|
||||
html2+="</div>";
|
||||
|
||||
html2+="</div>";
|
||||
}
|
||||
|
||||
}
|
||||
$('#text1').html(html1);
|
||||
$('#text2').html(html2);
|
||||
// console.log(textdata);
|
||||
// console.log(designValuedata);
|
||||
}
|
||||
}, '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";
|
||||
document.getElementById("main").style.height = (document.documentElement.clientHeight-15) + "px";
|
||||
|
||||
document.getElementById("backImage").src = ""+getRootPath()+"/images/大屏/出水水质.png";
|
||||
|
||||
getValue();
|
||||
//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 style="height:100%;width:100%;padding-top:15px;">
|
||||
<div id="main" style="height:100%;width:100%;padding:0px;background:rgba(19,32,85,0.27);border-radius: 8px;">
|
||||
<div style='float:left;width:50%;height:60px;'><img id="backImage" src="" style="z-index:-1;position: relative;height:100%;width: 100%;"/></div>
|
||||
<div style='float:left;width:50%;height:60px;'></div>
|
||||
<div style="float: left;width:15%;height: calc(100vh - 75px);">
|
||||
<div style="float: left;width:100%;height: 50%;">
|
||||
<div style="float: left;width:100%;height: 75%;"></div>
|
||||
<div style="float: left;width:100%;height: 25%;line-height: calc((100vh - 75px)/2*0.25);font-size: 24px;color: #ffffff;text-align: center;">设计值</div>
|
||||
</div>
|
||||
<div style="float: left;width:100%;height: 50%;">
|
||||
<div style="float: left;width:100%;height: 75%;"></div>
|
||||
<div style="float: left;width:100%;height: 25%;line-height: calc((100vh - 75px)/2*0.25);font-size: 24px;color: #ffffff;text-align: center;">设计值</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: left;width:85%;height: calc(100vh - 75px);">
|
||||
<div id="text1" style="float:left;width:100%;height: calc((100vh - 60px - 15px)/2);"></div>
|
||||
<div id="text2" style="float:left;width:100%;height: calc((100vh - 60px - 15px)/2);"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user