From 245c1b8d10d296ee31f4bf1cf3bdbcc1d3cc3d0e Mon Sep 17 00:00:00 2001
From: LiJun <LiJun@192.168.10.24>
Date: 星期一, 12 十一月 2018 09:54:10 +0800
Subject: [PATCH] 计算实时页面中的丢包率,通信计数,丢包率等
---
gx_tieta/WebRoot/index.jsp | 114 ++++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 89 insertions(+), 25 deletions(-)
diff --git a/gx_tieta/WebRoot/index.jsp b/gx_tieta/WebRoot/index.jsp
index 2d3d475..a92b69e 100644
--- a/gx_tieta/WebRoot/index.jsp
+++ b/gx_tieta/WebRoot/index.jsp
@@ -114,37 +114,15 @@
<!-- 鍦板浘鍐呭绛涢�� -->
<div class="map-info-panel-left w300">
<div class="map-info-panel-content">
- <div class="map-info">
+ <div class="map-info" id="showMapInfoDetail">
<span>鍦板浘宸ュ叿</span>
- <span class="map-info-btn-icon" id="showMapInfoDetail" title="璇︽儏"><i class="fa fa-angle-double-down"></i></span>
+ <span class="map-info-btn-icon" title="璇︽儏"><i class="fa fa-angle-double-down"></i></span>
</div>
<div class="map-info-detail">
<div class="layui-collapse" lay-filter="test" lay-accordion="">
<div class="layui-colla-item">
- <h2 class="layui-colla-title">娣诲姞鏈烘埧</h2>
- <div class="layui-colla-content layui-show"">
- <table>
- <tbody>
- <tr>
- <td class="w4em alg-c f-bold">缁忓害:</td>
- <td><input type="text" class="lng"></td>
- </tr>
- <tr>
- <td class="w4em alg-c f-bold">绾害:</td>
- <td><input type="text" class="lat"></td>
- </tr>
- <tr>
- <td colspan="2" class="alg-r btn-container">
- <button type="button" value="娣诲姞" id="mapToolAddHome" class="mrr8">娣诲姞</button>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div class="layui-colla-item">
<h2 class="layui-colla-title">瀹氫綅鏈烘埧</h2>
- <div class="layui-colla-content">
+ <div class="layui-colla-content layui-show">
<table>
<tbody>
<tr>
@@ -159,6 +137,36 @@
</tbody>
</table>
</div>
+ </div>
+ <div class="layui-colla-item" id="permitAddHome">
+ <h2 class="layui-colla-title">娣诲姞鏈烘埧</h2>
+ <div class="layui-colla-content">
+ <table id="mapToolAddHome">
+ <tbody>
+ <tr>
+ <td class="w4em alg-c f-bold">缁忓害:</td>
+ <td><input type="text" class="lng"></td>
+ </tr>
+ <tr>
+ <td class="w4em alg-c f-bold">绾害:</td>
+ <td><input type="text" class="lat"></td>
+ </tr>
+ <tr>
+ <td class="w4em alg-c f-bold">绫诲瀷:</td>
+ <td>
+ <input type="radio" class="pointStyle" name="pointStyle" value="0" checked><span class="mrr8">GPS</span>
+ <input type="radio" class="pointStyle" name="pointStyle" value="1"><span class="mrr8">鐧惧害</span>
+ <input type="radio" class="pointStyle" name="pointStyle" value="2"><span class="mrr8">鑵捐/楂樺痉</span>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="alg-r btn-container">
+ <button type="button" value="娣诲姞" id="mapToolAddHomeBtn" class="mrr8">娣诲姞</button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
</div>
</div>
</div>
@@ -3623,6 +3631,13 @@
});
}
+ // 鏍规嵁鏉冮檺鏇存柊鍦板浘宸ュ叿鍐呭
+ var permitAddHome = getPermit('batt_map_edit_permit', permits); // 娣诲姞鏈烘埧鐨勬潈闄�
+ // 娌℃湁娣诲姞鏈烘埧鐨勬潈闄�
+ if(!permitAddHome) {
+ $('#permitAddHome').remove();
+ }
+
// 鍦板浘宸︿笂鏂归潰鏉挎ā鍧�-鐐瑰嚮闈㈡澘涓婃柟鐨勫皬鍥炬爣鏄剧ず璁惧畾淇℃伅
$('#showMapInfoDetail').click(function() {
$('.map-info-detail').slideToggle();
@@ -3658,6 +3673,55 @@
}
});
+ /* 鍦板浘宸ュ叿娣诲姞鍦板浘鍥炬爣 */
+ var mapToolAddHome = $('#mapToolAddHome');
+ var mapToolAddHomeBtn = $('#mapToolAddHomeBtn');
+
+ // 鐐瑰嚮鍦板浘宸ュ叿娣诲姞鍦板浘鎸夐挳
+ mapToolAddHomeBtn.click(function() {
+ var lng = mapToolAddHome.find('.lng').val().trim();
+ var lat = mapToolAddHome.find('.lat').val().trim();
+ var pointStyles = mapToolAddHome.find('.pointStyle');
+ var pointStyle = 0;
+ pointStyles.each(function() {
+ if($(this).is(':checked')) {
+ pointStyle = $(this).val();
+ }
+ });
+ if(lng && lat) {
+ var point = getBaiduPoint(lng, lat, pointStyle);
+ var pt = new BMap.Point(point.lon, point.lat);
+ addCommonDot(map, pt);
+ map.centerAndZoom(pt, 18); // 鐢ㄥ煄甯傚悕璁剧疆鍦板浘涓績鐐�
+ }else {
+ layer.msg('璇疯緭鍏ョ粡绾害');
+ }
+
+ });
+
+ // 鑾峰彇鐧惧害鍦板浘鐨勭粡绾害
+ function getBaiduPoint(lng, lat, type) {
+ var point = {};
+ lng = Number(lng);
+ lat = Number(lat);
+ var _type = Number(type);
+ switch(_type) {
+ case 0: // GPS鍘熷鍧愭爣
+ point = GPS.wgs2bd(lat, lng);
+ break;
+ case 1: // 鐧惧害鍦板浘鍧愭爣
+ point = {
+ lon: lng,
+ lat: lat
+ };
+ break;
+ case 2: // 鑵捐/楂樺痉
+ point = GPS.bd_encrypt(lat, lng);
+ break;
+ }
+
+ return point;
+ }
});
// 鏇存柊鍦板浘宸ュ叿鎼滅储鏈烘埧
--
Gitblit v1.9.1