You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
161 lines
6.6 KiB
161 lines
6.6 KiB
<!DOCTYPE html>
|
|
<html style="background: #0b4b6c;">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
<title></title>
|
|
<meta charset="utf-8" />
|
|
<link rel="stylesheet" href="layui/css/layui.css" media="all" />
|
|
<link rel="stylesheet" href="../../css/ztree/metro/ztree.css">
|
|
<style>
|
|
dl dd {
|
|
text-align: left;
|
|
}
|
|
.layui-form{
|
|
width: 100%
|
|
}
|
|
#dataTime_1 {
|
|
width: 260px;
|
|
margin: 0 5px;
|
|
}
|
|
a {
|
|
color: #0af949;
|
|
text-decoration: underline;
|
|
}
|
|
.layui-table-tool-temp{
|
|
display: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div style="margin:0 auto;text-align: center;">
|
|
<form class="layui-form" style="float: right;width: 100%">
|
|
<div class="layui-input-inline">
|
|
<input type="text" class="layui-input" id="dataTime_1" placeholder="请选择查询的时间段">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div style="width: 90%;height: 500px;float: left;margin-left: 5%;">
|
|
<table id="accList" lay-filter="accList"></table>
|
|
</div>
|
|
|
|
<script type="text/javascript" src="layui/layui.js"></script>
|
|
<script>
|
|
//获取当前日期
|
|
var myDate = new Date();
|
|
var nowY = myDate.getFullYear();
|
|
var nowM = myDate.getMonth() + 1;
|
|
var nowD = myDate.getDate();
|
|
nowM = nowM < 10 ? "0" + nowM : nowM;
|
|
nowD = nowD < 10 ? "0" + nowD : nowD;
|
|
|
|
layui.use(['form', 'layer', 'table', 'laydate'], function () {
|
|
$ = layui.jquery,
|
|
form = layui.form,
|
|
layer = layui.layer,
|
|
table = layui.table,
|
|
laydate = layui.laydate;
|
|
|
|
|
|
//日期选择初始化
|
|
laydate.render({
|
|
elem: '#dataTime_1',
|
|
value: nowY + '-01-01 - ' + nowY + '-' + nowM + '-' + nowD,
|
|
isInitValue: true,
|
|
range: true,
|
|
done: function (value) {
|
|
initTable(value);
|
|
}
|
|
});
|
|
|
|
var initTable = function (time) {
|
|
var startDate = nowY + '-01-01'
|
|
var endDate = nowY + '-' + nowM + '-' + nowD;
|
|
if (time!=null && time.indexOf(" - ") != -1) {
|
|
startDate = time.split(" - ")[0]
|
|
endDate = time.split(" - ")[1];
|
|
}
|
|
//初始化表格数据
|
|
table.render({
|
|
elem: '#accList',
|
|
url: '../../ashx/VisitorHandler.ashx',
|
|
where: {
|
|
Action: 'getStatisticsCarPerVisCamByTime',
|
|
startTime: startDate,
|
|
endTime: endDate
|
|
},
|
|
toolbar: 'default',
|
|
defaultToolbar: ['filter', 'print', 'exports'],
|
|
cellMinWidth: 95,
|
|
id: "accListTable",
|
|
cols: [[
|
|
{ field: 'pName', title: '上级单位', minWidth: 60, align: "center" },
|
|
{ field: 'orgName', title: '所属单位', minWidth: 60, align: "center" },
|
|
{
|
|
field: 'carNum', title: '车辆出入数', sort: true, minWidth: 60, align: "center", templet: function (d) {
|
|
return "<div title=\"点击查看车辆出入记录\" style=\"width:100%;height:100%;cursor:pointer;\" onclick=\"goItem('car','" + startDate + "','" + endDate + "')\"><a href=\"#\">" + d.carNum + "</a>";
|
|
}
|
|
},
|
|
{
|
|
field: 'perNum', title: '人员出入数', sort: true, minWidth: 60, align: "center", templet: function (d) {
|
|
return "<div title=\"点击查看人员出入记录\" style=\"width:100%;height:100%;cursor:pointer;\" onclick=\"goItem('per','" + startDate + "','" + endDate + "')\"><a href=\"#\">" + d.perNum + "</a>";
|
|
}
|
|
},
|
|
{
|
|
field: 'visNum', title: '访客出入数', sort: true, minWidth: 60, align: "center", templet: function (d) {
|
|
return "<div title=\"点击查看访客出入记录\" style=\"width:100%;height:100%;cursor:pointer;\" onclick=\"goItem('vis','" + startDate + "','" + endDate + "')\"><a href=\"#\">" + d.visNum + "</a>";
|
|
}
|
|
},
|
|
{ field: 'camNum', title: '摄像抓拍数', sort: true, minWidth: 60, align: "center" }
|
|
]]
|
|
});
|
|
}
|
|
|
|
initTable();
|
|
});
|
|
|
|
function goItem(type,startTime,endTime) {
|
|
var clientWidth = parseInt(document.body.clientWidth * 0.9) + 'px';
|
|
var clientHeight = document.body.clientHeight == 0 ? '800px' : document.body.clientHeight + 'px';
|
|
var title = "", content = "";
|
|
switch (type) {
|
|
case "car":
|
|
title = "车辆出入记录";
|
|
content = "../VehicleAccess/index.html";
|
|
break;
|
|
case "per":
|
|
title = "人员出入记录";
|
|
content = "../PAccess/PAccessList.html";
|
|
break;
|
|
case "vis":
|
|
title = "访客出入记录";
|
|
content = "../Visitor/VisitorList.html";
|
|
break;
|
|
case "cam":
|
|
title = "摄像抓拍记录";
|
|
content = "";
|
|
break;
|
|
}
|
|
if (!window.sessionStorage.getItem("userInfo")) {
|
|
sessionStorage.setItem('userInfo', "{\"OrgID\": \"D8DC637B8B984848A63F82A018AFAEB0\",\"IsAdmin\":\"1\"}");
|
|
}
|
|
|
|
var index = layer.open({
|
|
title: title,
|
|
type: 2,
|
|
area: [clientWidth, clientHeight],
|
|
maxmin: true,
|
|
content: content,
|
|
success: function (layero, index) {
|
|
var body = layui.layer.getChildFrame('body', index);
|
|
body.find("#searchTime").val(startTime + " 00:00:00" + " - " + endTime + " 00:00:00");
|
|
}
|
|
})
|
|
window.sessionStorage.setItem("index", index);
|
|
}
|
|
|
|
</script>
|
|
<link rel="stylesheet" href="../../css/right-list.css" media="all" />
|
|
<link rel="stylesheet" href="../../css/bulletframebg.css" media="all" />
|
|
</body>
|
|
</html>
|
|
|