D:/workspace/chenjingjing/git/gx_tieta/gx_tieta/.gitignore
2019-01-18 2fe250ece8de95b3f70172fe5b45793ab6a3084a
gx_tieta/WebRoot/endure.jsp
@@ -8,19 +8,18 @@
<html>
  <head>
    <base href="<%=basePath%>">
    <title><s:text name="Batt_life_history_query"/></title>            <!--电池续航能力历史查询-->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="css/basic.css" rel="stylesheet">
    <link rel="stylesheet" href="css/BrdwMaint.css">
    <link rel="stylesheet" type="text/css" href="css/loading.css">
   <meta http-equiv="pragma" content="no-cache">
   <meta http-equiv="cache-control" content="no-cache">
   <meta http-equiv="expires" content="0">    
   <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
   <meta http-equiv="description" content="This is my page">
    <title><s:text name="Batt_life_history_query"/></title>            <!--电池续航能力历史查询-->
    <link href="css/basic.css" rel="stylesheet">
    <link rel="stylesheet" href="css/BrdwMaint.css">
    <link rel="stylesheet" type="text/css" href="css/loading.css">
    <link href="src/css/layui.css" type="text/css" rel="stylesheet">
    <style type="text/css">
        body {
            overflow-x: hidden !important;
@@ -65,25 +64,23 @@
                        <tr class="fWeight">
                            <td>省</td>                  <!-- 省 -->
                            <td>市</td>                  <!-- 市 -->
                            <td>区/县</td>                  <!-- 区/县 -->
                            <td><s:text name="Computer_name"/></td>                     <!-- 机房名称 -->
                            <td><s:text name="Cruising_ability"/><s:text name="Type"/></td>   <!-- 续航能力类型 -->            
                            <td  colspan="2"><s:text name="Battery_record_time"/></td>      <!-- 电池测试记录时间段 -->
                        </tr>
                        <tr>
                            <td>
                                <select id="station_name1">
                                </select>
                                <select id="station_name1"></select>
                            </td>
                            <td>
                                <select id="city">
                                </select>
                                <select id="city"></select>
                            </td>
                            <td>
                                <select id="station_name">
                                </select>
                                <select id="county"></select>
                            </td>
                            <td>
                                <select id="station_name"></select>
                            </td>
                            <td>
                                <select id="endu_type">
@@ -145,6 +142,7 @@
       <div id="allShade"></div>
        <script type="text/javascript" src="js/loading.js"></script>
        <script type="text/javascript" src="js/createTab.js"></script>
        <script type="text/javascript" src="src/layui.all.js"></script>
        <script type="text/javascript">
        var Page={
         pageCurr:1,
@@ -285,7 +283,9 @@
        }
        
        // 省-市-机房-电池组
        filterLoad = layer.load();
      $(document).ready(function(){
         filterLoad = layer.load();
         //页面加载时查询维护区中的枢纽类型
         $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
            data=data.result;
@@ -313,10 +313,16 @@
      });
      
      // 根据维护区的内容查询市
      function findCity() {
      function findCity(isLoad) {
         var data = {
            StationName1: $("#station_name1").val()
         };
         // 是否添加等待
         if(isLoad) {
            filterLoad = layer.load();
         }
         // 请求获取当前省下的市
         $.ajax({    
              type: "post",             
@@ -341,27 +347,80 @@
                 }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){
@@ -385,6 +444,8 @@
            }else{
               $("#station_name").text('').html('<option>暂无可测机房站点</option>');
            }
            layer.close(filterLoad);
         });
      }
      
@@ -395,6 +456,7 @@
            num:3,                                       //电池状态
            BattGroupId:$("#endu_type").val(),                  //查询数据             
            StationName:$('#station_name').val(),               //机房名
            StationName5:$('#county').val(),                  // 区/县
            StationName2:$('#city').val(),                     //市
            StationName1:$('#station_name1').val(),               //维护区
            BattProductDate:$('#starttime').val()+" 00:00:00",
@@ -407,8 +469,6 @@
      var formjson;
      //查询电池组的历史续航能力
      function searchBattLife(){
         loading.showLoading();
         var jsontemp = $('#search_form').serialize();
         if(formjson != jsontemp){
            Page.pageCurr = 1;
@@ -416,7 +476,9 @@
         }
               
         var temp = createSearchParam();   
         arrTd  = new Array();
         arrTd  = new Array();
         var load = layer.load(1);
         $.ajax({    
                type: "post",             
              url: "Batttestdata_infAction!serchBattLife",            
@@ -443,10 +505,10 @@
                 $('#total').text(Page.pageAll);
                 
                 createAllTbl(tblHd, tblBd, arrTh, arrTd, tblStatus);              
               loading.hideLoading();
               layer.close(load);
              },              
              error:function(){
                 loading.hideLoading();
                 layer.close(load);
                 noContent.showNoContent("查询失败,请检查网络连接!");
              }         
         });