From a86aed1d459024ab2a97d98115ef57f8dce808e6 Mon Sep 17 00:00:00 2001
From: admin:huo123456@qq <496960745@qq.com>
Date: 星期一, 21 一月 2019 09:15:44 +0800
Subject: [PATCH] Merge branch 'dev_lxw' of https://gitlab.com/whyclxw1/gx_tieta.git into dev_lxw
---
gx_tieta/WebRoot/mobil/voltageMbargraph.html | 32 +++++++++++++++++++++++++++++---
1 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/gx_tieta/WebRoot/mobil/voltageMbargraph.html b/gx_tieta/WebRoot/mobil/voltageMbargraph.html
index 2dd55d7..4ade873 100644
--- a/gx_tieta/WebRoot/mobil/voltageMbargraph.html
+++ b/gx_tieta/WebRoot/mobil/voltageMbargraph.html
@@ -59,7 +59,7 @@
background-image: -o-linear-gradient(#444,#2d2d2d);
background-image: linear-gradient(#444,#2d2d2d); border:1px solid #111; color: #fff; text-decoration: none;">杩斿洖</a>
- <h1>鍗曚綋鐢靛帇</h1>
+ <h1 id="biaoti">鍗曚綋鐢靛帇</h1>
<div data-role="collapsible" data-type="horizontal" class="ui-btn-right" style=" background-color: none; color: #333333; text-decoration: none;" >
<h1 id="alwaysRight">鍏朵粬</h1>
<div class="clear"></div>
@@ -82,6 +82,14 @@
</div>
</div>
</header>
+ <div>
+ <div class="ui-grid-c">
+ <div class="ui-block-a">鏈�澶�<span class="max"> </span></div>
+ <div class="ui-block-b">鏈�灏�<span class="min"> </span></div>
+ <div class="ui-block-c">骞冲潎<span class="avg"> </span></div>
+ <div class="ui-block-d">绱姞鍜�<span class="leijiasum"> </span></div>
+ </div>
+ </div>
<div id="bar"></div>
<div data-role="footer" data-position="fixed" data-theme="a">
@@ -93,7 +101,7 @@
</div>
</div>
</div>
-
+
<script type="text/javascript" src="mobilJs/echarts.js"></script>
<script type="text/javascript">
/* $('#alwaysRight').tap(function(){
@@ -129,6 +137,7 @@
var model = eval("("+data.result+")");
//model = eval("("+model.result+")");
datas = model.data;
+ $("#biaoti").text("鐢靛帇("+batt.BattGroupName+")");//鏍囬娣诲姞鐢垫睜缁勭紪鍙�
mon_vol = new Array(); //鐢靛帇
mon_tmp = new Array(); //娓╁害
@@ -146,6 +155,7 @@
mon_ser_percent.push((batt.MonSerStd==0?0:(datas[i].mon_ser*100/batt.MonSerStd)).toFixed(1));
mon_num.push(""+datas[i].mon_num); //鐢垫睜缁勫簭鍙�
}
+ createCount(datas);
if(myChart.getOption()==undefined){
createEcharts(myChart, mon_num, mon_vol);
console.info(myChart.getOption());
@@ -157,7 +167,23 @@
});
}
-
+ function createCount(datas){
+ var temp=new Array();
+ var sum=0;
+ console.info(datas);
+ for(var i=0;i<datas.length;i++){
+ temp.push((datas[i].mon_vol).toFixed(3));
+ sum+=parseFloat(temp[i]);
+ }
+ var max=Math.max.apply(null, temp);
+ var min=Math.min.apply(null, temp);
+ var avg=(sum/temp.length).toFixed(3);
+ sum=(sum).toFixed(2);
+ $(".max").text(max+'V');
+ $(".min").text(min+'V');
+ $(".avg").text(avg+'V');
+ $(".leijiasum").text(sum+'V');
+ }
function insertdata (mon_vol){
for(var i=0;i<inputs.length;i++){
--
Gitblit v1.9.1