-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhistory_data.html
More file actions
481 lines (465 loc) · 16.4 KB
/
history_data.html
File metadata and controls
481 lines (465 loc) · 16.4 KB
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>历史数据查询 — 管理中心</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" type="text/css" href="lib/bootstrap/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<script src="lib/jquery-1.7.2.min.js" type="text/javascript"></script>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<!--the top nav begin-->
<div class="navbar navbar-default" role="navigation">
<div class="navbar-inner">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">智慧农业物联网</a>
</div>
<ul class="nav navbar-nav pull-right" >
<li id= "fat-menu" class="dropdown">
<a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
<span class="glyphicon glyphicon-user"></span> 用户名
<span class="glyphicon glyphicon-chevron-down"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li role="presentation"><a role="menuitem" tabindex="-1" href="account_info.html">我的账户</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">登出</a></li>
</ul>
</li>
</ul>
</div>
</div>
<!--the top nav end-->
<!--the sidebar nav begin -->
<div class="sidebar-nav">
<a href="index.html" class="nav-header" ><span class="glyphicon glyphicon-home"></span> 管理中心 首页</a>
<a href="#dashboard-menu" class="nav-header collapsed" data-toggle="collapse"><span class="glyphicon glyphicon-dashboard"></span> 设备管理<span class="glyphicon glyphicon-chevron-up"></span></a>
<ul id="dashboard-menu" class="nav nav-list collapse">
<li ><a href="new_device.html">绑定新设备</a></li>
<li ><a href="my_device.html">我的设备</a></li>
<li ><a href="str_device.html">设备组织结构</a></li>
</ul>
<a href="led_manage.html" class="nav-header"><span class="glyphicon glyphicon-hd-video"></span> LED管理</a>
<a href="real_time_data.html" class="nav-header"><span class="glyphicon glyphicon-eye-open"></span> 实时数据</a>
<a href="history_data.html" class="nav-header" ><span class="glyphicon glyphicon-cloud"></span> 历史数据查询</a>
<a href="error.html" class="nav-header"><span class="glyphicon glyphicon-bell"></span> 异常警报<span class="label label-danger">4</span></a>
<a href="#account-menu" class="nav-header collapsed" data-toggle="collapse"><span class="glyphicon glyphicon-user"></span> 账户管理 <span class="glyphicon glyphicon-chevron-up"></span></a>
<ul id="account-menu" class="nav nav-list collapse">
<li ><a href="account_info.html">我的账户</a></li>
<li ><a href="account_permission.html">账户权限</a></li>
<li ><a href="change_password.html">修改密码</a></li>
</ul>
<a href="logout.html" class="nav-header" ><span class="glyphicon glyphicon-log-out"></span> 登出</a>
</div>
<!--the siderbar nav en-->
<div class="content">
<div class="header">
<!--page title begin-->
<h1 class="page-title">历史数据</h1>
</div>
<!--page title end and the main content begin-->
<div class="container">
<!--the toolbar begin -->
<div class="toolbar">
<div class="row">
<div class="col-xs-6">
<div class="quick-add-btn">
<a href="new_device.html" type="button" class="btn btn-danger"><span class="glyphicon glyphicon-new-window"></span> 绑定新设备</a>
</div>
</div>
<div class="col-xs-6">
<form class="form-inline pull-right" id="device-search" role="form">
<div class="form-group">
<input type="text" class="form-control" placeholder="设备名……">
</div>
<button type="submit" class="btn btn-default">筛选</button>
</form>
</div>
</div>
</div>
<!--the toolbar begin and the chart end-->
<div class="row">
<div id="graphic" class="col-xs-12">
<div id="device-title"><span class="glyphicon glyphicon-transfer"></span> 气象站01 <hr></div>
<div id="Temp-chart" class="chart-area"></div>
<div id="Humidity-chart" class="chart-area"></div>
<div id="device-title"><span class="glyphicon glyphicon-transfer"></span> 气象站02 <hr></div>
<div id="Lux-chart" class="chart-area"></div>
<div id="PH-chart" class="chart-area"></div>
<div id="CO2-chart" class="chart-area"></div>
</div><!--/span-->
</div>
</div>
<!--the container end -->
<footer>
<hr>
<p class="pull-right">© 2013 智慧农业物联网</p>
</footer>
</div>
<!--the content end -->
<script>
</script>
<script src="lib/bootstrap/js/bootstrap.js"></script>
<script src="lib/esl/esl.js"></script>
<script type="text/javascript">
require.config({
packages: [
{
name: 'echarts',
location: 'lib/echarts/src',
main: 'echarts'
},
{
name: 'zrender',
location: 'lib/zrender/src',
main: 'zrender'
}
]
});
var Tempoption = {
title : {
text: '温度',
subtext: '数据虚构'
},
tooltip : {
trigger: 'axis'
},
legend: {
data:['环境温度','土壤温度']
},
toolbox: {
show : true,
feature : {
mark : true,
dataZoom : true,
dataView : {readOnly: false},
magicType:['line', 'bar'],
restore : true,
saveAsImage : true
}
},
calculable : true,
dataZoom : {
show : true,
realtime : true,
start : 20,
end : 80
},
xAxis : [
{
type : 'category',
data : function(){
var list = [];
for (var i = 1; i <= 30; i++) {
list.push('2013-10-' + i);
}
return list;
}()
}
],
yAxis : [
{
type : 'value',
name : '摄氏度 /°C',
splitArea : {show : true}
}
],
series : [
{
name:'环境温度',
type:'line',
data:function(){
var list = [];
for (var i = 1; i <= 30; i++) {
list.push(Math.round(Math.random()* 30));
}
return list;
}()
},
{
name:'土壤温度',
type:'line',
data:function(){
var list = [];
for (var i = 1; i <= 30; i++) {
list.push(Math.round(Math.random()* 29));
}
return list;
}()
}
]
};
var Humidityoption = {
title : {
text: '湿度',
subtext: '数据虚构'
},
tooltip : {
trigger: 'axis'
},
legend: {
data:['环境湿度','土壤湿度']
},
toolbox: {
show : true,
feature : {
mark : true,
dataZoom : true,
dataView : {readOnly: false},
magicType:['line', 'bar'],
restore : true,
saveAsImage : true
}
},
calculable : true,
dataZoom : {
show : true,
realtime : true,
start : 20,
end : 80
},
xAxis : [
{
type : 'category',
data : function(){
var list = [];
for (var i = 1; i <= 30; i++) {
list.push('2013-10-' + i);
}
return list;
}()
}
],
yAxis : [
{
type : 'value',
name : '相对湿度 /%RH',
splitArea : {show : true}
}
],
series : [
{
name:'环境湿度',
type:'bar',
data:function(){
var list = [];
for (var i = 1; i <= 30; i++) {
list.push(Math.round(Math.random()* 80));
}
return list;
}()
},
{
name:'土壤湿度',
type:'bar',
data:function(){
var list = [];
for (var i = 1; i <= 30; i++) {
list.push(Math.round(Math.random()* 60));
}
return list;
}()
}
]
};
var Luxoption = {
title : {
text: '光照强度',
subtext: '数据虚构'
},
tooltip : {
trigger: 'axis'
},
toolbox: {
show : true,
feature : {
mark : true,
dataZoom : true,
dataView : {readOnly: false},
magicType:['line', 'bar'],
restore : true,
saveAsImage : true
}
},
calculable : true,
dataZoom : {
show : true,
realtime : true,
start : 20,
end : 80
},
xAxis : [
{
type : 'category',
data : function(){
var list = [];
for (var i = 1; i <= 30; i++) {
list.push('2013-10-' + i);
}
return list;
}()
}
],
yAxis : [
{
type : 'value',
name : '勒克斯 /lx',
splitArea : {show : true}
}
],
series : [
{
name:'光照强度',
type:'line',
data:function(){
var list = [];
for (var i = 1; i <= 30; i++) {
list.push(Math.round(Math.random()* 500));
}
return list;
}()
}
]
};
var PHoption = {
title : {
text: 'pH值',
subtext: '数据虚构'
},
tooltip : {
trigger: 'axis'
},
toolbox: {
show : true,
feature : {
mark : true,
dataZoom : true,
dataView : {readOnly: false},
magicType:['line', 'bar'],
restore : true,
saveAsImage : true
}
},
calculable : true,
dataZoom : {
show : true,
realtime : true,
start : 20,
end : 80
},
xAxis : [
{
type : 'category',
data : function(){
var list = [];
for (var i = 1; i <= 30; i++) {
list.push('2013-10-' + i);
}
return list;
}()
}
],
yAxis : [
{
type : 'value',
splitArea : {show : true}
}
],
series : [
{
name:'pH值',
type:'bar',
data:function(){
var list = [];
for (var i = 1; i <= 30; i++) {
list.push(Math.round(Math.random()* 9));
}
return list;
}()
}
]
};
var CO2option = {
title : {
text: '二氧化碳浓度',
subtext: '数据虚构'
},
tooltip : {
trigger: 'axis'
},
toolbox: {
show : true,
feature : {
mark : true,
dataZoom : true,
dataView : {readOnly: false},
magicType:['line', 'bar'],
restore : true,
saveAsImage : true
}
},
calculable : true,
dataZoom : {
show : true,
realtime : true,
start : 20,
end : 80
},
xAxis : [
{
type : 'category',
data : function(){
var list = [];
for (var i = 1; i <= 30; i++) {
list.push('2013-10-' + i);
}
return list;
}()
}
],
yAxis : [
{
type : 'value',
name : '百万分比浓度 /ppm',
splitArea : {show : true}
}
],
series : [
{
name:'pH值',
type:'line',
data:function(){
var list = [];
for (var i = 1; i <= 30; i++) {
list.push(Math.round(Math.random()* 500));
}
return list;
}()
}
]
};
require(
[
'echarts',
'echarts/chart/line',
'echarts/chart/bar'
],
function(ec) {
var myChart = ec.init(document.getElementById('Temp-chart'));
myChart.setOption(Tempoption);
var myChart = require('echarts').init(document.getElementById('Humidity-chart'));
myChart.setOption(Humidityoption);
var myChart = require('echarts').init(document.getElementById('Lux-chart'));
myChart.setOption(Luxoption);
var myChart = require('echarts').init(document.getElementById('PH-chart'));
myChart.setOption(PHoption);
var myChart = require('echarts').init(document.getElementById('CO2-chart'));
myChart.setOption(CO2option);
}
)
</script>
</body>
</html>