|
@@ -87,6 +87,8 @@ $('#nextStep').click(function() {
|
|
|
var startTimes = $('#startTime').val();
|
|
|
var endTimes = $('#endTime').val();
|
|
|
|
|
|
+
|
|
|
+
|
|
|
//获取表单的值 并转换成对象
|
|
|
let allParam = serializeArrayToObj($("#reportOutForm").serializeArray());
|
|
|
|
|
@@ -100,7 +102,6 @@ $('#nextStep').click(function() {
|
|
|
alert(res.msg);
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
//验证通过 请求ajax
|
|
|
ajaxRequest(MONTH_REPORT, "POST", allParam, function(result) {
|
|
|
// layer.close(layerCreateIndex);
|
|
@@ -124,7 +125,6 @@ $('#nextStep').click(function() {
|
|
|
var deviceStatistic = data.deviceStatistic; //告警处理
|
|
|
var deviceOnly = data.deviceOnly; //设备离线情况统计
|
|
|
|
|
|
-
|
|
|
//大标题和时间动态赋值
|
|
|
(function() {
|
|
|
$('#companyName').html(companyInfo.ownerName);
|
|
@@ -135,9 +135,9 @@ $('#nextStep').click(function() {
|
|
|
(function() {
|
|
|
let items = '';
|
|
|
items = ` <tr>
|
|
|
- <td>${companyInfo.ownerName}</td>
|
|
|
- <td>${companyInfo.ownerAddress} </td>
|
|
|
- </tr>`
|
|
|
+ <td>${companyInfo.ownerName}</td>
|
|
|
+ <td>${companyInfo.ownerAddress} </td>
|
|
|
+ </tr>`
|
|
|
$('#companyData').html(items);
|
|
|
$('#staticTime').html()
|
|
|
})();
|
|
@@ -149,18 +149,18 @@ $('#nextStep').click(function() {
|
|
|
let items2 = ''
|
|
|
typeList.forEach(function(item, key) {
|
|
|
items += ` <tr>
|
|
|
- <td>${item.TypeName} </td>
|
|
|
- <td>${item.Num}</td>
|
|
|
- <td>${item.TransmissionModel}</td>
|
|
|
- <td>${item.Business}</td>
|
|
|
- </tr>`
|
|
|
+ <td>${item.TypeName} </td>
|
|
|
+ <td>${item.Num}</td>
|
|
|
+ <td>${item.TransmissionModel}</td>
|
|
|
+ <td>${item.Business}</td>
|
|
|
+ </tr>`
|
|
|
})
|
|
|
items2 = ` <tr>
|
|
|
- <td>统计总数</td>
|
|
|
- <td>${data.typeList.deviceNum} </td>
|
|
|
- <td ></td>
|
|
|
- <td ></td>
|
|
|
- </tr>`
|
|
|
+ <td>统计总数</td>
|
|
|
+ <td>${data.typeList.deviceNum} </td>
|
|
|
+ <td ></td>
|
|
|
+ <td ></td>
|
|
|
+ </tr>`
|
|
|
$('#typeList').html(items + items2);
|
|
|
})();
|
|
|
|
|
@@ -169,13 +169,20 @@ $('#nextStep').click(function() {
|
|
|
var waterAlarm = JSON.parse(deviceStatistic.waterAlarm);
|
|
|
waterAlarm = waterAlarm.RESULT[0];
|
|
|
|
|
|
+ var waterAlarmRate = waterAlarm.count ? (waterAlarm.sum / waterAlarm.count) * 100 : 100;
|
|
|
+ if (waterAlarmRate == 100) {
|
|
|
+ $('.waterSummary').html(` 目前数据反应:统计时段内水系统告警报告数量:<span>${waterAlarm.count}</span>条。报告数量良好。<br> 提示:消防水设备状态良好,需要保持。`)
|
|
|
+ } else {
|
|
|
+ $('.waterSummary').html(` 目前数据反应:统计时段内水系统告警报告数量:<span>${waterAlarm.count}</span>条。报告数量良好。<br> 提示:有一定的火系统隐患或存在系统故障,需要排查。`)
|
|
|
+ }
|
|
|
+
|
|
|
let items = '';
|
|
|
items = ` <tr>
|
|
|
- <td>${waterAlarm.count}</td>
|
|
|
- <td>${waterAlarm.sum} </td>
|
|
|
- <td>${waterAlarm.count- waterAlarm.sum} </td>
|
|
|
- <td>${waterAlarm.count?(waterAlarm.sum/waterAlarm.count)*100:0}% </td>
|
|
|
- </tr>`
|
|
|
+ <td>${waterAlarm.count}</td>
|
|
|
+ <td>${waterAlarm.sum} </td>
|
|
|
+ <td>${waterAlarm.count- waterAlarm.sum} </td>
|
|
|
+ <td>${waterAlarmRate}% </td>
|
|
|
+ </tr>`
|
|
|
$('#water_statistics').html(items);
|
|
|
|
|
|
(function() {
|
|
@@ -303,14 +310,22 @@ $('#nextStep').click(function() {
|
|
|
(function() {
|
|
|
var fireAlarm = JSON.parse(deviceStatistic.fireAlarm);
|
|
|
fireAlarm = fireAlarm.RESULT[0];
|
|
|
+ $('#fireCount').html(fireAlarm.count)
|
|
|
+
|
|
|
+ var fireAlarmRate = fireAlarm.count ? (fireAlarm.sum / fireAlarm.count) * 100 : 100;
|
|
|
+ if (fireAlarmRate == 100) {
|
|
|
+ $('.fireSummary').html(` 目前数据反应:火系统告警报告数量:<span>${fireAlarm.count}</span>条。报告数量良好。<br> 提示:消防火设备状态良好,需要保持 。`)
|
|
|
+ } else {
|
|
|
+ $('.fireSummary').html(` 目前数据反应:火系统告警报告数量:<span>${fireAlarm.count}</span>条。报告数量良好。<br> 提示:提示:有一定的火系统隐患或存在系统故障,需要排查。`)
|
|
|
+ }
|
|
|
|
|
|
let items = '';
|
|
|
items = ` <tr>
|
|
|
- <td>${ fireAlarm.count}</td>
|
|
|
- <td>${ fireAlarm.sum} </td>
|
|
|
- <td>${ fireAlarm.count- fireAlarm.sum} </td>
|
|
|
- <td>${ fireAlarm.count? (fireAlarm.sum/ fireAlarm.count)*100:0}% </td>
|
|
|
- </tr>`
|
|
|
+ <td>${ fireAlarm.count}</td>
|
|
|
+ <td>${ fireAlarm.sum} </td>
|
|
|
+ <td>${ fireAlarm.count- fireAlarm.sum} </td>
|
|
|
+ <td>${ fireAlarmRate}% </td>
|
|
|
+ </tr>`
|
|
|
$('#fire_statistics').html(items);
|
|
|
(function() {
|
|
|
var myChart = echarts.init(document.querySelector("#fireChart1"));
|
|
@@ -439,13 +454,20 @@ $('#nextStep').click(function() {
|
|
|
var waterDeviceOnly = JSON.parse(deviceOnly.waterDeviceOnly);
|
|
|
waterDeviceOnly = waterDeviceOnly.RESULT[0];
|
|
|
|
|
|
+ var waterOnlyRate = waterDeviceOnly.count ? (waterDeviceOnly.sum / waterDeviceOnly.count) * 100 : 100;
|
|
|
+ if (waterOnlyRate == 100) {
|
|
|
+ $('.waterOnlySummary').html(` 目前数据反应:统计时段内水系统告警报告数量:<span>${waterDeviceOnly.count}</span>条。报告数量良好。<br> 提示:数据接收情况稳定,需要保持。`)
|
|
|
+ } else {
|
|
|
+ $('.waterOnlySummary').html(` 目前数据反应:统计时段内水系统告警报告数量:<span>${waterDeviceOnly.count}</span>条。报告数量良好。<br> 提示:有一定的水系统隐患或存在系统故障,需要排查。`)
|
|
|
+ }
|
|
|
+
|
|
|
let items = '';
|
|
|
items = ` <tr>
|
|
|
- <td>${ waterDeviceOnly.count}</td>
|
|
|
- <td>${ waterDeviceOnly.sum} </td>
|
|
|
- <td>${ waterDeviceOnly.count- waterDeviceOnly.sum} </td>
|
|
|
- <td>${ waterDeviceOnly.count? (waterDeviceOnly.sum/ waterDeviceOnly.count)*100:0}% </td>
|
|
|
- </tr>`
|
|
|
+ <td>${ waterDeviceOnly.count}</td>
|
|
|
+ <td>${ waterDeviceOnly.sum} </td>
|
|
|
+ <td>${ waterDeviceOnly.count- waterDeviceOnly.sum} </td>
|
|
|
+ <td>${ waterOnlyRate}% </td>
|
|
|
+ </tr>`
|
|
|
$('#waterDeviceOnly').html(items);
|
|
|
(function() {
|
|
|
var myChart = echarts.init(document.querySelector("#waterOnlyChart"));
|
|
@@ -573,14 +595,22 @@ $('#nextStep').click(function() {
|
|
|
|
|
|
var fireOnly = JSON.parse(deviceOnly.fireOnly);
|
|
|
fireOnly = fireOnly.RESULT[0];
|
|
|
+ $('#fireOnlyCount').html(fireOnly.count);
|
|
|
+
|
|
|
+ var fireOnlyRate = fireOnly.count ? (fireOnly.sum / fireOnly.count) * 100 : 100;
|
|
|
+ if (fireOnlyRate == 100) {
|
|
|
+ $('.fireOnlySummary').html(` 目前数据反应:统计时段内火系统告警报告数量:<span>${fireOnlyRate}</span>条。报告数量良好。<br> 提示:数据接收情况稳定,需要保持。`)
|
|
|
+ } else {
|
|
|
+ $('.fireOnlySummary').html(` 目前数据反应:统计时段内火系统告警报告数量:<span>${fireOnlyRate}</span>条。报告数量良好。<br> 提示:有一定的火系统隐患或存在系统故障,需要排查。`)
|
|
|
+ }
|
|
|
|
|
|
let items = '';
|
|
|
items = ` <tr>
|
|
|
- <td>${ fireOnly.count}</td>
|
|
|
- <td>${ fireOnly.sum} </td>
|
|
|
- <td>${ fireOnly.count- fireOnly.sum} </td>
|
|
|
- <td>${ fireOnly.count? (fireOnly.sum/ fireOnly.count)*100:0}% </td>
|
|
|
- </tr>`
|
|
|
+ <td>${ fireOnly.count}</td>
|
|
|
+ <td>${ fireOnly.sum} </td>
|
|
|
+ <td>${ fireOnly.count- fireOnly.sum} </td>
|
|
|
+ <td>${fireOnlyRate}% </td>
|
|
|
+ </tr>`
|
|
|
$('#fireOnly').html(items);
|
|
|
(function() {
|
|
|
var myChart = echarts.init(document.querySelector("#fireOnlyChart"));
|
|
@@ -707,14 +737,23 @@ $('#nextStep').click(function() {
|
|
|
(function() {
|
|
|
var smokeOnly = JSON.parse(deviceOnly.smokeOnly);
|
|
|
smokeOnly = smokeOnly.RESULT[0];
|
|
|
+ $('#somkeOnlyCount').html(smokeOnly.count);
|
|
|
+
|
|
|
+ var smokeOnlyRate = smokeOnly.count ? (smokeOnly.sum / smokeOnly.count) * 100 : 100;
|
|
|
+ if (smokeOnlyRate == 100) {
|
|
|
+ $('.smokeOnlySummary').html(` 目前数据反应:统计时段内烟感告警报告数量:<span>${smokeOnly.count}</span>条。报告数量良好。<br> 提示:数据接收情况稳定,需要保持。`)
|
|
|
+ } else {
|
|
|
+ $('.smokeOnlySummary').html(` 目前数据反应:统计时段内烟感告警报告数量:<span>${smokeOnly.count}</span>条。报告数量良好。<br> 提示:有一定的烟感隐患或存在系统故障,需要排查。`)
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
let items = '';
|
|
|
items = ` <tr>
|
|
|
- <td>${ smokeOnly.count}</td>
|
|
|
- <td>${ smokeOnly.sum} </td>
|
|
|
- <td>${ smokeOnly.count- smokeOnly.sum} </td>
|
|
|
- <td>${ smokeOnly.count? (smokeOnly.sum/ smokeOnly.count)*100:0}% </td>
|
|
|
- </tr>`
|
|
|
+ <td>${ smokeOnly.count}</td>
|
|
|
+ <td>${ smokeOnly.sum} </td>
|
|
|
+ <td>${ smokeOnly.count- smokeOnly.sum} </td>
|
|
|
+ <td>${ smokeOnlyRate}% </td>
|
|
|
+ </tr>`
|
|
|
$('#smokeOnly').html(items);
|
|
|
(function() {
|
|
|
var myChart = echarts.init(document.querySelector("#smokeOnlyChart"));
|
|
@@ -847,6 +886,8 @@ $('#nextStep').click(function() {
|
|
|
}, function(errorMsg) {
|
|
|
alert("异常错误!");
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
|
|
|
|
|
@@ -854,6 +895,9 @@ $('#nextStep').click(function() {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// 打印
|
|
|
(function() {
|
|
|
$("#btnPrint").click(function() {
|
|
@@ -863,7 +907,7 @@ $('#nextStep').click(function() {
|
|
|
|
|
|
//打印前echarts图表转换成图片 start
|
|
|
$('#waterChart1_img,#fireChart1_img,#waterOnlyChart_img,#fireOnlyChart_img,#smokeOnlyChart_img').show()
|
|
|
- $('waterChart1,#fireChart1,#waterOnlyChart,#fireOnlyChart,#smokeOnlyChart').hide()
|
|
|
+ $('#waterChart1,#fireChart1,#waterOnlyChart,#fireOnlyChart,#smokeOnlyChart').hide()
|
|
|
|
|
|
// end
|
|
|
|