D:/workspace/chenjingjing/git/gx_tieta/gx_tieta/.gitignore
2019-01-18 2fe250ece8de95b3f70172fe5b45793ab6a3084a
gx_tieta/WebRoot/mobil/eleMonomer.html
@@ -22,26 +22,30 @@
            <div class="fg-panel-content">
               <input type="hidden" id="test_type" name="bmd.tdata.test_type" value="3"/>
                   <fieldset data-role="controlgroup">
                  <p>维护区</p>
                  <select id="privince" name="bmd.binf.StationName1" data-mini="true">
                    <option value="">全部</option>
                  </select>
                  <p>机房站点</p>
                  <select id="city" name="bmd.binf.StationName" data-mini="true">
                     <option value="">全部</option>
                  </select>
                  <p>蓄电池组</p>
                  <select id="battgroup_name" name="bmd.binf.BattGroupId" data-mini="true">
                  <option value="0">全部</option>
                  </select>
                  <p>单体编号选择</p>
                  <select id="Single_number" name="bmd.binf.MonNum" data-mini="true">
                     <option value="0">全部(共0节)</option>
                  </select>
                <p>省</p>
                     <select id="mainteArea" name="bmd.binf.StationName1"data-mini="true">
                          <option value="">全部</option>
                     </select>
                     <p>市</p>
                     <select id="city" name="bmd.binf.StationName2" data-mini="true">
                        <option value="">全部</option>
                     </select>
                     <p>区/县</p>
                     <select id="country" name="bmd.binf.StationName5" data-mini="true">
                        <option value="">全部</option>
                     </select>
                      <p>机房站点</p>
                     <select id="homeName" name="bmd.binf.StationName" data-mini="true">
                        <option value="">全部</option>
                     </select>
                     <p>蓄电池组</p>
                     <select id="battgroup_name" name="bmd.binf.BattGroupId" data-mini="true">
                        <option value="0">全部</option>
                     </select>
                      <p>单体编号选择</p>
                     <select id="Single_number" name="bmd.binf.MonNum" data-mini="true">
                        <option value="0">全部(共0节)</option>
                     </select>
                   <div>
                     <legend class="volTest">放电测试</legend>
                    <label for="elevol">放电截止电压</label>
@@ -134,105 +138,245 @@
   var newArrTd = [];
   var tblCon = $('.tbl-container');
      
   //点击筛选弹出选择框时,查询维护区中的枢纽类型(尝试加载就返回数据)
   //页面加载时查询省
   $.post("BattInfAction_serchByStation",null,function(data){
      data=data.result;
      data=eval("("+data+")");
       if(data.code==1 && data.data.length>0){
         var $select=$("#privince");
         $select.text("");
         for(var i=0;i<=data.data.length;i++){
            $option=$("<option></option>");
            if(i==0){
               $option.html("全部(共"+data.sum+"节)");
               $select.siblings('span').text($option.text());
               $option.attr("value", "");
            }else{
               $option.text(data.data[i-1].StationName1);
               $option.attr("value",data.data[i-1].StationName1);
            }
            $select.append($option);
         }
      }
         findStationNamebyStationname1();
   });
   //当维护区的值变换时更新机房站点
   $('#privince').change(function(){
       findStationNamebyStationname1();
   });
   //根据维护区查询站点
   function findStationNamebyStationname1(){
      var selectvalue=$("#privince option:selected").val();
      //alert(selectvalue);
      $.post("BattInfAction_serchByStationName","bif.StationName1="+selectvalue,function(data){
         data=data.result;
         data=eval("("+data+")");
         //console.info(data);
         if(data.code==1 && data.data.length>0){
            var $select = $("#city");
            $select.text("");
            for(var i=0;i<data.data.length;i++){
               var $option=$("<option></option>");
               $option.text(data.data[i].StationName);
               $option.attr("value",data.data[i].StationName);
               if(i==0){
                  //$option.html("全部(共"+data.sum+"种)");
                  $select.siblings('span').text($option.text());
                  //$option.attr("value", "");
               }else{
               }
               $select.append($option);
            }
         }
         findserchByBattGroupNamebystationname();
      });
   }
   //
   $('#city').on('change', function(){
      findserchByBattGroupNamebystationname();
   });
   //根据维护区和机房查询蓄电池组
   function findserchByBattGroupNamebystationname(){
      var station_name1=$("#privince option:selected").val();
      var station_name=$("#city option:selected").val();
      $.post("BattInfAction_serchByBattGroupName","bif.StationName1="+station_name1+"&bif.StationName="+station_name,function(data){
         data=data.result;
         //console.info(data);
         data=eval("("+data+")");
         //console.info(data.data.length);
         if(data.code==1 && data.data.length>0){
            var $Obattgroup_name = $("#battgroup_name");
            var arr = new Array();
            for(var i=0;i<=data.data.length;i++) {
               if(i == 0) {
                  arr.push({
                     val: "0",
                     txt: "全部(共"+data.sum+"组)"
                  });
               }else{
                  arr.push({
                     val: data.data[i-1].BattGroupId,
                     txt:data.data[i-1].BattGroupName+"-"+data.data[i-1].MonCount+"节"
                  });
               }
            }
            updataSel($Obattgroup_name, arr);
         }
         Obattgroup_nameonchange();
      });
   }
      data = data.result;
       data = eval("("+data+")");
       //console.info(data);
       //console.info(data.code);
       if(data.code==1&&data.data.length>0){
            var $Ostation_name1=$("#mainteArea");
          $Ostation_name1.text("");
          var arr = new Array();
          for(var i=0;i<=data.data.length;i++)
           {
                 if(i == 0){
                    arr.push({
                       val:"",
                       txt:"全部(共"+data.sum+"个)",
                    });
                 }else{
                    arr.push({
                       val:data.data[i-1].StationName1,
                       txt:data.data[i-1].StationName1,
                    });
                 }
          }
          updataSel($Ostation_name1, arr);
        }
         findCity();
    });
//当省改变时更新市
   function findCity(){
      var data = {
         StationName1: $("#mainteArea").val()
      };
      //console.info(data);
      // 请求获取当前省下的市
      $.ajax({
           type: "post",
           url: "BattInfAction!serchStationName2",
           async:true,
           dataType:'json',
           data:"json = "+JSON.stringify(data),
           success: function(data){
         data = data.result;
          data = eval("("+data+")");
          //console.info(data);
          //console.info(data.code);
          if(data.code==1&&data.data.length>0){
               var $Ostation_name1=$("#city");
             $Ostation_name1.text("");
             var arr = new Array();
             for(var i=0;i<=data.data.length;i++)
              {
                    if(i == 0){
                       arr.push({
                          val:"",
                          txt:"全部(共"+data.data.length+"个)",
                       });
                    }else{
                       arr.push({
                          val:data.data[i-1].StationName2,
                          txt:data.data[i-1].StationName2,
                       });
                    }
             }
             updataSel($Ostation_name1, arr);
           }
            findCounty();
       }
       });
    }
   
   $("#battgroup_name").on('change',function(){
      Obattgroup_nameonchange();
//当市改变时更新区/县
   function findCounty(){
      var data = {
         StationName1: $("#mainteArea").val(),
         StationName2:$("#city").val(),
      };
      //console.info(data);
      $.ajax({
           type: "post",
           url: "BattInfAction!serchStationName5",
           async:true,
           dataType:'json',
           data:"json = "+JSON.stringify(data),
           success: function(data){
         data = data.result;
          data = eval("("+data+")");
          //console.info(data);
          //console.info(data.code);
          if(data.code==1&&data.data.length>0){
               var $Ostation_name1=$("#country");
             $Ostation_name1.text("");
             var arr = new Array();
             for(var i=0;i<=data.data.length;i++)
              {
                    if(i == 0){
                       arr.push({
                          val:"",
                          txt:"全部(共"+data.data.length+"个)",
                       });
                    }else{
                       arr.push({
                          val:data.data[i-1].StationName5,
                          txt:data.data[i-1].StationName5,
                       });
                    }
             }
             updataSel($Ostation_name1, arr);
           }
         findStationNamebyStationname1();
       }
       });
    }
 //当区县更新时更新机房
    function findStationNamebyStationname1(){
      var data = {
         StationName1: $("#mainteArea").val(),
         StationName2:$("#city").val(),
         StationName5:$("#country").val()
      };
      //console.info(data);
      $.ajax({
           type: "post",
           url: "BattInfAction!serchStationName3",
           async:true,
           dataType:'json',
           data:"json = "+JSON.stringify(data),
           success: function(data){
         data = data.result;
          data = eval("("+data+")");
          //console.info(data);
          //console.info(data.code);
          if(data.code==1&&data.data.length>0){
               var $Ostation_name1=$("#homeName");
             $Ostation_name1.text("");
             var arr = new Array();
             for(var i=0;i<=data.data.length;i++)
              {
                    if(i == 0){
                       arr.push({
                          val:"",
                          stationid:"",
                          txt:"全部(共"+data.data.length+"个)",
                       });
                    }else{
                       arr.push({
                          val:data.data[i-1].StationName,
                          stationid:data.data[i-1].StationId,
                          txt:data.data[i-1].StationName3,
                       });
                    }
             }
             //console.info(111111111111111);
             updataSelStation($Ostation_name1, arr);
           }
           findserchByBattGroupNamebystationname();
       }
       });
    }
 //根据机房获取电池组
     function findserchByBattGroupNamebystationname(){
      var stationid = $("#homeName").find('option:selected').attr('stationid')?$("#homeName").find('option:selected').attr('stationid'):'';
      var data = {
         StationName1: $("#mainteArea").val(),
         StationName2:$("#city").val(),
         StationName5:$("#country").val(),
         StationName: $("#homeName").val(),
         StationId: stationid
      };
      //console.info(data);
      $.ajax({
           type: "post",
           url: "BattInfAction!serchBattByStation",
           async:true,
           dataType:'json',
           data:"json = "+JSON.stringify(data),
           success: function(data){
         data = data.result;
          data = eval("("+data+")");
          //console.warn();
          //console.info(data);
          //console.info(data.code);
          if(data.code==1&&data.data.length>0){
               var $Ostation_name1=$("#battgroup_name");
             $Ostation_name1.text("");
             var arr = new Array();
             for(var i=0;i<=data.data.length;i++)
              {
                    if(i == 0){
                       arr.push({
                          val:0,
                          txt:"全部(共"+data.data.length+"个)",
                       });
                    }else{
                       arr.push({
                          val:data.data[i-1].BattGroupId,
                          txt:data.data[i-1].BattGroupName,
                       });
                    }
             }
             updataSel($Ostation_name1, arr);
           }
            Obattgroup_nameonchange();
       }
       });
    }
   //当省改变时更新市
   $('#mainteArea').change(function(){
         findCity();
   });
   //当市改变时改变区/县
   $('#city').change(function(){
         findCounty();
   });
   //当区/县改变时改变机房
   $('#country').change(function(){
         findStationNamebyStationname1();
   });
   //当机房改变时,更新电池组
   $('#homeName').change(function(){
      findserchByBattGroupNamebystationname();
   });
   //当选择蓄电池组时
   $('#battgroup_name').change(function(){
      //Obattgroup_nameonchange();
   });
   //当选择蓄电池组时更新单体
   function Obattgroup_nameonchange(){
      var battgroup_id = $("#battgroup_name option:selected").val();
      var $OSingle_number = $("#Single_number");
      $OSingle_number.text("");
      //console.info(battgroup_id);
      //alert();
      if(battgroup_id==0){
         var $option =  $("<option></option>");
@@ -241,13 +385,15 @@
         $OSingle_number.siblings('span').text($option.text());
         $OSingle_number.append($option);
      }else{
         $.post("BattInfAction!serchByMonNum","bif.BattGroupId="+battgroup_id,function(data){
         console.info(battgroup_id);
         $.post("BattInfAction!serchByMonNum","bif.BattGroupId="+battgroup_id,function(data){
            
            data=data.result;
            data=eval("("+data+")");
            console.info(data);
            if(data.code==1 && data.data.length>0){
               data=data.data[0];
               //console.info(data);
               console.info(data);
               for(var i=0;i<=data.MonCount;i++){
                  var $option = $("<option></option>");
                  if(i!=0){
@@ -301,6 +447,7 @@
   //查询单体
      
   function searchMonomer(){
      var totalcount = 0;
      MonNumlist=new Array();
      MonVollist=new Array();
      MonTestDate=new Array();
@@ -322,146 +469,181 @@
            arrResisTestTd=new Array();
            arrChargeTd=new Array();
            data=data.result;
            data=eval("("+data+")");
            var model = eval("("+data+")");
            //alert(battgroupid);
            //console.info(data);
            console.info(model);
            //console.info(data.data);   
            if(data.code==1 && data.data.length>0){
               data=data.data;
            if(model.code==1 && model.data.length>0){
               data=model.data;
               var test_type=$('#test_type').attr('value');
               if(test_type==3){
               //查询充放电测试的数据
                  var index=0;
                  var number = 0;
                  var lowCA = model.lowCA;
                  var lowCH = model.lowCH;
                  for(var i=0;i<data.length;i++){
                     //$('#total').text(data[i].smodel.data.length);
                     if(data[i].smodel.code==1 && data[i].smodel.data.length>0){
                        var lowCA=data[i].smodel.lowCA;
                        var lowCH=data[i].smodel.lowCH;
                        var testdateIndex=-1;
                        var test_record_count=0;
                        for(var j=0;j<data[i].smodel.data.length;j++){
                           if(MonVollist[data[i].smodel.data[j].mon_num-1]==undefined){
                              MonVollist[data[i].smodel.data[j].mon_num-1]=new Array();
                              RealCaplist[data[i].smodel.data[j].mon_num-1]=new Array();
                           }
                        //   console.info(test_record_count+"&&&&&");
                           if(test_record_count!=data[i].smodel.data[j].test_record_count){
                              MonTestDate.push(data[i].smodel.data[j].test_starttime);
                              test_record_count=data[i].smodel.data[j].test_record_count;
                           }
                           MonVollist[data[i].smodel.data[j].mon_num-1].push(data[i].smodel.data[j].mon_vol.toFixed(3));
                           MonNumlist[data[i].smodel.data[j].mon_num-1]=data[i].smodel.data[j].mon_num;
                           arrChargeTd[index++]=(i+1)+"-"+data[i].smodel.data[j].mon_num;      //编号
                           arrChargeTd[index++]=data[i].smodel.data[j].test_starttime;      //测试日期
                           arrChargeTd[index++]=data[i].smodel.data[j].test_curr.toFixed(1);         //测试电流
                           arrChargeTd[index++]=data[i].smodel.data[j].test_cap.toFixed(1);         //测试容量
                           arrChargeTd[index++]=data[i].smodel.data[j].mon_num;         //单体编号
                           arrChargeTd[index++]=data[i].smodel.data[j].mon_vol.toFixed(3);         //单体电压
                           var realCap=Math.round(GetMonomerCap(data[i].data.binf.MonCapStd,GetHourRate(data[i].data.binf.MonCapStd,data[i].smodel.data[j].test_curr),data[i].smodel.data[j].test_cap,data[i].data.tdata.max_monvol,data[i].smodel.data[j].mon_vol,data[i].data.binf.MonVolStd,CapType_Real));      //实际容量
                           //console.info(data[i].data.tdata.max_monvol);
                           arrChargeTd[index++]=realCap;
                           RealCaplist[data[i].smodel.data[j].mon_num-1].push(realCap);
                           var rest=Math.round(GetMonomerCap(data[i].data.binf.MonCapStd,GetHourRate(data[i].data.binf.MonCapStd,data[i].smodel.data[j].test_curr),data[i].smodel.data[j].test_cap,data[i].data.tdata.max_monvol,data[i].smodel.data[j].mon_vol,data[i].data.binf.MonVolStd,CapType_Rest));   //剩余容量
                           arrChargeTd[index++]=rest;
                           arrChargeTd[index++]=(realCap/data[i].data.binf.MonCapStd).toFixed(2)*100+"%";         //容量百分比
                           if(realCap>=data[i].data.binf.MonCapStd*lowCA){
                              arrChargeTd[index++]="正常";      //维护记录         正常
                           }else if(realCap<data[i].data.binf.MonCapStd*lowCA && realCap>data[i].data.binf.MonCapStd*lowCH){
                              arrChargeTd[index++]="告警";      //维护记录         告警
                           }else{
                              arrChargeTd[index++]="更换";      //维护记录         更换
                           }
                        }
                     totalcount++;
                     var testdata = data[i];
                     if(MonVollist[testdata.sdata.mon_num-1]==undefined){
                        MonVollist[testdata.sdata.mon_num-1]=new Array();
                        RealCaplist[testdata.sdata.mon_num-1]=new Array();
                     }
                  }
                  // console.info(arrChargeTd);
                     if(test_record_count != testdata.tdata.test_record_count){
                        number++;
                        //console.info(testdata.tdata.test_record_count);
                        MonTestDate.push(testdata.sdata.test_starttime);
                        test_record_count = testdata.tdata.test_record_count;
                     }
                     MonVollist[testdata.sdata.mon_num-1].push(testdata.sdata.mon_vol.toFixed(3));
                     MonNumlist[testdata.sdata.mon_num-1] = testdata.sdata.mon_num;
                     arrChargeTd.push((number)+"-"+testdata.sdata.mon_num);            //编号
                     arrChargeTd.push(testdata.sdata.test_starttime);               //测试日期
                     arrChargeTd.push(testdata.sdata.test_curr.toFixed(1));         //测试电流
                     arrChargeTd.push(testdata.sdata.test_cap.toFixed(1));         //测试容量
                     arrChargeTd.push(testdata.sdata.mon_num);                  //单体编号
                     arrChargeTd.push(testdata.sdata.mon_vol.toFixed(3));            //单体电压
                     console.info(testdata.sdata.test_curr);
                     var avg_curr = testdata.sdata.test_timelong>0?testdata.sdata.test_cap*3600/testdata.sdata.test_timelong:testdata.sdata.test_curr;         //计算平均的放电电流
                     //console.info("avg="+avg_curr);
                     var realCap=Math.round(GetMonomerCap(testdata.binf.MonCapStd,GetHourRate(testdata.binf.MonCapStd,avg_curr),testdata.sdata.test_cap,testdata.tdata.max_monvol,testdata.sdata.mon_vol,testdata.binf.MonVolStd,CapType_Real));      //实际容量
                     //console.info(data[i].data.tdata.max_monvol);
                     arrChargeTd.push(realCap);
                     //console.info("MonCapStd:"+data[i].data.binf.MonCapStd+"\t  test_curr:"+data[i].smodel.data[j].test_curr+"\t test_cap"+data[i].smodel.data[j].test_cap+"\t max_monvol:"+data[i].data.tdata.max_monvol+"\t mon_vol"+data[i].smodel.data[j].mon_vol+"\t MonVolStd"+data[i].data.binf.MonVolStd);
                     RealCaplist[testdata.sdata.mon_num-1].push(realCap);
                     var rest=Math.round(GetMonomerCap(testdata.binf.MonCapStd,GetHourRate(testdata.binf.MonCapStd,avg_curr),testdata.sdata.test_cap,testdata.tdata.max_monvol,testdata.sdata.mon_vol,testdata.binf.MonVolStd,CapType_Rest));      //剩余容量
                     arrChargeTd.push(rest);
                     arrChargeTd.push((realCap*100/testdata.binf.MonCapStd).toFixed(0)+"%");      //容量百分比
                     if(realCap >= testdata.binf.MonCapStd*lowCA){
                        arrChargeTd.push("正常");      //维护记录         正常
                     }else if(realCap<testdata.binf.MonCapStd*lowCA && realCap>testdata.binf.MonCapStd*lowCH){
                        arrChargeTd.push("告警");      //维护记录         告警
                     }else{
                        arrChargeTd.push("更换");      //维护记录         更换
                     }
                  }
                  createTbl(tblCon, arrTh1, arrChargeTd);
               }else if(test_type==5){
                  //查询电导测试数据
                  //console.info(123456);
                  var index=0;
                  //console.info(data);
                  var test_record_count=0;
                  var test_index = -1;
                  var number = 0;
                  var lowRa=model.lowRA;
                  var lowRH=model.lowRH;
                  var every_arr = new Array();      //平均电导
                  var monser_arr = new Array();      //每次数据的电导数据     AvgSer_Arr
                  for(var i=0;i<data.length;i++){
                     if(data[i].rmodel.code==1 && data[i].rmodel.data.length>0){
                        $('#total').text(data[i].rmodel.data.length);
                        var test_record_count=0;
                        var test_index=-1;
                        for(var j=0;j<data[i].rmodel.data.length;j++){
                           //console.info(data[i].rmodel)
                           mdata=data[i].rmodel.data[j];
                           var momnum=(mdata.mon_num+"").substring(0,(mdata.mon_num+"").length-1);
                           if(Voltagelist[momnum-1] ==undefined){
                              Voltagelist[momnum-1]=new Array();
                              Conductlist[momnum-1]=new Array();
                              Conductpercentlist[momnum-1]=new Array();
                              Resistancelist[momnum-1]=new Array();
                              Templist[momnum-1]=new Array();
                              ConnOhmlist[momnum-1]=new Array();
                           }
                           if(test_record_count!=mdata.test_record_count){
                              MonTestDate[++test_index]=mdata.test_starttime;
                               test_record_count=mdata.test_record_count;
                           }
                           Voltagelist[momnum-1][test_index]=(mdata.mon_vol).toFixed(3);
                           Conductlist[momnum-1][test_index]=mdata.mon_ser;
                           Resistancelist[momnum-1][test_index]=(mdata.mon_res).toFixed(3);
                           Templist[momnum-1][test_index]=(mdata.mon_tmp).toFixed(1);
                           ConnOhmlist[momnum-1][test_index]=(mdata.conn_res).toFixed(3);
                           MonNumlist[momnum-1]=momnum;
                           MonTestDate[test_index]=mdata.test_starttime;
                           //console.info((mdata.mon_num+"").length+"mdata.mon_num");
                           //console.info(momnum+"momnum");
                           arrResisTestTd[index++]=mdata.test_record_count+"-"+momnum;      //编号
                           arrResisTestTd[index++]=mdata.test_starttime;               //测试日期
                           arrResisTestTd[index++]=momnum;                           //单体编号
                           arrResisTestTd[index++]=mdata.mon_vol.toFixed(3);            //单体电压
                           arrResisTestTd[index++]=mdata.mon_tmp.toFixed(1);            //单体温度
                           arrResisTestTd[index++]=mdata.mon_res.toFixed(3);            //单体内阻
                           arrResisTestTd[index++]=mdata.mon_ser;                     //单体电导
                           if(data[i].data.binf.MonSerStd!=0){
                              console.info(data[i].data.binf.MonSerStd);
                              arrResisTestTd[index++]=((mdata.mon_ser/data[i].data.binf.MonSerStd)*100).toFixed(1);   //电导百分比
                           }else{
                              arrResisTestTd[index++]=(0).toFixed(1);                  //电导百分比
                           }
                           Conductpercentlist[momnum-1][test_index]=arrResisTestTd[index-1];
                           //console.info(mdata);
                           arrResisTestTd[index++]=mdata.conn_res.toFixed(3);            //连接条阻抗
                           arrResisTestTd[index++]=data[i].rmodel.newsum==1?"平均值":" 标称值";         /* 平均值      标称值 */                        //电导分析基准
                           arrResisTestTd[index++]=mdata.mon_avg.toFixed(0);            //电导基准值
                           var lowRa=data[i].rmodel.lowRA;
                           var lowRH=data[i].rmodel.lowRH;
                           if(data[i].rmodel.newsum==1){
                              //根据平均值比较
                              if(mdata.mon_ser>=((mdata.mon_avg.toFixed(0))*lowRa)){
                                 arrResisTestTd[index++]="正常";         /* 正常 */                     //维护建议
                              }else if(mdata.mon_ser<(mdata.mon_avg.toFixed(0))*lowRa && mdata.mon_ser>(mdata.mon_avg.toFixed(0))*lowRH){
                                 arrResisTestTd[index++]="告警";         /* 告警 */                     //维护建议
                              }else{
                                 arrResisTestTd[index++]="更换";      /* 更换 */
                              }
                           }else if(data[i].rmodel.newsum==0){
                              //根据标称值比较
                              var MonSerstd=data[i].data.binf.MonResStd;
                              //console.info(MonSerstd);
                              if(mdata.mon_ser>=(MonSerstd*lowRa)){
                                 arrResisTestTd[index++]="正常";         /* 正常 */
                              }else if(mdata.mon_ser<(MonSerstd*lowRa) && mdata.mon_ser>MonSerstd*lowRH){
                                 arrResisTestTd[index++]="告警";         /* 告警 */
                              }else{
                                 arrResisTestTd[index++]="更换";      /* 更换 */
                              }
                           }
                     var resdata = data[i];
                     //新的一比数据
                     if(test_record_count != resdata.rdata.test_record_count){
                        monser_arr.push(every_arr);
                        if(i>0){
                           every_arr = new Array();
                        }
                     }
                     }
                     var conduct = 0;
                     if(resdata.rdata.mon_res>0){
                        conduct = (1000/resdata.rdata.mon_res).toFixed(0);
                     }
                     every_arr.push(conduct);
                  }
                  test_record_count = 0 ;
                  for(var i=0;i<data.length;i++){
                     var resdata = data[i];
                     totalcount++;
                     //console.info(data[i].rmodel)
                     mdata=resdata.rdata;
                     var momnum=(mdata.mon_num+"").substring(0,(mdata.mon_num+"").length-1);
                     if(Voltagelist[momnum-1] ==undefined){
                        Voltagelist[momnum-1]=new Array();
                        Conductlist[momnum-1]=new Array();
                        Conductpercentlist[momnum-1]=new Array();
                        Resistancelist[momnum-1]=new Array();
                        Templist[momnum-1]=new Array();
                        ConnOhmlist[momnum-1]=new Array();
                     }
                     if(test_record_count!=mdata.test_record_count){
                        MonTestDate.push(mdata.test_starttime);
                        test_record_count=mdata.test_record_count;
                        test_index ++;
                        number ++;
                     }
                     Voltagelist[momnum-1].push((mdata.mon_vol).toFixed(3));
                     Templist[momnum-1].push((mdata.mon_tmp).toFixed(1));
                     ConnOhmlist[momnum-1].push((mdata.conn_res).toFixed(3));
                     MonNumlist[momnum-1]=momnum;
                     //MonTestDate[test_index]=mdata.test_starttime;
                     //console.info((mdata.mon_num+"").length+"mdata.mon_num");
                     //console.info(momnum+"momnum");
                     arrResisTestTd.push((number)+"-"+momnum);      //编号
                     arrResisTestTd.push(mdata.test_starttime);               //测试日期
                     arrResisTestTd.push(momnum);                           //单体编号
                     arrResisTestTd.push(mdata.mon_vol.toFixed(3));            //单体电压
                     arrResisTestTd.push(mdata.mon_tmp.toFixed(1));            //单体温度
                     arrResisTestTd.push(mdata.mon_res.toFixed(3));            //单体内阻
                     Resistancelist[momnum-1].push((mdata.mon_res).toFixed(3));
                     var conduct = 0;
                     if(mdata.mon_res > 0){
                        conduct = (1000/mdata.mon_res).toFixed(0);
                     }
                     Conductlist[momnum-1].push(conduct);
                     arrResisTestTd.push(conduct);                     //单体电导
                     var Conductpercent = 0;
                     if(resdata.binf.MonSerStd!=0){
                        //console.info(data[i].data.binf.MonSerStd);
                        Conductpercent = ((conduct/resdata.binf.MonSerStd)*100).toFixed(1);
                     }else{
                        Conductpercent = (0).toFixed(1);                  //电导百分比
                     }
                     arrResisTestTd.push(Conductpercent);   //电导百分比
                     Conductpercentlist[momnum-1].push(Conductpercent);
                     //console.info(mdata);
                     arrResisTestTd.push(mdata.conn_res.toFixed(3));            //连接条阻抗
                     arrResisTestTd.push(model.newsum==1?"平均值":"标称值");         // 平均值      标称值                         //电导分析基准
                     arrResisTestTd.push(arrAverageNum(monser_arr[test_index]));            //电导基准值mdata.mon_avg.toFixed(0)
                     if(model.newsum==1){
                        //console.info(typeof AvgSer_Arr[test_index]);
                        //根据平均值比较
                        if(conduct>=((arrAverageNum(monser_arr[test_index]).toFixed(0))*lowRa)){
                           arrResisTestTd.push("正常 ");         /* 正常 */                     //维护建议
                        }else if(conduct<(arrAverageNum(monser_arr[test_index]).toFixed(0))*lowRa && conduct>(arrAverageNum(monser_arr[test_index]).toFixed(0))*lowRH){
                           arrResisTestTd.push("告警");         /* 告警 */                     //维护建议
                        }else{
                           arrResisTestTd.push("更换");      /* 更换 */
                        }
                     }else if(model.newsum==0){
                        //根据标称值比较
                        var MonSerstd=resdata.binf.MonResStd;
                        //console.info(MonSerstd);
                        if(conduct>=(MonSerstd*lowRa)){
                           arrResisTestTd.push("正常");         /* 正常 */
                        }else if(conduct<(MonSerstd*lowRa) && conduct>MonSerstd*lowRH){
                           arrResisTestTd.push("告警");         /* 告警 */
                        }else{
                           arrResisTestTd.push("更换");      /* 更换 */
                        }
                     }
                  }
                   console.info(arrResisTestTd);
                  createTbl(tblCon, arrTh2, arrResisTestTd);