From 59efc00b3c872c76f50317513ddd4a1574844960 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Thu, 15 Mar 2018 14:52:28 +0800
Subject: [PATCH] 地图相关资源
---
src/main/webapp/js/moralmap.js | 32 ++++++++++++++++++++++----------
src/main/webapp/view/map.jsp | 15 ++++++++++-----
2 files changed, 32 insertions(+), 15 deletions(-)
diff --git a/src/main/webapp/js/moralmap.js b/src/main/webapp/js/moralmap.js
index 05e0221..83dadce 100644
--- a/src/main/webapp/js/moralmap.js
+++ b/src/main/webapp/js/moralmap.js
@@ -253,7 +253,7 @@
moralMap.isPopupBoxShow = function(id) {
return $(id).css('display') == 'block';
}
- moralMap.onItermClick = function(index) {
+ moralMap.onItermClick = function(index,select) {
var row = moralMap.getPopupEqu(index);
if(row['mac']==null){
alert("mac���������������������������������������");
@@ -265,16 +265,26 @@
longitude: row['longitude'],
latitude: row['latitude'],
version:row['deviceVersion']['version']
- }
+ };
+ !!select?equ['monitorPointId'] = row["monitorPointId"]:null;
var equStr = JSON.stringify(equ);
- if(window["console"]!=undefined){
- console.log(equStr);
+ if(!!select&&select==='chart'){
+ if(window['external']&&window['external']['showChartInfo']){
+ window['external'].showChartInfo(equStr);
+ }else{
+ alert(equStr);
+ }
}
- if(window['external']&&window['external']['showMonitorInfo']){
- window['external'].showMonitorInfo(equStr);
- }else{
- alert(equStr);
- }
+ else{
+ if(window["console"]!=undefined){
+ console.log(equStr);
+ }
+ if(window['external']&&window['external']['showMonitorInfo']){
+ window['external'].showMonitorInfo(equStr);
+ }else{
+ alert(equStr);
+ }
+ }
}
moralMap.setPopupEqus = function(arr) {
moralMap["_equs"] = arr;
@@ -406,7 +416,9 @@
}
name = name.substring(0, stop1) + "..." + name.substring(stop2, name.length);
}
- var li = "<li id='listview_item_" + e['mac'] + "' onclick=moralMap.onItermClick(" + i + ")><span id='listview_state_" + e['mac'] + "' class='" + state + "'>" + stateName + "</span>" + name + "</li>";
+ var li = "<li id='listview_item_" + e['mac'] + "'><span class='list-chart-span' onclick=moralMap.onItermClick(\"" + i + "\",'chart')><img src='/img/chart.png'></span>"
+ +"<span id='listview_state_" + e['mac'] + "'class='" + state + "'>" + stateName + "</span>" +
+ "<div style='cursor: pointer;' onclick=moralMap.onItermClick(\"" + i + "\")>" + name + "</div></li>";
outHtml += li;
}
outHtml += "</ul>";
diff --git a/src/main/webapp/view/map.jsp b/src/main/webapp/view/map.jsp
index 973baea..e212553 100644
--- a/src/main/webapp/view/map.jsp
+++ b/src/main/webapp/view/map.jsp
@@ -113,26 +113,31 @@
clear: both;
zoom: 1
}
-
+.list-chart-span {
+ cursor: pointer;
+ background-color: #4c9bf1
+}
.list li {
padding: 10px 0;
border-bottom: 1px dotted #eee;
line-height: 40px;
height: 40px;
font-size: 20px;
- cursor: pointer;
+ /*cursor: pointer;*/
}
.list span{
float: right;
position: relative;
- right: 18px;
+ right: 5px;
border-radius:4px;
- width: 70px;
+ width: 40px;
text-align: center;
height: 24px;
line-height: 24px;
- font-size: 16px;
+ font-size: 14px;
+ font-weight: bolder;
+ color: white;
margin: 10px 0;
padding:2px 0;
margin-right: 8px;
--
Gitblit v1.8.0