ZhuDongming
2019-11-20 f32e22e52376cabe49e8c7d1f52adb4b1aebffd3
src/main/webapp/view/map.jsp
@@ -11,7 +11,8 @@
<head>
    <meta charset="utf-8" />
    <title></title>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=rER1sgBIcQxkfNSlm2wmBGZGgEERrooM"></script>
    <script type="text/javascript"
            src="http://api.map.baidu.com/api?v=2.0&ak=rER1sgBIcQxkfNSlm2wmBGZGgEERrooM"></script>
    <script type="text/javascript" src="/js/jquery.min.js"></script>
    <script type="text/javascript" src="/js/utils.js"></script>
   <script type="text/javascript">
@@ -34,9 +35,11 @@
        font-size: 14px;
        font-family: "微软雅黑";
     }
    .anchorBL {
       display: none;
    }
    .main_body{
       border: 0;
       margin: 0;
@@ -44,11 +47,13 @@
       height: 100%;
       position: relative;
    }
*{
  margin:0;
  padding:0;
  list-style:none;
}
a{
    color: #1900c6;
   text-decoration: none;
@@ -56,10 +61,12 @@
   font-size: 14px;
   font-weight: 300;
}
a:hover {
   text-decoration: underline;
   color: #e60012;
}
#popup_box {
   top: 75px;
   left: 20px;
@@ -125,10 +132,12 @@
   clear: both;
   zoom: 1
}
.list-chart-span {
   cursor: pointer;
   background-color: #4c9bf1
}
.list li {
   padding: 10px 0;
   border-bottom: 1px dotted #eee;
@@ -178,6 +187,7 @@
   /*color: #777 ;*/
   background-color: #738d99 ;
}
         /*
           * 外面盒子样式---自己定义
           */
@@ -190,6 +200,7 @@
            box-sizing: border-box;
            text-align: center;
         }
         /*
          * 页数按钮样式
          */
@@ -238,16 +249,76 @@
            margin: 0 5px;
         }
         
.equ-data-box{width:351px;border:1px solid #dad5d5;background-color:#f6f6f6;padding:12px 0 12px 0;border-radius:3px;margin:10px auto;overflow:hidden;zoom:1;}
.equ-data-box .equ-data-list{width:330px;margin:0 0 0 10px;border-left:1px solid #d0cdcd;border-top:1px solid #d0cdcd;border-bottom:1px solid #d0cdcd;overflow:hidden;zoom:1;}
.equ-data-box .equ-data-list li{background:url(/img/list_li_bg.png) left top repeat-x;width:109px;height:165px;float:left;text-align:center;color:#282828;border-right:1px solid #d0cdcd}
.equ-data-box .equ-data-list li p{height:55px;padding-top:12px;line-height:55px;font-size:18px}
.equ-data-box .equ-data-list li span{height:60px;line-height:50px;display:block;color:#fff;font-size:40px}
.equ-data-box .equ-data-list li em{font-size:14px;line-height:28px;font-style:normal;display:block}
.equ-data-box .equ-data-list li .grade00{background:url(/img/list_num_green.png) left top no-repeat}
.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}
    .equ-data-box {
        width: 351px;
        border: 1px solid #dad5d5;
        background-color: #f6f6f6;
        padding: 12px 0 12px 0;
        border-radius: 3px;
        margin: 10px auto;
        overflow: hidden;
        zoom: 1;
    }
    .equ-data-box .equ-data-list {
        width: 330px;
        margin: 0 0 0 10px;
        border-left: 1px solid #d0cdcd;
        border-top: 1px solid #d0cdcd;
        border-bottom: 1px solid #d0cdcd;
        overflow: hidden;
        zoom: 1;
    }
    .equ-data-box .equ-data-list li {
        background: url(/img/list_li_bg.png) left top repeat-x;
        width: 109px;
        height: 165px;
        float: left;
        text-align: center;
        color: #282828;
        border-right: 1px solid #d0cdcd
    }
    .equ-data-box .equ-data-list li p {
        height: 55px;
        padding-top: 12px;
        line-height: 55px;
        font-size: 18px
    }
    .equ-data-box .equ-data-list li span {
        height: 60px;
        line-height: 50px;
        display: block;
        color: #fff;
        font-size: 40px
    }
    .equ-data-box .equ-data-list li em {
        font-size: 14px;
        line-height: 28px;
        font-style: normal;
        display: block
    }
    .equ-data-box .equ-data-list li .grade00 {
        background: url(/img/list_num_green.png) left top no-repeat
    }
    .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;
@@ -256,6 +327,7 @@
   top: 20px;
   z-index: 1;
}
 .tools_box .charts_btn {
    position: relative;
   float: right;
@@ -266,6 +338,7 @@
    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;
@@ -280,7 +353,7 @@
      </div>
       <!-- <div class="search_box">
      <button id="searchBtn" type="button">搜索</button>
      <input id="searchParam"/>
        <textarea style="width: 200px;height:200px;" id="searchParam"></textarea>
      </div> -->
     <!-- <div id="popup_box">
         <div id="equ_list" class="listview">
@@ -311,6 +384,7 @@
   //列表对象
     var listView  =moralMap.initListView({id: "#equ_list",pageSize:12});
     window["listView"] = listView;
   //展示设备列表,click事件触发
   function showEqus(obj) {
@@ -321,6 +395,7 @@
      listView.load(url); 
      moralMap.showPopupbox("#popup_box");
   }
   function loadLazy(url,paramMap,callBack,lazyKeyer){
      if(lazyKeyer==undefined){
         lazyKeyer = moralMap.lazyKeyer;
@@ -347,6 +422,7 @@
      },500);
   }
   function loadOverlays(url,callback){
       //从缓存取
       var oldMarkerList = moralMap.getHorizonMarkers();
@@ -367,6 +443,7 @@
         loadLazy(url,paramMap,callback);
       }
   }
   function addOverEquipments(jsonData){
      if(moralMap.layer()=="equipments"){
      var objs = jsonData = null?[]:jsonData;
@@ -399,8 +476,7 @@
                           }
                                 if(!!window['external']&&!!window['external']['callWin']){
                                        window['external'].callWin(equStr);
                           }else
                            if(!!window['external']&&!!window['external']['showMonitorInfo']){
                            } else if (!!window['external'] && !!window['external']['showMonitorInfo']) {
                                window['external'].showMonitorInfo(equStr);
                             }else{
                                alert(equStr);
@@ -412,6 +488,7 @@
       }
      }
   }
  function addOverMpoints(data){
         if(moralMap.layer()=="monitorpoints"){
         var mpoints = data = null?[]:data;
@@ -425,6 +502,7 @@
       }
         }
   }
    //地图load
    moralMap.addEventListener("load", function(type, target) {
            var paramMap = {};
@@ -458,6 +536,7 @@
      }
        return { 'x1': bs.southwestLng, 'y1': bs.southwestLat, 'x2': bs.northeastLng, 'y2': bs.northeastLat };
    }
    /**
     * 显示网格
     */
@@ -507,12 +586,14 @@
      }
        showGrid.polygons = polygons;
    }
   // 点击事件关闭 弹窗列表
    moralMap.addEventListener("click", function(type, target) {
        //moralMap.closePopupbox("#popup_box");
    });
   //地图放大缩小事件时,关闭弹窗
   moralMap.addEventListener('zoomstart', function(type) {});
        moralMap.addEventListener('zoomstart', function (type) {
        });
   //地图放大缩小事件时,关闭弹窗
   moralMap.addEventListener('zoomend', function(type) {
        var endZoom = this.getZoom();
@@ -554,8 +635,7 @@
            var objStr = JSON.stringify(obj);
            if(!!window['external']&&!!window['external']['callWin']){
                window['external'].callWin(objStr);
            }else
            if(!!window['external']&&!!window['external']['showChartInfo']){
                } else if (!!window['external'] && !!window['external']['showChartInfo']) {
                window['external'].showChartInfo("");
            }else{
                alert(objStr);
@@ -566,6 +646,7 @@
})(jQuery);
    var _intervalNum=-1;
    function startRefreshPage(){
         if(_intervalNum==-1){
              _intervalNum = self.setInterval(function(){
@@ -576,10 +657,12 @@
            refreshAllState();
         },5000);
    }
    function stopRefreshPage(){
        window.clearInterval(_intervalNum);
        _intervalNum=-1;
    }
   //刷新页面
   function refreshAllState() {
      var parma={};
@@ -666,14 +749,16 @@
   }
   
   function callJS(jsonData){
        // $("#searchParam").val(jsonData);
      var jsonData = JSON.parse(jsonData);
      var methodName = jsonData.methodName;
      if("JumpBaiduMap" == methodName){
         moralMap.callJS(jsonData);
      } else if ("RefreshState" == methodName) {
         //$("#searchParam").val(JSON.stringify(jsonData));
         var states = jsonData.states;
         moralMap.refreshState(states);
        } else if ("DeliverSensors" == methodName) {
            moralMap.showSensors(jsonData);
      }
   }
</script>