sgj
15 小时以前 711221e4b28157efc1762508e73e07311aa57a1e
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 - 摄像头ID
 * @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;
}
/**
 * 格式化日期