czt
2025-12-26 4aff6ce5a44047245f86e776d3b6b67314aed70e
fzzy-igdss-web/src/main/resources/static/security/snap/snapRecord.js
@@ -24,9 +24,9 @@
        count: typeof totalItems !== 'undefined' ? totalItems : 0,
        limit: typeof pageSize !== 'undefined' ? pageSize : 6,
        curr: typeof currentPage !== 'undefined' ? currentPage : 1,
        layout: [ 'prev',  'next', ],
        prev: '<i class="layui-icon layui-icon-left"></i>',
        next: '<i class="layui-icon layui-icon-right"></i>',
        layout: ['prev', 'page', 'next', ],
        // prev: '<i class="layui-icon layui-icon-left"></i>',
        // next: '<i class="layui-icon layui-icon-right"></i>',
        jump: function (obj, first) {
            if (!first) {
                searchRecord(obj.curr, obj.limit)
@@ -47,9 +47,9 @@
        count: totalCount,
        limit: pageSize,
        curr: currentPage,
        layout: ['prev',  'next', ],
        prev: '<i class="layui-icon layui-icon-left"></i>',
        next: '<i class="layui-icon layui-icon-right"></i>',
        layout: ['prev', 'page', 'next', ],
        // prev: '<i class="layui-icon layui-icon-left"></i>',
        // next: '<i class="layui-icon layui-icon-right"></i>',
        jump: function (obj, first) {
            if (!first) {
                searchRecord(obj.curr, obj.limit)
@@ -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>
@@ -209,6 +208,24 @@
        });
        // 返回摄像头名称,如果找不到则返回null
        return camera ? camera.name : null;
    }
    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;
}
@@ -319,14 +336,6 @@
    });
}
function openConf() {
    var url = ctx + "com.fzzy.igds.SnapConf.d";
    var options = {
        title: "抓拍配置",
        url: url,
        btn: 0,
        yes: function (index, layero) {
            $.modal.close(index);
        }
    };
    $.modal.openOptions(options);
    var url = ctx + "com.fzzy.igds.ConfByDept.d";
    $.modal.openTab("库区配置", url);
}