出入管理

This commit is contained in:
cwchen 2024-06-19 11:06:24 +08:00
parent a3e353a2c9
commit 07a48be220
1 changed files with 41 additions and 11 deletions

View File

@ -296,10 +296,6 @@ function getStatisticsPer(data) {
document.getElementById("twoscPer").textContent = dycNums[1];
document.getElementById("threescPer").textContent = dycNums[2];
document.getElementById("fourscPer").textContent = dycNums[3];
// var s = "../../img/video/voi_photo4.png";
// var htmls = '<img src ="' + s + '" alt="" style="height:100%;width:100%; margin-top:5%" />';
// $('#photos').empty().append(htmls);
}
/* 人员出入统计-异常告警 */
@ -343,8 +339,42 @@ function getPerStatisticsPhoto(accessType, timeType) {
elem: '#ID-carousel-demo-image',
width: '1000px',
height: '460px',
interval: 5000,
// indicator:'none'
interval: 10000,
change: function (obj) {
let fields = [];
const o = $('#img-carousel .pageCapacity').eq(obj.index);
o.find('img').each(function(index,item){
const src = $(this).attr('src');
const imgId = $(this).attr('imgId');
if(!src || src === 'null'){
fields.push(imgId);
}
})
if(fields.length > 0){
let paramData2 = 'fileIds=' + fields.toString();
let montageParam2 = aqEnnable ? encryptCBC(paramData2) : ' &' + encryptCBC(paramData2);
const url2 = commonUrl + "screen/largeScreen/accessMge/getPhotosById?params=" + montageParam2;
ajaxRequestGet(url2, "GET", true, function () {
}, function (result) {
if (result.code === 200) {
if (result.data && result.data.length > 0) {
$.each(result.data,function(index,item){
o.find('img').each(function(){
const imgId = $(this).attr('imgId');
if(item.fileId === imgId){
$(this).attr('src',item.base64);
}
})
});
}
} else if (result.code === 500) {
layer.msg(result.msg, { icon: 2 });
}
}, function (xhr, status, error) {
errorFn(xhr, status, error)
}, aqEnnable);
}
}
});
} else {
$('#abnormalAlarms').empty().append('<div class="none-data"><p>暂无数据</p></div>');
@ -381,7 +411,7 @@ function getPerStatisticsPhoto(accessType, timeType) {
elem: '#ID-carousel-demo-image2',
width: '380px',
height: '160px',
interval: 5000,
interval: 10000,
// indicator:'none'
});
} else {
@ -398,7 +428,7 @@ function getPerStatisticsPhoto(accessType, timeType) {
let cent = '';
for (var i = num; i >= 1; i--) {
cent += '<div class="capacityItem layout">'
+ '<img src="' + list[index * num - i].base64 + '">'
+ '<img imgId="' + list[index * num - i].val + '" src="' + list[index * num - i].base64 + '">'
+ '<p>' + list[index * num - i].personName + '</p>'
+ '<p>' + list[index * num - i].accesssTime + '</p>'
+ '</div>';
@ -409,7 +439,7 @@ function getPerStatisticsPhoto(accessType, timeType) {
let cent = '';
for (var i = zs * num; i < zs * num + xs; i++) {
cent += '<div class="capacityItem layout">'
+ '<img src="' + list[i].base64 + '">'
+ '<img imgId="' + list[i].val + '" src="' + list[i].base64 + '">'
+ '<p>' + list[i].personName + '</p>'
+ '<p>' + list[i].accesssTime + '</p>'
+ '</div>';
@ -420,7 +450,7 @@ function getPerStatisticsPhoto(accessType, timeType) {
let cent = '';
for (var i = 0; i < index; i++) {
cent += '<div class="capacityItem layout">'
+ '<img src="' + list[i].base64 + '">'
+ '<img imgId="' + list[i].val + '" src="' + list[i].base64 + '">'
+ '<p>' + list[i].personName + '</p>'
+ '<p>' + list[i].accesssTime + '</p>'
+ '</div>';
@ -437,7 +467,7 @@ function getPerStatisticsList(bidCode) {
skin: 'line',
page: true,
limit: 20, // 修改每页显示条数
height: 'full-140',
height: 'full-140',
headers: {
decrypt: "decrypt",
"Authorization": token