From 23d2d10ba2b388a0999702c9931efa14f12d7f8a Mon Sep 17 00:00:00 2001
From: whyclj <1525436766@qq.com>
Date: 星期五, 28 十二月 2018 16:43:54 +0800
Subject: [PATCH] 在实时监测和理士数据页面中添加累加和显示
---
gx_tieta/WebRoot/control.jsp | 1 +
gx_tieta/WebRoot/js/Title.js | 12 +++++++++++-
gx_tieta/WebRoot/charge-test.jsp | 3 ++-
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/gx_tieta/WebRoot/charge-test.jsp b/gx_tieta/WebRoot/charge-test.jsp
index 2f55d26..5d4d833 100644
--- a/gx_tieta/WebRoot/charge-test.jsp
+++ b/gx_tieta/WebRoot/charge-test.jsp
@@ -3058,7 +3058,8 @@
//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){
//鏍规嵁鏍囩О鍊艰绠�
diff --git a/gx_tieta/WebRoot/control.jsp b/gx_tieta/WebRoot/control.jsp
index 579c089..6e69e0d 100644
--- a/gx_tieta/WebRoot/control.jsp
+++ b/gx_tieta/WebRoot/control.jsp
@@ -2289,6 +2289,7 @@
table_index = 0;
createAllTbl(tbHd, tbBd, thVol, mon_vol_table_list);
title.setAvg(parseFloat(sum/array.length).toFixed(3));
+ title.setSum(sum);
getBattAlarmTitle(batt,"Voltage",title);
//title.alow = temp.alow; //璁剧疆鐢靛帇鍛婅浣庡��
//title.ahight = temp.ahight; //璁剧疆鐢靛帇鍛婅楂樺��
diff --git a/gx_tieta/WebRoot/js/Title.js b/gx_tieta/WebRoot/js/Title.js
index 50deff6..1583217 100644
--- a/gx_tieta/WebRoot/js/Title.js
+++ b/gx_tieta/WebRoot/js/Title.js
@@ -2,6 +2,7 @@
this.min=0; //鏈�灏忓��
this.max=0; //鏈�澶у��
this.avg=0; //骞冲潎鍊�
+ this.sum=0; //鎬诲拰
this.ahight=0; //楂樺憡璀﹂榾鍊�
this.alow=0; //浣庡憡璀﹂榾鍊�
this.clow=0; //娆′綆鏇存崲闃�鍊�
@@ -14,6 +15,7 @@
obj.min=0;
obj.max=0;
obj.avg=0;
+ obj.sum=0;
obj.ahight=0;
obj.alow=0;
obj.clow=0;
@@ -55,6 +57,14 @@
Title.prototype.getAvg=function(){
return this.avg;
+};
+
+Title.prototype.setSum=function(sum){
+ this.sum=sum;
+};
+
+Title.prototype.getSum=function(){
+ return this.sum;
};
Title.prototype.setAhight=function(ahight){
@@ -102,7 +112,7 @@
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";
+ title=maxText+"="+(parseFloat(this.max).toFixed(3))+"V;"+minText+"="+(parseFloat(this.min).toFixed(3))+"V;"+avgText+"="+(parseFloat(this.avg).toFixed(3))+"V;绱姞鍜�="+(parseFloat(this.sum).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惟";
--
Gitblit v1.9.1