Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/visual/modules/bigScreen_SJWFRegionalProfile.jsp
2026-01-16 14:13:44 +08:00

250 lines
14 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ 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_GetHourHistory", 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;
}
function numOutput(num){
var numpart=String(num).split(".");//将数字通过jq split用小数点分隔为数组对象
numpart[0]=numpart[0].replace(new RegExp('(\\d)(?=(\\d{3})+$)','ig'),"$1,");
//将数组对象第一个数据(整数部分)通过正则表达式每三位用逗号分隔
return numpart.join(".");//把数组通过join方法用.进行拼接
}
/* 请求数据 */
function getValue() {
$.post(ext.contextPath + '/plan/getJspWholeInfoByPlanLayoutId.do', { planLayoutId: "${param.planLayoutId}" }, function (data) {
// console.log(data);
if(data!=''){
for(var i=0;i<data.length;i++){
if(data[i].elementCode=="branchCompanyNum"){
$('#branchCompanyNum').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
}else if(data[i].elementCode=="peopleNum"){
$('#peopleNum').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
}else if(data[i].elementCode=="regionDWater"){
$('#regionDWater').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
}else if(data[i].elementCode=="regionYWater"){
$('#regionYWater').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
}else if(data[i].elementCode=="regionTWater"){
$('#regionTWater').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
}else if(data[i].elementCode=="companyDWater1"){
$('#companyDWater1').text(numOutput((data[i].visualCacheData.value).toFixed(1)));
}else if(data[i].elementCode=="companyDWater2"){
$('#companyDWater2').text(numOutput((data[i].visualCacheData.value).toFixed(1)));
}else if(data[i].elementCode=="companyDWater3"){
$('#companyDWater3').text(numOutput((data[i].visualCacheData.value).toFixed(1)));
}else if(data[i].elementCode=="companyDWater4"){
$('#companyDWater4').text(numOutput((data[i].visualCacheData.value).toFixed(1)));
}else if(data[i].elementCode=="companyYWater1"){
$('#companyYWater1').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
}else if(data[i].elementCode=="companyYWater2"){
$('#companyYWater2').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
}else if(data[i].elementCode=="companyYWater3"){
$('#companyYWater3').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
}else if(data[i].elementCode=="companyYWater4"){
$('#companyYWater4').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
}else if(data[i].elementCode=="companyTWater1"){
$('#companyTWater1').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
}else if(data[i].elementCode=="companyTWater2"){
$('#companyTWater2').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
}else if(data[i].elementCode=="companyTWater3"){
$('#companyTWater3').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
}else if(data[i].elementCode=="companyTWater4"){
$('#companyTWater4').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
}
}
}
}, '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";
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%;border-radius: 8px;">
<div style="position: absolute;width: 350px;height:80px;top:80px;left:250px;">
<div style="float: left;width: 30%;height: 100%;line-height:55px;color: #69F6F9;font-size: 24px;font-family: Helvetica;text-align: right;">现有员工</div>
<div style="float: left;width: 50%;height: 100%;color: #69F6F9;font-size: 35px;font-family: Helvetica;text-align: center;"><span id="peopleNum"></span><span> 人</span></div>
</div>
<div style="position: absolute;width: 350px;height:80px;top:80px;left:650px;">
<div style="float: left;width: 30%;height: 100%;line-height:55px;color: #69F6F9;font-size: 24px;font-family: Helvetica;text-align: right;">项目公司</div>
<div style="float: left;width: 50%;height: 100%;color: #69F6F9;font-size: 35px;font-family: Helvetica;text-align: center;"><span id="branchCompanyNum"></span><span> 家</span></div>
</div>
<div style="width:255px;height:136px;background: linear-gradient(19deg,#02395d 13%, rgba(0,16,107,0.5) 90%);border: 3px solid #00edf2;border-radius: 9px;position: absolute;top:430px;left:1130px;">
<div style="float:left;width:100%;height:45.5px;line-height:45.4px;text-align:center;color:#bcdfff;font-size: 16px;"><span>潍坊区域(</span><span id="regionDWater" style="color:#a5f1f7;font-size: 20px;"></span><span>万m³/D</span></div>
<div style="float:left;width:100%;height:45.5px;">
<div style="float:left;width:50%;line-height:45.4px;text-align:right;color:#bcdfff;font-size: 16px;">昨日水量:</div>
<div id="regionYWater" style="float:left;width:50%;line-height:45.4px;text-align:left;color:#347EFB;font-size: 20px;"></div>
</div>
<div style="float:left;width:100%;height:45.5px;">
<div style="float:left;width:50%;line-height:45.4px;text-align:right;color:#bcdfff;font-size: 16px;">今日水量:</div>
<div id="regionTWater" style="float:left;width:50%;line-height:45.4px;text-align:left;color:#347EFB;font-size: 20px;"></div>
</div>
</div>
<div style="width:230px;height:120px;background: rgba(3,5,18,0.25);border-radius: 9px;position:absolute;top:160px;left:50px;">
<table style="width:100%;height:100%;table-layout: fixed;text-align: center;vertical-align: middle;font-family: PingFangSC, PingFangSC-Semibold;">
<tr style="height:38px;">
<td style="width:91px;background:#76afdb;border-radius: 18px 0px 28px 0px;color:rgba(52,241,255,1);font-size:16px;font-weight: 600;letter-spacing:2px;">高新厂</td>
<td style="width:30px;"></td>
<td style="text-align:left;"><span id="companyDWater1" style="font-size:20px;color:#a5f1f7;"></span><span style="font-size:14px;color:#ffffff;"> 万m³/D</span></td>
</tr>
<tr>
<td colspan="2" style="text-align:right;font-size: 14px;color: #ffffff;">
昨日水量:
</td>
<td id="companyYWater1" style="text-align:left;font-size:20px;color:#347EFB;">
</td>
</tr>
<tr>
<td colspan="2" style="text-align:right;font-size: 14px;color: #ffffff;">
今日水量:
</td>
<td id="companyTWater1" style="text-align:left;font-size:20px;color:#347EFB;">
</td>
</tr>
</table>
</div>
<div style="width:230px;height:120px;background: rgba(3,5,18,0.25);border-radius: 9px;position:absolute;top:760px;left:1200px;">
<table style="width:100%;height:100%;table-layout: fixed;text-align: center;vertical-align: middle;font-family: PingFangSC, PingFangSC-Semibold;">
<tr style="height:38px;">
<td style="width:91px;background:#76afdb;border-radius: 18px 0px 28px 0px;color:rgba(52,241,255,1);font-size:16px;font-weight: 600;letter-spacing:2px;">沙窝厂</td>
<td style="width:30px;"></td>
<td style="text-align:left;"><span id="companyDWater2" style="font-size:20px;color:#a5f1f7;"></span><span style="font-size:14px;color:#ffffff;"> 万m³/D</span></td>
</tr>
<tr>
<td colspan="2" style="text-align:right;font-size: 14px;color: #ffffff;">
昨日水量:
</td>
<td id="companyYWater2" style="text-align:left;font-size:20px;color:#347EFB;">
</td>
</tr>
<tr>
<td colspan="2" style="text-align:right;font-size: 14px;color: #ffffff;">
今日水量:
</td>
<td id="companyTWater2" style="text-align:left;font-size:20px;color:#347EFB;">
</td>
</tr>
</table>
</div>
<div style="width:230px;height:120px;background: rgba(3,5,18,0.25);border-radius: 9px;position:absolute;top:760px;left:50px;">
<table style="width:100%;height:100%;table-layout: fixed;text-align: center;vertical-align: middle;font-family: PingFangSC, PingFangSC-Semibold;">
<tr style="height:38px;">
<td style="width:91px;background:#76afdb;border-radius: 18px 0px 28px 0px;color:rgba(52,241,255,1);font-size:16px;font-weight: 600;letter-spacing:2px;">城西厂</td>
<td style="width:30px;"></td>
<td style="text-align:left;"><span id="companyDWater3" style="font-size:20px;color:#a5f1f7;"></span><span style="font-size:14px;color:#ffffff;"> 万m³/D</span></td>
</tr>
<tr>
<td colspan="2" style="text-align:right;font-size: 14px;color: #ffffff;">
昨日水量:
</td>
<td id="companyYWater3" style="text-align:left;font-size:20px;color:#347EFB;">
</td>
</tr>
<tr>
<td colspan="2" style="text-align:right;font-size: 14px;color: #ffffff;">
今日水量:
</td>
<td id="companyTWater3" style="text-align:left;font-size:20px;color:#347EFB;">
</td>
</tr>
</table>
</div>
<div onclick="doGo('e0368f13e99945dbae7dae16b4c50a76');" style="cursor: pointer;width:230px;height:120px;background: rgba(3,5,18,0.25);border-radius: 9px;position:absolute;top:160px;left:1200px;">
<table style="width:100%;height:100%;table-layout: fixed;text-align: center;vertical-align: middle;font-family: PingFangSC, PingFangSC-Semibold;">
<tr style="height:38px;">
<td style="width:91px;background:#76afdb;border-radius: 18px 0px 28px 0px;color:rgba(52,241,255,1);font-size:16px;font-weight: 600;letter-spacing:2px;">城北厂</td>
<td style="width:30px;"></td>
<td style="text-align:left;"><span id="companyDWater4" style="font-size:20px;color:#a5f1f7;"></span><span style="font-size:14px;color:#ffffff;"> 万m³/D</span></td>
</tr>
<tr>
<td colspan="2" style="text-align:right;font-size: 14px;color: #ffffff;">
昨日水量:
</td>
<td id="companyYWater4" style="text-align:left;font-size:20px;color:#347EFB;">
</td>
</tr>
<tr>
<td colspan="2" style="text-align:right;font-size: 14px;color: #ffffff;">
今日水量:
</td>
<td id="companyTWater4" style="text-align:left;font-size:20px;color:#347EFB;">
</td>
</tr>
</table>
</div>
</div>
</div>
</body>
</html>