hdw
2018-09-26 032bc7893dd507a59f759a3215cced03d1bdbc19
gx_tieta/WebRoot/index.jsp
@@ -29,6 +29,7 @@
   <script type="text/javascript" src="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.js"></script>
   <link rel="stylesheet" href="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />
   <link href="css/basic.css" type="text/css" rel="stylesheet" />
   <link href="css/common.css" type="text/css" rel="stylesheet" />
   <link href="css/index_layout.css" type="text/css" rel="stylesheet" />
   <link rel="stylesheet" href="css/img-change.css">
   <link rel="stylesheet" href="css/confirm.css">
@@ -309,6 +310,7 @@
   <div class="clear"></div>
   <script type="text/javascript" src="pages/js/base.js"></script>
   <script type="text/javascript" src="pages/js/common.js"></script>
   <script type="text/javascript" src="pages/js/pages/siderbar.js"></script>
   <script type="text/javascript" src="js/panel.js"></script>
   <script type="text/javascript" src="js/search.js"></script>
   <script type="text/javascript" src="js/changePinYin.js"></script>
@@ -398,11 +400,6 @@
      $('#main .del-module').remove();   //移除class="del-module"的内容
      //根据饼状图的数量确定位置和大小
      getMapHt();
      $('.side-bar').resizable({
         minWidth: 190,
         maxWidth: 500
      });
      /* switch(pieLen){
         case 0:
            $('#main .china-map').remove();
@@ -674,7 +671,7 @@
   
            createIconExplain($('#map'));
            
            searchAllProvince();   // 生成维护区列表
            //searchAllProvince();   // 生成维护区列表
            /* addCommonDotHome(commonDot);
            createWarnDot(map, warnDotList);
            dischargeTimeOut(map, dischargeDotList);
@@ -2010,7 +2007,7 @@
               //console.info(allStation);
               createMapDot(map, allStation);
               
               setTimeout(searchStation, 4000);
               //setTimeout(searchStation, 4000);
            }
            /* for(var i=0;i<allStation.length;i++){
               if(allStation[i].low_num>0){                     //落后数目   
@@ -3068,5 +3065,74 @@
          img.attr('src', navImg);
       }
    }
    // siderbar模块
   $(function() {
      var TreeView = GLOBAL.pages.TreeView;
      var first = GLOBAL.pages.siderbar.first;   // 一级导航
      var second = GLOBAL.pages.siderbar.second;   // 二级导航
      var thirdFile = GLOBAL.pages.siderbar.thirdFile;   // 三级导航
      var treeView = new TreeView($('.side-bar .lside'));
      // 设置容器可拖动
      $('.side-bar').resizable({
         handles: 'e',
         maxWidth: 520,
         minWidth: 200,
         alsoResize: $('.side-bar .lside'),
         resize:function() {
            treeView.setContainer();
         }
      });
      // 生成一级导航-省
      first(treeView, treeView.container);
      // 省->市
      treeView.ele.on('click', '.province', function() {
         var province = $(this).data('attr');
         second(treeView, $(this).parent(), province);
      });
      // 市->机房
      treeView.ele.on('click', '.city', function() {
         var city = $(this).data('attr');
         thirdFile(treeView, $(this).parent(), city);
      });
      // 点击机房定位
      treeView.ele.on('click', '.home', function() {
         var home = $(this).data('attr');
         var dev_id = home.FBSDeviceId;
         searchStationById(home.StationId);
         // 根据设备id设置不同的图标
         if(eType.regType(dev_id, eType.type.equip61850)) {
            changeMapImgDesc($('#mapImgDesc'), '61850');
         }else {
            changeMapImgDesc($('#mapImgDesc'));
         }
      });
      $('#map').on('dblclick', function() {
         setLside();
         treeView.setContainer();
      });
      // 设置lside的高度
      setLside();
      treeView.setContainer();
      setLside();
      $(window).resize(function() {
         setLside();
      });
      // 设置lside的高度函数
      function setLside() {
         var sideBar = $('.side-bar');
         var lside = $('.side-bar .lside');
         // 设置宽高
         lside.width(sideBar.width());
         lside.height(sideBar.height());
      }
   });
   </script> 
</html>