| | |
| | | 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) |
| | |
| | | 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) |
| | |
| | | <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> |
| | |
| | | }); |
| | | // 返回摄像头名称,如果找不到则返回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; |
| | | } |
| | |
| | | }); |
| | | } |
| | | 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); |
| | | } |