From 0289e2c5349f6b2e8cf41126be7ff31381b3f1d5 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Mon, 19 Oct 2020 14:35:10 +0800
Subject: [PATCH] 多设备单因子数据及其平均值对比

---
 src/main/webapp/view/newmap.jsp |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/main/webapp/view/newmap.jsp b/src/main/webapp/view/newmap.jsp
index c2e63d8..4302057 100644
--- a/src/main/webapp/view/newmap.jsp
+++ b/src/main/webapp/view/newmap.jsp
@@ -370,7 +370,6 @@
 <textarea id="close" hidden></textarea>
 
 <div class="main_body">
-    <%--<input  id="button" type="button" value="������" onclick="getJs();">--%>
     <div class="tools_box">
         <div class="charts_btn">
         </div>
@@ -705,15 +704,17 @@
             //������������������
             ws.onmessage = function (msg) {
                 // $("#searchParam").val(JSON.parse(msg.data));
+                //moralMap.getRoad(JSON.parse(JSON.parse(msg.data)),regionCode);
                 moralMap.refreshWindDir(JSON.parse(JSON.parse(msg.data)));
                 /*  if (moralMap.showSensors && typeof (moralMap.showSensors) == "function") {
                       moralMap.showSensors(JSON.parse(JSON.parse(msg.data)));
                   }*/
+                if ($("#close").html() == "CloseMq") {
+                    ws.close();
+                }
+                moralMap.showSensors(JSON.parse(JSON.parse(msg.data)));
             };
 
-            if ($("#close").html()=="CloseMq") {
-                ws.close();
-            }
             //������������
             ws.onclose = function () {
                 $("#close").html("websocket������������");
@@ -722,7 +723,6 @@
             ws.onerror = function () {
                 $("#close").html("websocket������������");
             };
-
         }
 
     })(jQuery);
@@ -839,14 +839,9 @@
         } else if ("RefreshState" == methodName) {
             var states = jsonData.states;
             moralMap.refreshState(states);
-        } else if ("DeliverSensors" == methodName) {
-            $("#close").html(methodName);
-            moralMap.showSensors(jsonData);
         } else if ("CloseMq" == methodName) {
-            //window.location = "http://www.baidu.com"
             $("#close").html(methodName);
         }
     }
-
 
 </script>

--
Gitblit v1.8.0