Merge branch 'master' of http://192.168.0.56:3000/cwchen/ah_jjzhgd_webscreen
This commit is contained in:
commit
4145b9c3f3
|
|
@ -95,3 +95,6 @@ body {
|
||||||
.black{
|
.black{
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
.layui-table-init {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
@ -10,24 +10,22 @@ layui.use(['layer','table','form','laydate'], function () {
|
||||||
laydate.render({
|
laydate.render({
|
||||||
elem: '#date1',
|
elem: '#date1',
|
||||||
range: true,
|
range: true,
|
||||||
type: 'datetime',
|
type: 'date',
|
||||||
range: '~',
|
range: true,
|
||||||
change: function(value, date, endDate){
|
format: 'yyyy-MM-dd',
|
||||||
|
max: Date.parse(new Date()),
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
$('#date1').val(getNowTime() + " - " + getNowTime())
|
||||||
//时间范围设置
|
//时间范围设置
|
||||||
laydate.render({
|
laydate.render({
|
||||||
elem: '#date2',
|
elem: '#date2',
|
||||||
range: true,
|
range: true,
|
||||||
type: 'datetime',
|
type: 'date',
|
||||||
range: '~',
|
range: true,
|
||||||
change: function(value, date, endDate){
|
format: 'yyyy-MM-dd',
|
||||||
|
max: Date.parse(new Date()),
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
$('#date2').val(getNowTime() + " - " + getNowTime())
|
||||||
//今日、当月车辆出入场统计
|
//今日、当月车辆出入场统计
|
||||||
getVehicleStatistics();
|
getVehicleStatistics();
|
||||||
|
|
||||||
|
|
@ -71,10 +69,10 @@ function getVehicleStatistics(){
|
||||||
|
|
||||||
function getStatistics(data) {
|
function getStatistics(data) {
|
||||||
if (data != "") {
|
if (data != "") {
|
||||||
var jtrNum = data[0].jtrNum;
|
var jtrNum = handleData(data[0].jtrNum);
|
||||||
var jrcNum = data[0].jrcNum;
|
var jrcNum = handleData(data[0].jrcNum);
|
||||||
var dyrNum = data[0].dyrNum;
|
var dyrNum = handleData2(data[0].dyrNum);
|
||||||
var dycNum = data[0].dycNum;
|
var dycNum = handleData2(data[0].dycNum);
|
||||||
} else {
|
} else {
|
||||||
var jtrNum = "000";
|
var jtrNum = "000";
|
||||||
var jrcNum = "000";
|
var jrcNum = "000";
|
||||||
|
|
@ -106,7 +104,35 @@ function getStatistics(data){
|
||||||
var s = "../../img/video/voi_photo4.png";
|
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);
|
$('#photo').empty().append(htmls);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 数据处理
|
||||||
|
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) {
|
function getVehicleStatisticsPhoto(accessType, timeType) {
|
||||||
|
|
@ -154,17 +180,18 @@ function getVehicleStatisticsPhoto(accessType,timeType){
|
||||||
}
|
}
|
||||||
$('#abnormalAlarm').empty().append(html);
|
$('#abnormalAlarm').empty().append(html);
|
||||||
}, function (xhr, status, error) {
|
}, function (xhr, status, error) {
|
||||||
error(xhr, status, error)
|
errorFn(xhr, status, error)
|
||||||
}, aqEnnable);
|
}, aqEnnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getVehicleStatisticsList(bidCode) {
|
function getVehicleStatisticsList(bidCode) {
|
||||||
const url = commonUrl + "screen/largeScreen/accessMge/getVehicleStatisticsList"; // url
|
const url = commonUrl + "screen/largeScreen/accessMge/getVehicleStatisticsList";
|
||||||
table.render({
|
table.render({
|
||||||
elem: '#demo1',
|
elem: '#demo1',
|
||||||
url: url,
|
url: url,
|
||||||
skin: 'line',
|
skin: 'line',
|
||||||
page: true,
|
page: true,
|
||||||
|
height: 'full-560',
|
||||||
headers: {
|
headers: {
|
||||||
decrypt: "decrypt",
|
decrypt: "decrypt",
|
||||||
"Authorization": token
|
"Authorization": token
|
||||||
|
|
@ -177,12 +204,12 @@ function getVehicleStatisticsList(bidCode){
|
||||||
},
|
},
|
||||||
cols: [[
|
cols: [[
|
||||||
{ type: 'numbers', title: '序号' }, // 添加序号列
|
{ type: 'numbers', title: '序号' }, // 添加序号列
|
||||||
{field: 'proName', title: '工程名称',align:'center'},
|
{ field: 'proName', title: '工程名称', align: 'center', width: '10%' },
|
||||||
{field: 'carNum', title: '车牌号',align:'center'},
|
{ field: 'carNum', title: '车牌号', align: 'center', width: '15%' },
|
||||||
{field: 'userName', title: '司机',align:'center'},
|
{ field: 'userName', title: '司机', align: 'center', width: '15%' },
|
||||||
{field: 'phone', title: '司机电话',align:'center'},
|
{ field: 'phone', title: '司机电话', align: 'center', width: '20%' },
|
||||||
{field: 'accessType', title: '状态',align:'center'},
|
{ field: 'accessType', title: '状态', align: 'center', width: '10%' },
|
||||||
{field: 'accesssTime', title: '时间',align:'center'}
|
{ field: 'accesssTime', title: '时间', align: 'center', width: '30%' }
|
||||||
]],
|
]],
|
||||||
initComplete: function () {
|
initComplete: function () {
|
||||||
// 在表格渲染完成后,重新渲染序号列
|
// 在表格渲染完成后,重新渲染序号列
|
||||||
|
|
@ -206,7 +233,7 @@ function getPerStatistics(){
|
||||||
ajaxRequestGet(url, "GET", true, function () {
|
ajaxRequestGet(url, "GET", true, function () {
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
if (result.code === 200) {
|
if (result.code === 200) {
|
||||||
if (result.data && result.data.length > 1) {
|
if (result.data && result.data.length > 0) {
|
||||||
getStatisticsPer(result.data)
|
getStatisticsPer(result.data)
|
||||||
} else {
|
} else {
|
||||||
getStatisticsPer("")
|
getStatisticsPer("")
|
||||||
|
|
@ -215,24 +242,24 @@ function getPerStatistics(){
|
||||||
layer.msg(result.msg, { icon: 2 });
|
layer.msg(result.msg, { icon: 2 });
|
||||||
}
|
}
|
||||||
}, function (xhr, status, error) {
|
}, function (xhr, status, error) {
|
||||||
error(xhr, status, error)
|
errorFn(xhr, status, error)
|
||||||
setData(null);
|
setData(null);
|
||||||
}, aqEnnable);
|
}, aqEnnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getStatisticsPer(data) {
|
function getStatisticsPer(data) {
|
||||||
|
let jtrNum = null, jrcNum = null, dyrNum = null, dycNum = null;
|
||||||
if (data != "") {
|
if (data != "") {
|
||||||
var jtrNum = data[0].jtrNum;
|
jtrNum = handleData(data[0].jtrNum);
|
||||||
var jrcNum = data[0].jrcNum;
|
jrcNum = handleData(data[0].jrcNum);
|
||||||
var dyrNum = data[0].dyrNum;
|
dyrNum = handleData2(data[0].dyrNum);
|
||||||
var dycNum = data[0].dycNum;
|
dycNum = handleData2(data[0].dycNum);
|
||||||
} else {
|
} else {
|
||||||
var jtrNum = "000";
|
jtrNum = "000";
|
||||||
var jrcNum = "000";
|
jrcNum = "000";
|
||||||
var dyrNum = "0000";
|
dyrNum = "0000";
|
||||||
var dycNum = "0000";
|
dycNum = "0000";
|
||||||
}
|
}
|
||||||
|
|
||||||
const jtrNums = jtrNum.split("").map(Number);
|
const jtrNums = jtrNum.split("").map(Number);
|
||||||
document.getElementById("onerPer").textContent = jtrNums[0];
|
document.getElementById("onerPer").textContent = jtrNums[0];
|
||||||
document.getElementById("tworPer").textContent = jtrNums[1];
|
document.getElementById("tworPer").textContent = jtrNums[1];
|
||||||
|
|
@ -309,12 +336,13 @@ function getPerStatisticsPhoto(accessType,timeType){
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPerStatisticsList(bidCode) {
|
function getPerStatisticsList(bidCode) {
|
||||||
const url = commonUrl + "screen/largeScreen/accessMge/getPerStatisticsList"; // url
|
const url = commonUrl + "screen/largeScreen/accessMge/getPerStatisticsList";
|
||||||
table.render({
|
table.render({
|
||||||
elem: '#demo2',
|
elem: '#demo2',
|
||||||
url: url,
|
url: url,
|
||||||
skin: 'line',
|
skin: 'line',
|
||||||
page: true,
|
page: true,
|
||||||
|
height: 'full-560',
|
||||||
headers: {
|
headers: {
|
||||||
decrypt: "decrypt",
|
decrypt: "decrypt",
|
||||||
"Authorization": token
|
"Authorization": token
|
||||||
|
|
@ -326,12 +354,12 @@ function getPerStatisticsList(bidCode){
|
||||||
date: $('#date2').val()
|
date: $('#date2').val()
|
||||||
},
|
},
|
||||||
cols: [[
|
cols: [[
|
||||||
{type: 'numbers', title: '序号'}, // 添加序号列
|
{ type: 'numbers', title: '序号', width: '10%' }, // 添加序号列
|
||||||
{field: 'proName', title: '工程名称',align:'center'},
|
{ field: 'proName', title: '工程名称', align: 'center', width: '20%' },
|
||||||
{field: 'userName', title: '姓名',align:'center'},
|
{ field: 'userName', title: '姓名', align: 'center', width: '10%' },
|
||||||
{field: 'phone', title: '电话',align:'center'},
|
{ field: 'phone', title: '电话', align: 'center', width: '20%' },
|
||||||
{field: 'accessType', title: '状态',align:'center'},
|
{ field: 'accessType', title: '状态', align: 'center', width: '10%' },
|
||||||
{field: 'accesssTime', title: '时间',align:'center'}
|
{ field: 'accesssTime', title: '时间', align: 'center', width: '30%' }
|
||||||
]],
|
]],
|
||||||
initComplete: function () {
|
initComplete: function () {
|
||||||
// 在表格渲染完成后,重新渲染序号列
|
// 在表格渲染完成后,重新渲染序号列
|
||||||
|
|
@ -370,7 +398,7 @@ function exportVehicleData(){
|
||||||
// 创建一个隐藏的 <a> 标签
|
// 创建一个隐藏的 <a> 标签
|
||||||
var link = document.createElement('a');
|
var link = document.createElement('a');
|
||||||
link.href = url;
|
link.href = url;
|
||||||
link.download = '今日、当月车辆出入场统计.xlsx'; // 设置下载文件的名称,假设是 Excel 文件
|
link.download = '车辆出入统计.xlsx'; // 设置下载文件的名称,假设是 Excel 文件
|
||||||
// 将 <a> 标签添加到文档中
|
// 将 <a> 标签添加到文档中
|
||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
// 触发 <a> 标签的 click 事件来下载文件
|
// 触发 <a> 标签的 click 事件来下载文件
|
||||||
|
|
@ -399,7 +427,7 @@ function exportPerData(){
|
||||||
// 创建一个隐藏的 <a> 标签
|
// 创建一个隐藏的 <a> 标签
|
||||||
var link = document.createElement('a');
|
var link = document.createElement('a');
|
||||||
link.href = url;
|
link.href = url;
|
||||||
link.download = '今日、当月人员出入场统计.xlsx'; // 设置下载文件的名称,假设是 Excel 文件
|
link.download = '人员出入统计.xlsx'; // 设置下载文件的名称,假设是 Excel 文件
|
||||||
// 将 <a> 标签添加到文档中
|
// 将 <a> 标签添加到文档中
|
||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
|
|
||||||
|
|
@ -412,6 +440,6 @@ function exportPerData(){
|
||||||
// 移除 <a> 标签
|
// 移除 <a> 标签
|
||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
}, function (xhr, status, error) {
|
}, function (xhr, status, error) {
|
||||||
error(xhr, status, error)
|
errorFn(xhr, status, error)
|
||||||
}, aqEnnable);
|
}, aqEnnable);
|
||||||
}
|
}
|
||||||
|
|
@ -121,20 +121,20 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<label class="layui-form-label">时间:</label>
|
<label class="layui-form-label" style="width: 60px;">时间:</label>
|
||||||
<div class="layui-input-inline">
|
<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">
|
class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-inline">
|
<div class="layui-inline" style="margin-left: 36px;">
|
||||||
<div class="layui-col-xs12">
|
<div class="layui-col-xs12">
|
||||||
<button class="layui-btn" onclick="getQueryList(1)">查询</button>
|
<button class="layui-btn" onclick="getQueryList(1)">查询</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-inline">
|
<div class="layui-inline" style="margin-left: 10px;">
|
||||||
<div class="layui-col-xs12">
|
<div class="layui-col-xs12">
|
||||||
<button class="layui-btn" onclick="exportVehicleData()">导出</button>
|
<button class="layui-btn" onclick="exportVehicleData()">导出</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -166,7 +166,7 @@
|
||||||
<div class="imgs today-img">
|
<div class="imgs today-img">
|
||||||
<span class="font-style" id="threerPer"></span>
|
<span class="font-style" id="threerPer"></span>
|
||||||
</div>
|
</div>
|
||||||
<span class="span-style">辆</span>
|
<span class="span-style">人</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="today-font" style="margin-top: 10%;">今日累计出场</div>
|
<div class="today-font" style="margin-top: 10%;">今日累计出场</div>
|
||||||
<div class="direction">
|
<div class="direction">
|
||||||
|
|
@ -179,7 +179,7 @@
|
||||||
<div class="imgs today-img">
|
<div class="imgs today-img">
|
||||||
<span class="font-style" id="threecPer"></span>
|
<span class="font-style" id="threecPer"></span>
|
||||||
</div>
|
</div>
|
||||||
<span class="span-style" >辆</span>
|
<span class="span-style" >人</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="top-box-left-top-center">
|
<div class="top-box-left-top-center">
|
||||||
|
|
@ -198,7 +198,7 @@
|
||||||
<div class="cumulative-img">
|
<div class="cumulative-img">
|
||||||
<span class="font-style" id="foursrPer"></span>
|
<span class="font-style" id="foursrPer"></span>
|
||||||
</div>
|
</div>
|
||||||
<span class="span-style">辆</span>
|
<span class="span-style">人</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="cumulative-font" style="margin-top: 10%;">当月累计出场</div>
|
<div class="cumulative-font" style="margin-top: 10%;">当月累计出场</div>
|
||||||
<div class="direction" style="margin-top: 0%;">
|
<div class="direction" style="margin-top: 0%;">
|
||||||
|
|
@ -215,7 +215,7 @@
|
||||||
<div class=" cumulative-img">
|
<div class=" cumulative-img">
|
||||||
<span class="font-style" id="fourscPer"></span>
|
<span class="font-style" id="fourscPer"></span>
|
||||||
</div>
|
</div>
|
||||||
<span class="span-style">辆</span>
|
<span class="span-style">人</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="top-box-left-top-bot">
|
<div class="top-box-left-top-bot">
|
||||||
|
|
@ -254,19 +254,19 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<label class="layui-form-label">时间:</label>
|
<label class="layui-form-label" style="width: 60px;">时间:</label>
|
||||||
<div class="layui-input-inline">
|
<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">
|
class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-inline">
|
<div class="layui-inline" style="margin-left: 36px;">
|
||||||
<div class="layui-col-xs12">
|
<div class="layui-col-xs12">
|
||||||
<button class="layui-btn" onclick="getQueryList(2)">查询</button>
|
<button class="layui-btn" onclick="getQueryList(2)">查询</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline">
|
<div class="layui-inline" style="margin-left: 10px;">
|
||||||
<div class="layui-col-xs12">
|
<div class="layui-col-xs12">
|
||||||
<button class="layui-btn" onclick="exportPerData()">导出</button>
|
<button class="layui-btn" onclick="exportPerData()">导出</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue