From 07a48be220a5b386f25f5ab3b874ddcec015100f Mon Sep 17 00:00:00 2001
From: cwchen <1048842385@qq.com>
Date: Wed, 19 Jun 2024 11:06:24 +0800
Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=85=A5=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
js/pages/accessMge/accessMge.js | 52 ++++++++++++++++++++++++++-------
1 file changed, 41 insertions(+), 11 deletions(-)
diff --git a/js/pages/accessMge/accessMge.js b/js/pages/accessMge/accessMge.js
index 7a24c45..85f3204 100644
--- a/js/pages/accessMge/accessMge.js
+++ b/js/pages/accessMge/accessMge.js
@@ -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 = '';
- // $('#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('
暂无数据
' + list[index * num - i].personName + '
' + '' + list[index * num - i].accesssTime + '
' + '' + list[i].personName + '
' + '' + list[i].accesssTime + '
' + '' + list[i].personName + '
' + '' + list[i].accesssTime + '
' + '