function Title(){
|
this.min=0; //最小值
|
this.max=0; //最大值
|
this.avg=0; //平均值
|
this.ahight=0; //高告警阀值
|
this.alow=0; //低告警阀值
|
this.clow=0; //次低更换阀值
|
this.lc=0; //低告警单体数
|
this.lp=0; //低告警百分比
|
}
|
|
function createTitle(){
|
var obj=new Object();
|
obj.min=0;
|
obj.max=0;
|
obj.avg=0;
|
obj.ahight=0;
|
obj.alow=0;
|
obj.clow=0;
|
obj.lc=0;
|
obj.lp=0;
|
return obj;
|
}
|
|
function Title(min,max,avg,ahight,alow,clow,lc,lp){
|
this.min=min;
|
this.max=max;
|
this.avg=avg;
|
this.ahight=ahight;
|
this.alow=alow;
|
this.clow=clow;
|
this.lc=lc;
|
this.lp=lp;
|
}
|
|
Title.prototype.setMin=function(min){
|
this.min=min;
|
};
|
|
Title.prototype.getMin=function(){
|
return this.min;
|
};
|
|
Title.prototype.setMax=function(max){
|
this.max=max;
|
};
|
|
Title.prototype.getMax=function(){
|
return this.max;
|
};
|
|
Title.prototype.setAvg=function(avg){
|
this.avg=avg;
|
};
|
|
Title.prototype.getAvg=function(){
|
return this.avg;
|
};
|
|
Title.prototype.setAhight=function(ahight){
|
this.ahight=ahight;
|
};
|
|
Title.prototype.getAhight=function(){
|
return this.ahight;
|
};
|
|
Title.prototype.setAlow=function(alow){
|
this.alow=alow;
|
};
|
|
Title.prototype.getAlow=function(){
|
return this.alow;
|
};
|
|
Title.prototype.setClow=function(clow){
|
this.clow=clow;
|
};
|
|
Title.prototype.getClow=function(){
|
return this.clow;
|
};
|
|
Title.prototype.setLc=function(lc){
|
this.lc=lc;
|
};
|
|
Title.prototype.getLc=function(){
|
return this.lc;
|
};
|
|
Title.prototype.setLp=function(lp){
|
this.lp=lp;
|
};
|
|
Title.prototype.getLp=function(){
|
return lp;
|
};
|
|
Title.prototype.getAllTile=function(lname){
|
//alert(this.avg);
|
var title="";
|
if("Voltage"==lname){
|
//title=maxText+"="+(parseFloat(this.max).toFixed(3))+"V;"+minText+"="+(parseFloat(this.min).toFixed(3))+"V;"+avgText+"="+(parseFloat(this.avg).toFixed(3))+"V;"+lowText+"="+this.alow+"V;"+lcText+"="+this.lc+";"+lpText+"="+this.lp+"%";
|
title=maxText+"="+(parseFloat(this.max).toFixed(3))+"V;"+minText+"="+(parseFloat(this.min).toFixed(3))+"V;"+avgText+"="+(parseFloat(this.avg).toFixed(3))+"V";
|
}else if("Resistance"==lname){
|
//title=maxText+"="+(parseFloat(this.max).toFixed(3))+"mΩ;"+minText+"="+(parseFloat(this.min).toFixed(3))+"mΩ;"+avgText+"="+(parseFloat(this.avg).toFixed(3))+"mΩ;"+lowText+"="+this.alow+"mΩ;"+lcText+"="+this.lc+";"+lpText+"="+this.lp+"%";
|
title=maxText+"="+(parseFloat(this.max).toFixed(3))+"mΩ;"+minText+"="+(parseFloat(this.min).toFixed(3))+"mΩ;"+avgText+"="+(parseFloat(this.avg).toFixed(3))+"mΩ";
|
}else if("Temperature"==lname){
|
//title=maxText+"="+(parseFloat(this.max).toFixed(1))+"℃;"+minText+"="+(parseFloat(this.min).toFixed(1))+"℃;"+avgText+"="+(parseFloat(this.avg).toFixed(1))+"℃;"+lowText+"="+this.alow+"℃;"+lcText+"="+this.lc+";"+lpText+"="+this.lp+"%";
|
title=maxText+"="+(parseFloat(this.max).toFixed(1))+"℃;"+minText+"="+(parseFloat(this.min).toFixed(1))+"℃;"+avgText+"="+(parseFloat(this.avg).toFixed(1))+"℃";
|
}else if("Conductance"==lname){
|
//title=maxText+"="+(parseFloat(this.max).toFixed(0))+";"+minText+"="+(parseFloat(this.min).toFixed(0))+";"+avgText+"="+(parseFloat(this.avg).toFixed(0))+";"+lowText+"="+this.alow+";"+lcText+"="+this.lc+";"+lpText+"="+this.lp+"%";
|
title=maxText+"="+(parseFloat(this.max).toFixed(0))+";"+minText+"="+(parseFloat(this.min).toFixed(0))+";"+avgText+"="+(parseFloat(this.avg).toFixed(0));
|
}else if("MonJHCurr"==lname){
|
//title=maxText+"="+(parseFloat(this.max).toFixed(3))+"V;"+minText+"="+(parseFloat(this.min).toFixed(3))+"V;"+avgText+"="+(parseFloat(this.avg).toFixed(3))+"V;"+lowText+"="+this.alow+"V;"+lcText+"="+this.lc+";"+lpText+"="+this.lp+"%";
|
title=maxText+"="+(parseFloat(this.max).toFixed(3))+"A;"+minText+"="+(parseFloat(this.min).toFixed(3))+"A;"+avgText+"="+(parseFloat(this.avg).toFixed(3))+"A";
|
}else if("Serpercent"==lname || "Percent_total_capacity" == lname){
|
//title=maxText+"="+this.max+"%;"+minText+"="+this.min+"%;"+avgText+"="+this.avg+"%;"+lowText+"="+this.alow+"%;"+lcText+"="+this.lc+";"+lpText+"="+this.lp+"%";
|
title=maxText+"="+this.max+"%;"+minText+"="+this.min+"%;"+avgText+"="+this.avg+"%";
|
}else if("Actual_capacity"==lname || "Residual_capacity" == lname){
|
//title=maxText+"="+(parseFloat(this.max).toFixed(0))+"AH;"+minText+"="+(parseFloat(this.min).toFixed(0))+"AH;"+avgText+"="+(parseFloat(this.avg).toFixed(0))+"AH;"+lowText+"="+this.alow+"AH;"+lcText+"="+this.lc+";"+lpText+"="+this.lp+"%";
|
title=maxText+"="+(parseFloat(this.max).toFixed(0))+"AH;"+minText+"="+(parseFloat(this.min).toFixed(0))+"AH;"+avgText+"="+(parseFloat(this.avg).toFixed(0))+"AH";
|
}
|
return title;
|
};
|