| | |
| | | href="/hxzkoa/hxzk/plugins/table/datatable/custom_dt_html5.css"> |
| | | <link rel="stylesheet" type="text/css" |
| | | href="/hxzkoa/hxzk/plugins/table/datatable/dt-global_style.css"> |
| | | <link href="/hxzkoa/hxzk/layui/layui/src/css/layui.css" rel="stylesheet"> |
| | | <style> |
| | | body { |
| | | margin: 0px; |
| | | width: 100%; |
| | | min-width: 1500px; |
| | | max-width: 100%; |
| | | background: url("/hxzkoa/resources/images/bottomBackground2.jpg"); |
| | | height: 100%; |
| | | background-color: #F0F0F0; |
| | | } |
| | |
| | | <div> |
| | | <select style="float: left; width: 10%; margin-left: 10%;" |
| | | class="form-control form-control-lg" id="baowenList"> |
| | | <option value="01">报文数据</option> |
| | | <option value="02">原始数据</option> |
| | | <option value="03">UDP转发</option> |
| | | <option value="04">TCP转发</option> |
| | | <option value="05">注册报文</option> |
| | | <option value="06">调试数据</option> |
| | | <option value="07">HEX显示</option> |
| | | <option value="08">数据库数</option> |
| | | <option value="09">气体报文</option> |
| | | </select> <select |
| | | style="float: left; width: 10%; margin-left: 1%; margin-right: 1%;" |
| | | class="form-control form-control-lg" id="tagid"> |
| | | <option value="0000">所有标签</option> |
| | | <c:forEach items="${labelList}" var="label"> |
| | | <option value="${label.tag_id}">${label.tag_id}</option> |
| | | </c:forEach> |
| | | <option value="LOOK_BAOWEN,LOOK_ORIG">原始数据</option> |
| | | <option value="LOOK_BAOWEN,LOOK_UWB">UWB定位数据</option> |
| | | <option value="LOOK_BAOWEN,LOOK_GNGGA">卫星定位数据</option> |
| | | </select> |
| | | <input type="text" id="tagid" placeholder="请输入标签ID" style="margin-left: 15px;height: 36px;border-radius: 7px;border: 0px;font-size: 18px;margin-right: 15px"> |
| | | |
| | | |
| | | <button type="button" class="btn btn-secondary start">开始</button> |
| | | <button type="button" class="btn btn-secondary stop">暂停</button> |
| | | <button type="button" class="btn btn-secondary refresh">刷新</button> |
| | | <button type="button" class="btn btn-secondary refreshss">持续更新</button> |
| | | <button type="button" class="btn btn-secondary refreshstop">更新暂停</button> |
| | | <button type="button" class="btn btn-secondary clean">清空</button> |
| | | <button type="button" class="btn btn-secondary refreshstop">结束</button> |
| | | <button type="button" class="btn btn-secondary relo">刷新</button> |
| | | |
| | | </div> |
| | | <thead> |
| | | <tr align="center"> |
| | | <th>ID</th> |
| | | <th>序号</th> |
| | | <th>接收时间</th> |
| | | <th>报文类型</th> |
| | | <th>标签ID</th> |
| | | <th>报文内容</th> |
| | | <th>接收内容</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody id="nr"> |
| | | <!-- <c:forEach items="${baowen}" var="list"> |
| | | <tr align="center" class="d"> |
| | | <td>${list.id}</td> |
| | | <td>${list.Receive_time}</td> |
| | | <td>${list.type}</td> |
| | | <td>${list.tagid}</td> |
| | | <td>${list.neirong}</td> |
| | | </tr> |
| | | </c:forEach> --> |
| | | <tr align="center" class="d"> |
| | | <td>${list.id}</td> |
| | | <td>${list.Receive_time}</td> |
| | | <td>${list.type}</td> |
| | | <td>${list.tagid}</td> |
| | | <td>${list.neirong}</td> |
| | | </tr> |
| | | |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | |
| | | <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/layui/layui.js"></script> |
| | | <script> |
| | | |
| | | window.addEventListener("beforeunload", (event) => { |
| | | // Cancel the event as stated by the standard. |
| | | event.preventDefault(); |
| | | // Chrome requires returnValue to be set. |
| | | event.returnValue = ""; |
| | | clearInterval(refreshIntervalId); |
| | | $.ajax({ |
| | | url: "/hxzkoa/to_cs_stop1.do", |
| | | type: "post", |
| | | }); |
| | | }); |
| | | var refreshIntervalId; |
| | | window.onload = function () { |
| | | App.init(); |
| | | $.ajax({ |
| | |
| | | }; |
| | | $('.header-page').load('/hxzkoa/hxzk/top.html'); |
| | | $('.login-page').load('/hxzkoa/hxzk/head.html'); |
| | | var messageTimeout; |
| | | var count = 0; |
| | | var timeshow; |
| | | function showMessage() { |
| | | var start = $('.start').css('display'); |
| | | //console.log(start) |
| | | messageTimeout = setTimeout(showMessage, 500); |
| | | }; |
| | | |
| | | |
| | | |
| | | //查看 |
| | | $(".start").click(function () { |
| | | var baowenleixing = document.getElementById('baowenList').value; |
| | | var tagid = document.getElementById('tagid').value; |
| | |
| | | leixing: baowenleixing, |
| | | tagid: tagid |
| | | }, |
| | | success:function (data){ |
| | | //每秒查询数据库进行展示报文 |
| | | |
| | | } |
| | | }); |
| | | |
| | | }) |
| | | //刷新 |
| | | $(".relo").click(function (){ |
| | | var baowenleixing = document.getElementById('baowenList').value; |
| | | var tagid = document.getElementById('tagid').value; |
| | | var dt ="tagid="+tagid+"&type="+baowenleixing |
| | | $.ajax({ |
| | | url: "/hxzkoa/findbaowenid.do", |
| | | type: "post", |
| | | data: { |
| | | tagid: tagid, |
| | | }, |
| | | dataType: 'json', |
| | | success:function (data) { |
| | | //每秒查询数据库进行展示报文 |
| | | console.log(data) |
| | | $("#nr").empty() |
| | | var str = [] |
| | | for (var i = 0; i < data.length; i++) { |
| | | str += '<tr align="center">' + |
| | | '<td>' + data[i].id + '</<td>' + |
| | | '<td>' + data[i].time + '</<td>' + |
| | | '<td>' + data[i].type + '</<td>' + |
| | | '<td>' + data[i].tagid + '</<td>' + |
| | | '<td>' + data[i].nr + '</<td>' + |
| | | '</tr>' |
| | | } |
| | | $("#nr").append(str) |
| | | |
| | | } |
| | | }) |
| | | layer.msg('刷新成功'); |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | $(".refresh").click(function () { |
| | | $.ajax({ |
| | | url: "/hxzkoa/baowenrefresh.do", |
| | |
| | | } |
| | | }) |
| | | $(".refreshstop").click(function (){ |
| | | console.log('guijmikjk'); |
| | | clearInterval(timeshow); |
| | | console.log('jiehsu'); |
| | | clearInterval(refreshIntervalId); |
| | | $.ajax({ |
| | | url: "/hxzkoa/to_cs_stop.do", |
| | | url: "/hxzkoa/to_cs_stop1.do", |
| | | type: "post", |
| | | }); |
| | | }) |
| | | |
| | | $(".stop").click(function () { |
| | | clearInterval(refreshIntervalId); |
| | | $.ajax({ |
| | | url: "/hxzkoa/to_cs_stop.do", |
| | | type: "post", |
| | |
| | | url: "/hxzkoa/to_cs_clean.do", |
| | | type: "post", |
| | | }); |
| | | $("#nr").empty() |
| | | |
| | | |
| | | }) |
| | | window.onbeforeunload = function () { |
| | | $.ajax({ |