From edc2f9afce15552d85a583097bc6b56a1dd89950 Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Tue, 29 Sep 2020 13:53:31 +0800
Subject: [PATCH] 增加前端建点接口
---
src/main/webapp/view/newmap.jsp | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/src/main/webapp/view/newmap.jsp b/src/main/webapp/view/newmap.jsp
index 395d3fb..c042725 100644
--- a/src/main/webapp/view/newmap.jsp
+++ b/src/main/webapp/view/newmap.jsp
@@ -367,7 +367,7 @@
<body>
<div>
</div>
-<%--<textarea id="close" hidden></textarea>--%>
+<textarea id="close" hidden></textarea>
<div class="main_body">
<%--<input id="button" type="button" value="������" onclick="getJs();">--%>
@@ -709,20 +709,20 @@
/* if (moralMap.showSensors && typeof (moralMap.showSensors) == "function") {
moralMap.showSensors(JSON.parse(JSON.parse(msg.data)));
}*/
- /*if ($("#close").html() == "CloseMq") {
+ if ($("#close").html() == "CloseMq") {
ws.close();
- }*/
+ }
+ moralMap.showSensors(JSON.parse(JSON.parse(msg.data)));
};
//������������
ws.onclose = function () {
- //$("#close").html("websocket������������");
+ $("#close").html("websocket������������");
};
//���������������������
ws.onerror = function () {
- //$("#close").html("websocket������������");
+ $("#close").html("websocket������������");
};
-
}
})(jQuery);
@@ -839,12 +839,9 @@
} else if ("RefreshState" == methodName) {
var states = jsonData.states;
moralMap.refreshState(states);
- } else if ("DeliverSensors" == methodName) {
+ } else if ("CloseMq" == methodName) {
$("#close").html(methodName);
- moralMap.showSensors(jsonData);
- } /*else if ("CloseMq" == methodName) {
- $("#close").html(methodName);
- }*/
+ }
}
</script>
--
Gitblit v1.8.0