deviceInfo.html
11.2 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../../css/frame.css" rel="stylesheet" />
<link href="../../scripts/easyui/themes/default/easyui.css" rel="stylesheet" />
<link href="../../scripts/easyui/themes/icon.css" rel="stylesheet" />
<style type="text/css">
.tdTitle {
width: 120px;
}
.basicTable {
background-color: rgb(220, 223, 226);
margin-top: 10px;
margin-right: 10px;
margin-bottom: 10px;
margin-left: 10px;
height: 250px;
width: 420px;
float: left;
}
</style>
</head>
<body>
<form id="deviceInfoForm">
<table class="settingsContainer basicTable">
<tr>
<td class="tdTitle">型号:</td>
<td class="tdContent">
<div id="10" name="10"></div>
</td>
</tr>
<tr>
<td class="tdTitle">分辨率:</td>
<td class="tdContent">
<div id="0" name="0"></div>
</td>
</tr>
<!-- <tr> -->
<!-- <td class="tdTitle">硬件版本:</td> -->
<!-- <td class="tdContent"> -->
<!-- <div id="1" name="1"></div> -->
<!-- </td> -->
<!-- </tr> -->
<tr>
<td class="tdTitle">Fpga版本:</td>
<td class="tdContent">
<div id="2" name="2"></div>
</td>
</tr>
<tr>
<td class="tdTitle">系统版本:</td>
<td class="tdContent">
<div id="3" name="3"></div>
</td>
</tr>
<tr>
<td class="tdTitle">BSP版本:</td>
<td class="tdContent">
<div id="4" name="4"></div>
</td>
</tr>
<tr>
<td class="tdTitle">软件版本:</td>
<td class="tdContent">
<div id="5" name="5"></div>
</td>
</tr>
<tr>
<td class="tdTitle">算法版本:</td>
<td class="tdContent">
<div id="6" name="6"></div>
</td>
</tr>
<tr>
<td class="tdTitle">单片机版本:</td>
<td class="tdContent">
<div id="scmVersion" name="scmVersion"></div>
</td>
</tr>
</table>
<table class="settingsContainer basicTable" style="height:100px; clear: both; ">
<tr>
<td class="tdTitle">设备ID:</td>
<td class="tdContent">
<div id="7" name="7"></div>
</td>
</tr>
<tr>
<td class="tdTitle">授权状态:</td>
<td class="tdContent">
<div id="8" name="8"></div>
</td>
</tr>
<tr>
<td class="tdTitle">授权信息:</td>
<td class="tdContent">
<div id="9" name="9"></div>
</td>
</tr>
</table>
<table class="settingsContainer basicTable" style="display: block; clear: both; position: absolute; left: 440px;">
<tr>
<td class="tdTitle">经度:</td>
<td class="tdContent">
<div id="Longitude" name="Longitude"></div>
</td>
</tr>
<tr>
<td class="tdTitle">纬度:</td>
<td class="tdContent">
<div id="Latitude" name="Latitude"></div>
</td>
</tr>
<tr>
<td class="tdTitle">方向:</td>
<td class="tdContent">
<div id="Direction" name="Direction"></div>
</td>
</tr>
<tr>
<td class="tdTitle">速度:</td>
<td class="tdContent">
<div id="Velocity" name="Velocity"></div>
</td>
</tr>
<tr>
<td class="tdTitle">海拔:</td>
<td class="tdContent">
<div id="Altitude" name="Altitude"></div>
</td>
</tr>
<tr>
<td class="tdTitle">GPS时钟:</td>
<td class="tdContent">
<div id="GPSTime" name="GPSTime"></div>
</td>
</tr>
<tr>
<td class="tdTitle">搜星强度:</td>
<td class="tdContent">
<div id="GPSSatelliteNumber" name="GPSSatelliteNumber"></div>
</td>
</tr>
<tr>
<td class="tdTitle">温度:</td>
<td class="tdContent">
<div id="Temperature" name="Temperature"></div>
</td>
</tr>
</table>
<table class="settingsContainer basicTable" style="display: block; clear: both; position: absolute; left: 440px;top: 270px;height: 100px">
<tr>
<td class="tdTitle">方向:</td>
<td class="tdContent">
<div id="CompassDirection" name="CompassDirection"></div>
</td>
</tr>
<tr>
<td class="tdTitle">俯仰角:</td>
<td class="tdContent">
<div id="PitchAngle" name="PitchAngle"></div>
</td>
</tr>
<tr>
<td class="tdTitle">滚动角:</td>
<td class="tdContent">
<div id="RotationAngle" name="RotationAngle"></div>
</td>
</tr>
</table>
<table class="settingsContainer basicTable" style="display: block; clear: both; height: 190px">
<tr>
<td class="tdTitle">剩余电量:</td>
<td class="tdContent">
<div id="dumpEnergy" name="dumpEnergy"></div>
</td>
</tr>
<tr>
<td class="tdTitle">相机在线时间:</td>
<td class="tdContent">
<div id="onLineTimer" name="onLineTimer"></div>
</td>
</tr>
<tr>
<td class="tdTitle">4G网络信号强度</td>
<td class="tdContent">
<div id="netSignal" name="netSignal"></div>
</td>
</tr>
<tr>
<td class="tdTitle">4GCCID:</td>
<td class="tdContent">
<div id="gccid" name="gccid"></div>
</td>
</tr>
<tr>
<td class="tdTitle">电流:</td>
<td class="tdContent">
<div id="currentEnergy" name="currentEnergy"></div>
</td>
</tr>
</table>
<div style="display: block; clear: both; height: 150px;margin: 10px;color: rgb(95, 134, 241);">
<p style="margin-bottom: 5px;">报警信息展示:</p>
<div>电池剩余电量状态报警:电量过低(低于30%)</div>
<div>电池最大电量异常报警:电池寿命异常(电池峰值电量下降到初始峰值电量的50%以下)</div>
<div>电池温度异常报警:温度过高(高于100°c);温度过低(低于-20°c)</div>
<div>加热模块异常报警:无法加热</div>
<div>相机与数据接收服务时间异常报警:相机与服务时间不同步</div>
<div>相机与服务网络连接状态报警:相机未连接到数据接收服务器</div>
</div>
</form>
<script src="../../scripts/easyui/jquery.min.js"></script>
<script src="../../scripts/easyui/jquery.easyui.min.js"></script>
<script src="../../scripts/easyui/locale/easyui-lang-zh_CN.js"></script>
<script src="../../scripts/utilities.js"></script>
<script src="../../scripts/console-polyfill/index.js"></script>
<script type="text/javascript">
var parameterAdaptor = new ParameterAdaptor();
var interval;
$().ready(function () {
loadDeviceInfo();
interval = setInterval(queryGpsSensorData, 10000);
});
function PreProcessJsonMsg(PreProcessMsg) {
var Msg1 = PreProcessMsg.replace("\\\"", "\"");
var Msg2 = Msg1.replace("\\n", "");
return Msg2;
}
function queryGpsSensorData() {
var url = '../../do/trafficController/getExtraData?type=gps_sensor';
// url = 'json/gps_sensor.json';
$.get(url, null, function (data) {
//var msg = eval("("+data.feedback.Msg+")");
var msg;
try {
msg = $.parseJSON(data.feedback.Msg.replace("\\n", ""));
} catch (error) {
console.error("从" + url + "获取到的gps传感器数据非合法的Json格式! 数据:" + data.feedback.Msg);
}
// 数据不空,后面不再执行
if (!msg) {
return;
}
var allInfo = msg.gps_sensor;
$.each(allInfo, function (i, info) {
if (info.Type == "NineAxisSensor") {
$.each(info.Content, function (key, value) {
if (key == "Magnetic") {
var html = "";
$.each(value, function (childKey, childValue) {
html += "," + childValue;
});
$("div[name='CompassDirection']").html(html.substring(1));
return true;
}
$.each(value, function (childKey, childValue) {
$("div[name='" + childKey + "']").html(childValue);
});
});
return true;
}
//赋值
$.each(info.Content, function (key, value) {
$("div[name='" + key + "']").html(value);
})
});
}, "json");
}
window.onbeforeunload = function () {
window.clearInterval(interval);
};
function loadDeviceInfo() {
var RefererInfo = "deviceInfo";
parameterAdaptor.getParameters(RefererInfo, bindDeviceInfo);
}
//绑定数据
function bindDeviceInfo(data) {
//处理一下授权信息
data.feedback["9"] = data.feedback["9"].replace(/\\r\\n/g, "<br/>");
for (var key in data.feedback) {
$("#" + key).html(data.feedback[key]);
}
}
</script>
</body>
</html>