| | |
| | | <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); |
| | |
| | | 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> |
| | |
| | | <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"> |
| | |
| | | </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 --> |
| | |
| | | <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-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 |
| | |
| | | 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}"> |
| | |
| | | </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"> |
| | |
| | | </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> |
| | | |
| | |
| | | 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, |
| | |
| | | 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 = {}, |
| | |
| | | }); |
| | | 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; |
| | |
| | | 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]); |
| | | } |
| | | }; |
| | | }, |
| | |
| | | <!-- 百度地图功能 --> |
| | | <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 = []; |
| | |
| | | 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;//是否显示电量 |
| | |
| | | } |
| | | ); |
| | | |
| | | 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){ |
| | |
| | | //坐标转换完之后的回调函数 |
| | | |
| | | //bm.clearOverlays(); |
| | | var points = []; |
| | | // var points = []; |
| | | if (gps_node_list1.length != 0) { |
| | | for (var i = 0; i < gps_node_list1.length; i++) { |
| | | //var zhuangtaia = gps_node_list1[i][4]; |
| | | 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 (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]); |
| | | } |
| | | var point = new BMap.Point(new Number(gps_node_list1[i][1]), new Number(gps_node_list1[i][2])); |
| | | points.push(point); |
| | | 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]); |
| | | } |
| | | } |
| | | }; |
| | | gps_node_list1 = null |
| | | var newzuobiao = zhuanhuan(points); |
| | | baidumm(newzuobiao) |
| | | $("#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 baidumm(data) { |
| | | bm.clearOverlays(); |
| | | 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 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 |
| | | labeltagids.add(gps_node_list[i][0], tagid); |
| | | } |
| | | if (bm_tagZb == "1") { |
| | | 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, +55) }); |
| | | dianliang.setStyle({ |
| | | transform: 'translateX(-50%)', |
| | | backgroundColor: "0.000000000001", |
| | | border: 'none' |
| | | }); |
| | | marker.setLabel(dianliang); |
| | | labeldianliangs.add(gps_node_list[i][0], dianliang); |
| | | } |
| | | markers.add(gps_node_list[i][0], marker); |
| | | } |
| | | } |
| | | tt = tt + 1; |
| | | } |
| | | |
| | | 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) { |
| | |
| | | // 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 = 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] |
| | | 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; |
| | | tagid.setContent(aaaaa); //添加label-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%)', |
| | | backgroundColor: "0.000000000001", |
| | | border: 'none' |
| | | }); |
| | | marker.setLabel(zuobiao); |
| | | zuobiao = null; |
| | | 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") { |
| | | 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; |
| | | 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; |
| | | // } |
| | | } |
| | | gps_node_list = null; |
| | | }; |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | }); |
| | | var audio1 = new Audio("/hxzkoa/hxzk/image/voice/sos.wav"); |
| | | var audio2 = new Audio("/hxzkoa/hxzk/image/voice/warning.wav"); |
| | | //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) { |
| | | var str = '注意,编号[' + sosgaojing[i][0] + ']SOS告警' |
| | | audio1.play() |
| | | narn('log',str); |
| | | $.ajax({ |
| | | url: "/hxzkoa/sosgaojing.do", |
| | | type: "POST", |
| | | dataType: "JSON", |
| | | data: { |
| | | tagid: sosgaojing[i][0] |
| | | } |
| | | }) |
| | | } if (sosgaojing[i][9] == 1) { |
| | | var str = '注意,编号[' + sosgaojing[i][0] + ']进入危险区域' |
| | | audio2.play() |
| | | narn('log',str); |
| | | $.ajax({ |
| | | url: "/hxzkoa/fencegaojing.do", |
| | | type: "POST", |
| | | dataType: "JSON", |
| | | data: { |
| | | tagid: sosgaojing[i][0] |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | sosgaojing = null |
| | | } |
| | | |
| | | function narn (type,xiaoxi) { |
| | | naranja()[type]({ |
| | | title: '新消息提示', |
| | | text: xiaoxi, |
| | | timeout: 'keep', |
| | | buttons: [{ |
| | | text: '确认', |
| | | click: function (e) { |
| | | e.closeNotification() |
| | | } |
| | | }] |
| | | }) |
| | | } |
| | | |
| | | </script> |
| | | <!-- 室内定位地图功能结束 --> |