出入管理
This commit is contained in:
parent
cd6a0b587b
commit
0d7dbce2d3
|
|
@ -103,7 +103,7 @@ function getStatistics(data){
|
||||||
document.getElementById("threesc").textContent=dycNums[2];
|
document.getElementById("threesc").textContent=dycNums[2];
|
||||||
document.getElementById("foursc").textContent=dycNums[3];
|
document.getElementById("foursc").textContent=dycNums[3];
|
||||||
|
|
||||||
var s = "https://unpkg.com/outeres/demo/carousel/720x360-1.jpg";
|
var s = "../../img/video/voi_photo4.png";
|
||||||
var htmls = '<img src ="'+s+'" alt="" style="height:100%;width:100%; margin-top:5%" />';
|
var htmls = '<img src ="'+s+'" alt="" style="height:100%;width:100%; margin-top:5%" />';
|
||||||
$('#photo').empty().append(htmls);
|
$('#photo').empty().append(htmls);
|
||||||
|
|
||||||
|
|
@ -127,7 +127,27 @@ function getVehicleStatisticsPhoto(accessType,timeType){
|
||||||
html +='</div>';
|
html +='</div>';
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
html += '<div style="color:red;">未找到关联信息</div>'
|
// html += '<div style="color:#71757B;">无数据</div>'
|
||||||
|
|
||||||
|
html +='<div class="abnormalAlarmImg">';
|
||||||
|
html +='<img src ="../../img/video/voi_photo.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||||
|
html +='<span>告警1</span>';
|
||||||
|
html +='</div>';
|
||||||
|
|
||||||
|
html +='<div class="abnormalAlarmImg">';
|
||||||
|
html +='<img src ="../../img/video/voi_photo2.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||||
|
html +='<span>告警2</span>';
|
||||||
|
html +='</div>';
|
||||||
|
|
||||||
|
html +='<div class="abnormalAlarmImg">';
|
||||||
|
html +='<img src ="../../img/video/voi_photo3.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||||
|
html +='<span>告警3</span>';
|
||||||
|
html +='</div>';
|
||||||
|
|
||||||
|
html +='<div class="abnormalAlarmImg">';
|
||||||
|
html +='<img src ="../../img/video/voi_photo4.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||||
|
html +='<span>告警4</span>';
|
||||||
|
html +='</div>';
|
||||||
}
|
}
|
||||||
} else if (result.code === 500) {
|
} else if (result.code === 500) {
|
||||||
layer.msg(result.msg, { icon: 2 });
|
layer.msg(result.msg, { icon: 2 });
|
||||||
|
|
@ -235,7 +255,7 @@ function getStatisticsPer(data){
|
||||||
document.getElementById("threescPer").textContent=dycNums[2];
|
document.getElementById("threescPer").textContent=dycNums[2];
|
||||||
document.getElementById("fourscPer").textContent=dycNums[3];
|
document.getElementById("fourscPer").textContent=dycNums[3];
|
||||||
|
|
||||||
var s = "https://unpkg.com/outeres/demo/carousel/720x360-1.jpg";
|
var s = "../../img/video/voi_photo4.png";
|
||||||
var htmls = '<img src ="'+s+'" alt="" style="height:100%;width:100%; margin-top:5%" />';
|
var htmls = '<img src ="'+s+'" alt="" style="height:100%;width:100%; margin-top:5%" />';
|
||||||
$('#photos').empty().append(htmls);
|
$('#photos').empty().append(htmls);
|
||||||
}
|
}
|
||||||
|
|
@ -253,12 +273,31 @@ function getPerStatisticsPhoto(accessType,timeType){
|
||||||
var a = "sss";
|
var a = "sss";
|
||||||
$.each(result.data, function (index, item) {
|
$.each(result.data, function (index, item) {
|
||||||
html +='<div class="abnormalAlarmImg">';
|
html +='<div class="abnormalAlarmImg">';
|
||||||
html +='<img src ="'+s+'" alt="" style="height:100%;width:100%; margin-top:5%" />';
|
html +='<img src ="'+s+'" alt="" style="height:95%;width:100%; margin-top:5%" />';
|
||||||
html +='<span>'+ a +'</span>';
|
html +='<span>'+ a +'</span>';
|
||||||
html +='</div>';
|
html +='</div>';
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
html += '<div style="color:red;">未找到关联信息</div>'
|
// html += '<div style="color:#71757B;">无数据</div>'
|
||||||
|
html +='<div class="abnormalAlarmImg">';
|
||||||
|
html +='<img src ="../../img/video/voi_photo.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||||
|
html +='<span>告警1</span>';
|
||||||
|
html +='</div>';
|
||||||
|
|
||||||
|
html +='<div class="abnormalAlarmImg">';
|
||||||
|
html +='<img src ="../../img/video/voi_photo2.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||||
|
html +='<span>告警2</span>';
|
||||||
|
html +='</div>';
|
||||||
|
|
||||||
|
html +='<div class="abnormalAlarmImg">';
|
||||||
|
html +='<img src ="../../img/video/voi_photo3.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||||
|
html +='<span>告警3</span>';
|
||||||
|
html +='</div>';
|
||||||
|
|
||||||
|
html +='<div class="abnormalAlarmImg">';
|
||||||
|
html +='<img src ="../../img/video/voi_photo4.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||||
|
html +='<span>告警4</span>';
|
||||||
|
html +='</div>';
|
||||||
}
|
}
|
||||||
} else if (result.code === 500) {
|
} else if (result.code === 500) {
|
||||||
layer.msg(result.msg, { icon: 2 });
|
layer.msg(result.msg, { icon: 2 });
|
||||||
|
|
|
||||||
|
|
@ -20,14 +20,14 @@ function getGtLists(){
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
if (result.code === 200) {
|
if (result.code === 200) {
|
||||||
let html = '';
|
let html = '';
|
||||||
if (result.data && result.data.length > 0) {
|
if (result.data && result.data.length > 0 && result.data[0] !== null) {
|
||||||
$.each(result.data, function (index, item) {
|
$.each(result.data, function (index, item) {
|
||||||
html += '<option value="' + item.gtId + '">' + item.name + '</option>'
|
html += '<option value="' + item.gtId + '">' + item.name + '</option>'
|
||||||
})
|
})
|
||||||
// 设备列表
|
// 设备列表
|
||||||
getDeviceList(result.data[0].gtId);
|
getDeviceList(result.data[0].gtId);
|
||||||
}else{
|
}else{
|
||||||
html += '<option value="">未找到关联信息</option>'
|
html += '<option value="">无数据</option>'
|
||||||
getDeviceList("");
|
getDeviceList("");
|
||||||
}
|
}
|
||||||
$('#gt').empty().append(html);
|
$('#gt').empty().append(html);
|
||||||
|
|
@ -38,32 +38,6 @@ function getGtLists(){
|
||||||
}, function (xhr) {
|
}, function (xhr) {
|
||||||
layer.msg(xhr, { icon: 2 });
|
layer.msg(xhr, { icon: 2 });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId;
|
|
||||||
// let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
|
|
||||||
// const url = commonUrl + "system/sys/select/getGtLists?params="+ montageParam; // 杆塔url
|
|
||||||
// ajaxRequestGet(url, "GET", true, function () {
|
|
||||||
// }, function (result) {
|
|
||||||
// if (result.code === 200) {
|
|
||||||
// let html = '';
|
|
||||||
// if (result.data && result.data.length > 0) {
|
|
||||||
// $.each(result.data, function (index, item) {
|
|
||||||
// html += '<option value="' + item.gtId + '">' + item.name + '</option>'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// $('#gt').empty().append(html);
|
|
||||||
// layui.form.render();
|
|
||||||
// // 设备列表
|
|
||||||
// getDeviceList(result.data[0].gtId);
|
|
||||||
// // updateSelection();
|
|
||||||
// } else if (result.code === 500) {
|
|
||||||
// layer.msg(result.msg, { icon: 2 });
|
|
||||||
// }
|
|
||||||
// }, function (xhr, status, error) {
|
|
||||||
// error(xhr, status, error)
|
|
||||||
// setData(null);
|
|
||||||
// }, aqEnnable);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDeviceList(gtId){
|
function getDeviceList(gtId){
|
||||||
|
|
@ -74,7 +48,7 @@ function getDeviceList(gtId){
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
let html = '';
|
let html = '';
|
||||||
if (result.code === 200) {
|
if (result.code === 200) {
|
||||||
if (result.data && result.data.length > 1) {
|
if (result.data && result.data.length > 0 && result.data[0] !== null) {
|
||||||
$.each(result.data, function (index, item) {
|
$.each(result.data, function (index, item) {
|
||||||
html += '<div class="device-list-device" style="cursor: pointer;" onclick="getInfo(\'' +item.deviceId+ '\')" >';
|
html += '<div class="device-list-device" style="cursor: pointer;" onclick="getInfo(\'' +item.deviceId+ '\')" >';
|
||||||
html +='<input value = "'+item.deviceId +'" style="display:none;" />';
|
html +='<input value = "'+item.deviceId +'" style="display:none;" />';
|
||||||
|
|
@ -90,7 +64,7 @@ function getDeviceList(gtId){
|
||||||
})
|
})
|
||||||
getInfo(result.data[0].deviceId)
|
getInfo(result.data[0].deviceId)
|
||||||
}else{
|
}else{
|
||||||
html += '<div style="color:red;">未找到关联设备</div>'
|
html += '<div style="color:#71757B;">无数据</div>'
|
||||||
getInfo("")
|
getInfo("")
|
||||||
}
|
}
|
||||||
} else if (result.code === 500) {
|
} else if (result.code === 500) {
|
||||||
|
|
@ -107,9 +81,6 @@ function getInfo(deviceId){
|
||||||
//实时检测
|
//实时检测
|
||||||
getRealTimeDetection(deviceId);
|
getRealTimeDetection(deviceId);
|
||||||
|
|
||||||
//当日检测变化趋势
|
|
||||||
getTrend(deviceId)
|
|
||||||
|
|
||||||
//实时告警
|
//实时告警
|
||||||
getRealTimeAlarmList(deviceId)
|
getRealTimeAlarmList(deviceId)
|
||||||
|
|
||||||
|
|
@ -125,33 +96,21 @@ function getRealTimeDetection(deviceId){
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
let html = '';
|
let html = '';
|
||||||
if (result.code === 200) {
|
if (result.code === 200) {
|
||||||
if (result.data && result.data.length > 1) {
|
if (result.data && result.data.length > 0 && result.data[0] !== null) {
|
||||||
$.each(result.data, function (index, item) {
|
$.each(result.data, function (index, item) {
|
||||||
if(item.dataType=="1"){
|
let modeName = nullToEmpty(item.modeName);
|
||||||
html +='<div class="detection-style detection-incline">';
|
let val = nullToEmpty(item.val);
|
||||||
|
html +='<div style="cursor: pointer;" class="detection-style detection-incline" onclick="getTrend(\'' +deviceId+ '\', \'' +item.id+ '\')">' ;
|
||||||
html +='<div class="detection-style-font">';
|
html +='<div class="detection-style-font">';
|
||||||
html +='<div class="detection-style-font-top">倾斜检测</div>';
|
html +='<div class="detection-style-font-top">'+ modeName +'</div>';
|
||||||
html +='<div class="detection-style-font-bot">倾角'+item.val +'</div>';
|
html +='<div class="detection-style-font-bot">'+ val +'</div>';
|
||||||
html +='</div>';
|
html +='</div>';
|
||||||
html +='</div>';
|
html +='</div>';
|
||||||
}else if(item.dataType=="2"){
|
|
||||||
html +='<div class="detection-style detection-tension">';
|
|
||||||
html +='<div class="detection-style-font">';
|
|
||||||
html +='<div class="detection-style-font-top">张力检测</div>';
|
|
||||||
html +='<div class="detection-style-font-bot">张力'+item.val +'</div>';
|
|
||||||
html +='</div>';
|
|
||||||
html +='</div>';
|
|
||||||
}else if(item.dataType=="3"){
|
|
||||||
html +='<div class="detection-style detection-crash">';
|
|
||||||
html +='<div class="detection-style-font">';
|
|
||||||
html +='<div class="detection-style-font-top">碰撞检测</div>';
|
|
||||||
html +='<div class="detection-style-font-bot">碰撞'+item.val +'</div>';
|
|
||||||
html +='</div>';
|
|
||||||
html +='</div>';
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
//当日检测变化趋势
|
||||||
|
getTrend(deviceId,result.data[0].id)
|
||||||
}else{
|
}else{
|
||||||
html += '<div style="color:red;">未找到关联设备</div>'
|
html += '<div style="color:#71757B;">无数据</div>'
|
||||||
}
|
}
|
||||||
} else if (result.code === 500) {
|
} else if (result.code === 500) {
|
||||||
layer.msg(result.msg, { icon: 2 });
|
layer.msg(result.msg, { icon: 2 });
|
||||||
|
|
@ -163,15 +122,22 @@ function getRealTimeDetection(deviceId){
|
||||||
}, aqEnnable);
|
}, aqEnnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTrend(deviceId){
|
function nullToEmpty(name){
|
||||||
let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&deviceId=' + deviceId;
|
if (name === null || name === undefined) {
|
||||||
|
name = "";
|
||||||
|
}
|
||||||
|
return name
|
||||||
|
}
|
||||||
|
|
||||||
|
function getTrend(deviceId,id){
|
||||||
|
let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&deviceId=' + deviceId + '&id=' + id;
|
||||||
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
|
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
|
||||||
const url = commonUrl + "screen/largeScreen/towerAssInspect/getTrend?params="+montageParam; // url
|
const url = commonUrl + "screen/largeScreen/towerAssInspect/getTrend?params="+montageParam; // url
|
||||||
ajaxRequestGet(url, "GET", true, function () {
|
ajaxRequestGet(url, "GET", true, function () {
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
let html = '';
|
let html = '';
|
||||||
if (result.code === 200) {
|
if (result.code === 200) {
|
||||||
if (result.data && result.data.length > 1) {
|
if (result.data && result.data.length > 0 && result.data[0] !== null) {
|
||||||
let xLabel =[];
|
let xLabel =[];
|
||||||
let dataValue = [];
|
let dataValue = [];
|
||||||
$.each(result.data, function (index, item) {
|
$.each(result.data, function (index, item) {
|
||||||
|
|
@ -180,12 +146,12 @@ function getTrend(deviceId){
|
||||||
});
|
});
|
||||||
initEchartsOne(xLabel,dataValue);
|
initEchartsOne(xLabel,dataValue);
|
||||||
}else{
|
}else{
|
||||||
html += '<div style="color:red;">未找到关联设备</div>'
|
initEchartsOne([],[]);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (result.code === 500) {
|
} else if (result.code === 500) {
|
||||||
layer.msg(result.msg, { icon: 2 });
|
layer.msg(result.msg, { icon: 2 });
|
||||||
}
|
}
|
||||||
$('#tendency').empty().append(html);
|
|
||||||
}, function (xhr, status, error) {
|
}, function (xhr, status, error) {
|
||||||
error(xhr, status, error)
|
error(xhr, status, error)
|
||||||
setData(null);
|
setData(null);
|
||||||
|
|
|
||||||
|
|
@ -76,8 +76,8 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 变化趋势 -->
|
<!-- 变化趋势 -->
|
||||||
<div class="top-box-right">
|
<div class="top-box-right">
|
||||||
<div class="img-style tendency" id="tendency">
|
<div class="img-style tendency" >
|
||||||
|
<div id="tendency" style="height: 100%;width: 100%;"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue