<!doctype html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<title>唐山市烟草专卖局卷烟零售配送指挥调度平台</title>
|
<link href="css/index.css" rel="stylesheet" type="text/css">
|
<link href="css/public.css" rel="stylesheet" type="text/css">
|
<script src="js/jquery-1.11.1.min.js"></script>
|
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=H1RLDFX3oib78k9N9ocaB1Ac"></script>
|
<!-- <script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&services=true"></script> -->
|
<style type="text/css">
|
body, html {
|
width: 100%;
|
height: 100%;
|
margin: 0;
|
font-family: "微软雅黑";
|
}
|
.BMap_cpyCtrl {
|
display: none;
|
}
|
.anchorBL {
|
display: none;
|
}
|
|
table {font-family: verdana,arial,sans-serif;font-size:11px;color:#333333;border-width: 1px;border-color: #333;border-collapse: collapse;margin-left:10px;}
|
|
table th {border-width: 1px;padding: 8px;border-style: solid;border-color: #333;}
|
|
table td {border-width: 1px;padding: 8px;border-style: solid;border-color: #666666;}
|
</style>
|
</head>
|
|
<body oncontextmenu=self.event.returnValue=false onselectstart="return false">
|
<div class="top">
|
<div class="title">唐山市烟草专卖局卷烟零售配送指挥调度平台</div>
|
<div class="nav"><a class="active" href="index.html">实时调度</a><a href="aqgl.html">安全管理</a><a href="psfx.html">配送分析</a><a href="zhfx.html">综合分析</a><a href="yhdz.html">一户多证</a></div>
|
</div>
|
<div class="Main">
|
<!--顶部数据栏-->
|
<div class="data">
|
<div class="block">
|
<div class="l-t"></div>
|
<div class="l-b"></div>
|
<div class="r-t"></div>
|
<div class="r-b"></div>
|
<div class="main1">
|
<div><img src="images/icon_cl.png">
|
<dl>
|
<dt>车辆数 :</dt>
|
<dd id="car">82</dd>
|
</dl>
|
</div>
|
<div><img src="images/icon_jsy.png">
|
<dl>
|
<dt>驾驶员 :</dt>
|
<dd id="user">82</dd>
|
</dl>
|
</div>
|
<div><img src="images/icon_psy.png">
|
<dl>
|
<dt>配送员 :</dt>
|
<dd id="user2">82</dd>
|
</dl>
|
</div>
|
</div>
|
</div>
|
<div class="block">
|
<div class="l-t"></div>
|
<div class="l-b"></div>
|
<div class="r-t"></div>
|
<div class="r-b"></div>
|
<div class="main2">
|
<div><img src="images/icon_zyz.png">
|
<dl>
|
<dt>转运站 :</dt>
|
<dd>3</dd>
|
</dl>
|
</div>
|
<div><img src="images/icon_pqs.png">
|
<dl>
|
<dt>片区数 :</dt>
|
<dd id="area">14</dd>
|
</dl>
|
</div>
|
<div><img src="images/icon_shs.png">
|
<dl>
|
<dt>商户数 :</dt>
|
<dd id="customer">500</dd>
|
</dl>
|
</div>
|
</div>
|
</div>
|
<div class="block">
|
<div class="l-t"></div>
|
<div class="l-b"></div>
|
<div class="r-t"></div>
|
<div class="r-b"></div>
|
<div class="main3">
|
<div><img src="images/icon_cxcs.png">
|
<dl>
|
<dt>出车次数</dt>
|
<dd id="out">100</dd>
|
</dl>
|
</div>
|
<div><img src="images/icon_xslc.png">
|
<dl>
|
<dt>行驶里程</dt>
|
<dd id="driving">20</dd>
|
</dl>
|
</div>
|
<div><img src="images/icon_shbs.png">
|
<dl>
|
<dt>送货条数</dt>
|
<dd id="num">1000</dd>
|
</dl>
|
</div>
|
<div><img src="images/icon_dzqscs.png">
|
<dl>
|
<dt>电子签收次数</dt>
|
<dd id="status">100</dd>
|
</dl>
|
</div>
|
</div>
|
</div>
|
<div class="block">
|
<div class="l-t"></div>
|
<div class="l-b"></div>
|
<div class="r-t"></div>
|
<div class="r-b"></div>
|
<div class="main4">
|
<div><img src="images/icon_tzggts.png">
|
<dl>
|
<dt>通知公告条数</dt>
|
<dd id="notice">500</dd>
|
</dl>
|
</div>
|
<div><img src="images/icon_spjkcs.png">
|
<dl>
|
<!-- 视频监控次数 -->
|
<dt>明日配送段数</dt>
|
<dd id="video">1500</dd>
|
</dl>
|
</div>
|
<div><img src="images/icon_ychjcs.png">
|
<dl>
|
<dt>远程呼叫次数</dt>
|
<dd id="call">200</dd>
|
</dl>
|
</div>
|
<div><img src="images/icon_sgyhpc.png">
|
<dl>
|
<dt>事故隐患排查</dt>
|
<dd id="paiCha">50</dd>
|
</dl>
|
</div>
|
</div>
|
</div>
|
<div class="block">
|
<div class="l-t"></div>
|
<div class="l-b"></div>
|
<div class="r-t"></div>
|
<div class="r-b"></div>
|
<div class="main5">
|
<div><img src="images/icon_xcxdlcs.png">
|
<dl>
|
<dt>小程序登录次数</dt>
|
<dd id="wx">20</dd>
|
</dl>
|
</div>
|
<div><img src="images/icon_xcxsyl.png">
|
<dl>
|
<dt>小程序使用率</dt>
|
<dd id="wxRate">90%</dd>
|
</dl>
|
</div>
|
<div><img src="images/icon_hdcs.png">
|
<dl>
|
<dt>互动次数</dt>
|
<dd id="like">300</dd>
|
</dl>
|
</div>
|
<div><img src="images/icon_hdl.png">
|
<dl>
|
<dt>互动率</dt>
|
<dd id="likeRate">50%</dd>
|
</dl>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="content">
|
<!--今日配送任务-->
|
<div class="task">
|
<div class="l-t"></div>
|
<div class="l-b"></div>
|
<div class="r-t"></div>
|
<div class="r-b"></div>
|
<div class="title"><img src="images/icon_title.png"><span>今日配送任务</span>
|
<input type="date" style="width:129px;" id="sendTime" onchange="timeChange()"></input>
|
</div>
|
<ul class="scroll_css" id="content1">
|
</ul>
|
</div>
|
<div class="center">
|
<!--中间数据栏-->
|
<div class="c_data">
|
<div class="block">
|
<div class="l-t"></div>
|
<div class="l-b"></div>
|
<div class="r-t"></div>
|
<div class="r-b"></div>
|
<img src="images/icon_pscl.png">
|
<div class="title">配送车辆</div>
|
<dl onclick='table1()'>
|
<dt>出发 :</dt>
|
<dd id="outCar">2</dd>
|
</dl>
|
<dl onclick='taKanList()'>
|
<dt>待踏勘 :</dt>
|
<dd id="taKan">2</dd>
|
</dl>
|
</div>
|
<div class="block">
|
<div class="l-t"></div>
|
<div class="l-b"></div>
|
<div class="r-t"></div>
|
<div class="r-b"></div>
|
<img src="images/icon_pswd.png">
|
<div class="title">配送网点</div>
|
<dl onclick='table2()'>
|
<dt>未送达 :</dt>
|
<dd id="status0">2000</dd>
|
</dl>
|
<dl onclick='table7()'>
|
<dt>总计 :</dt>
|
<dd id="sumOrder">5000</dd>
|
</dl>
|
</div>
|
<div class="block">
|
<div class="l-t"></div>
|
<div class="l-b"></div>
|
<div class="r-t"></div>
|
<div class="r-b"></div>
|
<img src="images/icon_tsyj.png">
|
<div class="title">特殊预警</div>
|
<dl onclick='table4()'>
|
<dt>异常签收 :</dt>
|
<dd id="status2">0</dd>
|
</dl>
|
<dl onclick='table5()'>
|
<dt>危险开启 :</dt>
|
<dd id="open">2</dd>
|
</dl>
|
</div>
|
<div class="block">
|
<div class="l-t"></div>
|
<div class="l-b"></div>
|
<div class="r-t"></div>
|
<div class="r-b"></div>
|
<img src="images/icon_jrxh.png">
|
<div class="title">今日新户</div>
|
<dl onclick='table3()'>
|
<dt>已配送 :</dt>
|
<dd id="status1">10</dd>
|
</dl>
|
<dl onclick='table6()'>
|
<dt>新增 :</dt>
|
<dd id="addCustomer">50</dd>
|
</dl>
|
</div>
|
</div>
|
<!--地图-->
|
<div class="map">
|
<div class="l-t"></div>
|
<div class="l-b"></div>
|
<div class="r-t"></div>
|
<div class="r-b"></div>
|
<div class="cmd"><img onclick="back2()" class="Back" src="images/icon_back.png"><img class="Full" src="images/icon_full.png"></div>
|
<div class="Content" id="allMap"></div>
|
</div>
|
<script>
|
$(document).ready(function(){
|
$(".Full").click(function(){
|
$(".map").toggleClass("FullMap");
|
});
|
});
|
</script>
|
</div>
|
<!--事件日志-->
|
<div class="journal">
|
<div class="l-t"></div>
|
<div class="l-b"></div>
|
<div class="r-t"></div>
|
<div class="r-b"></div>
|
<div class="title"><img src="images/icon_title.png"><span>事件日志</span></div>
|
<ul class="scroll_css" id="content2">
|
</ul>
|
</div>
|
</div>
|
</div>
|
<!--设置滚动条样式-->
|
<script src="http://www.jq22.com/jquery/1.9.1/jquery.min.js"></script>
|
<script type="text/javascript" src="js/jquery.nicescroll.js"></script>
|
<script type="text/javascript">
|
$('.scroll_css').niceScroll({
|
cursorcolor: "#999",//#CC0071 光标颜色
|
cursoropacitymax: 0.4, //改变不透明度非常光标处于活动状态(scrollabar“可见”状态),范围从1到0
|
touchbehavior: false, //使光标拖动滚动像在台式电脑触摸设备
|
cursorwidth: "0.25rem", //像素光标的宽度
|
cursorborder: "0", // 游标边框css定义
|
cursorborderradius: "5px",//以像素为光标边界半径
|
autohidemode: true //是否隐藏滚动条
|
});
|
|
</script>
|
<!--危险开启视频弹层 已隐藏,使用时设置为显示即可-->
|
<div class="pop" style="display:none;" id="videoPop">
|
<div class="main">
|
<div class="l-t"></div>
|
<div class="l-b"></div>
|
<div class="r-t"></div>
|
<div class="r-b"></div>
|
<div class="close"><img src="images/icon_close.png" style="background-color:black"></div>
|
<div class="full"><img src="images/icon_full.png"></div>
|
<div class="video">
|
<iframe src='' id="iframe1" class="video"></iframe>
|
</div>
|
</div>
|
</div>
|
|
<div class="pop" style="display:none;" id="videoPop2">
|
<div class="main">
|
<div class="l-t"></div>
|
<div class="l-b"></div>
|
<div class="r-t"></div>
|
<div class="r-b"></div>
|
<div class="close"><img src="images/icon_close.png"></div>
|
<div class="full"><img src="images/icon_full.png"></div>
|
<div class="video" style="overflow:scroll;">
|
<table border="1" id="taKanList" style="margin-top:10px;color:white;font-size:14px;">
|
</table>
|
</div>
|
</div>
|
</div>
|
</body>
|
<script>
|
$(document).ready(function(){
|
$(".pop .close").click(function(){
|
$(".pop").css({"display":"none"});
|
});
|
$(".full").click(function(){
|
$(".pop .main").toggleClass("FullVideo");
|
});
|
});
|
|
|
// 百度地图API功能
|
var map = new BMap.Map('allMap');
|
var mapStyle ={
|
features: ["road","building","water","land"],//隐藏地图上的"poi",
|
style : 'midnight',
|
};
|
map.setMapStyle(mapStyle);
|
//map.addControl(new BMap.NavigationControl());//设置放大缩小的控件
|
map.centerAndZoom(new BMap.Point(118.187167,39.636514), 12);
|
map.enableScrollWheelZoom(true);
|
|
var mapType1 = new BMap.MapTypeControl({mapTypes: [BMAP_NORMAL_MAP,BMAP_HYBRID_MAP]});
|
|
var mapType2 = new BMap.MapTypeControl({anchor: BMAP_ANCHOR_TOP_LEFT});
|
var overView = new BMap.OverviewMapControl();
|
var overViewOpen = new BMap.OverviewMapControl({isOpen:true, anchor: BMAP_ANCHOR_BOTTOM_RIGHT});
|
|
map.addControl(mapType1); //2D图,卫星图
|
|
//var urls = "http://111.63.178.115:9091/xboot/"; //连上地址
|
var urls = "/xboot/";
|
//var url2 = "http://localhost:9999/";
|
//var urls = "http://127.0.0.1:9091/xboot/";
|
var url2 = "http://111.63.178.115:9091/index.html#/"; //连上地址
|
//var url2 = "http://192.168.0.102:9091/index.html#/"; //连上地址
|
|
$(function(){
|
var args = getArgs();
|
console.log(args,'args---')
|
if(args.token){
|
sessionStorage.setItem("token",args.token);
|
}else{
|
//window.location.href="http://111.63.178.115:9091/index.html#/login"
|
// window.location.href="http://111.63.178.115:9091/index.html#/login"
|
// if(!sessionStorage.getItem("token")){
|
// window.location.href="http://111.63.178.115:9091/index.html#/login"
|
// }
|
// if(!sessionStorage.getItem("token")){
|
// window.location.href="http://111.63.178.115:9091/index.html#/login"
|
// }else if(sessionStorage.getItem("token")!=tk){
|
// window.location.href="http://111.63.178.115:9091/index.html#/login"
|
// }
|
}
|
|
getIndex();
|
getTodayTask();
|
getEventLog();
|
|
getAllCar();
|
getTodayTask2();
|
|
window.setInterval(function() {
|
getIndex();
|
getTodayTask();
|
getTodayTask2();
|
},1000*60*14)
|
|
|
window.setInterval(function() {
|
getEventLog();
|
},1000*60*5)
|
|
start1();
|
});
|
|
function getArgs(){
|
var qs = (location.search.length > 0 ? location.search.substring(1) : ""),
|
args = {},
|
items = qs.length ? qs.split("&") : [],
|
item = null, name = null,
|
value = null, i = 0,
|
len = items.length;
|
|
for (i = 0; i < len; i++) {
|
item = items[i].split("=");
|
name = decodeURIComponent(item[0]);
|
value = decodeURIComponent(item[1]);
|
if (name.length) {
|
args[name] = value;
|
}
|
}
|
return args;
|
}
|
|
function timeChange(){
|
getTodayTask();
|
}
|
|
var time1 = null;
|
function start1(){
|
time1 = window.setInterval(function() {
|
getAllCar();
|
},1000*60*4)
|
}
|
|
function end1(){
|
clearInterval(time1);
|
}
|
|
var myIcon = new BMap.Icon("/images/car.png", new BMap.Size(50, 25));
|
var myIcon2 = new BMap.Icon("/images/mk2.png", new BMap.Size(31, 36));
|
|
var mks = [];
|
|
function getAllCar(){
|
clearMk();
|
$.ajax({
|
type: "get",
|
url: urls+"pcStatistic/getCars",
|
dataType: "json",
|
headers: {'accessToken':sessionStorage.getItem("token")},
|
success: function (data) {
|
if(data.code==200){
|
var result = data.result.data;
|
for(var i=0;i<result.length;i++){
|
let lng = result[i].longitude/360000.0;
|
let lat = result[i].latitude/360000.0;
|
let db = bd_encrypt(lng,lat);
|
lng = db.bd_lng;
|
lat = db.bd_lat
|
|
let carNo = result[i].plateNo;
|
let carCode = result[i].vehicleIndexCode+""
|
let time2 = result[i].time.substring(5,16)
|
let speed = result[i].speed/100000
|
|
// 创建Marker标注,使用小车图标
|
let pt = new BMap.Point(lng,lat);
|
let marker = new BMap.Marker(pt, {
|
icon: myIcon
|
});
|
|
// 将标注添加到地图
|
map.addOverlay(marker);
|
|
// 创建信息窗口
|
let opts2 = {width: 100,height: 90,title: '车辆信息'};
|
let infoWindow = new BMap.InfoWindow("数据时间:"+time2+"<br>车速:"+speed+"km/h<br> <button onclick=\"video('"+carCode+"')\">视频画面</button> ", opts2);
|
//<button onclick=\"video('"+carCode+"')\">视频画面</button> <button onclick=\"hujiao('"+carCode+"')\">一键呼叫</button>
|
//<a class=\"aaa\" href=\"https://111.63.178.115:1443/portal\" target=\"_blank\" rel=\"noreferrer\">视频画面</a>
|
// 点标记添加点击事件
|
marker.addEventListener('click', function () {
|
map.openInfoWindow(infoWindow, pt); // 开启信息窗口
|
});
|
|
let opts = {
|
position: pt, // 指定文本标注所在的地理位置
|
offset: new BMap.Size(-28, -34) // 设置文本偏移量
|
};
|
// 创建文本标注对象
|
let label = new BMap.Label(carNo, opts);
|
// 自定义文本标注样式
|
label.setStyle({
|
color: 'blue',
|
borderColor: '#ccc',
|
fontSize: '12px',
|
fontFamily: '微软雅黑'
|
});
|
map.addOverlay(label);
|
}
|
}
|
}
|
});
|
}
|
|
function clearMk(){
|
map.clearOverlays();
|
}
|
|
function back2(){
|
map.clearOverlays();
|
getAllCar();
|
start1();
|
}
|
|
function getCustomer(carNo){
|
$.ajax({
|
type: "get",
|
url: urls+"pcStatistic/getOrderStatus?carNo="+carNo,
|
dataType: "json",
|
success: function (data) {
|
|
if(data.code==200){
|
end1();
|
clearMk()
|
//map.centerAndZoom(new BMap.Point(118.187167,39.636514), 13);
|
|
var result = data.result;
|
for(var i=0;i<result.length;i++){
|
var lng = result[i].areaName;
|
var lat = result[i].areaSectionName;
|
if(!lng){
|
continue;
|
}
|
var customerName = result[i].customerName;
|
var userName = result[i].code;
|
var img = result[i].img;
|
var id = result[i].id;
|
var status = result[i].status;
|
var times
|
if(result[i].updateTime){
|
times = result[i].updateTime.substring(11,16);
|
}
|
|
|
if(status==0){
|
let pt = new BMap.Point(lng,lat);
|
let marker = new BMap.Marker(pt);
|
map.addOverlay(marker);
|
|
let sContent = '<h4 style="margin:0 0 5px 0;">'+customerName+':配送中</h4>'
|
let infoWindow = new BMap.InfoWindow(sContent);
|
// marker添加点击事件
|
marker.addEventListener('click', function () {
|
map.openInfoWindow(infoWindow, pt);
|
});
|
}else if(status==1){
|
let pt = new BMap.Point(lng,lat);
|
let marker = new BMap.Marker(pt, {
|
icon: myIcon2
|
});
|
map.addOverlay(marker);
|
|
let sContent = '<h4 style="margin:0 0 5px 0;">'+customerName+'</h4>'+
|
'<img style="float:right;margin:0 4px 22px" id="'+id+'" src="'+img+'" width="139" height="104"/>'+
|
'<div style="margin:0;line-height:1.5;font-size:13px;">'+times+'<br>'+userName+'<br>已签收</div></div>';
|
let infoWindow = new BMap.InfoWindow(sContent);
|
// marker添加点击事件
|
marker.addEventListener('click', function () {
|
map.openInfoWindow(infoWindow, pt);
|
// 图片加载完毕重绘infoWindow
|
document.getElementById(id).onload = function () {
|
infoWindow.redraw(); // 防止在网速较慢时生成的信息框高度比图片总高度小,导致图片部分被隐藏
|
};
|
});
|
}else{
|
let pt = new BMap.Point(lng,lat);
|
let marker = new BMap.Marker(pt, {
|
icon: myIcon2
|
});
|
map.addOverlay(marker);
|
|
let sContent = '<h4 style="margin:0 0 5px 0;">'+customerName+'</h4>'+
|
'<div style="margin:0;line-height:1.5;font-size:13px;">'+result[i].remarks+'</div></div>';
|
let infoWindow = new BMap.InfoWindow(sContent);
|
marker.addEventListener('click', function () {
|
map.openInfoWindow(infoWindow, pt);
|
});
|
}
|
}
|
}
|
}
|
});
|
}
|
|
function taKanList(){
|
$("#videoPop2").show();
|
$('#taKanList').html("");
|
$.ajax({
|
type: "get",
|
url: urls+"pcStatistic/getTaKanList",
|
dataType: "json",
|
success: function (data) {
|
if(data.code==200){
|
var list = data.result;
|
$('#taKanList').append("<tr><th>商户名称</th><th>录入时间</th><th>状态</th></tr>");
|
for(var i=0;i<list.length;i++){
|
var c = list[i]
|
$('#taKanList').append("<tr><th>"+c.name+"</th><th>"+c.createTime+"</th><th>待踏勘</th></tr>");
|
}
|
|
}
|
}
|
});
|
}
|
|
function video(carId){
|
//$("#videoPop").show();
|
//$('#iframe1').attr("src","/haiKang3.html");
|
//$('#iframe1').attr("src","https://111.63.178.115:1443/portal");
|
window.open("https://111.63.178.115:1443/portal/cas/loginPage?service=https://111.63.178.115:1443/portal")
|
//<a href="https://111.63.178.115:1443/portal" target="_blank" rel="noreferrer">视频画面</a>
|
}
|
|
function hujiao(carId){
|
//alert(carId);
|
}
|
|
function getIndex(){
|
$.ajax({
|
type: "get",
|
url: urls+"pcStatistic/getIndex1",
|
dataType: "json",
|
headers: {'accessToken':sessionStorage.getItem("token")},
|
success: function (data) {
|
if(data.code==200){
|
var result = data.result;
|
$('#call').html(result.call);
|
$('#car').html(result.car);
|
$('#taKan').html(result.taKan);
|
$('#customer').html(result.customer);
|
$('#dept').html(result.dept);
|
$('#area').html(result.area);
|
$('#driving').html(parseInt(result.driving/10000)+"万");
|
$('#like').html(result.like);
|
$('#likeRate').html(result.likeRate+"%");
|
$('#notice').html(result.notice);
|
$('#num').html(parseInt(result.num/10000)+"万");
|
$('#out').html(result.out);
|
$('#outCar').html(result.outCar);
|
$('#paiCha').html(result.paiCha);
|
$('#status').html(result.status);
|
$('#user').html(result.user);
|
$('#user2').html(result.user2);
|
//$('#video').html(result.video);
|
$('#wxRate').html((parseInt((result.wxRate/result.customer)*100)+1)+"%");
|
$('#wx').html(parseInt(result.wx/10000)+"万");
|
$('#addCustomer').html(result.addCustomer);
|
$('#open').html(result.open);
|
}else if(data.code==401) {
|
//window.location.href="http://111.63.178.115:9091/index.html#/login"
|
}
|
}
|
});
|
}
|
|
function getTodayTask(){
|
$("#content1").html("");
|
let sendTime = $("#sendTime").val();
|
$.ajax({
|
type: "get",
|
url: urls+"pcStatistic/getTodayTask?sendTime="+sendTime,
|
dataType: "json",
|
headers: {'accessToken':sessionStorage.getItem("token")},
|
success: function (data) {
|
if(data.code==200){
|
var sum=0;
|
var status0=0;
|
var status1 = 0;
|
for(var i=0;i<data.result.length;i++){
|
var area = data.result[i];
|
var ids = i+"-"+area.carNo;
|
if(area.level!=0){
|
var rate = 0;
|
if(area.num!=0){
|
rate = parseInt(((area.num-area.level)/area.num)*100);
|
}
|
$("#content1").append('<li id="'+ids+'"><div class="info"><span>'+area.carNo+'</span><span>'+area.areaName+'</span><span>'+area.areaSectionName+'</span></div><div class="value">'+rate+'%</div></li>')
|
}else{
|
$("#content1").append('<li id="'+ids+'"><div class="info"><span>'+area.carNo+'</span><span>'+area.areaName+'</span><span>'+area.areaSectionName+'</span></div><div class="value"><img src="images/icon_100.png"></div></li>');
|
}
|
sum+=area.num;
|
status0+=area.level
|
status1+=area.seq
|
|
$("#"+ids).click(function(e){
|
var car = e.currentTarget.id;
|
var carNo = car.split("-");
|
if(carNo[1]=='null'){
|
/* alert("暂无数据") */
|
}else{
|
getCustomer(carNo[1])
|
}
|
});
|
}
|
|
$('#sumOrder').html(sum);
|
$('#status0').html(status0);
|
$('#status1').html(sum-status0);
|
$('#status2').html(sum-status0-status1);
|
|
|
$(".task ul li").click(function(){
|
$(".task ul li").removeClass("focus");
|
$(this).addClass("focus");
|
});
|
}
|
}
|
});
|
}
|
|
function getTodayTask2(){
|
let day1 = new Date();
|
day1.setDate(day1.getDate() + 1);
|
let sendTime = day1.format("yyyy-MM-dd");
|
//alert(sendTime)
|
$.ajax({
|
type: "get",
|
url: urls+"pcStatistic/getTodayTask?sendTime="+sendTime,
|
dataType: "json",
|
headers: {'accessToken':sessionStorage.getItem("token")},
|
success: function (data) {
|
if(data.code==200){
|
$('#video').html(data.result.length);
|
}
|
}
|
});
|
}
|
|
function getEventLog(){
|
$("#content2").html("");
|
let sendTime = $("#sendTime").val();
|
$.ajax({
|
type: "get",
|
url: urls+"pcStatistic/getEventLog?sendTime="+sendTime,
|
dataType: "json",
|
headers: {'accessToken':sessionStorage.getItem("token")},
|
success: function (data) {
|
if(data.code==200){
|
for(let i=0;i<data.result.length;i++){
|
let area = data.result[i];
|
let time = area.createTime.substring(11,16)
|
if(area.type==6){
|
$("#content2").append('<li><div class="info"><span>'+time+'</span><span>'+area.carNo+'</span></div><div class="value">配送成功</div></li>')
|
}else{
|
let content = "";
|
if(area.type==1){
|
content = '疲劳驾驶';
|
}else if(area.type==2){
|
content = '接打电话';
|
}else if(area.type==3){
|
content = '不系安全带';
|
}else if(area.type==4){
|
content = '开车抽烟';
|
}else if(area.type==5){
|
content = '车厢异常开启';
|
}else if(area.type==7){
|
content = '超速';
|
}
|
|
if(area.type==5){
|
$("#content2").append('<li onclick="eventImg2(''+area.refId+'')" class="info"><div class="info"><span>'+time+'</span><span>'+area.carNo+'</span></div><div class="value">'+content+'</div></li>');
|
}else{
|
$("#content2").append('<li id="'+area.refId+'" class="info"><div class="info"><span>'+time+'</span><span>'+area.carNo+'</span></div><div class="value">'+content+'</div></li>');
|
$("#"+area.refId).click(function(e){
|
let refId = e.currentTarget.id;
|
eventImg(refId)
|
});
|
}
|
}
|
}
|
}
|
}
|
});
|
}
|
|
function eventImg2(id){
|
$("#videoPop").show();
|
$('#iframe1').attr("src","/test.html?"+id);
|
}
|
|
function eventImg(id){
|
$("#videoPop").show();
|
$.ajax({
|
type: "get",
|
url: urls+"pcStatistic/getAlarmByCarId?alarmId="+id,
|
dataType: "json",
|
headers: {'accessToken':sessionStorage.getItem("token")},
|
success: function (data) {
|
if(data.code==200){
|
if(data.result.code=='0'){
|
if(data.result.data.length>0){
|
$('#iframe1').attr("src","/test.html?"+data.result.data[0].thumbUrl);
|
}else{
|
$('#iframe1').attr("src","/test.html");
|
}
|
}else{
|
$('#iframe1').attr("src","/test.html");
|
}
|
//$('#iframe1').attr("src","/test.html?http://111.63.178.115:9091/img/yancao.1888c013.png");
|
}else{
|
$('#iframe1').attr("src","/test.html");
|
}
|
}
|
});
|
}
|
|
function bd_encrypt(gg_lng, gg_lat) {
|
var X_PI = Math.PI * 3000.0 / 180.0;
|
var x = gg_lng, y = gg_lat;
|
var z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * X_PI);
|
var theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * X_PI);
|
var bd_lng = z * Math.cos(theta) + 0.013;
|
var bd_lat = z * Math.sin(theta) + 0.007;
|
return {
|
bd_lat: bd_lat,
|
bd_lng: bd_lng
|
};
|
}
|
|
function table1(){
|
$("#videoPop").show();
|
$('#iframe1').attr("src",url2+"table1");
|
}
|
function table2(){
|
$("#videoPop").show();
|
$('#iframe1').attr("src",url2+"table2");
|
}
|
function table3(){
|
$("#videoPop").show();
|
$('#iframe1').attr("src",url2+"table3");
|
}
|
function table4(){
|
$("#videoPop").show();
|
$('#iframe1').attr("src",url2+"table4");
|
}
|
function table5(){
|
$("#videoPop").show();
|
$('#iframe1').attr("src",url2+"table5");
|
}
|
function table6(){
|
$("#videoPop").show();
|
$('#iframe1').attr("src",url2+"table6");
|
}
|
function table7(){
|
$("#videoPop").show();
|
$('#iframe1').attr("src",url2+"table7");
|
}
|
|
Date.prototype.format = function (fmt) {
|
var o = {
|
"M+": this.getMonth() + 1, //月份
|
"d+": this.getDate(), //日
|
"h+": this.getHours(), //小时
|
"m+": this.getMinutes(), //分
|
"s+": this.getSeconds(), //秒
|
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
"S": this.getMilliseconds() //毫秒
|
};
|
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
for (var k in o)
|
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
return fmt;
|
}
|
</script>
|
</html>
|