D:/workspace/chenjingjing/git/gx_tieta/gx_tieta/.gitignore
2019-01-18 2fe250ece8de95b3f70172fe5b45793ab6a3084a
gx_tieta/WebRoot/eleAnalyse.jsp
@@ -14,6 +14,7 @@
   <link href="css/basic.css" type="text/css" rel="stylesheet" />
   <link href="css/analyse.css" type="text/css" rel="stylesheet">
   <link href="css/query.css" type="text/css" rel="stylesheet">
   <link href="src/css/layui.css" type="text/css" rel="stylesheet">
   <script type="text/javascript" src="js/echarts.js"></script>
   <script type="text/javascript" src="js/eleAnalyse.js"></script>
   <script type="text/javascript" src="js/frame.js"></script>
@@ -59,6 +60,8 @@
                  <td>省</td>
                  <!-- 市 -->
                  <td>市</td>
                  <!-- 区/县 -->
                  <td>区/县</td>
                  <!-- 机房站点(或机房设备) -->
                  <td><s:text name="Computer_site"/></td>
                  <!-- 蓄电池组 -->
@@ -87,6 +90,10 @@
                  </td>
                  <td>
                     <select id="city" name="bd.binf.StationName2">
                     </select>
                  </td>
                  <td>
                     <select id="county" name="bd.binf.StationName5">
                     </select>
                  </td>
                  <td>
@@ -233,6 +240,7 @@
   <!--页脚内容-->
</body>
<script type="text/javascript" src="js/createTab.js"></script>
<script type="text/javascript" src="src/layui.all.js"></script>
<script type="text/javascript">
   var permits;
   <%   Object obj=session.getAttribute("permits");
@@ -304,8 +312,14 @@
      eleform.submit();
   }
   
   var isNewLoad = true;
   // 省-市-机房-电池组
   var filterLoad;
   $(document).ready(function(){
      filterLoad = layer.load();
      var pre_province = getQueryString('province');
      //页面加载时查询维护区中的枢纽类型
      $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
         data=data.result;
@@ -320,23 +334,32 @@
                  $option.html("<s:text name='All'/>(<s:text name='Common'/>"+data.data.length+"<s:text name='Species'/>)");   
                  $option.attr("value", "");         
               }else{
                  if(pre_province == data.data[i-1] && isNewLoad){
                     $option.attr('selected',true);
                  }
                  $option.text(data.data[i-1]);
                  $option.attr("value",data.data[i-1]);   
               }               
               $select.append($option);
            }
         }else{
            $("#station_name1").text('').html('<option>暂无管理的维护区</option>');
            $("#station_name1").text('').html('<option>暂无管理的省</option>');
         }
         findCity();      
      });
   });
   
   // 根据维护区的内容查询市
   function findCity() {
   function findCity(isLoad) {
      var data = {
         StationName1: $("#station_name1").val()
      };
      var pre_city = getQueryString('city');
      // 是否添加等待
      if(isLoad) {
         filterLoad = layer.load();
      }
      // 请求获取当前省下的市
      $.ajax({    
           type: "post",             
@@ -353,35 +376,99 @@
               var optsList = [];
               for(var i=0;i<_data.length;i++){
                  var __data = _data[i];
                  var tmp = getOptionsData(__data.StationName2, __data.StationName2, __data);
                  var tmp = getOptionsData(__data.StationName2, __data.StationName2, __data,{});
                  //console.info(pre_city + '=='+  __data.StationName2);
                  if(pre_city == __data.StationName2 && isNewLoad){
                     tmp = getOptionsData(__data.StationName2, __data.StationName2, __data,{},true);
                  }
                  optsList.push(tmp);
               }
               //console.info(optsList);
               // 根据数据生成下拉列表
               createOptions($select, optsList, true);
              }else {
                 $select.text('').html('<option>暂无可测市</option>');
              }
              findStationNamebyStationname1();
              findCounty();
           }
       });
   }
   
   // 查询区/县
   function findCounty(isLoad) {
      var tmp = {
         StationName1:$("#station_name1").val(),
         StationName2:$("#city").val(),
      };
      // 是否添加等待
      if(isLoad) {
         filterLoad = layer.load();
      }
      var pre_county = getQueryString('county');
      // 查询区县
      $.ajax({
         type: 'post',
         async: true,
         url: "BattInfAction!serchStationName5",
         data: "json="+JSON.stringify(tmp),
         success:function(data) {
            var rs = JSON.parse(data.result);
            var $select = $("#county");
            if(rs.code==1){
               var _data = rs.data;
               // 根据数据构造生成下拉列表的数据
               var optsList = [];
               for(var i=0;i<_data.length;i++){
                  var __data = _data[i];
                  var _attr = {
                     StationId: __data.StationId
                  };
                  var tmp = getOptionsData(__data.StationName5, __data.StationName5, __data, _attr);
                  if(pre_county == __data.StationName5 && isNewLoad){
                     tmp = getOptionsData(__data.StationName5, __data.StationName5, __data, _attr,{},true);
                  }
                  optsList.push(tmp);
               }
               // 根据数据生成下拉列表
               createOptions($select, optsList, true);
            }else{
               $select.text('').html('<option>暂无可测机房站点</option>');
            }
            findStationNamebyStationname1();
         }
      });
   }
   //当维护区的值变换时更新市
   $('#station_name1').change(function(){
      findCity();
      findCity(true);
   });
   
   //当维护区的值变换时更新机房站点
   $('#city').change(function(){
      findStationNamebyStationname1();
      findCounty(true);
   });
   //当区/县的值变换时更新机房站点
   $('#county').change(function(){
      findStationNamebyStationname1(true);
   });
   
   //根据省,市查询站点
   function findStationNamebyStationname1(){
   function findStationNamebyStationname1(isLoad){
      var tmp = {
         StationName1:$("#station_name1").val(),
         StationName2:$("#city").val()
         StationName2:$("#city").val(),
         StationName5:$("#county").val()
      };
      // 是否添加等待
      if(isLoad) {
         filterLoad = layer.load();
      }
      var pre_home = getQueryString('home');
      //var selectvalue=$("#station_name1 option:selected").val();
      //alert(selectvalue);
      $.post("BattInfAction!serchStationName3","json="+JSON.stringify(tmp),function(data){
@@ -396,10 +483,14 @@
               var _attr = {
                  StationId: __data.StationId
               };
               var tmp = getOptionsData(__data.StationName3, __data.StationName3, __data, _attr);
               var tmp = getOptionsData(__data.StationName3, __data.StationName, __data, _attr);
               //console.info(pre_home +'=='+ __data.StationName);
               if(pre_home == __data.StationName && isNewLoad){
                  tmp = getOptionsData(__data.StationName3, __data.StationName, __data, _attr,{},true);
               }
               optsList.push(tmp);
            }
            //console.info(optsList);
            // 根据数据生成下拉列表
            createOptions($select, optsList, true);
         }else{
@@ -411,20 +502,25 @@
   
   // 根据机房名称查询电池组
   $('#station_name').change(function(){
      findserchByBattGroupNamebystationname();
      findserchByBattGroupNamebystationname(true);
   });
   
   //根据省,市和机房查询蓄电池组
   function findserchByBattGroupNamebystationname(){
   function findserchByBattGroupNamebystationname(isLoad){
      var stationid = $("#station_name").find('option:selected').attr('stationid')?$("#station_name").find('option:selected').attr('stationid'):'';
      // 构造查询条件
      var tmp = {
         StationName1:$("#station_name1").val(),
         StationName2:$("#city").val(),
         StationName3: $("#station_name").val(),
         StationName5:$("#county").val(),
         StationName: $("#station_name").val(),
         StationId: stationid
      };
      // 是否添加等待
      if(isLoad) {
         filterLoad = layer.load();
      }
      var pre_battid = getQueryString('battid');
      //var station_name1=$("#station_name1 option:selected").val();
      //var station_name=$("#station_name option:selected").val();
      
@@ -446,6 +542,9 @@
               };
               var txt = _data.BattGroupName+'-'+_data.MonCount+"<s:text name='Section'/>";
               var tmp = getOptionsData(txt, _data.BattGroupId, _data, _attr);
               if(pre_battid == _data.BattGroupId && isNewLoad){
                  tmp = getOptionsData(txt, _data.BattGroupId, _data, _attr,{},true);
               }
               optsList.push(tmp);
            }
            
@@ -455,6 +554,8 @@
         }else{
            $("#battgroup_name").text('').html('<option>暂无可测蓄电池组</option>');
         }
         isNewLoad = false;
         layer.close(filterLoad);
      });
   }
   
@@ -468,6 +569,24 @@
   });
   
   createPictable();
   //点击曲线选择复选框对表格内的复选框全部选中
   $('#tabEchartCon .tbFixed').on('click','table thead input',function(){
      if($(this).is(':checked'))
      {
         console.info($('#tabEchartCon .secCured table tbody input[type="checkbox"]').length);
         $('#tabEchartCon .secCured table tbody input[type="checkbox"]').prop('checked',true);
      }else{
         console.info(false);
         $('#tabEchartCon .secCured table tbody input[type="checkbox"]').prop('checked',false);
      }
   });
   $('#tabEchartCon .left .secCurve').on('click', 'input[type="checkbox"]', function(){
      createPicByTable();
      createMyTable(tbl_data);
   });
   //生成曲线表格选项
   function createPictable(){
      var ArrLineTh=["<s:text name='BatteryID'/>","<input type='checkbox' checked='checked'/><s:text name='Curve_to_choose'/>"];  /* 电池组ID    曲线选择 */
@@ -482,21 +601,8 @@
      }
      createCard($('#tabEchartCon .tbFixed'),ArrLineTh,ArrLineTd);
      createCard($('#tabEchartCon .secCurve'),ArrLineTh,ArrLineTd);
      //点击曲线选择复选框对表格内的复选框全部选中
      $('#tabEchartCon .tbFixed').on('click','table thead input',function(){
         if($(this).is(':checked'))
         {
            console.info($('#tabEchartCon .secCured table tbody input[type="checkbox"]').length);
            $('#tabEchartCon .secCured table tbody input[type="checkbox"]').prop('checked',true);
         }else{
            console.info(false);
            $('#tabEchartCon .secCured table tbody input[type="checkbox"]').prop('checked',false);
         }
      });
      $('#tabEchartCon .left .secCurve input[type="checkbox"]').click(function(){
         createPicByTable();
         createMyTable(tbl_data);
      });
      setTblWidth($('#tabEchartCon .tbFixed'), $('#tabEchartCon .secCurve'));
   }
   
   
@@ -951,6 +1057,7 @@
         binf:{
            StationName1:$('#station_name1').val(),
            StationName2:$('#city').val(),
            StationName5: $('#county').val(),
            StationName:$('#station_name').val(),
            BattGroupId:$('#battgroup_name').val(),
            BattProducer:$('#batt_producer').val(),