hdw
2018-10-31 f6ec7be038914b05ebca63fae87619ab5e386424
gx_tieta/WebRoot/dataManage.jsp
@@ -40,6 +40,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 +59,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 +206,7 @@
</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">
   var permits;
   <%   Object obj=session.getAttribute("permits");
@@ -367,30 +373,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));
   });   
   
   //页面内对数据进行操作的效果
@@ -655,9 +658,48 @@
              }else {
                 $select.text('').html('<option>暂无可测市</option>');
              }
              findStationNamebyStationname1();
              findCounty();
           }
       });
   }
   // 查询区/县
   function findCounty() {
      var tmp = {
         StationName1:$("#station_name1").val(),
         StationName2:$("#city").val(),
      };
      // 查询区县
      $.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();
         }
      });
   }
   
   //当维护区的值变换时更新市
@@ -667,6 +709,11 @@
   
   //当维护区的值变换时更新机房站点
   $('#city').change(function(){
      findCounty();
   });
   //当区/县的值变换时更新机房站点
   $('#county').change(function(){
      findStationNamebyStationname1();
   });
   
@@ -674,7 +721,8 @@
   function findStationNamebyStationname1(){
      var tmp = {
         StationName1:$("#station_name1").val(),
         StationName2:$("#city").val()
         StationName2:$("#city").val(),
         StationName5: $("#county").val()
      };
      //var selectvalue=$("#station_name1 option:selected").val();
      //alert(selectvalue);
@@ -714,6 +762,7 @@
      var tmp = {
         StationName1:$("#station_name1").val(),
         StationName2:$("#city").val(),
         StationName5: $("#county").val(),
         StationName: $("#station_name").val(),
         StationId: stationid
      };
@@ -911,6 +960,7 @@
         binf:{
            StationName1:$('#station_name1').val(),
            StationName2:$('#city').val(),
            StationName5: $('#county').val(),
            StationName:$('#station_name').val(),
            BattGroupId:$('#battgroup_name').val()
         },