From 37336922a1df99ac1636e398e12e64dedfba10e5 Mon Sep 17 00:00:00 2001
From: 15832144755 <67030627+15832144755@users.noreply.github.com>
Date: 星期四, 18 十一月 2021 16:15:16 +0800
Subject: [PATCH] 11.18完整39

---
 src/main/webapp/hxzk/index.jsp |  898 ++++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 574 insertions(+), 324 deletions(-)

diff --git a/src/main/webapp/hxzk/index.jsp b/src/main/webapp/hxzk/index.jsp
index ee4af19..bb36e9c 100644
--- a/src/main/webapp/hxzk/index.jsp
+++ b/src/main/webapp/hxzk/index.jsp
@@ -35,7 +35,35 @@
 				<link href="https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap" rel="stylesheet">
 				<link href="https://fonts.googleapis.com/css?family=Quicksand:400,500,600,700&display=swap"
 					rel="stylesheet">
+					<link rel="stylesheet" href="/hxzkoa/hxzk/assets/css/tanchuang/naranja.min.css">
 				<style>
+					body {
+						margin: 0px;
+						width: 100%;
+						min-width: 1500px;
+						max-width: 100%;
+						height: 100%;
+						background-color: #F0F0F0;
+					}
+
+					#head {
+						background-color: #FFFF00;
+						width: 100%;
+						height: 100px;
+					}
+
+					#center {
+						background-color: #00FFFF;
+						width: 100%;
+						min-height: 100%;
+					}
+
+					#foot {
+						background-color: #FF00FF;
+						width: 100%;
+						height: 100px;
+					}
+
 					.panel-head {
 						font-size: 1rem;
 						color: rgba(255, 255, 255, .7);
@@ -67,6 +95,9 @@
 						text-align: center;
 						margin-top: 10px;
 					}
+					/* p {
+						color: #0c0c0c;
+					} */
 				</style>
 				<script src="/hxzkoa/hxzk/assets/js/app.js"></script>
 				<script src="/hxzkoa/hxzk/assets/js/dashboard/dash_2.js"></script>
@@ -75,19 +106,21 @@
 				<script src="/hxzkoa/hxzk/bootstrap/js/bootstrap.min.js"></script>
 				<script src="/hxzkoa/hxzk/bootstrap/js/popper.min.js"></script>
 				<script src="/hxzkoa/hxzk/plugins/apex/apexcharts.js"></script>
+				<script src="/hxzkoa/hxzk/plugins/echarts/echarts.min.js"></script>
 				<script src="/hxzkoa/hxzk/plugins/table/datatable/button-ext/jszip.min.js"></script>
 				<script src="/hxzkoa/hxzk/plugins/table/jquery.table2excel.js"></script>
 				<script src="/hxzkoa/hxzk/plugins/sweetalerts/promise-polyfill.js"></script>
 				<script src="/hxzkoa/hxzk/plugins/sweetalerts/sweetalert2.min.js"></script>
 				<script src="/hxzkoa/hxzk/plugins/sweetalerts/custom-sweetalert.js"></script>
 				<script src="/hxzkoa/hxzk/plugins/perfect-scrollbar/perfect-scrollbar.min.js"></script>
+				<script src="/hxzkoa/hxzk/assets/js/tanchuang/naranja.js"></script>
 
 				<!-- 鐧惧害鍦板浘鎺ュ彛 -->
 				<script type="text/javascript" id="baidumap_api"
 					src="http://api.map.baidu.com/getscript?v=3.0&ak=PUftjeZCKHtEn8ZMjeAGnViSO8NBvBNm"></script>
 			</head>
 
-			<body class="alt-menu sidebar-noneoverflow" style="overflow:auto">
+			<body class="alt-menu sidebar-noneoverflow" style="overflow: auto">
 				<!-- BEGIN LOADER -->
 				<div id="load_screen">
 					<div class="loader">
@@ -98,10 +131,13 @@
 				</div>
 				<!--  END LOADER -->
 				<div class="border-left"
-					style="opacity:0.4;float:left;position:absolute;z-index:1;left:120px;height:20px;"><img alt=""
-						src="/hxzkoa/resources/images/border.png" class="img-left"></div>
-				<div class="border-right" style="opacity:0.4;float:right;position:absolute;z-index:2;right:120px;"><img
-						alt="" src="/hxzkoa/resources/images/border2.png" class="img-right"></div>
+					style="opacity: 0.4; float: left; position: absolute; z-index: 1; left: 120px; height: 20px;">
+					<img alt="" src="/hxzkoa/resources/images/border.png" class="img-left">
+				</div>
+				<div class="border-right"
+					style="opacity: 0.4; float: right; position: absolute; z-index: 2; right: 120px;">
+					<img alt="" src="/hxzkoa/resources/images/border2.png" class="img-right">
+				</div>
 				<!--  BEGIN NAVBAR  -->
 				<div class="login-page"></div>
 				<!--  END NAVBAR  -->
@@ -117,51 +153,37 @@
 						<div class="layout-px-spacing">
 							<div class="row layout-top-spacing">
 								<div class="col-xl-3 col-lg-6 col-md-6 col-sm-12 col-12 layout-spacing"
-									style="padding-right:5px;padding-left:5px;padding-bottom:5px;padding-top:5px;"
+									style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; padding-top: 5px;"
 									id="jizhanxinxi">
-									<div class="widget widget-one_hybrid widget-engagement" style="height:380px;">
+									<div class="widget widget-one_hybrid widget-engagement" style="height: 380px;">
 										<div class='panel-head'>浣嶇疆鏁版嵁</div>
-										<div id="wasd" class="" style="margin-top:50px;">
-										</div>
+										<div id="wasd" class="" style="margin-top: 50px;"></div>
 									</div>
 								</div>
-								<!-- <div class="col-xl-3 col-lg-6 col-md-6 col-sm-12 col-12 layout-spacing"
-									style="padding-right:5px;padding-left:5px;padding-bottom:5px;padding-top:5px;"
-									id='jizhanxinxi'>
-									<div class="widget widget-one_hybrid widget-engagement">
-										<div class="widget-heading" style="height:380px;">
-											<div class='panel-head'>瀹炴椂鏁版嵁</div>
-											<div id="realtime" class="" style="margin-top:50px;">
-										</div>
-											<div class="table-responsive mb-4 mt-4"
-												style="position:absolute;top:10px;display: flex;justify-content: center;flex-wrap: wrap;">
-												<div class="item"
-													style="width: 50%;height: 173px;border: solid 7px rgb(90, 90, 77); border-style: inset;">
-													<div class="text" id="ssc1"></div>
-												</div>
-												<div class="item"
-													style="width: 50%;height: 173px;border: solid 7px rgb(90, 90, 77); border-style: inset;">
-													<div class="text" id="ssc2"></div>
-												</div>
-												<div class="item"
-													style="width: 100%;height: 173px;border: solid 7px rgb(90, 90, 77); border-style: inset;">
-													<div class="text" id="ssc3"></div>
-												</div>
-											</div>
-										</div>
-									</div>
-								</div> -->
 								<div class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12 layout-spacing"
-									style="padding-right:5px;padding-left:5px;padding-bottom:5px;padding-top:5px;"
+									style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; padding-top: 5px;"
 									id="ditu">
 									<div class="widget widget-one_hybrid widget-engagement" id="map">
-										<div class="widget-heading" style="height:480px;" id="map_bg">
-											<div class='panel-head' id="maphead">鍦板浘 <div
-													style="position:absolute;right:8px;top:8px;" id="quanping"
-													onclick="changeMapSize()"><svg t="1618401864629" class="icon"
-														viewBox="0 0 1024 1024" version="1.1"
-														xmlns="http://www.w3.org/2000/svg" p-id="1141" width="16"
-														height="16">
+										<div class="widget-heading" style="height: 480px;" id="map_bg">
+											<input id='sousuotagid' type="text" class="form" name="sousuoid"
+												style="position: absolute;z-index: 9;float: left;margin-top: 47px;margin-left: 140px;border: 1px solid #5c9792;border-radius: 3px;background-color: rgba(255, 255, 255, 0.5);"
+												placeholder="杈撳叆濮撳悕鎴栨爣绛惧彿">
+											<input id="sou" type="button"
+												style="position: absolute;z-index: 9;margin-top: 47px;margin-left: 290px;border: 0.1px solid #5c9792;border-radius: 3px;background-color: rgba(255, 255, 255, 0.5);"
+												value="鎼滅储" onclick="sousuo()">
+											<input id="qu" type="button"
+												style="position: absolute;z-index: 9;margin-top: 47px;margin-left: 290px;border: 0.1px solid #5c9792;border-radius: 3px;background-color: rgba(255, 255, 255, 0.5);display: none;"
+												value="鍙栨秷" onclick="quxiao()">
+											<p id="shuliang2"
+												style="position: absolute;z-index: 9;float: left;margin-top: 47.2px;margin-left: 60px;padding-top: 0.7px;padding-bottom: 0.7px;padding-left: 1.5px;padding-right: 1.5px;color: black;border: 0.1px solid #5c9792;border-radius: 3px;background-color: rgba(255, 255, 255, 0.5);">
+												鍦ㄧ嚎锛�<a id="shuliang"></a>浜�</p>
+											<div class='panel-head' id="maphead">
+												鍦板浘
+												<div style="position: absolute; right: 8px; top: 8px;" id="quanping"
+													onclick="changeMapSize()">
+													<svg t="1618401864629" class="icon" viewBox="0 0 1024 1024"
+														version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1141"
+														width="16" height="16">
 														<path d="M868.6 96H720c-7.6 0-15.2 2.9-21 8.7-5.8 5.8-8.7 13.4-8.7 21s2.9 15.2 8.7 21c5.8 5.8 13.4 8.7 21 
                                 8.7h106.5L580.1 401.8c-11.6 11.6-11.6 30.4 0 42 11.6 11.6 30.4 11.6 42 0l246.4-246.4V304c0 7.6 2.9 15.2 8.7 21 5.8 5.8 13.4 8.7 
                                 21 8.7s15.2-2.9 21-8.7c5.8-5.8 8.7-13.4 8.7-21V155.4c0.1-32.8-26.5-59.4-59.3-59.4zM898.3 690.3c-7.6 0-15.2 2.9-21 8.7-5.8 5.8-8.7 
@@ -172,29 +194,26 @@
                                 0-42-11.6-11.7-30.5-11.7-42.1-0.1zM197.5 155.4H304c7.6 0 15.2-2.9 21-8.7 5.8-5.8 8.7-13.4 8.7-21s-2.9-15.2-8.7-21c-5.8-5.8-13.4-8.7-21-8.7H155.4C122.6 
                                 96 96 122.6 96 155.4V304c0 7.6 2.9 15.2 8.7 21 5.8 5.8 13.4 8.7 21 8.7s15.2-2.9 21-8.7c5.8-5.8 8.7-13.4 8.7-21V197.5l246.4 246.4c11.6 11.6 30.4 
                                 11.6 42 0 11.6-11.6 11.6-30.4 0-42L197.5 155.4z" p-id="1142" fill="#ffffff"></path>
-													</svg></div>
+													</svg>
+												</div>
 											</div>
-											<div style="width:100%; height:430px; float:left" id="wrap">
-												<canvas id="draw"></canvas>1
+											<div style="width: 100%; height: 430px; float: left" id="wrap">
+												<canvas id="draw"></canvas>
 											</div>
-											<div style="width: 100%;
-											height: 100%;
-											overflow: hidden;
-											margin:0;
-											font-family:" 寰蒋闆呴粦";" id="baidumap">
-											</div>
+											<div style="width: 100%; height: 100%; overflow: hidden; margin: 0; font-family:"
+												寰蒋闆呴粦";" id="baidumap"></div>
 										</div>
 									</div>
 								</div>
 								<div class="col-xl-3 col-lg-6 col-md-6 col-sm-12 col-12 layout-spacing"
-									style="padding-right:5px;padding-left:5px;padding-bottom:5px;padding-top:5px;"
+									style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; padding-top: 5px;"
 									id="gaojinghuizong">
-									<div class="widget widget-one_hybrid widget-engagement" style="height:380px;">
+									<div class="widget widget-one_hybrid widget-engagement" style="height: 380px;">
 										<div class='panel-head'>鍛婅姹囨��</div>
-										<div id="s-col" class="" style="margin-top:50px">
-											<input type="hidden" id="shebei" value="${shebei}">
-											<input type="hidden" id="reWarningSummary_k" value="${reWarningSummary_k}">
-											<input type="hidden" id="reWarningSummary_v" value="${reWarningSummary_v}">
+										<div id="s-col" class="" style="margin-top: 50px">
+											<input type="hidden" id="shebei" value="${shebei}"> <input type="hidden"
+												id="reWarningSummary_k" value="${reWarningSummary_k}"> <input
+												type="hidden" id="reWarningSummary_v" value="${reWarningSummary_v}">
 											<input type="hidden" id="realAttendance_k" value="${realAttendance_k}">
 											<input type="hidden" id="realAttendance_v" value="${realAttendance_v}">
 											<input type="hidden" id="realtongji_k" value="${realtongji_k}">
@@ -206,31 +225,32 @@
 									</div>
 								</div>
 								<div class="col-xl-3 col-lg-6 col-md-6 col-sm-12 col-12 layout-spacing"
-									style="bottom:100px;padding-right:5px;padding-left:5px;padding-bottom:5px;padding-top:5px;"
+									style="bottom: 100px; padding-right: 5px; padding-left: 5px; padding-bottom: 5px; padding-top: 5px;"
 									id="tongjishuju">
-									<div class="widget widget-one_hybrid widget-engagement" style="height:380px;">
+									<div class="widget widget-one_hybrid widget-engagement" style="height: 380px;">
 										<div class='panel-head'>缁熻鏁版嵁</div>
-										<div id="polarArea-chart" class="" style="margin-top:50px;">
+										<div id="polarArea-chart" class="" style="margin-top: 50px;">
 										</div>
 									</div>
 								</div>
 								<div class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12 layout-spacing"
-									style="padding-right:5px;padding-left:5px;padding-bottom:5px;padding-top:5px;"
+									style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; padding-top: 5px;"
 									id="shishikaoqin">
 									<div class="widget widget-one_hybrid widget-engagement">
-										<div class="widget-heading" style="height:280px;">
+										<div class="widget-heading" style="height: 280px;">
 											<div class='panel-head'>璁惧淇℃伅</div>
-											<div class="table-responsive mb-4 mt-4" style="position:absolute;top:10px;">
+											<div class="table-responsive mb-4 mt-4"
+												style="position: absolute; top: 10px;">
 												<table id="html5-extension" class="table table-hover"
-													style="width:100%;">
+													style="width: 100%;">
 													<thead>
 														<tr align="center">
-															<th style="padding:12px 5px;">鐘舵��</th>
-															<th style="padding:12px 5px;">璁惧缂栧彿</th>
-															<th style="padding:12px 5px;">缁戝畾瀵硅薄</th>
-															<th style="padding:12px 5px;">鐗堟湰</th>
-															<th style="padding:12px 5px;">璁惧璇︽儏</th>
-															<th style="padding:12px 5px;">鏇存柊鏃堕棿</th>
+															<th style="padding: 12px 5px;">鐘舵��</th>
+															<th style="padding: 12px 5px;">璁惧缂栧彿</th>
+															<th style="padding: 12px 5px;">缁戝畾瀵硅薄</th>
+															<th style="padding: 12px 5px;">鐗堟湰</th>
+															<th style="padding: 12px 5px;">璁惧璇︽儏</th>
+															<th style="padding: 12px 5px;">鏇存柊鏃堕棿</th>
 														</tr>
 													</thead>
 													<tbody id="nr">
@@ -260,12 +280,11 @@
 									</div>
 								</div>
 								<div class="col-xl-3 col-lg-6 col-md-6 col-sm-12 col-12 layout-spacing"
-									style="bottom:100px;padding-right:5px;padding-left:5px;padding-bottom:5px;padding-top:5px;"
+									style="bottom: 100px; padding-right: 5px; padding-left: 5px; padding-bottom: 5px; padding-top: 5px;"
 									id="xianchanggongzhong">
-									<div class="widget widget-one_hybrid widget-engagement" style="height:380px;">
+									<div class="widget widget-one_hybrid widget-engagement" style="height: 380px;">
 										<div class='panel-head'>鐜板満宸ョ</div>
-										<div id="donut-chart" class="" style="margin-top:50px;">
-										</div>
+										<div id="donut-chart" class="" style="margin-top: 50px;"></div>
 									</div>
 								</div>
 
@@ -315,6 +334,10 @@
 								diaoyongbaidumap();
 
 							} else {
+								document.getElementById("sousuotagid").style.display = "none";
+								document.getElementById("sou").style.display = "none";
+								document.getElementById("qu").style.display = "none";
+								document.getElementById("shuliang2").style.display = "none";
 								document.getElementById("baidumap").style.display = "none";
 								$.ajax({
 									async: false,
@@ -334,14 +357,14 @@
 							};
 						});
 						$('.header-page').load('/hxzkoa/hxzk/top.html'); $('.login-page').load('/hxzkoa/hxzk/head.html');
-						var params = {
-							zoomVal: 1,
-							left: 0,
-							top: 0,
-							currentX: 0,
-							currentY: 0,
-							flag: false
-						};
+						// var params = {
+						// 	zoomVal: 1,
+						// 	left: 0,
+						// 	top: 0,
+						// 	currentX: 0,
+						// 	currentY: 0,
+						// 	flag: false
+						// };
 					</script>
 
 					<!-- BEGIN FUNCTION SCRIPTS -->
@@ -356,7 +379,7 @@
 							if (expand == false) {
 								//鐐瑰嚮鏀惧ぇ
 								expand = true;
-								modified = false;
+								// modified = false;
 								if (document.getElementById("wrap").style.display == "none") {
 									//褰撳墠姝e湪浣跨敤鐧惧害鍦板浘
 									document.getElementById('ditu').className = "col-xl-12 col-lg-6 col-md-6 col-sm-12 col-12 layout-spacing";
@@ -380,13 +403,13 @@
 								}
 								document.getElementById("jizhanxinxi").style.display = "none";
 								document.getElementById("gaojinghuizong").style.display = "none";
-								document.getElementById("biaoqianxinxi").style.display = "none";
+								document.getElementById("tongjishuju").style.display = "none";
 								document.getElementById("shishikaoqin").style.display = "none";
 								document.getElementById("xianchanggongzhong").style.display = "none";
 							} else {
 								//鏀惧ぇ鐘舵�佷笅鐐瑰嚮鎭㈠鍘熸牱
 								expand = false;
-								modified = false;
+								// modified = false;
 								document.getElementById("jizhanxinxi").style.display = "";
 								if (document.getElementById("wrap").style.display == "none") {
 									//褰撳墠姝e湪浣跨敤鐧惧害鍦板浘
@@ -410,7 +433,8 @@
 									diaoyonghuatu(current_floor);
 								}
 								document.getElementById("gaojinghuizong").style.display = "";
-								document.getElementById("biaoqianxinxi").style.display = "";
+								document.getElementById("jizhanxinxi").style.display = "";
+								document.getElementById("tongjishuju").style.display = "";
 								document.getElementById("shishikaoqin").style.display = "";
 								document.getElementById("xianchanggongzhong").style.display = "";
 							}
@@ -464,6 +488,21 @@
 							return sysset;
 						};
 
+						function getfence() {
+							var fences = [];
+							$.ajax({
+								async: false, //鍚屾鐨�
+								type: "POST",
+								url: "/hxzkoa/baidufence.do",
+								dataType: "json",
+								success: function (data) {
+									// console.log(data.fences[0])
+									fences = data.fences;
+								},
+							});
+							return fences;
+						}
+
 						function loadImages(sources, callback) {
 							var count = 0,
 								images = {},
@@ -615,6 +654,23 @@
 							});
 							return realposition
 						};
+						
+						function getRealPositiongao() {
+							var realposition = [];
+							$.ajax({
+								async: false,
+								type: 'POST',
+								url: "/hxzkoa/getRealPosition_all.do",
+								dataType: 'json',
+								success: function (data) {
+									for (var i = 0; i < data.length; i++) {
+										//playMark[id,name,power,life,x,y,time]
+										realposition.push([data[i].tagid, data[i].name, data[i].power, data[i].life, data[i].posx, data[i].posy, data[i].time, data[i].fence == 1 || data[i].sos == 1, data[i].sos, data[i].fence])
+									}
+								},
+							});
+							return realposition
+						};
 
 						function getstatus(tagida) {
 							var panduan;
@@ -671,31 +727,6 @@
 											finalrealtrack[data[i][0].tagid].push([data[i][j].x, data[i][j].y, data[i][j].time])
 										}
 									}
-									//for (var i=0;i<data.length;i++)
-									/* 	        	   let tmp = new Set();
-													   for (var i=0;i<data.length;i++){
-														   tmp.add(data[i].tagid);
-													   };
-													   let tmpl = Array.from(tmp);
-													   for (i in tmpl){
-														   realtrack[tmpl[i]]=[];
-														   finalrealtrack[tmpl[i]]=[];
-													   }
-													   for(var i=0; i<data.length; i++){
-														   realtrack[data[i].tagid].push([data[i].x, data[i].y, data[i].time])
-													   }
-													   for (var i in realtrack){
-														   if (realtrack[i].length>50){
-															   var itvl = new Number(realtrack[i].length/50);
-															   var tmp_result = [];
-															   for (j=0;i<realtrack[i].length;j+=itvl){
-																   tmp_result.push(realtrack[i][j])
-															   }
-															   finalrealtrack[i]=tmp_result;
-														   } else {
-															   finalrealtrack[i]=realtrack[i]
-														   }
-													   } */
 								},
 							});
 							return finalrealtrack;
@@ -762,7 +793,7 @@
 											if (data[i].gps_EW == "W") {
 												jingdu = String(0 - jingdu);
 											};
-											gpslist.push([data[i].tagid, jingdu, weidu, data[i].gps_haiba_gao, data[i].gps_state, data[i].gps_num, data[i].gps_hdop, data[i].gps_tuoqiu, data[i].gps_chafen_time, data[i].gps_chafen_id, data[i].gps_jiaoyan, data[i].gps_kahao, data[i].gps_power, data[i].gps_sos, data[i].addtime, data[i].name]);
+											gpslist.push([data[i].tagid, jingdu, weidu, data[i].gps_haiba_gao, data[i].gps_state, data[i].gps_num, data[i].gps_hdop, data[i].gps_tuoqiu, data[i].gps_chafen_time, data[i].gps_chafen_id, data[i].gps_jiaoyan, data[i].gps_kahao, data[i].gps_power, data[i].gps_sos, data[i].addtime, data[i].name, data[i].gsp_jingdu, data[i].gps_weidu]);
 										}
 									};
 								},
@@ -863,9 +894,171 @@
 					<!-- 鐧惧害鍦板浘鍔熻兘 -->
 					<script type="text/javascript">
 
+						var sousuopd = false;
+						var sousuoid = "";
+
+						function sousuo() {
+							sousuopd = true;
+							sousuoid = $("#sousuotagid").val();
+							document.getElementById("sou").style.display = "none";
+							document.getElementById("qu").style.display = "";
+						}
+
+						function quxiao() {
+							sousuopd = false;
+							sousuoid = "";
+							document.getElementById("qu").style.display = "none";
+							document.getElementById("sou").style.display = "";
+							document.getElementById("sousuotagid").value = "";
+						}
+
+						function Convertor(ak) {
+							this.stepCount = 100;
+							this.pointCount = [];
+							this.Result = [];
+							this.NoisIndex = [];
+							this.Time = new Date();
+							this.AK = ak;
+							this.M_PI = 3.14159265358979324;
+							this.A = 6378245.0;
+							this.EE = 0.00669342162296594323;
+							this.X_PI = this.M_PI * 3000.0 / 180.0;
+						}
+						Convertor.prototype.outofChine = function (p) {
+							if (p.lng < 72.004 || p.lng > 137.8347) {
+								return true;
+							}
+							if (p.lat < 0.8293 || p.lat > 55.8271) {
+								return true;
+							}
+							return false;
+						}
+							;
+						Convertor.prototype.WGS2GCJ_lat = function (x, y) {
+							var ret1 = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * Math.sqrt(Math.abs(x));
+							ret1 += (20.0 * Math.sin(6.0 * x * this.M_PI) + 20.0 * Math.sin(2.0 * x * this.M_PI)) * 2.0 / 3.0;
+							ret1 += (20.0 * Math.sin(y * this.M_PI) + 40.0 * Math.sin(y / 3.0 * this.M_PI)) * 2.0 / 3.0;
+							ret1 += (160.0 * Math.sin(y / 12.0 * this.M_PI) + 320 * Math.sin(y * this.M_PI / 30.0)) * 2.0 / 3.0;
+							return ret1;
+						}
+							;
+						Convertor.prototype.WGS2GCJ_lng = function (x, y) {
+							var ret2 = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * Math.sqrt(Math.abs(x));
+							ret2 += (20.0 * Math.sin(6.0 * x * this.M_PI) + 20.0 * Math.sin(2.0 * x * this.M_PI)) * 2.0 / 3.0;
+							ret2 += (20.0 * Math.sin(x * this.M_PI) + 40.0 * Math.sin(x / 3.0 * this.M_PI)) * 2.0 / 3.0;
+							ret2 += (150.0 * Math.sin(x / 12.0 * this.M_PI) + 300.0 * Math.sin(x / 30.0 * this.M_PI)) * 2.0 / 3.0;
+							return ret2;
+						}
+							;
+						Convertor.prototype.WGS2GCJ = function (poi) {
+							if (this.outofChine(poi)) {
+								return;
+							}
+							var poi2 = {};
+							var dLat = this.WGS2GCJ_lat(poi.lng - 105.0, poi.lat - 35.0);
+							var dLon = this.WGS2GCJ_lng(poi.lng - 105.0, poi.lat - 35.0);
+							var radLat = poi.lat / 180.0 * this.M_PI;
+							var magic = Math.sin(radLat);
+							magic = 1 - this.EE * magic * magic;
+							var sqrtMagic = Math.sqrt(magic);
+							dLat = (dLat * 180.0) / ((this.A * (1 - this.EE)) / (magic * sqrtMagic) * this.M_PI);
+							dLon = (dLon * 180.0) / (this.A / sqrtMagic * Math.cos(radLat) * this.M_PI);
+							poi2.lat = poi.lat + dLat;
+							poi2.lng = poi.lng + dLon;
+							return poi2;
+						}
+							;
+						Convertor.prototype.GCJ2BD09 = function (poi) {
+							var poi2 = {};
+							var x = poi.lng
+								, y = poi.lat;
+							var z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * this.X_PI);
+							var theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * this.X_PI);
+							poi2.lng = z * Math.cos(theta) + 0.0065;
+							poi2.lat = z * Math.sin(theta) + 0.006;
+							return poi2;
+						}
+							;
+						/**
+						* WGS->鐧惧害鍧愭爣绯�
+						*/
+						Convertor.prototype.WGS2BD09 = function (poi) {
+							//WGS->GCJ
+							var poi2 = this.WGS2GCJ(poi);
+							if (typeof poi2 === "undefined") {
+								return;
+							}
+							//GCJ->鐧惧害鍧愭爣绯�
+							return this.GCJ2BD09(poi2);
+						}
+
+						function zhuanhuan(aaa) {
+							var c = new Convertor();
+							var bbb = [];
+							for (var i = 0; i < aaa.length; i++) {
+								var rr = c.WGS2BD09({ lng: aaa[i].lng, lat: aaa[i].lat });
+								bbb.push(rr);
+							}
+							return bbb;
+							c = null;
+							bbb = null;
+						}
+
+						jQuery.Hashtable = function () {
+							this.items = new Array();
+							this.itemsCount = 0;
+							this.add = function (key, value) {
+								if (!this.containsKey(key)) {
+									this.items[key] = value;
+									this.itemsCount++;
+								}
+								else
+									throw "key '" + key + "' allready exists."
+							}
+							this.get = function (key) {
+								if (this.containsKey(key))
+									return this.items[key];
+								else
+									return null;
+							}
+
+							this.remove = function (key) {
+								if (this.containsKey(key)) {
+									delete this.items[key];
+									this.itemsCount--;
+								}
+								else
+									throw "key '" + key + "' does not exists."
+							}
+							this.containsKey = function (key) {
+								return typeof (this.items[key]) != "undefined";
+							}
+							this.containsValue = function containsValue(value) {
+								for (var item in this.items) {
+									if (this.items[item] == value)
+										return true;
+								}
+								return false;
+							}
+							this.contains = function (keyOrValue) {
+								return this.containsKey(keyOrValue) || this.containsValue(keyOrValue);
+							}
+							this.clear = function () {
+								this.items = new Array();
+								itemsCount = 0;
+							}
+							this.size = function () {
+								return this.itemsCount;
+							}
+							this.isEmpty = function () {
+								return this.size() == 0;
+							}
+						};
+
 						function diaoyongbaidumap() {
 							//璇诲彇绯荤粺璁剧疆
 							var bm_sysSetting = getSystemSetting();
+							var fences = getfence();
 							var bm_tagZb = bm_sysSetting[0].tagZb;//鏄惁鏄剧ず鏍囩鍧愭爣
 							var bm_viewName = bm_sysSetting[0].viewName;//鏄惁鏄剧ず浜哄憳鍚嶇О
 							var bm_viewPower = bm_sysSetting[0].viewPower;//鏄惁鏄剧ず鐢甸噺
@@ -876,7 +1069,7 @@
 							var bm_baidu_j = bm_sysSetting[0].baidu_j;//鐧惧害鍦板浘绮惧害
 							var bm_baidu_w = bm_sysSetting[0].baidu_w;//鐧惧害鍦板浘缁村害
 
-							// 鐧惧害鍦板浘API鍔熻兘
+							// 鐧惧害鍦板浘API鍔熻兘//榛樿鍗槦鍦板浘 {mapType:BMAP_SATELLITE_MAP}
 							var bm = new BMap.Map("baidumap");    // 鍒涘缓Map瀹炰緥
 
 							bm.centerAndZoom(new BMap.Point(bm_baidu_j, bm_baidu_w), 12);  // 鍒濆鍖栧湴鍥�,璁剧疆涓績鐐瑰潗鏍囧拰鍦板浘绾у埆
@@ -901,8 +1094,67 @@
 							}
 							);
 
+							for (var i = 0; i < fences.length; i++) {
+								fences[i] = fences[i].split(";");
+								for (var j = 0; j < fences[i].length; j++) {
+									fences[i][j] = fences[i][j].split(",");
+								}
+							}
+
+							for (var i = 0; i < fences.length; i++) {
+								var str = [];
+								for (var j = 0; j < fences[i].length; j++) {
+									var point = {
+										lng: parseFloat(fences[i][j][0]),
+										lat: parseFloat(fences[i][j][1])
+									}
+									str[j] = point;
+								}
+								var polygon = new BMap.Polygon(str, {
+									strokeColor: "rgba(255,0,0,0.3)",
+									fillColor: "rgba(255,0,0,0.3)",
+									strokeWeight: 2,
+									strokeOpacity: 0.5
+								});
+								bm.addOverlay(polygon);
+							}
+
+							// var json_data = {
+							// 	"Point": [{ 
+							// 		"lng": 116.298438, 
+							// 		"lat": 40.054905 
+							// 	},
+							// 	{
+							// 		"lng": 116.303217,
+							// 		"lat": 40.055126
+							// 	},
+							// 	{
+							// 		"lng": 116.295743,
+							// 		"lat": 40.053303
+							// 	},
+							// 	{
+							// 		"lng": 116.303037,
+							// 		"lat": 40.05253
+							// 	}
+							// 	]
+							// };
+							// var obj = eval(json_data);
+							// var point_array = obj.Point;
+							// console.log(point_array)
+							// console.log(typeof point_array)
+							// var polygon = new BMap.Polygon(point_array, {
+							// 	strokeColor: "blue",
+							// 	strokeWeight: 2,
+							// 	strokeOpacity: 0.5
+							// });
+							// bm.addOverlay(polygon);
 							//current_node_list涓簕key(tagid):zuobiao_mark}
 							var current_node_list = new Array();
+							var markers = new jQuery.Hashtable();
+							var labelzuobiaos = new jQuery.Hashtable();
+							var labeltagids = new jQuery.Hashtable();
+							var labeldianliangs = new jQuery.Hashtable();
+							var tt = 0;
 							//var current_node_list = new Queue();
 
 							/* 	    function getGPSInfo(data){
@@ -911,37 +1163,107 @@
 										+"\n娣诲姞鏃堕棿"+gps_node_list[current_gps_index][14]
 									}; */
 
-							var t = 300; //姣�600ms浠庡悗鍙拌姹備竴娆℃渶鏂扮殑鏁版嵁
+							//var t = 300; 姣�600ms浠庡悗鍙拌姹備竴娆℃渶鏂扮殑鏁版嵁
 							fn();
 
 							var timer = setTimeout(function f() {
 								fn();
 								timer = setTimeout(f, 300);
-							}, t);
+							}, 300);
 
 							//timer_bm = setTimeout(fn ,t); 
 
 							function fn() {
 								//鑾峰彇gps鍧愭爣, [tagid, jingdu, weidu, gps_haiba_gao, gps_state, gps_num, gps_hdop, gps_tuoqiu, gps_chafen_time, gps_chafen_id, gps_jiaoyan, gps_kahao, gps_power, gps_sos, addtime]
-								var gps_node_list = getGPS();
-								//console.log(gps_node_list)
+								var gps_node_list1 = getGPS();
+								var gps_node_list = [];
 								//鍧愭爣杞崲瀹屼箣鍚庣殑鍥炶皟鍑芥暟
-								translateCallback = function (data) {
-									// if (data.status == 0) {
-									for (var i = 0; i < data.points.length; i++) {
-										var zhuangtaia = getstatus(gps_node_list[i][0]);
-										if (current_node_list[gps_node_list[i][0]].size() > 0) {
-											old_mark = current_node_list[gps_node_list[i][0]].front();
-											current_node_list[gps_node_list[i][0]].dequeue();
-											bm.removeOverlay(old_mark);//娓呴櫎涓婁竴涓�
-										}
-										if ((bm_offView == '1' && zhuangtaia == '1') || (bm_offView == '0')) {
-											marker = new BMap.Marker(data.points[i], { icon: myIcon });
-											bm.addOverlay(marker);
-											current_node_list[gps_node_list[i][0]].enqueue(marker);
 
+								//bm.clearOverlays();
+								// var points = [];
+								if (gps_node_list1.length != 0) {
+									for (var i = 0; i < gps_node_list1.length; i++) {
+										if ((bm_offView == '1' && gps_node_list1[i][4] == '1') || (bm_offView == '0')) {
+											// if (current_node_list[gps_node_list1[i][0]] == null) {
+											// 	current_node_list[gps_node_list1[i][0]] = new Queue();
+											// }
+											if (sousuopd) {
+												if (gps_node_list1[i][0] == sousuoid || gps_node_list1[i][15] == sousuoid) {
+													gps_node_list.push(gps_node_list1[i])
+												} else {
+													bm.removeOverlay(markers.get(gps_node_list1[i][0]));
+													if (markers.get(gps_node_list1[i][0]) != null) {
+														if (bm_viewTagid == "1") {
+															labeltagids.remove(gps_node_list1[i][0]);
+														}
+														if (bm_tagZb == "1") {
+															labelzuobiaos.remove(gps_node_list1[i][0]);
+														}
+														if (bm_viewPower == "1") {
+															labeldianliangs.remove(gps_node_list1[i][0]);
+														}
+														markers.remove(gps_node_list1[i][0]);
+													}
+												}
+											} else {
+												gps_node_list.push(gps_node_list1[i]);
+											}
+										}
+										if (tt == 1) {
+											if (gps_node_list1[i][4] == '1') {
+												bm.removeOverlay(markers.get(gps_node_list1[i][0]));
+												if (markers.get(gps_node_list1[i][0]) != null) {
+													if (bm_viewTagid == "1") {
+														labeltagids.remove(gps_node_list1[i][0]);
+													}
+													if (bm_tagZb == "1") {
+														labelzuobiaos.remove(gps_node_list1[i][0]);
+													}
+													if (bm_viewPower == "1") {
+														labeldianliangs.remove(gps_node_list1[i][0]);
+													}
+													markers.remove(gps_node_list1[i][0]);
+												}
+											}
+										}
+										if (gps_node_list1[i][4] != '1') {
+											bm.removeOverlay(markers.get(gps_node_list1[i][0]));
+											if (markers.get(gps_node_list1[i][0]) != null) {
+												if (bm_viewTagid == "1") {
+													labeltagids.remove(gps_node_list1[i][0]);
+												}
+												if (bm_tagZb == "1") {
+													labelzuobiaos.remove(gps_node_list1[i][0]);
+												}
+												if (bm_viewPower == "1") {
+													labeldianliangs.remove(gps_node_list1[i][0]);
+												}
+												markers.remove(gps_node_list1[i][0]);
+											}
+										}
+									};
+									$("#shuliang").html(gps_node_list.length);
+									if (markers.itemsCount != gps_node_list.length) {
+										// var point = new BMap.Point(new Number(gps_node_list[i][1]), new Number(gps_node_list[i][2]));
+										// points.push(point);
+										// var newzuobiao = zhuanhuan(points);
+										baidummm()
+									} else {
+										baidumm()
+									}
+								}
+
+								function baidummm() {
+									for (var i = 0; i < gps_node_list.length; i++) {
+										if (markers.get(gps_node_list[i][0]) == null) {
+											var c = new Convertor();
+											var rr = c.WGS2BD09({ lng: new Number(gps_node_list[i][1]), lat: new Number(gps_node_list[i][2]) });
+											var point = new BMap.Point(rr.lng, rr.lat);
+											marker = new BMap.Marker(point, { icon: myIcon });
+											bm.addOverlay(marker);
 											if (bm_viewTagid == "1") {
-												var tagid = new BMap.Label(gps_node_list[i][0], { offset: new BMap.Size(20, -30) });
+												var aaaaa = gps_node_list[i][15] + "  " + gps_node_list[i][0]
+												var tagid = new BMap.Label(aaaaa, { offset: new BMap.Size(20, -30) });
 												tagid.setStyle({
 													color: "#fff",
 													fontSize: "14px",
@@ -952,92 +1274,104 @@
 													transform: 'translateX(-50%)',
 												});
 												marker.setLabel(tagid); //娣诲姞label-tagid
+												labeltagids.add(gps_node_list[i][0], tagid);
 											}
 											if (bm_tagZb == "1") {
-												var zuobiao = new BMap.Label(gps_node_list[i][1] + ',' + gps_node_list[i][2], { offset: new BMap.Size(20, +40) });
-												zuobiao.setStyle({ transform: 'translateX(-50%)' });
+												var zuobiao = new BMap.Label(gps_node_list[i][16] + ',' + gps_node_list[i][17], { offset: new BMap.Size(20, +40) });
+												zuobiao.setStyle({
+													transform: 'translateX(-50%)',
+													backgroundColor: "0.000000000001",
+													border: 'none'
+												});
 												marker.setLabel(zuobiao);
+												labelzuobiaos.add(gps_node_list[i][0], zuobiao);
 											}
 											if (bm_viewPower == "1") {
-												var dianliang = new BMap.Label("璁惧鐢甸噺" + gps_node_list[i][12], { offset: new BMap.Size(20, +60) });
-												dianliang.setStyle({ transform: 'translateX(-50%)' });
+												var dianliang = new BMap.Label("璁惧鐢甸噺" + gps_node_list[i][12], { offset: new BMap.Size(20, +55) });
+												dianliang.setStyle({
+													transform: 'translateX(-50%)',
+													backgroundColor: "0.000000000001",
+													border: 'none'
+												});
 												marker.setLabel(dianliang);
+												labeldianliangs.add(gps_node_list[i][0], dianliang);
 											}
-
-											/* 				        if(bm_name=="1"){
-																		var name=new BMap.Label("璁惧鍚嶇О:"+gps_node_list[i][15],{offset:new BMap.Size(20,+40)});
-																		name.setStyle({transform: 'translateX(-50%)'});
-																		marker.setLabel(name); //娣诲姞label-tagid
-																	} */
-											/* 				     	// 鍒涘缓淇℃伅绐楀彛
-																	var opts = {
-																		width: 200,
-																		height: 100,
-																		title: '褰撳墠鍧愭爣淇℃伅'
-																	};
-																	var infoWindow = new BMap.InfoWindow(getGPSInfo(data.points[0]), opts);
-																	// 鐐规爣璁版坊鍔犵偣鍑讳簨浠�
-																	marker.addEventListener('click', function () {
-																		bm.openInfoWindow(infoWindow, point); // 寮�鍚俊鎭獥鍙�
-																	}); */
-
-											//bm.setCenter(data.points[i]);
+											markers.add(gps_node_list[i][0], marker);
 										}
 									}
-									// }
-									/* if(data.status === 0) {
-														var marker = new BMap.Marker(data.points[0], {
-															icon: myIcon
-														});
-													    
-													//var marker = new BMap.Marker(data.points[0]);
-													bm.addOverlay(marker);
-													if (bm_viewTagid=="1"){
-														//console.log("data.points[0]",data.points[0]);
-																var tagid=new BMap.Label("璁惧ID:"+gps_node_list[current_gps_index][0],{offset:new BMap.Size(0,-20)});
-														marker.setLabel(tagid); //娣诲姞label-tagid
-													}
-													if (bm_tagZb=="1"){
-														var zuobiao = new BMap.Label("璁惧鍧愭爣:"+gps_node_list[current_gps_index][1]+','+gps_node_list[current_gps_index][2],{offset:new BMap.Size(-20,30)});
-														marker.setLabel(zuobiao);
-													}
-													if (bm_viewPower=="1"){
-														var dianliang = new BMap.Label("璁惧鐢甸噺"+gps_node_list[current_gps_index][12],{offset:new BMap.Size(20,5)});
-														marker.setLabel(dianliang);
-													}
-													  // 鍒涘缓淇℃伅绐楀彛
-													var opts = {
-														width: 200,
-														height: 100,
-														title: '褰撳墠鍧愭爣淇℃伅'
-													};
-													var infoWindow = new BMap.InfoWindow(getGPSInfo(data.points[0]), opts);
-													// 鐐规爣璁版坊鍔犵偣鍑讳簨浠�
-													marker.addEventListener('click', function () {
-														bm.openInfoWindow(infoWindow, point); // 寮�鍚俊鎭獥鍙�
-													});
-												    
-													bm.setCenter(data.points[0]);
-												  } */
-								};
-
-								//bm.clearOverlays();
-								var pointArr = [];
-								if (gps_node_list.length != 0) {
-									for (var i = 0; i < gps_node_list.length; i++) {
-										if (current_node_list[gps_node_list[i][0]] == null) {
-											current_node_list[gps_node_list[i][0]] = new Queue();
-										}
-										var point = new BMap.Point(new Number(gps_node_list[i][1]), new Number(gps_node_list[i][2]));
-										pointArr.push(point);
-									};
-									var convertor = new BMap.Convertor();
-									convertor.translate(pointArr, 1, 5, translateCallback);
+									tt = tt + 1;
 								}
-								// 		    else {
-								// 		    	current_node_list.clear();
-								// 		    	bm.clearOverlays();
-								// 		    }
+
+								function baidumm() {
+									// bm.clearOverlays();
+									for (var i = 0; i < gps_node_list.length; i++) {
+										//var zhuangtaia = getstatus(gps_node_list[i][0]);
+										// if (current_node_list[gps_node_list[i][0]].size() > 0) {
+										// 	old_mark = current_node_list[gps_node_list[i][0]].front();
+										// 	current_node_list[gps_node_list[i][0]].dequeue();
+										// 	bm.removeOverlay(old_mark);//娓呴櫎涓婁竴涓�
+										// 	old_mark = null;
+										// }
+										// marker = new BMap.Marker(data[i], { icon: myIcon });
+										// bm.addOverlay(marker);
+										// current_node_list[gps_node_list[i][0]].enqueue(marker);
+										marker = markers.get(gps_node_list[i][0]);
+										var c = new Convertor();
+										var rr = c.WGS2BD09({ lng: new Number(gps_node_list[i][1]), lat: new Number(gps_node_list[i][2]) });
+										var point = new BMap.Point(rr.lng, rr.lat);
+										marker.setPosition(point);
+										if (bm_viewTagid == "1") {
+											tagid = labeltagids.get(gps_node_list[i][0]);
+											var aaaaa = gps_node_list[i][15] + "  " + gps_node_list[i][0]
+											tagid.setContent(aaaaa); //娣诲姞label-tagid
+										}
+										if (bm_tagZb == "1") {
+											zuobiao = labelzuobiaos.get(gps_node_list[i][0]);
+											var bbbbb = gps_node_list[i][16] + ',' + gps_node_list[i][17]
+											zuobiao.setContent(bbbbb);
+										}
+										if (bm_viewPower == "1") {
+											diangliang = labeldianliangs.get(gps_node_list[i][0]);
+											var ccccc = "璁惧鐢甸噺" + gps_node_list[i][12]
+											diangliang.setContent(ccccc);
+										}
+										// if (bm_viewTagid == "1") {
+										// 	var aaaaa = gps_node_list[i][15] + "  " + gps_node_list[i][0]
+										// 	var tagid = new BMap.Label(aaaaa, { offset: new BMap.Size(20, -30) });
+										// 	tagid.setStyle({
+										// 		color: "#fff",
+										// 		fontSize: "14px",
+										// 		borderRadius: "5px",
+										// 		padding: "5px 5px",
+										// 		border: "0",
+										// 		backgroundColor: "#32CD32",
+										// 		transform: 'translateX(-50%)',
+										// 	});
+										// 	marker.setLabel(tagid); //娣诲姞label-tagid
+										// 	tagid = null;
+										// }
+										// if (bm_tagZb == "1") {
+										// 	var zuobiao = new BMap.Label(gps_node_list[i][1] + ',' + gps_node_list[i][2], { offset: new BMap.Size(20, +40) });
+										// 	zuobiao.setStyle({
+										// 		transform: 'translateX(-50%)',
+										// 		backgroundColor: "0.000000000001",
+										// 		border: 'none'
+										// 	});
+										// 	marker.setLabel(zuobiao);
+										// 	zuobiao = null;
+										// }
+										// if (bm_viewPower == "1") {
+										// 	var dianliang = new BMap.Label("璁惧鐢甸噺" + gps_node_list[i][12], { offset: new BMap.Size(20, +55) });
+										// 	dianliang.setStyle({
+										// 		transform: 'translateX(-50%)',
+										// 		backgroundColor: "0.000000000001",
+										// 		border: 'none'
+										// 	});
+										// 	marker.setLabel(dianliang);
+										// 	dianliang = null;
+										// }
+									}
+								};
 
 
 								/**
@@ -1168,6 +1502,8 @@
 								_this.context = draw.getContext('2d');
 								_this.canvas.height = wrap.offsetHeight;
 								_this.canvas.width = wrap.offsetWidth;
+								wrap.onclick = null;
+								_this.canvas.onclick = null;
 
 								loadImages(imgList, function (images) {
 									for (var key in images) {
@@ -1279,8 +1615,10 @@
 										};
 									};
 									can.drawImage(_this.cacheCanvas, 0, 0);
+									_this.cacheCanvas.onclick = null;
 								} else {
 									can.drawImage(_this.cacheCanvas, 0, 0);
+									_this.cacheCanvas.onclick = null;
 								};
 
 
@@ -1794,53 +2132,6 @@
 							},
 
 						}
-						/* var timeshow;
-						var weizhi;
-						setTimeout(function(){
-							setshow();
-							timeshow = setInterval(setshow, 3000);
-						},0)
-							function setshow () {
-								$.ajax({
-									async: false,
-									type: "POST",
-									url: "/hxzkoa/setshow.do",
-									dataType: 'json',
-									success (data) {
-										$("#ssc1").html('<span class="fonts1">' + data[0].type + '</span><br><span class="fonts">' + data[0].num + '</span>');
-										$("#ssc2").html('<span class="fonts1">' + data[1].type + '</span><br><span class="fonts">' + data[1].num + '</span>');
-										$("#ssc3").html('<span class="fonts1">' + data[2].type + '</span><br><span class="fonts">' + data[2].num + '</span>'); 
-									weizhi = data[0].num;
-									} 
-								});
-							}
-							function myStopFunction () {
-							clearInterval(timeshow);
-							} 
-									/* window.setInterval(function () {
-									getNewSeries(lastDate, {
-									  min: 10,
-									  max: 90
-									}) 
-								  
-									chart.updateSeries([{
-									  data: weizhi
-									}])
-								  }, 1000) */
-						/* var timeshow = setInterval(setweizhi, 5000);
-						function setweizhi () {
-							console.log('99999')
-							$.ajax({
-								async: false,
-								type: "POST",
-								url: "/hxzkoa/setweizhi.do",
-								dataType: 'json',
-							});
-						} */
-						/* var j = 4;
-						var i = 0;
-						var shebei = $("#shebei").val();
-						console.log("chushihua",shebei.toString()) */
 						$.ajax({
 							url: "/hxzkoa/setshebei.do",
 							type: "post",
@@ -1873,101 +2164,60 @@
 										i = 0;
 									}
 								}
-								// function shebeido() {
-								// 	var j = i + 4
-								// 	var html = ''
-								// 	for (i; i < j; i++) {
-								// 		console.log(i)
-								// 		// console.log(data[i].zhuangtai)
-								// 		if (data[i] == false) {
-								// 			break;
-								// 		} else {
-								// 			html += '<tr align="center"><td class="noExl">' + data[i].zhuangtai + '</td><td>' + data[i].id + '</td><td>' + data[i].duixiang + '</td><td>' + data[i].banben + '</td><td>' + data[i].xiangqing + '</td><td>' + data[i].time + '</td></tr>'
-								// 			// html += '<tr align="center" class="d"><td>' + item.id + '</td><td>' + item.receive_time + '</td><td>' + item.type + '</td><td>' + item.tagid + '</td><td>' + item.neirong + '</td></tr>'
-								// 		}
-								// 	}
-								// 	console.log(html)
-								// 	// console.log(i)
-								// 	$("#nr").html(html)
-								// 	if (i >= data.length) {
-								// 		console.log('鍒濆鍖栦簡')
-								// 		i = 0;
-								// 	}
-								// }
 							}
 						});
-						// var timeshow = setInterval(sos, 4000);
-						// function sos() {
-						// 	$.ajax({
-						// 		url: "/hxzkoa/sosfence.do",
-						// 		type: "POST",
-						// 		dataType: "JSON",
-						// 		success(data) {
-						// 			if (data == null) {
-
-						// 			} else {
-						// 				var str = ""
-						// 				alert(str)
-						// 				audio.play()
-						// 			}
-						// 		}
-						// 	})
-						// }
-						//alert('涓�鑷姩寮�鍚憡璀︽彁閱�')
-						var audio1 = new Audio("/hxzkoa/hxzk/image/voice/sos.wav");
-						var audio2 = new Audio("/hxzkoa/hxzk/image/voice/warning.wav");
-						var current_floor;
-						function qufloor(floor) {
-							current_floor = floor
-						}
-						// var zaipan = []
-						// var sosgaojing1 = getRealPosition();
-						// for (var i = 0; i < sosgaojing1.length; i++) {
-						// 	zaipan.push(false)
-						// }
+						//var audio1 = new Audio("/hxzkoa/hxzk/image/voice/sos.wav");
+						//var audio2 = new Audio("/hxzkoa/hxzk/image/voice/warning.wav");
+						//var current_floor;
+						//function qufloor(floor) {
+						//	current_floor = floor
+						//}
 						setInterval(baojing, 1000)
 						function baojing() {
-							var sosgaojing = getRealPosition();
+							var sosgaojing = getRealPositiongao();
 							for (var i = 0; i < sosgaojing.length; i++) {
 								if (sosgaojing[i][7] == 1) {
 									if (sosgaojing[i][8] == 1) {
-										// if (zaipan[i] == false) {
 										var str = '娉ㄦ剰,缂栧彿[' + sosgaojing[i][0] + ']SOS鍛婅'
-										// Audio1.click()
-										audio1.play()
-										//swal(str)
-										/* $.ajax({
+										narn('log',str);
+										$.ajax({
 											url: "/hxzkoa/sosgaojing.do",
 											type: "POST",
 											dataType: "JSON",
 											data: {
 												tagid: sosgaojing[i][0]
 											}
-										}) */
-										// }
+										})
 									} if (sosgaojing[i][9] == 1) {
-										// if (zaipan[i] == false) {
 										var str = '娉ㄦ剰,缂栧彿[' + sosgaojing[i][0] + ']杩涘叆鍗遍櫓鍖哄煙'
-										// audio2.click()
-										audio2.play()
-										//swal(str)
-										/* $.ajax({
+										narn('log',str);
+										$.ajax({
 											url: "/hxzkoa/fencegaojing.do",
 											type: "POST",
 											dataType: "JSON",
 											data: {
 												tagid: sosgaojing[i][0]
 											}
-										}) */
-										// }
+										})
 									}
-									// zaipan[i] = true
 								}
-								// } else {
-								// 	zaipan[i] = false
-								// }
 							}
+							sosgaojing = null
 						}
+						
+						function narn (type,xiaoxi) {
+							naranja()[type]({
+							  title: '鏂版秷鎭彁绀�',
+							  text: xiaoxi,
+							  timeout: 'keep',
+							  buttons: [{
+								text: '纭',
+								click: function (e) {
+								  e.closeNotification()
+								}
+							  }]
+							})
+						  }
 
 					</script>
 					<!-- 瀹ゅ唴瀹氫綅鍦板浘鍔熻兘缁撴潫 -->

--
Gitblit v1.10.0