| | |
| | | var oChargeThrInfor=document.getElementById("charge_thr_infor");
|
| | | var batteststopDataList = new Array();
|
| | | //根据指定的测试数据查询结束时的指定电池组的数据
|
| | | function findtestdatastop(record_count){ |
| | | function findtestdatastop(record_count){
|
| | | Monnum_list = new Array(); //初始化电池编号数组
|
| | | Monvol_list = new Array(); //初始化电池电压数组
|
| | | checkArray = new Array();
|
| | | var arr = new Array();
|
| | | var batt = getBattinfById();
|
| | | //console.info(batt);
|
| | | for(var i=0;i<batt.MonCount;i++){
|
| | | Monnum_list[i]="#"+(i+1);
|
| | | Monvol_list[i]= (0).toFixed(3); |
| | | checkArray.push(1);
|
| | | arr[i] = (0).toFixed(3);
|
| | | } |
| | | $ajax("post","BatttestdatastopAction_findByInfo","btds.BattGroupId="+BattGroupId+"&btds.test_record_count="+record_count, function(data){
|
| | | data=eval("("+data+")");
|
| | | data=data.result;
|
| | | data=eval("("+data+")");
|
| | | //console.info(data);
|
| | | if(data.code==1){
|
| | | data=data.data;
|
| | | batteststopDataList = data;
|
| | | |
| | | var batt = getBattinfById();
|
| | | batteststopDataList = data; |
| | | //console.info(batt);
|
| | | var moncount = batt.MonCount;
|
| | | |
| | | Monnum_list = new Array(); //初始化电池编号数组
|
| | | Monvol_list = new Array(); //初始化电池电压数组
|
| | | checkArray = new Array();
|
| | | var arr = new Array();
|
| | | for(var i=0;i<moncount;i++){
|
| | | |
| | | for(var i=0;i<moncount;i++){ |
| | | Monnum_list[i]="#"+(i+1);
|
| | | if(data[i] != undefined){
|
| | | Monvol_list[i]=data[i].mon_vol.toFixed(3);
|
| | |
| | | Monvol_list[i]= (0).toFixed(3);
|
| | | }
|
| | | arr[i]=Monvol_list[i];
|
| | | checkArray.push(1);
|
| | | }
|
| | |
|
| | | //console.info(arr);
|
| | | //console.info(arrTh[li_index]);
|
| | | $('#charge_thr_th').find('tr th').eq(1).text(arrTh[li_index]);
|
| | | //updataSecCol($('#charge_thr_th'), arrTh[li_index], arr);
|
| | | createBattVoltable(arr);
|
| | | //reflushBattStatus(data[0]);
|
| | | }else{
|
| | | var obj = getBattinfById();
|
| | | for(var i = 1;i<=obj.MonCount;i++){
|
| | | Monnum_list.push("#"+i);
|
| | | Monnum_list[i-1] = "#"+i;
|
| | | }
|
| | | }
|
| | | createBattVoltable(arr);
|
| | | });
|
| | |
|
| | |
|
| | |
| | | //console.info(batt);
|
| | | for(var i=0;i<list.length;i++){
|
| | | index = (list[i].mon_num/10).toFixed(0)-1;
|
| | | Monnum_list[index]="#"+(index+1);
|
| | | //Monnum_list[index]="#"+(index+1);
|
| | | console.info(index);
|
| | | //percentage_list[index]=list[i].conn_res.toFixed(1);
|
| | | monres_list[index]=list[i].mon_res.toFixed(3);
|
| | | montmp_list[index]=list[i].mon_tmp.toFixed(1);
|
| | |
| | | batt_test_evary_record = new Array(); //记录当前测试记录的每笔的组端测试值
|
| | | batt_tmp_data = new Array();
|
| | | //console.info(AllTestData);
|
| | | |
| | | if(AllTestData!=undefined){
|
| | | var batt = getBattinfById();
|
| | | if(AllTestData!=undefined && AllTestData.length>0){
|
| | | if(Monnum_list != undefined && Monnum_list.length>0){
|
| | | AllData=new Array();
|
| | | //console.info(Monnum_list);
|
| | | for(var i=0;i<Monnum_list.length;i++){
|
| | | for(var i=0;i<batt.MonCount;i++){
|
| | | batt_test_voldata[i] = new Array();
|
| | | batt_test_tmpdata[i] = new Array();
|
| | | }
|
| | | max=Number.NEGATIVE_INFINITY; //无穷小值
|
| | | min=Number.POSITIVE_INFINITY; //无穷大值
|
| | | var test_record_num = 0;
|
| | | //console.info(AllTestData.length);
|
| | | var batt_index = -1;
|
| | |
|
| | | //console.info(Monnum_list);
|
| | | //console.info("***************");
|
| | | |
| | | var start_record_num = AllTestData[0].record_num;
|
| | | BattGroupVol[0] = new Array();
|
| | | BattGroupVol[1] = new Array();
|
| | | for(var i=0;i<AllTestData.length;i++){
|
| | |
| | |
|
| | | batt_test_data[++batt_index] = new Array();
|
| | | test_record_num = AllTestData[i].record_num;
|
| | | if(test_record_num > 1){
|
| | | if(test_record_num > start_record_num){
|
| | | batt_test_data[batt_index]=batt_test_data[batt_index-1].slice(0);
|
| | | setArrayvalue(batt_test_voldata,batt_index);
|
| | | setArrayvalue(batt_test_tmpdata,batt_index);
|
| | | }else{
|
| | | //第一笔充放电数据
|
| | | var batt = getBattinfById();
|
| | | for(var k =0;k<batt.MonCount;k++){
|
| | | batt_test_data[batt_index][k] = 0;
|
| | | batt_test_voldata[k][batt_index] = 0;
|
| | | batt_test_tmpdata[k][batt_index] = 0;
|
| | | batt_test_data[0][k] = 0;
|
| | | batt_test_voldata[k][0] = 0;
|
| | | batt_test_tmpdata[k][0] = 0;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | var title=getTitle(Monvol_list,"Voltage");
|
| | | reflushBattStatus(AllTestData[AllTestData.length-1]);
|
| | |
|
| | | var batt = getBattinfById();
|
| | | |
| | | //console.info(Monvol_list);
|
| | | var tempmin = Math.floor(getMinFromArr(Monvol_list)*0.9);
|
| | | //var tempmax = (batt.MonVolStd*1.25).toFixed(3);
|
| | |
| | | //console.info(title);
|
| | | }else{
|
| | | if("Voltage"==units){
|
| | | Titleobj.setAvg((sum/array.length).toFixed(3)); |
| | | Titleobj.setAvg((sum/array.length).toFixed(3)); |
| | | Titleobj.setSum(sum); |
| | | var low=getLow(1,1);
|
| | | if(low.low_method==0){
|
| | | //根据标称值计算
|
| | |
| | | function getBattStr() {
|
| | | var battInfo = getBattinfById();
|
| | | //console.info(battInfo);
|
| | | var battStr = battInfo.StationName+'-'+battInfo.BattGroupName;
|
| | | var battStr = battInfo.StationName+'-'+battInfo.BattGroupName+'-标称容量'+battInfo.MonCapStd+'AH';
|
| | | $('#address_infor').text(battStr);
|
| | | }
|
| | |
|