From 91aec47712c9a369b000ad2a67682fc2a8ab92f7 Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期三, 17 十二月 2025 10:13:31 +0800
Subject: [PATCH] 智能抓拍添加库区回显
---
fzzy-igdss-web/src/main/resources/static/security/snap/snapRecord.js | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/fzzy-igdss-web/src/main/resources/static/security/snap/snapRecord.js b/fzzy-igdss-web/src/main/resources/static/security/snap/snapRecord.js
index 51c2bdb..48c2a5f 100644
--- a/fzzy-igdss-web/src/main/resources/static/security/snap/snapRecord.js
+++ b/fzzy-igdss-web/src/main/resources/static/security/snap/snapRecord.js
@@ -177,12 +177,11 @@
<span>${formatDate(record.snapTime)}</span>
</div>
</div>
-<!--
- <div class="meta-item">
+
+ <div class="meta-item">
<i class="layui-icon layui-icon-home"></i>
- <span>${record.deptId || ''}</span>
+ <span>${getDeptName(record.deptId) || record.deptId || ''}</span>
</div>
- -->
</div>
</div>
@@ -213,6 +212,24 @@
return null;
}
+/**
+ * 鏍规嵁搴撳尯ID鑾峰彇搴撳尯鍚嶇О
+ * @param {string} deptId - 鎽勫儚澶碔D
+ * @returns {string|null} 鎽勫儚澶村悕绉版垨null
+ */
+function getDeptName(deptId) {
+ // 纭繚deptList瀛樺湪涓斾负鏁扮粍
+ if (typeof deptList !== 'undefined' && Array.isArray(deptList) && deptId) {
+ // 鏌ユ壘鍖归厤鐨勬憚鍍忓ご瀵硅薄
+ var dept = deptList.find(function(item) {
+ return item.id === deptId;
+ });
+ // 杩斿洖鎽勫儚澶村悕绉帮紝濡傛灉鎵句笉鍒板垯杩斿洖null
+ return dept ? dept.kqmc : null;
+ }
+ return null;
+}
+
/**
* 鏍煎紡鍖栨棩鏈�
--
Gitblit v1.9.3