<!DOCTYPE html>
|
<html lang="zh-cn" xmlns:th=http://www.thymeleaf.org>
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
<meta name="viewport"
|
content="width=device-width, initial-scale=1, maximum-scale=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta name="renderer" content="webkit">
|
<title>门禁记录抓拍</title>
|
|
<link rel="stylesheet" type="text/css" th:href="@{../../static/plugins/layui/css/layui.css?v=2.5.5}">
|
|
<style type="text/css">
|
|
.layui-card-header {
|
font-weight: bold;
|
}
|
|
.cut-img {
|
height: 480px;
|
width: 600px;
|
}
|
|
.layui-layer-title {
|
font-weight: bold;
|
background-color: #eff4f6;
|
}
|
|
thead span {
|
font-weight: bold
|
}
|
</style>
|
|
</head>
|
|
<body>
|
<!-- 可追踪信息 -->
|
<div class="layui-tab-content">
|
<div class="layui-fluid" id="recordFilesDiv">
|
<!-- <div class="layui-col-md6 layui-col-sm6"> -->
|
<!-- <div class="layui-card"> -->
|
<!-- <div class="layui-card-header">图片1</div> -->
|
<!-- <div class="layui-card-body"> -->
|
<!-- <img src="" alt="" /> -->
|
<!-- </div> -->
|
<!-- </div> -->
|
<!-- </div> -->
|
</div>
|
</div>
|
|
<script th:inline="javascript">
|
var id = [[${id}]];
|
var imgPathList = [[${imgPathList}]];
|
</script>
|
|
<script th:src="@{../../static/plugins/layui/layui.js}"></script>
|
<script th:src="@{../../static/js/jquery.min.js}"></script>
|
|
<script>
|
var layer;
|
$(function () {
|
layui.use(['layer'], function () {
|
layer = layui.layer;
|
//获取附件信息
|
var index = layer.load();
|
renderImg(imgPathList);
|
layer.close(index);
|
});
|
});
|
|
// 渲染出入库的图片列表
|
function renderImg(imgList) {
|
var mainDiv = $("#recordFilesDiv");
|
mainDiv.empty();
|
var html;
|
if(imgList == null || imgList.length <= 0){
|
layer.msg("图片未找到!");
|
return true;
|
}
|
$.each(imgList, function (index, item) {
|
html = "";
|
html += "<div class='layui-col-md6 layui-col-sm6'><div class='layui-card'>";
|
html += "<div class='layui-card-header'>抓拍记录-" + (index+1) + "</div>";
|
html += "<div class='layui-card-body'>";
|
//使用文件流进行渲染图片
|
html += "<img class ='cut-img' src='../../basic/common/getImg?filePath=" + item + "' />";
|
|
html += "</div></div></div>";
|
mainDiv.append(html);
|
});
|
}
|
|
</script>
|
</body>
|
</html>
|