D:/workspace/chenjingjing/git/gx_tieta/gx_tieta/.gitignore
2019-01-18 2fe250ece8de95b3f70172fe5b45793ab6a3084a
gx_tieta/WebRoot/dataManage.jsp
@@ -13,6 +13,7 @@
   <title><s:text name="Batt_charge_discharge_manage"/></title>
   <link rel="stylesheet" type="text/css" href="css/basic.css">
   <link rel="stylesheet" type="text/css" href="css/dtManage.css">
   <link href="src/css/layui.css" type="text/css" rel="stylesheet">
   <style>
      .b8cfe5{
         background-color:#b8cfe5;
@@ -40,6 +41,7 @@
               <tr class="fWeight">
                  <td>省</td>                        <!-- 省 -->
                  <td>市</td>                        <!-- 市 -->
                  <td>区/县</td>                        <!-- 区/县 -->
                  <td><s:text name="Computer_site"/></td>                           <!-- 机房站点(或机房设备) -->
                  <td><s:text name="Battery"/></td>
                  <td><s:text name="Battery_record"/></td>                     <!-- 电池测试记录 -->
@@ -58,6 +60,10 @@
                  </td>
                  <td>
                     <select id="city" name="bmd.binf.StationName2">
                     </select>
                  </td>
                  <td>
                     <select id="county" name="bmd.binf.StationName5">
                     </select>
                  </td>
                  <td>
@@ -201,6 +207,8 @@
</body>
<script type="text/javascript" src="js/createTab.js"></script>
<script type="text/javascript" src="js/query.js"></script>
<script type="text/javascript" src="pages/js/common.js"></script>
<script type="text/javascript" src="src/layui.all.js"></script>
<script type="text/javascript">
   var permits;
   <%   Object obj=session.getAttribute("permits");
@@ -351,7 +359,7 @@
         var binfs=new Array();
         $('.tbl-body table tbody tr').each(function(i){
            if($(this).hasClass('b8cfe5')){
               binfs.push(Alltestdata[i].binf);
               binfs.push(batttestdatas[i].binf);
            }
         });    
         if(confirm("确认删除这"+binfs.length+"条测试数据吗?")){         
@@ -367,30 +375,27 @@
   
   //选中右键菜单中的[查看数据]选项跳转到历史数据查询页面选中指定的电池组
   $('#right-menu .check_data').click(function(){
      var battgroupid=0;
      var stationid = 0;
      var batt = {};
      //console.info(Alltestdata);
      $('.tbl-body table tbody tr').each(function(i){
         if($(this).hasClass('b8cfe5')){
            battgroupid=Alltestdata[i].binf.BattGroupId;
            stationid = Alltestdata[i].binf.StationId;
            batt = Alltestdata[i].binf;
         }
      });
      $(this).attr("href","charge-test.jsp?battgroupId="+battgroupid+"&stationId="+stationid);
      });
      //console.log(batt);
      $(this).attr("href", skipUrl('charge-test.jsp', batt.StationName1, batt.StationName2,batt.StationName5, batt.StationName));
   });
   
   //选中右键菜单中的[查看落后单体统计数据]选项跳转到历史数据查询页面选中指定的电池组
   $('#right-menu .check_last').click(function(){
      var battgroupid=0;
      var stationid = 0;
      var batt = {};
      //console.info(Alltestdata);
      $('.tbl-body table tbody tr').each(function(i){
         if($(this).hasClass('b8cfe5')){
            battgroupid = Alltestdata[i].binf.BattGroupId;
            stationid = Alltestdata[i].binf.StationId;
            batt = Alltestdata[i].binf;
         }
      });   
      $(this).attr("href","eleAnalyse.jsp?battgroupId="+battgroupid+"&stationId="+stationid);
      $(this).attr("href", skipUrl('eleAnalyse.jsp', batt.StationName1, batt.StationName2,batt.StationName5, batt.StationName));
   });   
   
   //页面内对数据进行操作的效果
@@ -440,7 +445,7 @@
      });
   });
   
   var batttestdatas;      //当前表格中的数据数组(其中的stationid标识了当前数据是属于内阻数据还是充放电数据)
   var  formjson;
   //根据筛选条件查询
   function searchDisCharage(){
@@ -451,6 +456,7 @@
         formjson = temp;
      }
      Alltestdata=new Array();
      batttestdatas = new Array();
      // 清除表格内容
      $('.tbl-body table').remove();
      //创建等待框
@@ -470,6 +476,7 @@
               var alllist=list[i];
               var tmp = $.extend(true, {}, alllist.data);
               Alltestdata.push(tmp);
               batttestdatas.push(alllist.data);
               Page = alllist.data.page;
               tbArrTd.push(alllist.data.binf.StationName);      //机房名称
               tbArrTd.push(alllist.data.binf.BattGroupName);      //电池组名称
@@ -597,7 +604,10 @@
      }
   }
   
   // 省-市-机房-电池组
   var filterLoad;
   $(document).ready(function(){
      filterLoad = layer.load();
      //页面加载时查询维护区中的枢纽类型
      $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
         data=data.result;
@@ -625,10 +635,16 @@
   });
   
   // 根据维护区的内容查询市
   function findCity() {
   function findCity(isLoad) {
      var data = {
         StationName1: $("#station_name1").val()
      };
      // 是否添加等待
      if(isLoad) {
         filterLoad = layer.load();
      }
      // 请求获取当前省下的市
      $.ajax({    
           type: "post",             
@@ -653,27 +669,79 @@
              }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();
      }
      // 查询区县
      $.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);
                  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 selectvalue=$("#station_name1 option:selected").val();
      //alert(selectvalue);
      $.post("BattInfAction!serchStationName3","json="+JSON.stringify(tmp),function(data){
@@ -702,16 +770,21 @@
   }
   
   $('#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'):'';
      // 是否添加等待
      if(isLoad) {
         filterLoad = layer.load();
      }
      // 构造查询条件
      var tmp = {
         StationName1:$("#station_name1").val(),
         StationName2:$("#city").val(),
         StationName5: $("#county").val(),
         StationName: $("#station_name").val(),
         StationId: stationid
      };
@@ -742,9 +815,12 @@
            
            // 根据数据生成下拉列表
            createOptions($select, optsList, true);
            $select.find('option:selected').eq(0).val(0);
         }else{
            $("#battgroup_name").text('').html('<option>暂无可测蓄电池组</option>');
         }
         layer.close(filterLoad);
      });
   }
   
@@ -908,6 +984,7 @@
         binf:{
            StationName1:$('#station_name1').val(),
            StationName2:$('#city').val(),
            StationName5: $('#county').val(),
            StationName:$('#station_name').val(),
            BattGroupId:$('#battgroup_name').val()
         },