| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <%-- |
| | | Created by IntelliJ IDEA. |
| | | User: Dell |
| | | Date: 2023/11/23 |
| | | Time: 11:54 |
| | | To change this template use File | Settings | File Templates. |
| | | --%> |
| | | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
| | | <html> |
| | | <head> |
| | | <title>Title</title> |
| | | <style> |
| | | ul li{ |
| | | height: 30px; |
| | | } |
| | | .layui-layout-body{ |
| | | padding-bottom: 0px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <link rel="stylesheet" href="../../CSS/layui2.css"> |
| | | <link rel="stylesheet" href="../../CSS/layer.css"> |
| | | <link rel="stylesheet" href="ChaXunGuiJiJs/style.css"> |
| | | <body style=""> |
| | | <div class="heimu1" style="display: none;width: 100%; overflow: hidden;text-align: center;position: fixed;top: 300px;z-index: 999999999;"> |
| | | <div class="loader-radar" style="height: 100px;width: 100px"></div> |
| | | </div> |
| | | <div class="heimu" style="display: none;height: 100%;width: 100%;position: fixed;top: 0px;background-color: rgb(0,0,0,0.6);z-index: 9999999"></div> |
| | | <div class="layui-container" style="width: 55%;margin: 0px;padding: 0px"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs12 layui-col-md12"> |
| | | <div class="layui-form-item" style="display: none"> |
| | | <label class="layui-form-label" style="background-color: #1E9FFF;color: white;font-size: 12px">忢å°å¾</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="city" style="height: 38px;border: 1px solid #666666;background-color: whitesmoke" lay-verify="required" id="cxList" class="dituList" onchange="changeMap()"> |
| | | <option value="ç¾åº¦å°å¾">ç¾åº¦å°å¾</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="display: inline-block;position: relative;left: -5%"> |
| | | <label class="layui-form-label">设å¤ID</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" id="tagid" placeholder="请è¾å
¥ID"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="display: none;position: relative;left: -80px"> |
| | | <div class="layui-input-inline" style="width: 300px"> |
| | | <button style="display: inline-block;height: 35px;width: 85px" class="" onclick="ontimes(0.5)">è¿åå°æ¶</button> |
| | | <button style="display: inline-block;height: 35px;width: 85px" class="" onclick="ontimes(1)">è¿1å°æ¶</button> |
| | | <button style="display: inline-block;height: 35px;width: 85px" class="" onclick="ontimes(2)">è¿2å°æ¶</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item" style="display: inline-block;position: relative;left: -5%;"> |
| | | <label class="layui-form-label">è¯·éæ©èå´</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" id="test16" placeholder="å¼å§ å° ç»æ" style="width: 300px"> |
| | | <input type="hidden" id="FanWei"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="display: inline-block;position: relative;left: 6%;" id="bfsudu" > |
| | | <div class="layui-input-inline"> |
| | | <select id="bofangsudu" onchange="baiduBoFang()" style="height: 35px" > |
| | | <option value="1">ææ¾é度x1</option> |
| | | <option value="2">ææ¾é度x2</option> |
| | | <option value="4">ææ¾é度x4</option> |
| | | <option value="6">ææ¾é度x6</option> |
| | | <option value="ææ¾é度x8">ææ¾é度x8</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="display: inline-block;width: 70px"> |
| | | <div class="layui-input-inline"> |
| | | <button type="button" class="layui-btn layui-btn-danger" id="search" onclick="ks('æ¥è¯¢')">æ¥è¯¢</button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="display: inline-block;width: 70px"> |
| | | <div class="layui-input-inline"> |
| | | <button type="button" class="layui-btn layui-btn-danger" id="pause" onclick="zanting()" >æå</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-md12"> |
| | | <div style="width: 100%; height: 50%;margin: auto" |
| | | id="wrap"> |
| | | <canvas id="draw"></canvas> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="width: 300px;height: 400px;background-color: rgb(12, 98, 163,0.7);position: fixed;top: 170px;right:15px;z-index: 99999;display: none"> |
| | | <ul style="color: white;margin-top: 18px;margin-left: 20px;font-size: 12px"> |
| | | <li>å½åï¼<span id="data1">0/0æ¡</span></li> |
| | | <li>åç§°ï¼<span class="data2">ææ æ°æ®</span></li> |
| | | <li>ç¼å·ï¼<span class="data3">ææ æ°æ®</span></li> |
| | | <li>ç»åº¦ï¼<span class="data4">ææ æ°æ®</span></li> |
| | | <li>纬度ï¼<span class="data5">ææ æ°æ®</span></li> |
| | | <li>é«ç¨ï¼<span class="data6">ææ æ°æ®</span></li> |
| | | <li>ç¶æï¼<span class="data7">ææ æ°æ®</span></li> |
| | | <li>Xåæ ï¼<span class="data8">ææ æ°æ®</span></li> |
| | | <li>Yåæ ï¼<span class="data9">ææ æ°æ®</span></li> |
| | | <li>Zåæ ï¼<span class="data10">ææ æ°æ®</span></li> |
| | | <li>çµéï¼<span class="data11">ææ æ°æ®</span></li> |
| | | <li>æ¶é´ï¼<span class="data12">ææ æ°æ®</span></li> |
| | | |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | </body> |
| | | |
| | | <script src="/hxzkuwb/HouTai/Js/jquery-3.5.1.js"></script> |
| | | <script src="../../JS/layui.js"></script> |
| | | <script src="../../JS/layer.js"></script> |
| | | <script src="../../languages/languages.js"></script> |
| | | <script src="ChaXunGuiJiJs/ChaXunGuiJiJs.js"></script> |
| | | <script src="ChaXunGuiJiJs/ErWei.js"></script> |
| | | <script src="ChaXunGuiJiJs/BaiDuGuiJi.js"></script> |
| | | <script src="//mapopen.bj.bcebos.com/github/BMapGLLib/TrackAnimation/src/TrackAnimation.min.js"></script> |
| | | <script> |
| | | localStorage.setItem("ChaXunGuiJi","已宿") |
| | | loadJScript(); |
| | | |
| | | function loadJScript() { |
| | | var script = document.createElement('script'); |
| | | script.type = 'text/javascript'; |
| | | script.src = '//api.map.baidu.com/api?type=webgl&v=1.0&ak=zoVtgLNWuaZBjMAa32RZRFIagXxST0fm&callback=init'; |
| | | document.body.appendChild(script); |
| | | } |
| | | function ks(input){ |
| | | if (input == "æ¥è¯¢"){ |
| | | $("#search").css("background-color","green") |
| | | var type = $("#cxList").val() |
| | | |
| | | if(type == "ç¾åº¦å°å¾") { |
| | | baiDuGuiJi() |
| | | } |
| | | } |
| | | } |
| | | function changeMap(){ |
| | | var ceng =$("#cxList").val(); |
| | | if(ceng == "ç¾åº¦å°å¾"){ |
| | | $("#baidumap").show() |
| | | $("#wrap").hide(); |
| | | }else{ |
| | | $("#bfsudu").css("display","inline-block") |
| | | $("#wrap").show(); |
| | | $("#baidumap").hide() |
| | | $.ajax({ |
| | | async: false, |
| | | type: 'POST', |
| | | url: "/hxzkuwb/findFloorMap", |
| | | dataType: 'json', |
| | | data: { |
| | | floor: ceng |
| | | }, |
| | | success: function (data) { |
| | | ts1 = getYuandian() |
| | | ts2 = getTruemap() |
| | | imgUrl = '/hxzkuwb/HouTai/MapImg/' + data.mapname; |
| | | //imgUrl = '/hxzkoa/hxzk/image/mapfile/office.jpg'; |
| | | new MarkPoints(imgUrl); |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | function ontimes(time) { |
| | | if(time == 0.5){ |
| | | var now = new Date(); |
| | | var year1 = now.getFullYear(); |
| | | var month1 = String(now.getMonth() + 1).padStart(2, '0'); |
| | | var day1 = String(now.getDate()).padStart(2, '0'); |
| | | var hour1 = String(now.getHours()).padStart(2, '0'); |
| | | var minute1 = String(now.getMinutes()).padStart(2, '0'); |
| | | var second1 = String(now.getSeconds()).padStart(2, '0'); |
| | | var currentDateTime = year1+"-"+month1+"-"+day1+" "+hour1+":"+minute1+":"+second1 |
| | | console.log(currentDateTime); |
| | | const halfHourAgo = new Date(); |
| | | halfHourAgo.setMinutes(halfHourAgo.getMinutes() - 30); |
| | | const year = halfHourAgo.getFullYear(); |
| | | const month = String(halfHourAgo.getMonth() + 1).padStart(2, '0'); |
| | | const day = String(halfHourAgo.getDate()).padStart(2, '0'); |
| | | const hour = String(halfHourAgo.getHours()).padStart(2, '0'); |
| | | const minute = String(halfHourAgo.getMinutes()).padStart(2, '0'); |
| | | const second = String(halfHourAgo.getSeconds()).padStart(2, '0'); |
| | | const halfHourAgoDateTime = year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second |
| | | $("#FanWei").val(halfHourAgoDateTime+" å° "+currentDateTime) |
| | | $("#test16").val("已鿩è¿åå°æ¶") |
| | | } |
| | | if (time == 1){ |
| | | var now = new Date(); |
| | | var year1 = now.getFullYear(); |
| | | var month1 = String(now.getMonth() + 1).padStart(2, '0'); |
| | | var day1 = String(now.getDate()).padStart(2, '0'); |
| | | var hour1 = String(now.getHours()).padStart(2, '0'); |
| | | var minute1 = String(now.getMinutes()).padStart(2, '0'); |
| | | var second1 = String(now.getSeconds()).padStart(2, '0'); |
| | | var currentDateTime = year1+"-"+month1+"-"+day1+" "+hour1+":"+minute1+":"+second1 |
| | | const halfHourAgo = new Date(); |
| | | halfHourAgo.setMinutes(halfHourAgo.getMinutes() - 60); |
| | | const year = halfHourAgo.getFullYear(); |
| | | const month = String(halfHourAgo.getMonth() + 1).padStart(2, '0'); |
| | | const day = String(halfHourAgo.getDate()).padStart(2, '0'); |
| | | const hour = String(halfHourAgo.getHours()).padStart(2, '0'); |
| | | const minute = String(halfHourAgo.getMinutes()).padStart(2, '0'); |
| | | const second = String(halfHourAgo.getSeconds()).padStart(2, '0'); |
| | | const halfHourAgoDateTime = year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second |
| | | $("#FanWei").val(halfHourAgoDateTime+" å° "+currentDateTime) |
| | | $("#test16").val("已鿩è¿1å°æ¶") |
| | | } |
| | | if (time == 2){ |
| | | var now = new Date(); |
| | | var year1 = now.getFullYear(); |
| | | var month1 = String(now.getMonth() + 1).padStart(2, '0'); |
| | | var day1 = String(now.getDate()).padStart(2, '0'); |
| | | var hour1 = String(now.getHours()).padStart(2, '0'); |
| | | var minute1 = String(now.getMinutes()).padStart(2, '0'); |
| | | var second1 = String(now.getSeconds()).padStart(2, '0'); |
| | | var currentDateTime = year1+"-"+month1+"-"+day1+" "+hour1+":"+minute1+":"+second1 |
| | | console.log(currentDateTime); |
| | | const halfHourAgo = new Date(); |
| | | halfHourAgo.setMinutes(halfHourAgo.getMinutes() - 120); |
| | | const year = halfHourAgo.getFullYear(); |
| | | const month = String(halfHourAgo.getMonth() + 1).padStart(2, '0'); |
| | | const day = String(halfHourAgo.getDate()).padStart(2, '0'); |
| | | const hour = String(halfHourAgo.getHours()).padStart(2, '0'); |
| | | const minute = String(halfHourAgo.getMinutes()).padStart(2, '0'); |
| | | const second = String(halfHourAgo.getSeconds()).padStart(2, '0'); |
| | | const halfHourAgoDateTime = year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second |
| | | $("#FanWei").val(halfHourAgoDateTime+" å° "+currentDateTime) |
| | | $("#test16").val("已鿩è¿2å°æ¶") |
| | | } |
| | | } |
| | | |
| | | function zanting(){ |
| | | var tall = $("#pause").text(); |
| | | if (cx == true){ |
| | | if (tall == "æå"){ |
| | | tds = false |
| | | $("#pause").text("ç»§ç»") |
| | | }else{ |
| | | tds = true |
| | | $("#pause").text("æå") |
| | | var ins = localStorage.getItem("JiXu") |
| | | var movingIcon = new BMapGL.Icon('../../Icon/人å.png', new BMapGL.Size(32, 32)); |
| | | var marker = new BMapGL.Marker(dtlist[0], {icon: movingIcon}); |
| | | var label = new BMapGL.Label("", {offset: new BMapGL.Size(0, -50)}); |
| | | label.setStyle({ |
| | | color: "white", |
| | | fontSize: "12px", |
| | | borderRadius: "5px", |
| | | padding: "5px 5px", |
| | | border: "0", |
| | | transform: 'translateX(-50%)', |
| | | backgroundColor: bgcolor, |
| | | |
| | | }); |
| | | var label1 = new BMapGL.Label("", {offset: new BMapGL.Size(0, 30)}); |
| | | label1.setStyle({ |
| | | color: "white", |
| | | fontSize: "12px", |
| | | borderRadius: "5px", |
| | | padding: "5px 5px", |
| | | border: "0", |
| | | transform: 'translateX(-50%)', |
| | | backgroundColor: bgcolor, |
| | | |
| | | }); |
| | | marker.setLabel(label); |
| | | var marker1 = new BMapGL.Marker(dtlist[0], {icon: movingIcon}); |
| | | marker1.setLabel(label1); |
| | | bm.clearOverlays(); |
| | | |
| | | bm.addOverlay(marker1) |
| | | bm.addOverlay(marker); |
| | | function animateMarker(index) { |
| | | if (tds == false) { |
| | | localStorage.setItem("JiXu",index) |
| | | return; |
| | | } else { |
| | | if (index == datalist.length) { |
| | | nub = false |
| | | } |
| | | $("#data1").text(index + "/" + datalist.length) |
| | | $(".data2").text(datalist[index].name) |
| | | $(".data3").text(datalist[index].tagid) |
| | | $(".data4").text(datalist[index].gspJingdu) |
| | | $(".data5").text(datalist[index].gpsWeidu) |
| | | $(".data6").text(datalist[index].gpsHaibaGao) |
| | | $(".data7").text(datalist[index].gpsState) |
| | | $(".data11").text(datalist[index].gpsPower) |
| | | $(".data12").text(datalist[index].addtime) |
| | | |
| | | if (index < dtlist.length) { |
| | | var point = new BMapGL.Point(dtlist[index].lng, dtlist[index].lat); |
| | | marker.setPosition(point); |
| | | marker1.setPosition(point); |
| | | label.setContent(datalist[index].name + " " + datalist[index].tagid); |
| | | label1.setContent(datalist[index].gspJingdu + " " + datalist[index].gpsWeidu); |
| | | // 设置延è¿åç§»å¨å°ä¸ä¸ä¸ªç¹ |
| | | setTimeout(function () { |
| | | animateMarker(parseInt(ins)+parseInt(1)); |
| | | ins = parseInt(ins)+parseInt(1) |
| | | }, sudu); // è¿éè®¾ç½®çæ¯æ¯500毫ç§ç§»å¨ä¸æ¬¡ï¼ä½ å¯ä»¥æ ¹æ®éè¦è°æ´ |
| | | |
| | | } |
| | | |
| | | if (index < dtlist.length && index > 0) { |
| | | var line = new BMapGL.Polyline([dtlist[index - 1], point], { |
| | | strokeColor: 'red', |
| | | strokeWeight: 2, |
| | | strokeOpacity: 1 |
| | | }); |
| | | bm.addOverlay(line); |
| | | } |
| | | } |
| | | } |
| | | animateMarker(ins); |
| | | |
| | | } |
| | | }else{ |
| | | layer.msg('请å
æ¥è¯¢è½¨è¿¹ï¼') |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | </html> |