From 350b94ed35470107882ceccbaff6f0fd5d98f191 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期二, 03 三月 2026 17:00:27 +0800
Subject: [PATCH] 字段判空
---
igdss-app/js/admin/security-snapshot.js | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/igdss-app/js/admin/security-snapshot.js b/igdss-app/js/admin/security-snapshot.js
index c696913..7db4d36 100644
--- a/igdss-app/js/admin/security-snapshot.js
+++ b/igdss-app/js/admin/security-snapshot.js
@@ -105,6 +105,7 @@
PatrolList = result.data;
renderPatrol();
} else {
+ PatrolList = ''
renderPatrol();
mui.toast(result.msg);
// console.log(JSON.stringify(result))
@@ -122,12 +123,12 @@
if (PatrolList && PatrolList.length > 0) {
$.each(PatrolList, function(index, item) {
html += '<li><div class="item"><div class="top">'
- html += '<div class="text">'+item.deptName+'</div><div class="r-btn r-warn1" id = "' + item.id +'">鏌ョ湅鐓х墖</div></div>';
+ html += '<div class="text">'+ (item.deptName == null?"--":item.deptName) +'</div><div class="r-btn r-warn1" id = "' + item.id +'">鏌ョ湅鐓х墖</div></div>';
html += '<div class="top-tit"><div class="text">鎶撴媿璁惧锛�'+item.cameraId+'</div></div>';
html += '<div class="cards"><div class="cd"><div class="con user">'
- html += '<div class="tit">鏍囩</div><div class="txt">' + item.tags + '</div></div></div>';
+ html += '<div class="tit">鏍囩</div><div class="txt">' + (item.tags == null||item.tags==""?"--":item.tags) + '</div></div></div>';
html += '<div class="cd"><div class="con loc"><div class="tit">鏃堕棿</div>'
- html += '<div class="txt">' +item.snapTime + '</div></div></div></div></div></li>'
+ html += '<div class="txt">' +(item.snapTime == null?"--":item.snapTime)+ '</div></div></div></div></div></li>'
})
} else {
html +=
--
Gitblit v1.9.3