LiJun
2018-10-16 58a598834e4b87d6d0522b2d3374e478fb8dfa03
gx_tieta/WebRoot/control.jsp
@@ -15,6 +15,7 @@
   <link href="css/basic.css" type="text/css" rel="stylesheet" />
   <link href="css/control_style.css" type="text/css" rel="stylesheet" />
   <link rel="stylesheet" href="css/BrdwMaint.css">
   <link rel="stylesheet" href="css/common.css">
   <link href="jqueryui/jquery-ui.css" type="text/css" rel="stylesheet" />
   <!-- <link rel="stylesheet" type="text/css" href="css/popup.css"> -->
   <link rel="stylesheet" type="text/css" href="css/popup-tbl.css">
@@ -126,11 +127,6 @@
      <table>
         <tr>
            <td id="ele_content">
               <!-- 机房数电池组数 -->
               <div id="mach_num">
                  <s:text name="Room_num"></s:text>:<span id="room_num"></span>;&nbsp;<s:text name="Batt_group_num"></s:text>:<span id="batt_group_num"></span>
                   <div style="float: right; margin-right: 5px"><i class="fa"></i></div>
                </div>
                <!--电池组菜单栏-->
               <div id="lside">
                  
@@ -840,6 +836,7 @@
   <script type="text/javascript" src="js/dischargetest/bts.js"></script>
   <script type="text/javascript" src="js/dischargetest/4016.js"></script>
   <script type="text/javascript" src="pages/js/pages/control-common.js"></script>
   <script type="text/javascript" src="pages/js/pages/siderbar.js"></script>
   <!-- 引入电路图 -->
   <script type="text/javascript" src="js/elecircle.js"></script>
   <script type="text/javascript" src="js/elecircle.content.js"></script>
@@ -979,8 +976,6 @@
         var winHt = $(window).height();
         var bodyHt = $('body').height();
         var batt_listen = $('#ele_content .batt-listen').height();
         //console.info('*****');
         //console.info(batt_listen);
         var shiftHt = winHt - bodyHt;
         var graph = $('.graph').height();
         var lSide = $('#lside').height();
@@ -1018,29 +1013,32 @@
         var unit = "";
         if(lname == 'Voltage'){
            unit ="V";
            max = batt.MonVolStd*1.25;
            /* max = batt.MonVolStd*1.25;
            var tempmax = Math.max.apply( Math, array);   
            if(tempmax > max){
               max = tempmax*1.25;
            }
            } */
            max = Math.max.apply( Math, array)*1.1;
            max = max.toFixed(3);   
         }else if(lname == 'Resistance'){
            unit = "mΩ";
            max = (batt.MonResStd*1.25);
            /* max = (batt.MonResStd*1.25);
            max = 10;
            var tempmax = Math.max.apply( Math, array)*1.25;
            if(tempmax<max){
               max = tempmax;
            }
            } */
            max = Math.max.apply( Math, array)*1.1;
            max = (max).toFixed(3);
         }else if(lname == 'Temperature'){
            unit = "℃";
            max = (Math.max.apply( Math, array)*1.25).toFixed(3);
            max = (Math.max.apply( Math, array)*1.5).toFixed(3);
         }else if(lname == 'Conductance'){
            max = (batt.MonSerStd*1.25).toFixed(3);
            //max = (batt.MonSerStd*1.25).toFixed(3);
            max = (Math.max.apply( Math, array)*1.1).toFixed(3);
         }else if(lname == 'MonJHCurr') {
            unit = "mA";
            max = (Math.max.apply( Math, array)*1.25).toFixed(3);
            max = (Math.max.apply( Math, array)*1.1).toFixed(3);
         }
         //console.info("max:"+max+"    min:"+min);
         if(lname=='Resistance' || lname=='Temperature'){
@@ -1111,7 +1109,7 @@
      }
      
      
      seachAllStation();
      //seachAllStation();
      //查询所有机房
      function seachAllStation(){
         $.ajax({    
@@ -1674,17 +1672,20 @@
            var array = getArray(lname);
            var batt = getBatt();
            var min = (Math.min.apply( Math, array)*0.9).toFixed(3);
            var max = 0 ;
            var max = (Math.max.apply( Math, array)*1.1).toFixed(3);
            //console.info(batt);
            if(lname == 'Voltage'){
               max = (batt.MonVolStd*1.25).toFixed(3);
               //max = (batt.MonVolStd*1.25).toFixed(3);
               max = (Math.max.apply( Math, array)*1.1).toFixed(3);
            }else if(lname == 'Resistance'){
               //max = (batt.MonResStd*1.25).toFixed(3);
               max =10;
               //max =10;
               max = (Math.max.apply( Math, array)*1.1).toFixed(3);
            }else if(lname == 'Temperature'){
               max = (Math.max.apply( Math, array)*1.25).toFixed(3);
               max = (Math.max.apply( Math, array)*1.5).toFixed(3);
            }else if(lname == 'Conductance'){
               max = (batt.MonSerStd*1.25).toFixed(3);
               //max = (batt.MonSerStd*1.25).toFixed(3);
               max = (Math.max.apply( Math, array)*1.1).toFixed(3);
            }
            //console.info("max:"+max+"   min:"+min);
            if(lname=='Resistance' || lname=='Temperature'){
@@ -2008,16 +2009,23 @@
      
      //根据当前选中的电池组id获取当前电池组的信息
      function getBatt(){
         if(battinlist!=undefined && BattGroupId!=undefined){
         /* if(battinlist!=undefined && BattGroupId!=undefined){
            for(var i=0;i<battinlist.length;i++){
               for(var k=0;k<battinlist[i].length;k++){
                  if(BattGroupId==battinlist[i][k].BattGroupId){
                     console.info(battinlist);
                     return battinlist[i][k];
                  }
               }
            }
         } */
         var activeFile = $('.whyc-sider-menu .sider-menu-file.active');
         if(activeFile.length == 1) {
            return activeFile.data('attr');
         }else {
            return undefined;
         }
         return undefined;
      }
      
      //将指定列中的与value相等的值的单元格变为红色
@@ -2672,17 +2680,6 @@
            $(this).attr('href', 'charge-test.jsp?battgroupId='+BattGroupId+"&stationId="+batt.StationId);
         });
      });
      $(function() {
         $('#ele_content').resizable({
            minWidth: 240,
            maxWidth: 520,
            handles: 'e',
            edge: 10
         });
      });
   
   $(function(){
      //启动查询电池充放电状态的线程
@@ -3944,6 +3941,88 @@
         $('.confirm').hide();
         $('.confirm-mask').hide();
      }
      // siderbar模块
      $(function() {
         var TreeView = GLOBAL.pages.TreeView;
         var first = GLOBAL.pages.siderbar.first;   // 一级导航
         var second = GLOBAL.pages.siderbar.second;   // 二级导航
         var third = GLOBAL.pages.siderbar.third;   // 三级导航
         var fourth = GLOBAL.pages.siderbar.fourth;   // 四级导航
         var treeView = new TreeView($('#lside'));
         $('#lside').width($('#ele_content').width());
         treeView.setContainer();
         // 设置容器可拖动
         $('#ele_content').resizable({
            handles: 'e',
            maxWidth: 520,
            minWidth: 200,
            alsoResize: $('#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');
            third(treeView, $(this).parent(), city);
         });
         battinlist = [];
         // 机房->电池组
         treeView.ele.on('click', '.home', function() {
            var home = $(this).data('attr');
            var tmp = {
               StationName1: home.StationName1,
               StationName2: home.StationName2,
               StationName: home.StationName,
               StationId: home.StationId
            };
            fourth(treeView, $(this).parent(), tmp);
         });
         // 电池组
         treeView.ele.on('click', '.eleGroup', function() {
            var eleGroup = $(this).data('attr');
            // 根据BattGroupId查询数据
            if(BattGroupId != eleGroup.BattGroupId) {
               BattGroupId = eleGroup.BattGroupId;
               // 对BTS9611做特殊的处理
               var batt = getBatt();
               //console.info(batt);
               $('#eleCircleBtn').removeClass('hide');
               if(regEquipType(batt.FBSDeviceId, globalPattern.BTSSreen)) {
                  var isAct = $('#eleCircleBtn').hasClass('action');
                  if(isAct) {
                     lname = 'Voltage';
                     $('#'+lname).addClass('action');
                  }
                  $('#eleCircleBtn').removeClass('action').addClass('hide');
                  $('.ele-circle').hide();
                  $('.graph').show();
                  myChart.resize();
               }
               mygraph.ischange = 1;            //重新绘制拓扑图
               getBattStr();
               searchBattAlarmParam();            //查询电池告警参数
               clearInterval(time);
               showtable();
               time=window.setInterval("showtable()",4000);
            }
         });
      });
   </script>
   <script type="text/javascript" src="js/Title.js"></script>
   <script type="text/javascript" src="js/control.js"></script>