出入管理

This commit is contained in:
sliang 2024-04-01 19:49:28 +08:00
parent 723d6a312c
commit 6b44152303
11 changed files with 960 additions and 57 deletions

View File

@ -1,5 +1,5 @@
let aqEnnable = true // 参数加密开关
const commonUrl = "http://10.40.92.33:18080/zhgd/";
const commonUrl = "http://10.40.92.105:18080/zhgd/";
/* 登录相关 */
const login_url = commonUrl + "auth/login"; // 登录url
const login_out = commonUrl + "auth/logout"; // 登出url
@ -54,4 +54,24 @@ function ajaxRequestGet(url, type, async, beforeFn, successFn, errorFn, isAes) {
success: successFn,
error: errorFn
});
}
/* GET请求 */
function ajaxRequestGetExport(url, type, async, beforeFn, successFn, errorFn, isAes) {
$.ajax({
url: url,
type: type,
headers: {
"authorization": sessionStorage.getItem("zhgd_token"),
"decrypt": isAes ? '' : 'decrypt'
},
xhrFields: {
responseType: 'blob' // 告诉 xhr 我们期望返回的数据类型是 blob
},
async: async,
beforeSend: beforeFn,
success: successFn,
error: errorFn
});
}

207
css/accessMge/accessMge.css Normal file
View File

@ -0,0 +1,207 @@
html,
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
color: #fff;
font-family: 'Alibaba PuHuiTi R';
}
.layout {
display: flex;
align-items: center;
justify-content: center;
}
.main-box {
width: 100%;
height: 100%;
justify-content: space-evenly;
flex-direction: column;
}
.top-box {
width: 100%;
height: 47%;
display: flex;
justify-content: space-around;
}
.bot-box {
width: 100%;
height: 47%;
display: flex;
justify-content: space-around;
}
.top-box-left{
margin-top: 2%;
margin-left: 1%;
width: 49%;
height: 80%;
}
.top-box-left-top{
width: 100%;
height: 48%;
display: flex;
}
.top-box-left-top-left{
width: 20%;
height: 100%;
display: flex;
flex-direction: column;
}
.today-font{
color: #01E8DB;
letter-spacing:1px;
font-size: 16px;
font-weight: 500;
height: 5%;
width: 100%;
}
.direction{
display: flex;
flex-direction: row;
height: 30%;
width: 100%;
margin-top: 6%;
}
.imgs{
width: 60%;
height: 70%;
margin: 5% 5%;
text-align: center;
}
.today-img{
padding: 5% 2% 2% 2%;
background: url("../../img/accessMge/today.png") no-repeat 0 0 / 100% 100%;
display: flex;
justify-content: center;
align-items:center;
}
.font-style{
font-family: 'zcoolqingkehuangyouti';
color: #fff;
font-size: 28px;
display: flex;
align-items: center;
justify-content: center;
}
.span-style{
color: #fff;
display: flex;
flex-direction: column-reverse;
}
.top-box-left-top-center{
margin-left: 5%;
width: 35%;
height: 100%;
display: flex;
flex-direction: column;
}
.cumulative-font{
color: #01E7BE;
letter-spacing:1px;
font-size: 16px;
font-weight: 500;
height: 5%;
width: 100%;
}
.cumulative-img{
padding: 0.5% 0% 0% 0%;
width: 12%;
height: 100%;
margin: 5.5% 3% 5% 3%;
text-align: center;
background: url("../../img/accessMge/cumulative.png") no-repeat 0 0 / 100% 100%;
display: flex;
justify-content: center;
}
.top-box-left-top-bot{
width: 40%;
height: 100%;
}
.abnormalAlarm{
height: 90%;
width: 100%;
display: flex;
flex-direction: row;
}
.abnormalAlarmImg{
width: 20%;
height: 100%;
margin-left: 1%;
}
.top-box-left-bot{
margin-top: 2%;
width: 100%;
height: 48%;
}
.top-box-right{
margin-top: 2%;
margin-left: 1%;
width: 49%;
height: 80%;
}
.bot-box-left{
margin-left: 1%;
width: 38.5%;
height: 100%;
}
.bot-box-right{
margin-right: 1%;
width: 58.5%;
height: 100%;
}
.img-style{
width: 100%;
height: 100%;
box-sizing: border-box;
background-position: center center !important;
}
.vehicle {
background: url("../../img/accessMge/vehicle.png") no-repeat 0 0 / 100% 100%;
display: flex;
}
.personnel {
background: url("../../img/accessMge/personnel.png") no-repeat 0 0 / 100% 100%;
display: flex;
}
.layui-form-item .layui-inline{
margin-right: 0px
}
.layui-form-label{
padding-left: 1px;
padding-right: 1px
}
.layui-form-item .layui-input-inline{
width: 150px;
}

View File

@ -74,6 +74,10 @@ th {
justify-content: space-between;
}
.layui-laydate-content th{
background-color: transparent;
}
::-webkit-scrollbar
{
width: 6px;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
img/accessMge/personnel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
img/accessMge/today.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
img/accessMge/vehicle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -0,0 +1,378 @@
let layer,table,form,laydate;
const bidCode = parent.$('#bidPro').val();
layui.use(['layer','table','form','laydate'], function () {
layer = layui.layer;
table = layui.table;
form = layui.form;
laydate = layui.laydate;
//时间范围设置
laydate.render({
elem: '#date1',
range: true,
type: 'datetime',
range: '~',
change: function(value, date, endDate){
}
});
//时间范围设置
laydate.render({
elem: '#date2',
range: true,
type: 'datetime',
range: '~',
change: function(value, date, endDate){
}
});
//今日、当月车辆出入场统计
getVehicleStatistics();
// //今日、当月车辆出入场统计图片
getVehicleStatisticsPhoto("1","1");
// //今日、当月车辆出入场统计列表
getVehicleStatisticsList(bidCode);
// //今日、当月人员出入场统计
getPerStatistics();
// //今日、当月人员出入场统计图片
getPerStatisticsPhoto("1","1");
// //今日、当月人员出入场统计列表
getPerStatisticsList(bidCode);
});
function getVehicleStatistics(){
let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId;
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
const url = commonUrl + "screen/largeScreen/accessMge/getVehicleStatistics?params="+montageParam; // url
ajaxRequestGet(url, "GET", true, function () {
}, function (result) {
if (result.code === 200) {
if (result.data && result.data.length > 0) {
//今日、当月车辆出入场统计
getStatistics(result.data)
}else{
//今日、当月车辆出入场统计
getStatistics("")
}
} else if (result.code === 500) {
layer.msg(result.msg, { icon: 2 });
}
}, function (xhr, status, error) {
error(xhr, status, error)
}, aqEnnable);
}
function getStatistics(data){
if(data!=""){
var jtrNum = data[0].jtrNum;
var jrcNum = data[0].jrcNum;
var dyrNum = data[0].dyrNum;
var dycNum = data[0].dycNum;
}else{
var jtrNum = "000";
var jrcNum = "000";
var dyrNum = "0000";
var dycNum = "0000";
}
const jtrNums = jtrNum.split("").map(Number);
document.getElementById("oner").textContent=jtrNums[0];
document.getElementById("twor").textContent=jtrNums[1];
document.getElementById("threer").textContent=jtrNums[2];
const jrcNums = jrcNum.split("").map(Number);
document.getElementById("onec").textContent=jrcNums[0];
document.getElementById("twoc").textContent=jrcNums[1];
document.getElementById("threec").textContent=jrcNums[2];
const dyrNums = dyrNum.split("").map(Number);
document.getElementById("onesr").textContent=dyrNums[0];
document.getElementById("twosr").textContent=dyrNums[1];
document.getElementById("threesr").textContent=dyrNums[2];
document.getElementById("foursr").textContent=dyrNums[3];
const dycNums = dycNum.split("").map(Number);
document.getElementById("onesc").textContent=dycNums[0];
document.getElementById("twosc").textContent=dycNums[1];
document.getElementById("threesc").textContent=dycNums[2];
document.getElementById("foursc").textContent=dycNums[3];
var s = "https://unpkg.com/outeres/demo/carousel/720x360-1.jpg";
var htmls = '<img src ="'+s+'" alt="" style="height:100%;width:100%; margin-top:5%" />';
$('#photo').empty().append(htmls);
}
function getVehicleStatisticsPhoto(accessType,timeType){
let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&accessType=' + accessType + '&timeType=' + timeType;
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
const url = commonUrl + "screen/largeScreen/accessMge/getVehicleStatisticsPhoto?params="+montageParam; // url
ajaxRequestGet(url, "GET", true, function () {
}, function (result) {
let html = '';
if (result.code === 200) {
if (result.data && result.data.length > 0) {
var s = "https://unpkg.com/outeres/demo/carousel/720x360-1.jpg";
var a = "sss";
$.each(result.data, function (index, item) {
html +='<div class="abnormalAlarmImg">';
html +='<img src ="'+s+'" alt="" style="height:100%;width:100%; margin-top:5%" />';
html +='<span>'+ a +'</span>';
html +='</div>';
})
}else{
html += '<div style="color:red;">未找到关联信息</div>'
}
} else if (result.code === 500) {
layer.msg(result.msg, { icon: 2 });
}
$('#abnormalAlarm').empty().append(html);
}, function (xhr, status, error) {
error(xhr, status, error)
}, aqEnnable);
}
function getVehicleStatisticsList(bidCode){
const url = commonUrl + "screen/largeScreen/accessMge/getVehicleStatisticsList"; // url
table.render({
elem: '#demo1',
url: url,
skin: 'line',
page: true,
headers:{
decrypt:"decrypt",
"Authorization":token
},
where: {
bidCode:bidCode,
proName:$('#proName1').val(),
carNum:$('#carNum1').val(),
date:$('#date1').val()
},
cols: [[
{type: 'numbers', title: '序号'}, // 添加序号列
{field: 'proName', title: '工程名称',align:'center'},
{field: 'carNum', title: '车牌号',align:'center'},
{field: 'userName', title: '司机',align:'center'},
{field: 'phone', title: '司机电话',align:'center'},
{field: 'accessType', title: '状态',align:'center'},
{field: 'accesssTime', title: '时间',align:'center'}
]],
initComplete: function () {
// 在表格渲染完成后,重新渲染序号列
var that = this.elem.next();
var tool = that.children('.layui-table-box').children('.layui-table-fixed').children('.layui-table-body').children('.layui-table');
tool.find("tr").each(function (index, item) {
$(this).find('td[data-field="LAY_TABLE_INDEX"]').text(index + 1);
});
},
done:function(res, curr, count, origin){
console.log(res);
}
})
}
function getPerStatistics(){
let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId;
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
const url = commonUrl + "screen/largeScreen/accessMge/getPerStatistics?params="+montageParam; // url
ajaxRequestGet(url, "GET", true, function () {
}, function (result) {
if (result.code === 200) {
if (result.data && result.data.length > 1) {
getStatisticsPer(result.data)
}else{
getStatisticsPer("")
}
} else if (result.code === 500) {
layer.msg(result.msg, { icon: 2 });
}
}, function (xhr, status, error) {
error(xhr, status, error)
setData(null);
}, aqEnnable);
}
function getStatisticsPer(data){
if(data!=""){
var jtrNum = data[0].jtrNum;
var jrcNum = data[0].jrcNum;
var dyrNum = data[0].dyrNum;
var dycNum = data[0].dycNum;
}else{
var jtrNum = "000";
var jrcNum = "000";
var dyrNum = "0000";
var dycNum = "0000";
}
const jtrNums = jtrNum.split("").map(Number);
document.getElementById("onerPer").textContent=jtrNums[0];
document.getElementById("tworPer").textContent=jtrNums[1];
document.getElementById("threerPer").textContent=jtrNums[2];
const jrcNums = jrcNum.split("").map(Number);
document.getElementById("onecPer").textContent=jrcNums[0];
document.getElementById("twocPer").textContent=jrcNums[1];
document.getElementById("threecPer").textContent=jrcNums[2];
const dyrNums = dyrNum.split("").map(Number);
document.getElementById("onesrPer").textContent=dyrNums[0];
document.getElementById("twosrPer").textContent=dyrNums[1];
document.getElementById("threesrPer").textContent=dyrNums[2];
document.getElementById("foursrPer").textContent=dyrNums[3];
const dycNums = dycNum.split("").map(Number);
document.getElementById("onescPer").textContent=dycNums[0];
document.getElementById("twoscPer").textContent=dycNums[1];
document.getElementById("threescPer").textContent=dycNums[2];
document.getElementById("fourscPer").textContent=dycNums[3];
var s = "https://unpkg.com/outeres/demo/carousel/720x360-1.jpg";
var htmls = '<img src ="'+s+'" alt="" style="height:100%;width:100%; margin-top:5%" />';
$('#photos').empty().append(htmls);
}
function getPerStatisticsPhoto(accessType,timeType){
let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&accessType=' + accessType + '&timeType=' + timeType;
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
const url = commonUrl + "screen/largeScreen/accessMge/getPerStatisticsPhoto?params="+montageParam; // url
ajaxRequestGet(url, "GET", true, function () {
}, function (result) {
let html = '';
if (result.code === 200) {
if (result.data && result.data.length > 0) {
var s = "https://unpkg.com/outeres/demo/carousel/720x360-1.jpg";
var a = "sss";
$.each(result.data, function (index, item) {
html +='<div class="abnormalAlarmImg">';
html +='<img src ="'+s+'" alt="" style="height:100%;width:100%; margin-top:5%" />';
html +='<span>'+ a +'</span>';
html +='</div>';
})
}else{
html += '<div style="color:red;">未找到关联信息</div>'
}
} else if (result.code === 500) {
layer.msg(result.msg, { icon: 2 });
}
$('#abnormalAlarms').empty().append(html);
}, function (xhr, status, error) {
error(xhr, status, error)
}, aqEnnable);
}
function getPerStatisticsList(bidCode){
const url = commonUrl + "screen/largeScreen/accessMge/getPerStatisticsList"; // url
table.render({
elem: '#demo2',
url: url,
skin: 'line',
page: true,
headers:{
decrypt:"decrypt",
"Authorization":token
},
where: {
bidCode:bidCode,
proName:$('#proName2').val(),
userName:$('#userName').val(),
date:$('#date2').val()
},
cols: [[
{type: 'numbers', title: '序号'}, // 添加序号列
{field: 'proName', title: '工程名称',align:'center'},
{field: 'userName', title: '姓名',align:'center'},
{field: 'phone', title: '电话',align:'center'},
{field: 'accessType', title: '状态',align:'center'},
{field: 'accesssTime', title: '时间',align:'center'}
]],
initComplete: function () {
// 在表格渲染完成后,重新渲染序号列
var that = this.elem.next();
var tool = that.children('.layui-table-box').children('.layui-table-fixed').children('.layui-table-body').children('.layui-table');
tool.find("tr").each(function (index, item) {
$(this).find('td[data-field="LAY_TABLE_INDEX"]').text(index + 1);
});
},
done:function(res, curr, count, origin){
console.log(res);
}
})
}
function getQueryList(type){
if(type==1){
getVehicleStatisticsList(bidCode);
}else{
getPerStatisticsList(bidCode);
}
}
function exportVehicleData(){
let proName = $('#proName1').val();
let carNum = $('#carNum1').val();
let date = $('#date1').val();
let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&proName=' + proName + '&carNum=' + carNum + '&date=' + date;
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
const url = commonUrl + "screen/largeScreen/accessMge/exportVehicleData?params=" + montageParam; // url
ajaxRequestGetExport(url, "GET", true, function () {
}, function (blob, status, xhr) {
// 创建一个 Blob 对象
var url = window.URL.createObjectURL(blob);
// 创建一个隐藏的 <a> 标签
var link = document.createElement('a');
link.href = url;
link.download = '今日、当月车辆出入场统计.xlsx'; // 设置下载文件的名称,假设是 Excel 文件
// 将 <a> 标签添加到文档中
document.body.appendChild(link);
// 触发 <a> 标签的 click 事件来下载文件
link.click();
// 释放 URL 对象
window.URL.revokeObjectURL(url);
// 移除 <a> 标签
document.body.removeChild(link);
}, function (xhr, status, error) {
error(xhr, status, error)
}, aqEnnable);
}
function exportPerData(){
let proName = $('#proName2').val();
let userName = $('#userName').val();
let date = $('#date2').val();
let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&proName=' + proName + '&userName=' + userName + '&date=' + date;
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
const url = commonUrl + "screen/largeScreen/accessMge/exportPerData?params=" + montageParam; // url
ajaxRequestGetExport(url, "GET", true, function () {
}, function (blob, status, xhr) {
// 创建一个 Blob 对象
var url = window.URL.createObjectURL(blob);
// 创建一个隐藏的 <a> 标签
var link = document.createElement('a');
link.href = url;
link.download = '今日、当月人员出入场统计.xlsx'; // 设置下载文件的名称,假设是 Excel 文件
// 将 <a> 标签添加到文档中
document.body.appendChild(link);
// 触发 <a> 标签的 click 事件来下载文件
link.click();
// 释放 URL 对象
window.URL.revokeObjectURL(url);
// 移除 <a> 标签
document.body.removeChild(link);
}, function (xhr, status, error) {
error(xhr, status, error)
}, aqEnnable);
}

View File

@ -9,8 +9,10 @@ layui.use(['layer','table'], function () {
});
function getBuildLists(){
const url = commonUrl + "system/sys/select/getBuildLists"; // 建管单位url
ajaxRequest(url, "get", null , true, function () {
let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId;
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
const url = commonUrl + "system/sys/select/getBuildLists?params=" + montageParam; // url
ajaxRequestGet(url, "GET", true, function () {
}, function (result) {
if (result.code === 200) {
let html = '';
@ -28,23 +30,25 @@ function getBuildLists(){
} else if (result.code === 500) {
layer.msg(result.msg, { icon: 2 });
}
}, function (xhr) {
error(xhr)
});
}, function (xhr, status, error) {
error(xhr, status, error)
}, aqEnnable);
}
function getSelectLists(){
const url = commonUrl + "system/sys/select/getSelectLists"; // 建管单位url
ajaxRequest(url, "get", null , true, function () {
let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId;
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
const url = commonUrl + "system/sys/select/getSelectLists?params=" + montageParam; // url
ajaxRequestGet(url, "GET", true, function () {
}, function (result) {
if (result.code === 200) {
getSelect(result.data)
} else if (result.code === 500) {
layer.msg(result.msg, { icon: 2 });
}
}, function (xhr) {
error(xhr)
});
}, function (xhr, status, error) {
error(xhr, status, error)
}, aqEnnable);
}
function getSelect(data){

View File

@ -15,7 +15,7 @@ layui.use(['layer','table','form'], function () {
});
function getGtLists(){
const url = commonUrl + "system/sys/select/getGtLists?bidCode="+ bidCode; // 杆塔url
const url = commonUrl + "system/sys/select/getGtLists?bidCode="+ bidCode; // 杆塔url
ajaxRequest(url, "get", null , true, function () {
}, function (result) {
if (result.code === 200) {
@ -24,31 +24,53 @@ function getGtLists(){
$.each(result.data, function (index, item) {
html += '<option value="' + item.gtId + '">' + item.name + '</option>'
})
// 设备列表
getDeviceList(result.data[0].gtId);
}else{
html += '<option value="">未找到关联信息</option>'
getDeviceList("");
}
$('#gt').empty().append(html);
layui.form.render();
// 设备列表
getDeviceList(result.data[0].gtId);
// updateSelection();
} else if (result.code === 500) {
layer.msg(result.msg, { icon: 2 });
}
}, function (xhr) {
layer.msg(xhr, { icon: 2 });
});
// let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId;
// let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
// const url = commonUrl + "system/sys/select/getGtLists?params="+ montageParam; // 杆塔url
// ajaxRequestGet(url, "GET", true, function () {
// }, function (result) {
// if (result.code === 200) {
// let html = '';
// if (result.data && result.data.length > 0) {
// $.each(result.data, function (index, item) {
// html += '<option value="' + item.gtId + '">' + item.name + '</option>'
// })
// }
// $('#gt').empty().append(html);
// layui.form.render();
// // 设备列表
// getDeviceList(result.data[0].gtId);
// // updateSelection();
// } else if (result.code === 500) {
// layer.msg(result.msg, { icon: 2 });
// }
// }, function (xhr, status, error) {
// error(xhr, status, error)
// setData(null);
// }, aqEnnable);
}
function getDeviceList(gtId){
const params = {
"roleCode": roleCode,
"orgId": orgId,
"userId": userId,
"bidCode":bidCode,
"gtId":gtId
}
const url = commonUrl + "screen/largeScreen/towerAssInspect/getDeviceList?roleCode="+roleCode+"&orgId="+orgId+"&userId="+userId+"&bidCode="+bidCode+"&gtId="+gtId; // 设备列表url
let encryptStr = encryptCBC(JSON.stringify(params));
ajaxRequest(url, "get", null, true, function () {
const paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&gtId=' + gtId;
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
const url = commonUrl + "screen/largeScreen/towerAssInspect/getDeviceList?params="+montageParam; // url
ajaxRequestGet(url, "get", true, function () {
}, function (result) {
let html = '';
if (result.code === 200) {
@ -69,14 +91,15 @@ function getDeviceList(gtId){
getInfo(result.data[0].deviceId)
}else{
html += '<div style="color:red;">未找到关联设备</div>'
getInfo("")
}
} else if (result.code === 500) {
layer.msg(result.msg, { icon: 2 });
}
$('#deviceList').empty().append(html);
}, function (xhr) {
layer.msg(xhr, { icon: 2 });
});
}, function (xhr , status, error) {
error(xhr, status, error)
}, aqEnnable);
}
//根据点击的设备去查询其他信息
@ -85,7 +108,7 @@ function getInfo(deviceId){
getRealTimeDetection(deviceId);
//当日检测变化趋势
// getTrend(deviceId)
getTrend(deviceId)
//实时告警
getRealTimeAlarmList(deviceId)
@ -95,16 +118,10 @@ function getInfo(deviceId){
}
function getRealTimeDetection(deviceId){
const params = {
"roleCode": roleCode,
"orgId": orgId,
"userId": userId,
"bidCode":bidCode,
"deviceId":deviceId
}
const url = commonUrl + "screen/largeScreen/towerAssInspect/getRealTimeDetection?roleCode="+roleCode+"&orgId="+orgId+"&userId="+userId+"&bidCode="+bidCode+"&deviceId="+deviceId; // 设备列表url
let encryptStr = encryptCBC(JSON.stringify(params));
ajaxRequest(url, "get", null, true, function () {
let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&deviceId=' + deviceId;
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
const url = commonUrl + "screen/largeScreen/towerAssInspect/getRealTimeDetection?params="+montageParam; // url
ajaxRequestGet(url, "get", true, function () {
}, function (result) {
let html = '';
if (result.code === 200) {
@ -140,22 +157,17 @@ function getRealTimeDetection(deviceId){
layer.msg(result.msg, { icon: 2 });
}
$('#detection').empty().append(html);
}, function (xhr) {
layer.msg(xhr, { icon: 2 });
});
}, function (xhr, status, error) {
error(xhr, status, error)
setData(null);
}, aqEnnable);
}
function getTrend(deviceId){
const params = {
"roleCode": roleCode,
"orgId": orgId,
"userId": userId,
"bidCode":bidCode,
"deviceId":deviceId
}
const url = commonUrl + "screen/largeScreen/towerAssInspect/getTrend?roleCode="+roleCode+"&orgId="+orgId+"&userId="+userId+"&bidCode="+bidCode+"&deviceId="+deviceId; // 设备列表url
let encryptStr = encryptCBC(JSON.stringify(params));
ajaxRequest(url, "get", null, true, function () {
let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&deviceId=' + deviceId;
let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
const url = commonUrl + "screen/largeScreen/towerAssInspect/getTrend?params="+montageParam; // url
ajaxRequestGet(url, "GET", true, function () {
}, function (result) {
let html = '';
if (result.code === 200) {
@ -173,10 +185,11 @@ function getTrend(deviceId){
} else if (result.code === 500) {
layer.msg(result.msg, { icon: 2 });
}
$('#deviceList').empty().append(html);
}, function (xhr) {
layer.msg(xhr, { icon: 2 });
});
$('#tendency').empty().append(html);
}, function (xhr, status, error) {
error(xhr, status, error)
setData(null);
}, aqEnnable);
}

View File

@ -3,9 +3,286 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../../css/font.css">
<link rel="stylesheet" href="../../plugin/layui-v2.9.7/layui/css/layui.css">
<link rel="stylesheet" href="../../css/coreTable.css"/>
<link rel="stylesheet" href="../../css/accessMge/accessMge.css">
<link rel="stylesheet" href="../../plugin/toolTip/mTips.css">
<script src="../../js/publics/jquery-3.6.0.min.js" type="text/javascript"></script>
<script src="../../plugin/layui-v2.9.7/layui/layui.js"></script>
<script src="../../js/publics/public.js" type="text/javascript"></script>
<script src="../../api/commonRequest.js" type="text/javascript"></script>
<script src="../../js/publics/aescbc.js"></script>
<title>出入管理</title>
</head>
<body>
出入管理
<div class="layout main-box">
<div class="top-box">
<div class="img-style vehicle">
<div class="top-box-left">
<div class="top-box-left-top">
<div class="top-box-left-top-left">
<div class="today-font">今日累计入场</div>
<div class="direction">
<div class="imgs today-img">
<span class="font-style" id="oner"></span>
</div>
<div class="imgs today-img">
<span class="font-style" id="twor"></span>
</div>
<div class="imgs today-img">
<span class="font-style" id="threer"></span>
</div>
<span class="span-style"></span>
</div>
<div class="today-font" style="margin-top: 10%;">今日累计出场</div>
<div class="direction">
<div class="imgs today-img">
<span class="font-style" id="onec"></span>
</div>
<div class="imgs today-img">
<span class="font-style" id="twoc"></span>
</div>
<div class="imgs today-img">
<span class="font-style" id="threec"></span>
</div>
<span class="span-style" ></span>
</div>
</div>
<div class="top-box-left-top-center">
<div class="cumulative-font">当月累计入场</div>
<div class="direction" style="margin-top: 0%;">
<div class="cumulative-img">
<span class="font-style" id="onesr"></span>
</div>
<div class="cumulative-img">
<span class="font-style" id="twosr"></span>
</div>
<div class="cumulative-img">
<span class="font-style" id="threesr"></span>
</div>
<span class="span-style"></span>
<div class="cumulative-img">
<span class="font-style" id="foursr"></span>
</div>
<span class="span-style"></span>
</div>
<div class="cumulative-font" style="margin-top: 10%;">当月累计出场</div>
<div class="direction" style="margin-top: 0%;">
<div class="cumulative-img">
<span class="font-style" id="onesc"></span>
</div>
<div class="cumulative-img">
<span class="font-style" id="twosc"></span>
</div>
<div class="cumulative-img">
<span class="font-style" id="threesc"></span>
</div>
<span class="span-style"></span>
<div class="cumulative-img">
<span class="font-style" id="foursc"></span>
</div>
<span class="span-style"></span>
</div>
</div>
<div class="top-box-left-top-bot">
<div class="img-style" id="photo">
</div>
</div>
</div>
<div class="top-box-left-bot">
<div style="color: #fff;letter-spacing:1px;font-size: 16px;">异常告警</div>
<div class="abnormalAlarm" id="abnormalAlarm">
</div>
</div>
</div>
<div class="top-box-right">
<div style=" width: 100%;height: 100%;">
<form class="layui-form " onsubmit="return false">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">工程名称:</label>
<div class="layui-input-inline">
<input type="text" id="proName1" placeholder="请输入工程名称" autocomplete="off"
class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">车牌号:</label>
<div class="layui-input-inline">
<input type="text" id="carNum1" placeholder="请输入车牌号" autocomplete="off"
class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">时间:</label>
<div class="layui-input-inline">
<input type="text" id="date1" placeholder="请选择时间" autocomplete="off"
class="layui-input">
</div>
</div>
<div class="layui-inline">
<div class="layui-col-xs12">
<button class="layui-btn" onclick="getQueryList(1)">查询</button>
</div>
</div>
<div class="layui-inline">
<div class="layui-col-xs12">
<button class="layui-btn" onclick="exportVehicleData()">导出</button>
</div>
</div>
</div>
</form>
<div class="right-down-right">
<table id="demo1" lay-filter="test"></table>
</div>
</div>
</div>
</div>
</div>
<div class="bot-box">
<div class="img-style personnel">
<div class="top-box-left">
<div class="top-box-left-top">
<div class="top-box-left-top-left">
<div class="today-font">今日累计入场</div>
<div class="direction">
<div class="imgs today-img">
<span class="font-style" id="onerPer"></span>
</div>
<div class="imgs today-img">
<span class="font-style" id="tworPer"></span>
</div>
<div class="imgs today-img">
<span class="font-style" id="threerPer"></span>
</div>
<span class="span-style"></span>
</div>
<div class="today-font" style="margin-top: 10%;">今日累计出场</div>
<div class="direction">
<div class="imgs today-img">
<span class="font-style" id="onecPer"></span>
</div>
<div class="imgs today-img">
<span class="font-style" id="twocPer"></span>
</div>
<div class="imgs today-img">
<span class="font-style" id="threecPer"></span>
</div>
<span class="span-style" ></span>
</div>
</div>
<div class="top-box-left-top-center">
<div class="cumulative-font">当月累计入场</div>
<div class="direction" style="margin-top: 0%;">
<div class="cumulative-img">
<span class="font-style" id="onesrPer"></span>
</div>
<div class="cumulative-img">
<span class="font-style" id="twosrPer"></span>
</div>
<div class="cumulative-img">
<span class="font-style" id="threesrPer"></span>
</div>
<span class="span-style"></span>
<div class="cumulative-img">
<span class="font-style" id="foursrPer"></span>
</div>
<span class="span-style"></span>
</div>
<div class="cumulative-font" style="margin-top: 10%;">当月累计出场</div>
<div class="direction" style="margin-top: 0%;">
<div class=" cumulative-img">
<span class="font-style" id="onescPer"></span>
</div>
<div class=" cumulative-img">
<span class="font-style" id="twoscPer"></span>
</div>
<div class=" cumulative-img">
<span class="font-style" id="threescPer"></span>
</div>
<span class="span-style"></span>
<div class=" cumulative-img">
<span class="font-style" id="fourscPer"></span>
</div>
<span class="span-style"></span>
</div>
</div>
<div class="top-box-left-top-bot">
<div class="img-style" id="photos">
</div>
</div>
</div>
<div class="top-box-left-bot">
<div style="color: #fff;letter-spacing:1px;font-size: 16px;">异常告警</div>
<div class="abnormalAlarm" id="abnormalAlarms">
</div>
</div>
</div>
<div class="top-box-right">
<div style=" width: 100%;height: 100%;">
<form class="layui-form " onsubmit="return false">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">工程名称:</label>
<div class="layui-input-inline">
<input type="text" id="proName2" placeholder="请输入工程名称" autocomplete="off"
class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">姓名:</label>
<div class="layui-input-inline">
<input type="text" id="userName" placeholder="请输入司机姓名" autocomplete="off"
class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">时间:</label>
<div class="layui-input-inline">
<input type="text" id="date2" placeholder="请选择时间" autocomplete="off"
class="layui-input">
</div>
</div>
<div class="layui-inline">
<div class="layui-col-xs12">
<button class="layui-btn" onclick="getQueryList(2)">查询</button>
</div>
</div>
<div class="layui-inline">
<div class="layui-col-xs12">
<button class="layui-btn" onclick="exportPerData()">导出</button>
</div>
</div>
</div>
</form>
<div class="right-down-right">
<table id="demo2" lay-filter="test"></table>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script src="../../js/pages/accessMge/accessMge.js" type="text/javascript"></script>
</html>