282 lines
14 KiB
Plaintext
282 lines
14 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" %>
|
||
|
|
|
||
|
|
<!DOCTYPE html>
|
||
|
|
<!-- <html lang="zh-CN"> -->
|
||
|
|
<!-- BEGIN HEAD -->
|
||
|
|
<head>
|
||
|
|
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||
|
|
</title>
|
||
|
|
<!-- 引入daterangepicker-->
|
||
|
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||
|
|
|
||
|
|
<style type="text/css">
|
||
|
|
</style>
|
||
|
|
|
||
|
|
<script type="text/javascript">
|
||
|
|
|
||
|
|
$(function () {
|
||
|
|
var bodyWidth = $(window).width();
|
||
|
|
var bodyHeight = $(window).height();
|
||
|
|
|
||
|
|
$('#mian').css('width', bodyWidth);
|
||
|
|
$('#mian').css('height', bodyHeight);
|
||
|
|
|
||
|
|
$.ajax({
|
||
|
|
url: ext.contextPath + '/bim/page/getRouteEqData.do',
|
||
|
|
type: "POST",
|
||
|
|
data: {
|
||
|
|
code: '${param.code}',
|
||
|
|
unitId: '${param.unitId}'
|
||
|
|
},
|
||
|
|
dataType: 'json',
|
||
|
|
success: function (data) {
|
||
|
|
// console.log(data)
|
||
|
|
let totalEqNum = 0;
|
||
|
|
let totalPointNum = 0;
|
||
|
|
let completePointNum = 0;
|
||
|
|
let abnormalPointNum = 0;
|
||
|
|
let abnormalEqNum = 0;
|
||
|
|
let normalEqNum = 0;
|
||
|
|
let eqRateNum = 100;
|
||
|
|
if (data.length > 0) {
|
||
|
|
totalEqNum = data[0].eqNum;
|
||
|
|
totalPointNum = data[0].pointNum;
|
||
|
|
completePointNum = data[0].pointNum;
|
||
|
|
abnormalPointNum = data[0].abnormalPointNum;
|
||
|
|
abnormalEqNum = data[0].abnormalEqNum;
|
||
|
|
normalEqNum = data[0].normalEqNum;
|
||
|
|
if (Number(totalEqNum) > 0) {
|
||
|
|
eqRateNum = (Number(normalEqNum) / Number(totalEqNum) * 100).toFixed(0);
|
||
|
|
}
|
||
|
|
|
||
|
|
$('#totalEqNum').text(totalEqNum);
|
||
|
|
$('#totalPointNum').text(totalPointNum);
|
||
|
|
$('#completePointNum').text(completePointNum);
|
||
|
|
$('#abnormalPointNum').text(abnormalPointNum);
|
||
|
|
if (Number(abnormalPointNum) > 0) {
|
||
|
|
$('#abnormalPointNum').css("color", "#F7FF00");
|
||
|
|
}
|
||
|
|
$('#abnormalEqNum').text(abnormalEqNum);
|
||
|
|
if (Number(abnormalEqNum) > 0) {
|
||
|
|
$('#abnormalEqNum').css("color", "#F7FF00");
|
||
|
|
}
|
||
|
|
$('#normalEqNum').text(normalEqNum);
|
||
|
|
$('#eqRateNum').text(eqRateNum + "%");
|
||
|
|
if (Number(eqRateNum) < 100) {
|
||
|
|
$('#eqRateNum').css("color", "#F7FF00");
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
$.ajax({
|
||
|
|
url: ext.contextPath + '/bim/page/getRouteData.do',
|
||
|
|
type: "POST",
|
||
|
|
data: {
|
||
|
|
code: '${param.code}',
|
||
|
|
unitId: '${param.unitId}',
|
||
|
|
type: 'alarm'
|
||
|
|
},
|
||
|
|
dataType: 'json',
|
||
|
|
success: function (data) {
|
||
|
|
// console.log(data)
|
||
|
|
var html = "<table style='width: 100%;color: #0AB1DF;font-size: 52px;table-layout:fixed;text-align: center;able-layout: fixed;overflow: auto;'>";
|
||
|
|
if (data.length > 0) {
|
||
|
|
html += "<tbody style='width: 100%;'>";
|
||
|
|
html += "<tr style='width: 100%;color: #C9C9C9;font-weight: 700;height: 60px;border-bottom: 2px solid #f4f4f4;'>";
|
||
|
|
html += "<td style='width: 20%;'>设备名称</td>";
|
||
|
|
html += "<td style='width: 80%;'>报警信息</td>";
|
||
|
|
html += "</tr>";
|
||
|
|
html += "</tbody>";
|
||
|
|
for (let i = 0; i < data.length; i++) {
|
||
|
|
let content = data[i];
|
||
|
|
html += "<tr style='width: 100%;color: #C9C9C9;height: 60px;border-bottom: 1px solid #f4f4f4;'>";
|
||
|
|
html += "<td style='white-space: nowrap;overflow: hidden;text-overflow: ellipsis;'>" + content.eqname + "</td>";
|
||
|
|
html += "<td style='white-space: nowrap;overflow: hidden;text-overflow: ellipsis;'>" + content.alarmcontent + "</td>";
|
||
|
|
html += "</tr>";
|
||
|
|
}
|
||
|
|
} else {
|
||
|
|
html += "<tbody>";
|
||
|
|
html += "<tr style='width: 100%;color: #C9C9C9;font-weight: 700;'>";
|
||
|
|
html += "<td style='text-align: left;padding-left: 30px;padding-top: 30px;'>无报警信息!</td>";
|
||
|
|
html += "</tr>";
|
||
|
|
html += "</tbody>";
|
||
|
|
}
|
||
|
|
html += "</table>";
|
||
|
|
$('#alarmTab').append(html);
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
$.ajax({
|
||
|
|
url: ext.contextPath + '/bim/page/getRouteData.do',
|
||
|
|
type: "POST",
|
||
|
|
data: {
|
||
|
|
code: '${param.code}',
|
||
|
|
unitId: '${param.unitId}',
|
||
|
|
type: 'point'
|
||
|
|
},
|
||
|
|
dataType: 'json',
|
||
|
|
success: function (data) {
|
||
|
|
// console.log(data)
|
||
|
|
var html = "<table style='width: 100%;color: #0AB1DF;font-size: 52px;table-layout:fixed;text-align: center;overflow: auto;'>";
|
||
|
|
if (data.length > 0) {
|
||
|
|
html += "<tbody style='width: 100%;'>";
|
||
|
|
html += "<tr style='width: 100%;color: #C9C9C9;font-weight: 700;height: 60px;border-bottom: 2px solid #f4f4f4;'>";
|
||
|
|
html += "<td style='width: 25%;'>设备名称</td>";
|
||
|
|
html += "<td style='width: 30%;'>点位名称</td>";
|
||
|
|
html += "<td style='width: 25%;'>点位编号</td>";
|
||
|
|
html += "<td style='width: 20%;'>当前值</td>";
|
||
|
|
html += "</tr>";
|
||
|
|
html += "</tbody>";
|
||
|
|
for (let i = 0; i < data.length; i++) {
|
||
|
|
let content = data[i];
|
||
|
|
html += "<tr style='width: 100%;color: #C9C9C9;height: 60px;border-bottom: 1px solid #f4f4f4;'>";
|
||
|
|
html += "<td style='white-space: nowrap;overflow: hidden;text-overflow: ellipsis;'>" + content.eqname + "</td>";
|
||
|
|
html += "<td style='white-space: nowrap;overflow: hidden;text-overflow: ellipsis;'>" + content.mpname + "</td>";
|
||
|
|
html += "<td style='white-space: nowrap;overflow: hidden;text-overflow: ellipsis;'>" + content.mpid + "</td>";
|
||
|
|
html += "<td style='white-space: nowrap;overflow: hidden;text-overflow: ellipsis;'>" + content.alarmvalue + "</td>";
|
||
|
|
html += "</tr>";
|
||
|
|
}
|
||
|
|
} else {
|
||
|
|
html += "<tbody>";
|
||
|
|
html += "<tr style='width: 100%;color: #C9C9C9;font-weight: 700;'>";
|
||
|
|
html += "<td style='text-align: left;padding-left: 30px;padding-top: 30px;'>无点位信息!</td>";
|
||
|
|
html += "</tr>";
|
||
|
|
html += "</tbody>";
|
||
|
|
}
|
||
|
|
html += "</table>";
|
||
|
|
$('#pointTab').append(html);
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
function changeTab(st) {
|
||
|
|
if (st == '0') {
|
||
|
|
$('#pointTab').css("display", "none");
|
||
|
|
$('#alarmTab').css("display", "block");
|
||
|
|
$('#click2').css("background", "transparent");
|
||
|
|
$('#click2').css("border", "0px solid #00cbff");
|
||
|
|
$('#click1').css("background", "#066baf");
|
||
|
|
$('#click1').css("border", "1px solid #00cbff");
|
||
|
|
} else if (st == '1') {
|
||
|
|
$('#alarmTab').css("display", "none");
|
||
|
|
$('#pointTab').css("display", "block");
|
||
|
|
$('#click1').css("background", "transparent");
|
||
|
|
$('#click1').css("border", "0px solid #00cbff");
|
||
|
|
$('#click2').css("background", "#066baf");
|
||
|
|
$('#click2').css("border", "1px solid #00cbff");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
// function getRootPath() {
|
||
|
|
// var pathName = window.location.pathname.substring(1);
|
||
|
|
// // var webName = pathName == '' ? '' : pathName.substring(0, pathName.indexOf('/'));
|
||
|
|
// return window.location.protocol + '//' + window.location.host;
|
||
|
|
// }
|
||
|
|
</script>
|
||
|
|
</head>
|
||
|
|
<body style="background-color: transparent;">
|
||
|
|
<div id="mian"
|
||
|
|
style="float: left;background-color: rgba(9,48,112,0.7);background-size: 100% 100%;border-radius: 8px;padding: 30px;">
|
||
|
|
<div style="float: left;width:280px;height: 80px;text-align: left;line-height: 80px;color: #D3F9FF;font-size: 70px;font-family: Microsoft YaHei UI, Microsoft YaHei UI-Regular;border-bottom: 8px solid #d3f9ff;">
|
||
|
|
巡检报告
|
||
|
|
</div>
|
||
|
|
<div style="float: left;width: calc(100% - 280px);height: 80px;border-bottom: 1px solid #d3f9ff;">
|
||
|
|
</div>
|
||
|
|
<div style="float: left;width: 100%;height: 160px;">
|
||
|
|
<div style="float: left;width: 100%;height: 80px;padding: 10px 15px;">
|
||
|
|
<div style="float: left;width: 23%;height: 60px;color: #FFFFFF;font-size: 50px;line-height: 60px;text-align: left;padding-left:20px;">
|
||
|
|
<div style="float: left;width: 60%;height: 60px;">
|
||
|
|
设备总数:
|
||
|
|
</div>
|
||
|
|
<div id="totalEqNum"
|
||
|
|
style="float: left;width: 40%;height: 60px;"></div>
|
||
|
|
</div>
|
||
|
|
<div style="float: left;width: 2%;height: 60px;"></div>
|
||
|
|
<div style="float: left;width: 23%;height: 60px;color: #FFFFFF;font-size: 50px;line-height: 60px;text-align: left;padding-left:20px;">
|
||
|
|
<div style="float: left;width: 60%;height: 60px;">
|
||
|
|
巡检点位数:
|
||
|
|
</div>
|
||
|
|
<div id="totalPointNum"
|
||
|
|
style="float: left;width: 40%;height: 60px;"></div>
|
||
|
|
</div>
|
||
|
|
<div style="float: left;width: 2%;height: 60px;"></div>
|
||
|
|
<div style="float: left;width: 23%;height: 60px;color: #FFFFFF;font-size: 50px;line-height: 60px;text-align: left;padding-left:20px;">
|
||
|
|
<div style="float: left;width: 60%;height: 60px;">
|
||
|
|
巡检完成数:
|
||
|
|
</div>
|
||
|
|
<div id="completePointNum"
|
||
|
|
style="float: left;width: 40%;height: 60px;"></div>
|
||
|
|
</div>
|
||
|
|
<div style="float: left;width: 2%;height: 60px;"></div>
|
||
|
|
<div style="float: left;width: 23%;height: 60px;color: #FFFFFF;font-size: 50px;line-height: 60px;text-align: left;padding-left:20px;">
|
||
|
|
<div
|
||
|
|
style="float: left;width: 60%;height: 60px;color: #FFFFFF;font-size: 50px;line-height: 60px;text-align: left;">
|
||
|
|
巡检完成率:
|
||
|
|
</div>
|
||
|
|
<div style="float: left;width: 40%;height: 60px;color: #FFFFFF;font-size: 50px;line-height: 60px;text-align: left;">
|
||
|
|
100%
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div style="float: left;width: 2%;height: 60px;"></div>
|
||
|
|
</div>
|
||
|
|
<div style="float: left;width: 100%;height: 80px;padding: 10px 15px;">
|
||
|
|
<div id="click1"
|
||
|
|
style="float: left;width: 23%;height: 60px;color: #FFFFFF;font-size: 50px;line-height: 60px;text-align: left;cursor: pointer;padding-left:20px;background: #066baf;border: 1px solid #00cbff;border-radius: 6px;"
|
||
|
|
onclick="changeTab('0');">
|
||
|
|
<div
|
||
|
|
style="float: left;width: 60%;height: 60px;text-align: left;">
|
||
|
|
异常点位数:
|
||
|
|
</div>
|
||
|
|
<div id="abnormalPointNum"
|
||
|
|
style="float: left;width: 40%;height: 60px;text-align: left;"></div>
|
||
|
|
</div>
|
||
|
|
<div style="float: left;width: 2%;height: 60px;"></div>
|
||
|
|
<div style="float: left;width: 23%;height: 60px;color: #FFFFFF;font-size: 50px;line-height: 60px;text-align: left;padding-left:20px;">
|
||
|
|
<div style="float: left;width: 60%;height: 60px;">
|
||
|
|
涉及设备:
|
||
|
|
</div>
|
||
|
|
<div id="abnormalEqNum"
|
||
|
|
style="float: left;width: 40%;height: 60px;"></div>
|
||
|
|
</div>
|
||
|
|
<div style="float: left;width: 2%;height: 60px;"></div>
|
||
|
|
<div id="click2"
|
||
|
|
style="float: left;width: 23%;height: 60px;color: #FFFFFF;font-size: 50px;line-height: 60px;text-align: left;cursor: pointer;padding-left:20px;border-radius: 6px;"
|
||
|
|
onclick="changeTab('1');">
|
||
|
|
<div style="float: left;width: 60%;height: 60px;color: #FFFFFF;font-size: 50px;line-height: 60px;text-align: left;">
|
||
|
|
正常设备:
|
||
|
|
</div>
|
||
|
|
<div id="normalEqNum"
|
||
|
|
style="float: left;width: 40%;height: 60px;color: #FFFFFF;font-size: 50px;line-height: 60px;text-align: left;"></div>
|
||
|
|
</div>
|
||
|
|
<div style="float: left;width: 2%;height: 60px;"></div>
|
||
|
|
<div style="float: left;width: 23%;height: 60px;color: #FFFFFF;font-size: 50px;line-height: 60px;text-align: left;padding-left:20px;">
|
||
|
|
<div
|
||
|
|
style="float: left;width: 60%;height: 60px;color: #FFFFFF;font-size: 50px;line-height: 60px;text-align: left;">
|
||
|
|
设备完好率:
|
||
|
|
</div>
|
||
|
|
<div id="eqRateNum"
|
||
|
|
style="float: left;width: 40%;height: 60px;color: #FFFFFF;font-size: 50px;line-height: 60px;text-align: left;"></div>
|
||
|
|
</div>
|
||
|
|
<div style="float: left;width: 2%;height: 60px;"></div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
<div id="alarmTab"
|
||
|
|
style="float: left;width: 100%;height: calc(100% - 240px);overflow: auto;background: rgba(0,0,0,0.7);display: block;">
|
||
|
|
</div>
|
||
|
|
<div id="pointTab"
|
||
|
|
style="float: left;width: 100%;height: calc(100% - 240px);overflow: auto;background: rgba(0,0,0,0.7);display: none;">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
</html>
|