BUG
CJJ
2018-12-25 f8b9f11ea2743bc2dcc126fb36de035bf0924856
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>内阻柱状图</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes"/>
<link rel="stylesheet" href="mobilCss/jquery.mobile-1.1.0.min.css" />
<link href="mobilCss/jquery.jqplot.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="mobilJs/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="mobilJs/jquery.mobile-1.1.0.min.js"></script>
<script type="text/javascript" src="mobilJs/base.js"></script>
<script type="text/javascript" src="../js/echarts.js"></script>
<style type="text/css">
    a:link {
        text-decoration: none; 
        color:#ffffff; 
    }
    .myChart {
        width: 300px;
        height: 400px;
    }
    h1{
        font-size:1.5em; 
    }
    
    .full-width{
        width: 100% !important;
        padding-left:0.7em;
    }
    .full-width:active {
        background-color: #33cccc;
    }
    .full-width a{
        display: block;
        width: 100% !important;
    }
    
    .ui-bar-g {
        border-top: 1px solid #46a180;
        border-bottom:1px solid #46a180;
        background: #15cc8b;
        color:#ffffff;
        font-weight: bold;
        text-shadow: 0 -1px 1px #000000;
        background-image: -moz-linear-gradient(top, #72d5ae, #5bb692);
        background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #72d5ae),color-stop(1, #5bb692));
        -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#72d5ae', EndColorStr='#5bb692')";
 
    }
    
    .ui-btn-up-g{border:1px solid #3a755a;background-image: -moz-linear-gradient(top, #72d5ae, #5bb692);
        background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #72d5ae),color-stop(1, #5bb692));
        -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#72d5ae', EndColorStr='#5bb692')";
    }
    
    #bar{
        width:500px;
        height: 300px;
    }
    #alwaysRight {
        float:right !important;
    }
    .clear{
        width: 100%;
        height:1px;
        clear:both;
    }
    </style>
    
</head>
<body>
    <div id="pageBarChart" data-role="page" data-rockncoder-jspage="manageBarChart">
        <header data-role="header" data-position="fixed" data-theme="g">
 
           <a href="control.html" class="ui-btn ui-corner-all ui-shadow  ui-btn-icon-left" target="_top" style="padding:0.5em 0.5em; /*background-color: #e9e9e9; color: #333333;*/color:#fff;border:1px solid #3a755a;; text-decoration: none;">返回</a>
 
            <h1>内阻</h1>
 
            <div  data-role="collapsible"  data-type="horizontal"  class="ui-btn-right"  style=" background-color: none; color: #ffffff; text-decoration: none;" >
                <h1 id="alwaysRight">其他</h1>
                <div class="clear"></div>
                <div style="margin-top:-0.5em; background-color: #e9e9e9;">
                    <h1 class="full-width">
                        <a href="voltageMbargraph.html" target="_top" style="text-decoration:none;">电压</a>
                    </h1>
            
                    <h1 class="full-width">
                        <a href="temperatureMbargraph.html" target="_top" style="text-decoration:none;">温度</a>
                    </h1>
                    <h1 class="full-width">
                        <a href="conductanceMbargraph.html" target="_top" style="text-decoration:none;">电导</a>
                    </h1>
                    <!-- <h1 class="full-width">
                        <a href="conductancepctMbargraph.html" target="_top" style="text-decoration:none;">电导百分比(%)</a>
                    </h1>
                    <h1 class="full-width">
                        <a href="cellconnectorMbargraph.html" target="_top" style="text-decoration:none;">连接条阻抗</a>
                    </h1> -->
                </div>
                 
 
 
            </div>
        </header>
        <div id="bar">
            
        </div>
        
        <div data-role="footer" data-position="fixed" data-theme="g">
         <div data-role="navbar">
      <ul>
        <li><a href="index.html" target="_top" data-role="button" data-icon="home" data-transition="slide" style="color:#ffffff;">首页</a></li>
        <li><a href="internalresistanceM.html" target="_top" data-role="button" data-icon="grid" data-transition="slide" style="color:#ffffff;">列表图</a></li>
      </ul>
    </div>
    </div>
       
    </div>
    <script type="text/javascript" src="mobilJs/echarts.js"></script>
    <script type="text/javascript">
    var  mon_vol = new Array();                //电压
    var  mon_tmp = new Array();                //温度
    var  mon_res = new Array();                //内阻
    var  mon_ser = new Array();                //电导
    var  mon_conn_res = new Array();        //连接条
    var  mon_ser_percent = new Array();        //电导百分比
    var  mon_num = new Array();                //电池组序号
    var barCon = document.getElementById('bar');
    var myChart = echarts.init(barCon);
    var  batt;
    
    var inputs=$('input[name="datas"]');
    $(document).ready(function(){
         var temp=getCookie("batt");
         if(temp.length>0){
             batt=eval("("+temp+")");
         }    
              
         findvol();
         reload1();
    });
        
        
    function findvol() {
        $.post("Batt_rtdataAction_serchByCondition","json="+JSON.stringify({BattGroupId:batt.BattGroupId}),function(data){
            var model = eval("("+data.result+")");
               //model = eval("("+model.result+")");
            datas = model.data;
            
            mon_vol = new Array();                //电压
            mon_tmp = new Array();                //温度
            mon_res = new Array();                //内阻
            mon_ser = new Array();                //电导
            mon_conn_res = new Array();            //连接条
            mon_ser_percent = new Array();        //电导百分比
            mon_num =new Array();                //电池组序号
            for(var i=0;i<datas.length;i++){
                mon_vol.push(datas[i].mon_vol.toFixed(3));                //电压
                mon_tmp.push(datas[i].mon_tmp.toFixed(1)) ;                //温度
                mon_res.push(datas[i].mon_res.toFixed(3));                //内阻
                mon_ser.push(datas[i].mon_ser.toFixed(0));                //电导
                mon_conn_res.push(datas[i].mon_vol.toFixed(3));            //连接条
                mon_ser_percent.push((batt.MonSerStd==0?0:(datas[i].mon_ser*100/batt.MonSerStd)).toFixed(1));
                mon_num.push(""+datas[i].mon_num);                //电池组序号
            }
            if(myChart.getOption()==undefined){
                createEcharts(myChart, mon_num, mon_res);
                console.info(myChart.getOption());            
            }else{
                reflushconductEcharts(mon_res);
            }
            //console.info(mon_ser_percent);
            insertdata(mon_vol);
        });
     }              
            
            
            
    function insertdata (mon_vol){
        for(var i=0;i<inputs.length;i++){
            inputs[i].value=mon_vol[i];
        }
        //console.info(inputs);
    }
    
    function reload1(){         
        window.setInterval(findvol,4000);
    }    
    
    function createEcharts(ele,yarr,xarr){
         var ht = $.mobile.getScreenHeight()- 90;
         var wd= $(window).width()-10;
         $('#bar').height(ht).width(wd);
         ele.resize();
        //$('.show').height(document.documentElement.clientHeight - 65 + 'px').width(width);
         createSpecialBar(ele, yarr, xarr);
         
     }
     
    // 当横屏和竖屏切换时更改面板的高度
    $(window).on("orientationchange",function(){
        setTimeout(function() {
            var srnWidth = $(window).width()-5;
            var srnHt = $.mobile.getScreenHeight()-90;
            $('#bar').width(srnWidth).height(srnHt);
            myChart.resize();
            reflushEcharts(myChart.getOption().series[0].data);
        }, 200);
    });
    </script>    
 
</body>
 
</html>