From b284d078f196af80a105dc3bcb610d8ed37d9251 Mon Sep 17 00:00:00 2001
From: ZhuDongming <773644075@qq.com>
Date: Fri, 08 Nov 2019 11:49:29 +0800
Subject: [PATCH] update

---
 src/main/webapp/view/pollutionsource.jsp |   99 ++++++++++++++++++++++++++-----------------------
 1 files changed, 52 insertions(+), 47 deletions(-)

diff --git a/src/main/webapp/view/pollutionsource.jsp b/src/main/webapp/view/pollutionsource.jsp
index a1ac426..b9a9f7b 100644
--- a/src/main/webapp/view/pollutionsource.jsp
+++ b/src/main/webapp/view/pollutionsource.jsp
@@ -104,7 +104,7 @@
         top: 30px;
         right: 50px;
         display: inline-block;
-        width: 80px;
+        width: 100px;
         height: 40px;
         border-width: 0px;
         border-radius: 3px;
@@ -122,7 +122,7 @@
 
 <body>
 <div class="main_body">
-    <input type="button" id="show" value="������"/>
+    <input type="button" id="show" value="������������"/>
     <div id="cpm">������������������</div>
     <div id="mapCanvas"></div> <!-- ������������ -->
     <!-- ���sensorInfo,regionCode,regionName,monitorPoint,device-->
@@ -162,10 +162,10 @@
     var marker = new BMap.Marker(point, {icon: icon, offset: new BMap.Size(0, -20)});
     map.addOverlay(marker);
     map.centerAndZoom(point, 16);
-    if (!$.isEmptyObject(dirPoint) && !$.isEmptyObject(getPollutionSourceData) && typeof (getPollutionSourceData["e6"]) != "undefined" && typeof (getPollutionSourceData["e7"]) != "undefined" && typeof (getPollutionSourceData["e18"]) != "undefined" && typeof (getPollutionSourceData["e23"]) != "undefined" && getPollutionSourceData["e18"] > 0.03) {
+    if (!$.isEmptyObject(dirPoint) && !$.isEmptyObject(getPollutionSourceData) && typeof (getPollutionSourceData["e6"]) != "undefined" && typeof (getPollutionSourceData["e7"]) != "undefined" && typeof (getPollutionSourceData["e18"]) != "undefined" && typeof (getPollutionSourceData["e23"]) != "undefined") {
         var windSpeed = parseFloat(getPollutionSourceData["e18"]);
         var windDir = parseFloat(getPollutionSourceData["e23"]);
-        var distance = windSpeed * 3600;
+        var distance = windSpeed * 3600>108? windSpeed * 3600:108;
         var winDirStart = 255 - windDir;
         var winDirEnd = 285 - windDir;
         var marker1 = new BMap.Marker(EOffsetBearing(dirPoint, distance * 0.15, winDirStart), {
@@ -192,7 +192,7 @@
 
     $("#show").one('click', function () {
         setTimeout(function () {
-            if ($.isEmptyObject(dirPoint) || $.isEmptyObject(getPollutionSourceData) || typeof (getPollutionSourceData["e6"]) == "undefined" || typeof (getPollutionSourceData["e7"]) == "undefined" || typeof (getPollutionSourceData["e18"]) == "undefined" || typeof (getPollutionSourceData["e23"]) == "undefined" || getPollutionSourceData["e18"] <= 0.03) {
+            if ($.isEmptyObject(dirPoint) || $.isEmptyObject(getPollutionSourceData) || typeof (getPollutionSourceData["e6"]) == "undefined" || typeof (getPollutionSourceData["e7"]) == "undefined" || typeof (getPollutionSourceData["e18"]) == "undefined" || typeof (getPollutionSourceData["e23"]) == "undefined") {
                 showNoData();
             } else {
                 var humidity = parseFloat(getPollutionSourceData["e6"]);
@@ -201,7 +201,7 @@
                 var windDir = parseFloat(getPollutionSourceData["e23"]);
                 var selectSensorKey = getPollutionSourceData["selectSensorKey"];
                 var markerDir = new BMap.Marker(dirPoint);
-                lab = new BMap.Label("���������������������������</br>" + selectSensorKey + "������", {
+                lab = new BMap.Label("���������������������������������������������</br>" + selectSensorKey + "������", {
                     position: dirPoint,
                     offset: new BMap.Size(20, -40)
                 });
@@ -213,7 +213,7 @@
                 });
                 map.addOverlay(lab);
 
-                var distance = windSpeed * 3600;
+                var distance = windSpeed * 3600>108? windSpeed * 3600:108;
                 var winDirStartLeft = 240 - windDir;
                 var winDirEndLeft = 250 - windDir;
                 var winDirStartMiddle = 250 - windDir;
@@ -314,49 +314,54 @@
                     map.addOverlay(oval);
                 }, 500);
 
-                var winfowTextCause = "<p style='height: 44px;line-height: 22px'>���������������������������������������������������������������������������������������������������������������������</p>";
+                var winfowTextCause = "<p style='height: 22px;line-height: 22px'>������������������������������������������������������������������</p>";
                 var winfowTextSource;
                 var supplement;
-                if (month == 12 || month == 1 || month == 2) {
-                    if (windSpeed >= 3.4) {
-                        supplement = "���������������������������������������������������������������������������";
+                if (selectSensorKey == "������") {
+                    winfowTextCause = "<p style='height: 44px;line-height: 22px'>���������������������������������������������������������������������������������������������������������������������������������������������</p>";
+                    winfowTextSource = "<p style='height: 22px;line-height: 22px'>NOx������VOCs������������</p>";
+                } else {
+                    if (month == 12 || month == 1 || month == 2) {
+                        if (windSpeed >= 3.4) {
+                            supplement = "���������������������������������������������������������������������������";
+                        }
+                        if (humidity >= 90.0) {
+                            supplement = "������������������������������������������������������������������������";
+                        } else {
+                            supplement = "";
+                        }
+                        winfowTextSource = "<p style='height: 22px;line-height: 22px'>���������������������������������������������������������������������������������" + supplement + "</p>";
+                    } else if (month == 3 || month == 4 || month == 5) {
+                        if (windSpeed >= 3.4) {
+                            supplement = "���������������������������������������������������������������������������";
+                        }
+                        if (humidity >= 90.0) {
+                            supplement = "������������������������������������������������������������������������";
+                        } else {
+                            supplement = "";
+                        }
+                        winfowTextSource = "<p style='height: 22px;line-height: 22px'>���������������������������������������������������������������" + supplement + "</p>";
+                    } else if (month == 6 || month == 7) {
+                        if (windSpeed >= 3.4) {
+                            supplement = "������������������������������������";
+                        }
+                        if (humidity >= 90.0) {
+                            supplement = "���������������������������������������������������������������������������";
+                        } else {
+                            supplement = "";
+                        }
+                        winfowTextSource = "<p style='height: 22px;line-height: 22px'>���������������������������������������,���������������������" + supplement + "</p>";
+                    } else if (month == 8 || month == 9 || month == 10 || month == 11) {
+                        if (windSpeed >= 3.4) {
+                            supplement = "������������������������������������������";
+                        }
+                        if (humidity >= 90.0) {
+                            supplement = "������������������������������������������������������������������������";
+                        } else {
+                            supplement = "";
+                        }
+                        winfowTextSource = "<p style='height: 22px;line-height: 22px'>������������������������������������������������������������������������������������������������������" + supplement + "</p>";
                     }
-                    if (humidity >= 90.0) {
-                        supplement = "������������������������������������������������������������������������";
-                    } else {
-                        supplement = "";
-                    }
-                    winfowTextSource = "<p style='height: 22px;line-height: 22px'>���������������������������������������������������������������������������������" + supplement + "</p>";
-                } else if (month == 3 || month == 4 || month == 5) {
-                    if (windSpeed >= 3.4) {
-                        supplement = "���������������������������������������������������������������������������";
-                    }
-                    if (humidity >= 90.0) {
-                        supplement = "������������������������������������������������������������������������";
-                    } else {
-                        supplement = "";
-                    }
-                    winfowTextSource = "<p style='height: 22px;line-height: 22px'>���������������������������������������������������������������" + supplement + "</p>";
-                } else if (month == 6 || month == 7) {
-                    if (windSpeed >= 3.4) {
-                        supplement = "������������������������������������";
-                    }
-                    if (humidity >= 90.0) {
-                        supplement = "���������������������������������������������������������������������������";
-                    } else {
-                        supplement = "";
-                    }
-                    winfowTextSource = "<p style='height: 22px;line-height: 22px'>���������������������������������������,���������������������" + supplement + "</p>";
-                } else if (month == 8 || month == 9 || month == 10 || month == 11) {
-                    if (windSpeed >= 3.4) {
-                        supplement = "������������������������������������������";
-                    }
-                    if (humidity >= 90.0) {
-                        supplement = "������������������������������������������������������������������������";
-                    } else {
-                        supplement = "";
-                    }
-                    winfowTextSource = "<p style='height: 22px;line-height: 22px'>������������������������������������������������������������������������������������������������������" + supplement + "</p>";
                 }
 
                 var winfowText = '<div style="height:150px;" >';

--
Gitblit v1.8.0