From a9c3fe66d59c504a18f6a8d0f639be99a68fb7d6 Mon Sep 17 00:00:00 2001
From: ZhuDongming <773644075@qq.com>
Date: Tue, 30 Jun 2020 15:00:47 +0800
Subject: [PATCH] update动态选择设备绑定
---
src/main/webapp/view/newmap.jsp | 46 +++++++++++++++++++++++++++++++++++++++-------
1 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/src/main/webapp/view/newmap.jsp b/src/main/webapp/view/newmap.jsp
index a7e50f0..d3e7710 100644
--- a/src/main/webapp/view/newmap.jsp
+++ b/src/main/webapp/view/newmap.jsp
@@ -317,8 +317,8 @@
.tools_box {
position: absolute;
- height: 120px;
- width: 400px;
+ height: 90px;
+ width: 90px;
right: 1px;
top: 20px;
z-index: 1;
@@ -340,12 +340,43 @@
background: url(/img/charts_btn_bg_2.png) left top no-repeat;
background-size: 70%;
}
+ .wind_explain{
+ position: absolute;
+ height: 200px;
+ width: 110px;
+ right: 1px;
+ top: 110px;
+ z-index: 1;
+ }
+ .wind_explain li{
+ height: 25px;
+ }
+ .wind_explain li span{
+ display: inline-block;
+ height: 25px;
+ line-height: 25px;
+ }
+ .wind_explain li img{
+ vertical-align: top;
+ }
</style>
<body>
<div class="main_body">
<div class="tools_box">
<div class="charts_btn">
</div>
+ </div>
+ <div class="wind_explain">
+ <ul>
+ <li><img src="/img/icoWind01.png" width="25" height="25"><span>1������</span></li>
+ <li><img src="/img/icoWind02.png" width="25" height="25"><span>2������</span></li>
+ <li><img src="/img/icoWind03.png" width="25" height="25"><span>3������</span></li>
+ <li><img src="/img/icoWind04.png" width="25" height="25"><span>4������</span></li>
+ <li><img src="/img/icoWind05.png" width="25" height="25"><span>5������</span></li>
+ <li><img src="/img/icoWind06.png" width="25" height="25"><span>6������</span></li>
+ <li><img src="/img/icoWind07.png" width="25" height="25"><span>7������</span></li>
+ <li><img src="/img/icoWind08.png" width="25" height="25"><span>8���������������</span></li>
+ </ul>
</div>
<%-- <div class="search_box">
<button id="searchBtn" type="button">������</button>
@@ -372,6 +403,7 @@
moralMap['params'] = params;
var orgId = params["orgId"];
var regionCode = params["regionCode"];
+ var accountId = params["accountId"];
var provinceCode = regionCode.toString().substring(0, 2) + "0000";
var mapType = getUrlParam("mapType");
var mapOption = {};
@@ -488,7 +520,7 @@
}
var moralMask = new moralMap.Equipment(obj);
moralMap.addOverlay(moralMask);
- if (obj['hasWindInfo']) {
+ if (obj['hasWindInfo'] && obj['state'] != 4) {
var moralDeviceWind = new moralMap.Device(obj);
moralMap.addOverlay(moralDeviceWind);
}
@@ -645,7 +677,7 @@
if (typeof (WebSocket) === "undefined") {
alert("������������������������WebSocket");
} else {
- ws = new WebSocket('ws://' + hostAndPort + '/screen/webSocket/' + orgId + '&' + regionCode);
+ ws = new WebSocket('ws://' + hostAndPort + '/screen/webSocket/' + orgId + '&' + accountId+'_'+regionCode);
ws.onopen = function () {
};
@@ -653,9 +685,9 @@
ws.onmessage = function (msg) {
// $("#searchParam").val(JSON.parse(msg.data));
moralMap.refreshWindDir(JSON.parse(JSON.parse(msg.data)));
- if (moralMap.showSensors && typeof (moralMap.showSensors) == "function") {
+ /* if (moralMap.showSensors && typeof (moralMap.showSensors) == "function") {
moralMap.showSensors(JSON.parse(JSON.parse(msg.data)));
- }
+ }*/
};
//������������
@@ -780,7 +812,7 @@
var states = jsonData.states;
moralMap.refreshState(states);
} else if ("DeliverSensors" == methodName) {
- // moralMap.showSensors(jsonData);
+ moralMap.showSensors(jsonData);
}
}
</script>
--
Gitblit v1.8.0