From f9abb9474b09cf37ac4bbd6a65ea6229ebc06214 Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Thu, 10 May 2018 14:20:43 +0800 Subject: [PATCH] 报警阀值 获取 --- src/main/webapp/view/map.jsp | 87 +++++++++++++++++++++++++++++++++++-------- 1 files changed, 70 insertions(+), 17 deletions(-) diff --git a/src/main/webapp/view/map.jsp b/src/main/webapp/view/map.jsp index 0b02bf5..e339ca1 100644 --- a/src/main/webapp/view/map.jsp +++ b/src/main/webapp/view/map.jsp @@ -2,7 +2,7 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@page isELIgnored="false" %> <% - String version ="1.000003"; + String version ="1.000004"; response.setHeader("Cache-Control","no-store"); response.setHeader("Pragrma","no-cache"); response.setDateHeader("Expires",0); @@ -105,7 +105,8 @@ float: right; width: 70px; height: 28px; - line-height: 28px + line-height: 28px; + cursor:pointer; } .list { @@ -113,26 +114,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; @@ -144,6 +150,7 @@ .list .state01 { background-color: #FF9; + color: #ff7f00; } .list .state02 { @@ -156,9 +163,9 @@ } .list .state04 { - - background-color: #eee; - color: #777 + /*background-color: #eee;*/ + /*color: #777 ;*/ + background-color: #738d99 ; } /* * ������������������---������������ @@ -230,9 +237,36 @@ .equ-data-box .equ-data-list li .grade01{color:#282828;background:url(/img/list_num_yellow.png) left top no-repeat} .equ-data-box .equ-data-list li .grade02{background:url(/img/list_num_orange.png) left top no-repeat} .equ-data-box .equ-data-list li .grade03{background:url(/img/list_num_red.png) left top no-repeat} +.tools_box{ + position: absolute; + height: 120px; + width: 400px; + right: 1px; + top: 20px; + z-index: 1; +} + .tools_box .charts_btn { + position: relative; + float: right; + margin: 0; + border: 0; + height: 85px; + width: 85px; + background:url(/img/charts_btn_bg_1.png) left top no-repeat; + background-size: 70%; + } + .tools_box .charts_btn:hover { + cursor:pointer; + background:url(/img/charts_btn_bg_2.png) left top no-repeat; + background-size: 70%; + } </style> <body> <div class="main_body"> + <div class="tools_box"> + <div class="charts_btn"> + </div> + </div> <div class="search_box"> <button id="searchBtn" type="button">������</button> <input id="searchParam"/> @@ -314,13 +348,24 @@ for(var i in objs) { var obj = objs[i]; if(moralMap.getEquipment(obj["mac"])==null){ + obj['mouseover'] = function (type) { + if(type.target.getData()==null){ + //��������������������������������������������������� ������������������ + refreshAllState(); + } + } obj['click'] = function(){ - var _obj = this.getOption(); + var _obj = this.getOption(); + if(_obj['mac']==null){ + alert("mac���������������������������������������"); + return; + } var equ = { name: _obj['name'], mac: (_obj['mac']).toLowerCase(), longitude: _obj['longitude'], latitude: _obj['latitude'], + monitorPointId: _obj['monitorPointId'], version:_obj['deviceVersion']['version'] } var equStr = JSON.stringify(equ); @@ -333,12 +378,6 @@ alert(equStr); } } - obj['mouseover'] = function (type) { - if(type.target.getData()==null){ - //��������������������������������������������������� ������������������ - refreshAllState(); - } - } var moralMask = new moralMap.Equipment(obj); moralMap.addOverlay(moralMask); } @@ -374,6 +413,10 @@ //��������������������� ���������������,��������� moralMap.addEventListener("tilesloaded", function(type, target) { }); + // ������������������ ������������ + moralMap.addEventListener("click", function(type, target) { + moralMap.closePopupbox("#popup_box"); + }); //������������������������������������������ moralMap.addEventListener('zoomstart', function(type) {}); //������������������������������������������ @@ -404,6 +447,16 @@ listView.load(url); } ) + //������������������������������ + $(".charts_btn").click( + function (e) { + if(window['external']&&window['external']['showChartInfo']){ + window['external'].showChartInfo(""); + }else{ + alert(""); + } + } + ); //������������ })(jQuery); -- Gitblit v1.8.0