Merge branch 'master' of http://192.168.0.56:3000/cwchen/ah_jjzhgd_webscreen
This commit is contained in:
commit
4145b9c3f3
|
|
@ -94,4 +94,7 @@ body {
|
|||
}
|
||||
.black{
|
||||
color: #000;
|
||||
}
|
||||
.layui-table-init {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
|
@ -1,63 +1,61 @@
|
|||
let layer,table,form,laydate;
|
||||
let layer, table, form, laydate;
|
||||
const bidCode = parent.$('#bidPro').val();
|
||||
layui.use(['layer','table','form','laydate'], function () {
|
||||
layer = layui.layer;
|
||||
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){
|
||||
|
||||
}
|
||||
type: 'date',
|
||||
range: true,
|
||||
format: 'yyyy-MM-dd',
|
||||
max: Date.parse(new Date()),
|
||||
});
|
||||
|
||||
$('#date1').val(getNowTime() + " - " + getNowTime())
|
||||
//时间范围设置
|
||||
laydate.render({
|
||||
elem: '#date2',
|
||||
range: true,
|
||||
type: 'datetime',
|
||||
range: '~',
|
||||
change: function(value, date, endDate){
|
||||
|
||||
}
|
||||
type: 'date',
|
||||
range: true,
|
||||
format: 'yyyy-MM-dd',
|
||||
max: Date.parse(new Date()),
|
||||
});
|
||||
|
||||
$('#date2').val(getNowTime() + " - " + getNowTime())
|
||||
//今日、当月车辆出入场统计
|
||||
getVehicleStatistics();
|
||||
|
||||
|
||||
// //今日、当月车辆出入场统计图片
|
||||
getVehicleStatisticsPhoto("1","1");
|
||||
|
||||
getVehicleStatisticsPhoto("1", "1");
|
||||
|
||||
// //今日、当月车辆出入场统计列表
|
||||
getVehicleStatisticsList(bidCode);
|
||||
|
||||
|
||||
// //今日、当月人员出入场统计
|
||||
getPerStatistics();
|
||||
|
||||
|
||||
// //今日、当月人员出入场统计图片
|
||||
getPerStatisticsPhoto("1","1");
|
||||
|
||||
getPerStatisticsPhoto("1", "1");
|
||||
|
||||
// //今日、当月人员出入场统计列表
|
||||
getPerStatisticsList(bidCode);
|
||||
});
|
||||
|
||||
function getVehicleStatistics(){
|
||||
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
|
||||
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{
|
||||
} else {
|
||||
//今日、当月车辆出入场统计
|
||||
getStatistics("")
|
||||
}
|
||||
|
|
@ -65,54 +63,82 @@ function getVehicleStatistics(){
|
|||
layer.msg(result.msg, { icon: 2 });
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
error(xhr, status, error)
|
||||
}, aqEnnable);
|
||||
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{
|
||||
function getStatistics(data) {
|
||||
if (data != "") {
|
||||
var jtrNum = handleData(data[0].jtrNum);
|
||||
var jrcNum = handleData(data[0].jrcNum);
|
||||
var dyrNum = handleData2(data[0].dyrNum);
|
||||
var dycNum = handleData2(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];
|
||||
|
||||
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];
|
||||
|
||||
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];
|
||||
|
||||
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];
|
||||
|
||||
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 = "../../img/video/voi_photo4.png";
|
||||
var htmls = '<img src ="'+s+'" alt="" style="height:100%;width:100%; margin-top:5%" />';
|
||||
var htmls = '<img src ="' + s + '" alt="" style="height:100%;width:100%; margin-top:5%" />';
|
||||
$('#photo').empty().append(htmls);
|
||||
|
||||
}
|
||||
|
||||
function getVehicleStatisticsPhoto(accessType,timeType){
|
||||
|
||||
// 数据处理
|
||||
function handleData(value) {
|
||||
if (parseInt(value) > 0 && parseInt(value) < 10) {
|
||||
return '00' + value;
|
||||
} else if (parseInt(value) >= 10 && parseInt(value) < 100) {
|
||||
return '0' + value;
|
||||
} else if (parseInt(value) >= 100 && parseInt(value) < 1000) {
|
||||
return value;
|
||||
} else {
|
||||
return '000';
|
||||
}
|
||||
}
|
||||
|
||||
// 数据处理2
|
||||
function handleData2(value) {
|
||||
if (parseInt(value) > 0 && parseInt(value) < 10) {
|
||||
return '000' + value;
|
||||
} else if (parseInt(value) >= 10 && parseInt(value) < 100) {
|
||||
return '00' + value;
|
||||
} else if (parseInt(value) >= 100 && parseInt(value) < 1000) {
|
||||
return '0' + value;
|
||||
} else if (parseInt(value) >= 1000 && parseInt(value) < 10000) {
|
||||
return value;
|
||||
} else {
|
||||
return '0000';
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
const url = commonUrl + "screen/largeScreen/accessMge/getVehicleStatisticsPhoto?params=" + montageParam; // url
|
||||
ajaxRequestGet(url, "GET", true, function () {
|
||||
}, function (result) {
|
||||
let html = '';
|
||||
|
|
@ -120,150 +146,151 @@ function getVehicleStatisticsPhoto(accessType,timeType){
|
|||
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>';
|
||||
$.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{
|
||||
} else {
|
||||
// html += '<div style="color:#71757B;">无数据</div>'
|
||||
|
||||
html +='<div class="abnormalAlarmImg">';
|
||||
html +='<img src ="../../img/video/voi_photo.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html +='<span>告警1</span>';
|
||||
html +='</div>';
|
||||
|
||||
html +='<div class="abnormalAlarmImg">';
|
||||
html +='<img src ="../../img/video/voi_photo2.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html +='<span>告警2</span>';
|
||||
html +='</div>';
|
||||
|
||||
html +='<div class="abnormalAlarmImg">';
|
||||
html +='<img src ="../../img/video/voi_photo3.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html +='<span>告警3</span>';
|
||||
html +='</div>';
|
||||
|
||||
html +='<div class="abnormalAlarmImg">';
|
||||
html +='<img src ="../../img/video/voi_photo4.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html +='<span>告警4</span>';
|
||||
html +='</div>';
|
||||
|
||||
html += '<div class="abnormalAlarmImg">';
|
||||
html += '<img src ="../../img/video/voi_photo.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html += '<span>告警1</span>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="abnormalAlarmImg">';
|
||||
html += '<img src ="../../img/video/voi_photo2.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html += '<span>告警2</span>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="abnormalAlarmImg">';
|
||||
html += '<img src ="../../img/video/voi_photo3.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html += '<span>告警3</span>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="abnormalAlarmImg">';
|
||||
html += '<img src ="../../img/video/voi_photo4.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html += '<span>告警4</span>';
|
||||
html += '</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);
|
||||
errorFn(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) {
|
||||
function getVehicleStatisticsList(bidCode) {
|
||||
const url = commonUrl + "screen/largeScreen/accessMge/getVehicleStatisticsList";
|
||||
table.render({
|
||||
elem: '#demo1',
|
||||
url: url,
|
||||
skin: 'line',
|
||||
page: true,
|
||||
height: 'full-560',
|
||||
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', width: '10%' },
|
||||
{ field: 'carNum', title: '车牌号', align: 'center', width: '15%' },
|
||||
{ field: 'userName', title: '司机', align: 'center', width: '15%' },
|
||||
{ field: 'phone', title: '司机电话', align: 'center', width: '20%' },
|
||||
{ field: 'accessType', title: '状态', align: 'center', width: '10%' },
|
||||
{ field: 'accesssTime', title: '时间', align: 'center', width: '30%' }
|
||||
]],
|
||||
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);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
done: function (res, curr, count, origin) {
|
||||
console.log(res);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function getPerStatistics(){
|
||||
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 () {
|
||||
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) {
|
||||
if (result.data && result.data.length > 0) {
|
||||
getStatisticsPer(result.data)
|
||||
}else{
|
||||
} 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 (xhr, status, error) {
|
||||
errorFn(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";
|
||||
function getStatisticsPer(data) {
|
||||
let jtrNum = null, jrcNum = null, dyrNum = null, dycNum = null;
|
||||
if (data != "") {
|
||||
jtrNum = handleData(data[0].jtrNum);
|
||||
jrcNum = handleData(data[0].jrcNum);
|
||||
dyrNum = handleData2(data[0].dyrNum);
|
||||
dycNum = handleData2(data[0].dycNum);
|
||||
} else {
|
||||
jtrNum = "000";
|
||||
jrcNum = "000";
|
||||
dyrNum = "0000";
|
||||
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];
|
||||
|
||||
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];
|
||||
|
||||
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];
|
||||
|
||||
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];
|
||||
|
||||
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 = "../../img/video/voi_photo4.png";
|
||||
var htmls = '<img src ="'+s+'" alt="" style="height:100%;width:100%; margin-top:5%" />';
|
||||
var htmls = '<img src ="' + s + '" alt="" style="height:100%;width:100%; margin-top:5%" />';
|
||||
$('#photos').empty().append(htmls);
|
||||
}
|
||||
|
||||
function getPerStatisticsPhoto(accessType,timeType){
|
||||
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
|
||||
const url = commonUrl + "screen/largeScreen/accessMge/getPerStatisticsPhoto?params=" + montageParam; // url
|
||||
ajaxRequestGet(url, "GET", true, function () {
|
||||
}, function (result) {
|
||||
let html = '';
|
||||
|
|
@ -271,147 +298,148 @@ function getPerStatisticsPhoto(accessType,timeType){
|
|||
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:95%;width:100%; margin-top:5%" />';
|
||||
html +='<span>'+ a +'</span>';
|
||||
html +='</div>';
|
||||
$.each(result.data, function (index, item) {
|
||||
html += '<div class="abnormalAlarmImg">';
|
||||
html += '<img src ="' + s + '" alt="" style="height:95%;width:100%; margin-top:5%" />';
|
||||
html += '<span>' + a + '</span>';
|
||||
html += '</div>';
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
// html += '<div style="color:#71757B;">无数据</div>'
|
||||
html +='<div class="abnormalAlarmImg">';
|
||||
html +='<img src ="../../img/video/voi_photo.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html +='<span>告警1</span>';
|
||||
html +='</div>';
|
||||
|
||||
html +='<div class="abnormalAlarmImg">';
|
||||
html +='<img src ="../../img/video/voi_photo2.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html +='<span>告警2</span>';
|
||||
html +='</div>';
|
||||
|
||||
html +='<div class="abnormalAlarmImg">';
|
||||
html +='<img src ="../../img/video/voi_photo3.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html +='<span>告警3</span>';
|
||||
html +='</div>';
|
||||
|
||||
html +='<div class="abnormalAlarmImg">';
|
||||
html +='<img src ="../../img/video/voi_photo4.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html +='<span>告警4</span>';
|
||||
html +='</div>';
|
||||
html += '<div class="abnormalAlarmImg">';
|
||||
html += '<img src ="../../img/video/voi_photo.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html += '<span>告警1</span>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="abnormalAlarmImg">';
|
||||
html += '<img src ="../../img/video/voi_photo2.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html += '<span>告警2</span>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="abnormalAlarmImg">';
|
||||
html += '<img src ="../../img/video/voi_photo3.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html += '<span>告警3</span>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="abnormalAlarmImg">';
|
||||
html += '<img src ="../../img/video/voi_photo4.png" alt="" style="height:85%;width:100%; margin-top:5%" />';
|
||||
html += '<span>告警4</span>';
|
||||
html += '</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);
|
||||
error(xhr, status, error)
|
||||
}, aqEnnable);
|
||||
}
|
||||
|
||||
function getPerStatisticsList(bidCode){
|
||||
const url = commonUrl + "screen/largeScreen/accessMge/getPerStatisticsList"; // url
|
||||
function getPerStatisticsList(bidCode) {
|
||||
const url = commonUrl + "screen/largeScreen/accessMge/getPerStatisticsList";
|
||||
table.render({
|
||||
elem: '#demo2',
|
||||
url: url,
|
||||
skin: 'line',
|
||||
page: true,
|
||||
headers:{
|
||||
decrypt:"decrypt",
|
||||
"Authorization":token
|
||||
height: 'full-560',
|
||||
headers: {
|
||||
decrypt: "decrypt",
|
||||
"Authorization": token
|
||||
},
|
||||
where: {
|
||||
bidCode:bidCode,
|
||||
proName:$('#proName2').val(),
|
||||
userName:$('#userName').val(),
|
||||
date:$('#date2').val()
|
||||
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'}
|
||||
{ type: 'numbers', title: '序号', width: '10%' }, // 添加序号列
|
||||
{ field: 'proName', title: '工程名称', align: 'center', width: '20%' },
|
||||
{ field: 'userName', title: '姓名', align: 'center', width: '10%' },
|
||||
{ field: 'phone', title: '电话', align: 'center', width: '20%' },
|
||||
{ field: 'accessType', title: '状态', align: 'center', width: '10%' },
|
||||
{ field: 'accesssTime', title: '时间', align: 'center', width: '30%' }
|
||||
]],
|
||||
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);
|
||||
});
|
||||
// 在表格渲染完成后,重新渲染序号列
|
||||
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){
|
||||
done: function (res, curr, count, origin) {
|
||||
console.log(res);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function getQueryList(type){
|
||||
if(type==1){
|
||||
function getQueryList(type) {
|
||||
if (type == 1) {
|
||||
getVehicleStatisticsList(bidCode);
|
||||
}else{
|
||||
} else {
|
||||
getPerStatisticsList(bidCode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function exportVehicleData(){
|
||||
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 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);
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
// 创建一个隐藏的 <a> 标签
|
||||
var link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.download = '今日、当月车辆出入场统计.xlsx'; // 设置下载文件的名称,假设是 Excel 文件
|
||||
var link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.download = '车辆出入统计.xlsx'; // 设置下载文件的名称,假设是 Excel 文件
|
||||
// 将 <a> 标签添加到文档中
|
||||
document.body.appendChild(link);
|
||||
document.body.appendChild(link);
|
||||
// 触发 <a> 标签的 click 事件来下载文件
|
||||
link.click();
|
||||
link.click();
|
||||
// 释放 URL 对象
|
||||
window.URL.revokeObjectURL(url);
|
||||
window.URL.revokeObjectURL(url);
|
||||
// 移除 <a> 标签
|
||||
document.body.removeChild(link);
|
||||
document.body.removeChild(link);
|
||||
}, function (xhr, status, error) {
|
||||
error(xhr, status, error)
|
||||
error(xhr, status, error)
|
||||
}, aqEnnable);
|
||||
}
|
||||
|
||||
function exportPerData(){
|
||||
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 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);
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
// 创建一个隐藏的 <a> 标签
|
||||
var link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.download = '今日、当月人员出入场统计.xlsx'; // 设置下载文件的名称,假设是 Excel 文件
|
||||
var link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.download = '人员出入统计.xlsx'; // 设置下载文件的名称,假设是 Excel 文件
|
||||
// 将 <a> 标签添加到文档中
|
||||
document.body.appendChild(link);
|
||||
|
||||
document.body.appendChild(link);
|
||||
|
||||
// 触发 <a> 标签的 click 事件来下载文件
|
||||
link.click();
|
||||
|
||||
link.click();
|
||||
|
||||
// 释放 URL 对象
|
||||
window.URL.revokeObjectURL(url);
|
||||
|
||||
window.URL.revokeObjectURL(url);
|
||||
|
||||
// 移除 <a> 标签
|
||||
document.body.removeChild(link);
|
||||
document.body.removeChild(link);
|
||||
}, function (xhr, status, error) {
|
||||
error(xhr, status, error)
|
||||
errorFn(xhr, status, error)
|
||||
}, aqEnnable);
|
||||
}
|
||||
|
|
@ -121,20 +121,20 @@
|
|||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">时间:</label>
|
||||
<label class="layui-form-label" style="width: 60px;">时间:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="date1" placeholder="请选择时间" autocomplete="off"
|
||||
<input type="text" id="date1" placeholder="请选择时间" readonly style="cursor: pointer;width: 190px;"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline" style="margin-left: 36px;">
|
||||
<div class="layui-col-xs12">
|
||||
<button class="layui-btn" onclick="getQueryList(1)">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline" style="margin-left: 10px;">
|
||||
<div class="layui-col-xs12">
|
||||
<button class="layui-btn" onclick="exportVehicleData()">导出</button>
|
||||
</div>
|
||||
|
|
@ -166,7 +166,7 @@
|
|||
<div class="imgs today-img">
|
||||
<span class="font-style" id="threerPer"></span>
|
||||
</div>
|
||||
<span class="span-style">辆</span>
|
||||
<span class="span-style">人</span>
|
||||
</div>
|
||||
<div class="today-font" style="margin-top: 10%;">今日累计出场</div>
|
||||
<div class="direction">
|
||||
|
|
@ -179,7 +179,7 @@
|
|||
<div class="imgs today-img">
|
||||
<span class="font-style" id="threecPer"></span>
|
||||
</div>
|
||||
<span class="span-style" >辆</span>
|
||||
<span class="span-style" >人</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="top-box-left-top-center">
|
||||
|
|
@ -198,7 +198,7 @@
|
|||
<div class="cumulative-img">
|
||||
<span class="font-style" id="foursrPer"></span>
|
||||
</div>
|
||||
<span class="span-style">辆</span>
|
||||
<span class="span-style">人</span>
|
||||
</div>
|
||||
<div class="cumulative-font" style="margin-top: 10%;">当月累计出场</div>
|
||||
<div class="direction" style="margin-top: 0%;">
|
||||
|
|
@ -215,7 +215,7 @@
|
|||
<div class=" cumulative-img">
|
||||
<span class="font-style" id="fourscPer"></span>
|
||||
</div>
|
||||
<span class="span-style">辆</span>
|
||||
<span class="span-style">人</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="top-box-left-top-bot">
|
||||
|
|
@ -254,19 +254,19 @@
|
|||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">时间:</label>
|
||||
<label class="layui-form-label" style="width: 60px;">时间:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="date2" placeholder="请选择时间" autocomplete="off"
|
||||
<input type="text" id="date2" placeholder="请选择时间" autocomplete="off" readonly style="cursor: pointer;width: 190px;"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline" style="margin-left: 36px;">
|
||||
<div class="layui-col-xs12">
|
||||
<button class="layui-btn" onclick="getQueryList(2)">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline" style="margin-left: 10px;">
|
||||
<div class="layui-col-xs12">
|
||||
<button class="layui-btn" onclick="exportPerData()">导出</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue