| | |
| | | $(this).css("background-color","#9bbaf3");
|
| | | });
|
| | |
|
| | | function toInformationArray(list){
|
| | | Monnum_list = new Array(); //初始化电池编号数组
|
| | | Monvol_list = new Array(); //初始化电池电压数组
|
| | | checkArray = new Array();
|
| | | for(var i=0;i<list.length;i++){
|
| | | Monnum_list[i]="#"+list[i].mon_num;
|
| | | Monvol_list[i]=list[i].mon_vol.toFixed(3);
|
| | | checkArray.push(1);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | |
|
| | | //查询指定的电池组id下指定测试次数的测试数据
|
| | |
| | | data=eval("("+data+")");
|
| | | if(data.code==1){
|
| | | data=data.data;
|
| | | //console.info(data);
|
| | | batteststopDataList = data;
|
| | | toInformationArray(data);
|
| | | |
| | | var batt = getBattinfById();
|
| | | //console.info(batt);
|
| | | var moncount = batt.MonCount;
|
| | | |
| | | Monnum_list = new Array(); //初始化电池编号数组
|
| | | Monvol_list = new Array(); //初始化电池电压数组
|
| | | checkArray = new Array();
|
| | | var arr = new Array();
|
| | | //console.info(data);
|
| | | for(var i=0;i<data.length;i++){
|
| | | arr[data[i].mon_num-1]=data[i].mon_vol.toFixed(3);
|
| | | 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);
|
| | | }else{
|
| | | 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]);
|
| | |
| | | if(AllTestData!=undefined){
|
| | | if(Monnum_list != undefined && Monnum_list.length>0){
|
| | | AllData=new Array();
|
| | | //console.info(Monnum_list);
|
| | | for(var i=0;i<Monnum_list.length;i++){
|
| | | batt_test_voldata[i] = new Array();
|
| | | batt_test_tmpdata[i] = new Array();
|
| | |
| | | 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;
|
| | | }
|
| | | }
|
| | | if(max<AllTestData[i].mon_vol){
|
| | | }
|
| | | /* if(max<AllTestData[i].mon_vol){
|
| | | max = AllTestData[i].mon_vol;
|
| | | }
|
| | | if(min>AllTestData[i].mon_vol){
|
| | | min = AllTestData[i].mon_vol;
|
| | | }
|
| | | } */
|
| | | //console.info(AllTestData[i]);
|
| | | batt_test_data[batt_index][AllTestData[i].mon_num-1] = AllTestData[i].mon_vol;
|
| | | batt_test_voldata[AllTestData[i].mon_num-1][batt_index] = AllTestData[i].mon_vol;
|
| | |
| | | // 根据折线图的状态值生成对应的折线
|
| | | var line_status = $('#lineStatus').val();
|
| | | if(line_status == 0) { // 生成单体电压折线图
|
| | | max = getMaxFromArr(batt_test_voldata);
|
| | | min = getMinFromArr(batt_test_voldata);
|
| | | CreateLineEchart('myLineChart',oRBottom,Monnum_list,TestTime,batt_test_voldata,max,min,thrname); //生成右下折线图
|
| | | }else { // 生成单体
|
| | | max = getMaxFromArr(batt_test_tmpdata);
|