From 30d07fbe902f3013a65a7c00fa141b119610a8f7 Mon Sep 17 00:00:00 2001 From: kaiyu <404897439@qq.com> Date: Tue, 22 Sep 2020 08:34:54 +0800 Subject: [PATCH] Merge branch 'master' of http://blit.7drlb.com:8888/r/screen_api_v2 --- src/main/webapp/view/cartrajectory.jsp | 37 ++++++++++++++++++++++++++++++++----- 1 files changed, 32 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/view/cartrajectory.jsp b/src/main/webapp/view/cartrajectory.jsp index f70760e..700a48b 100644 --- a/src/main/webapp/view/cartrajectory.jsp +++ b/src/main/webapp/view/cartrajectory.jsp @@ -263,6 +263,26 @@ } var trackPoints = []; //��������������������������������������������������������������� if (sensorInfo.length > 0) { + for (var i = 0; i <sensorInfo.length ; i++) { + if (typeof (sensorInfo[i]["e76"]) == "undefined") { + sensorInfo.splice(i,1); + i--; + }else { + var lon = parseFloat(sensorInfo[i].e76.substr(0, sensorInfo[i].e76.length - 1)); + var lat = parseFloat(sensorInfo[i].e77.substr(0, sensorInfo[i].e77.length - 1)); + if (lon>150 || lon<70 || lat<=20 || lat>60){ + sensorInfo.splice(i,1); + i--; + } + if (i>1){ + if (sensorInfo[i]["e76"]==sensorInfo[i-1]["e76"] && sensorInfo[i]["e77"]==sensorInfo[i-1]["e77"]){ + sensorInfo.splice(i,1); + i--; + } + } + } + } + $.each(sensorInfo, function (item, value) { if (typeof (value.e76) == "undefined") { showNoFlightTrajectory(); @@ -340,11 +360,18 @@ }else { var data="<p style='height: 30px;font-size: 15px;font-weight: bold;padding: 10px 0 0 13px;color: #2aabd2'>"+"������������"+"</p>"; data=data+"<p style='padding:10px 0 0 18px '>"+"���������"+info["time"]+"</p>"; - data=data+"<p style='padding:10px 0 0 18px '>"+"PM2.5���"+info["e1"]+"</p>"; - data=data+"<p style='padding:10px 0 0 18px '>"+"PM10���"+info["e2"]+"</p>"; - data=data+"<p style='padding:10px 0 0 18px '>"+"TSP���"+info["e40"]+"</p>"; - if (typeof(info["e17"])==="undefined"){ - }else { + if (typeof(info["e1"])!="undefined"){ + data=data+"<p style='padding:10px 0 0 18px '>"+"PM2.5���"+info["e1"]+"</p>"; + } + if (typeof(info["e2"])!="undefined"){ + data=data+"<p style='padding:10px 0 0 18px '>"+"PM10���"+info["e2"]+"</p>"; + } + + if (typeof(info["e40"])!="undefined"){ + data=data+"<p style='padding:10px 0 0 18px '>"+"TSP���"+info["e40"]+"</p>"; + } + + if (typeof (info["e17"])!="undefined"){ data=data+"<p style='padding:10px 0 0 18px '>"+"VOCs���������"+info["e17"]+"</p>"; } textArea=textArea+data+"</div>"; -- Gitblit v1.8.0