|
@@ -9,38 +9,124 @@
|
|
<link href="${base}/styles/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
|
|
<link href="${base}/styles/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
-<div id="contentDiv">loading...</div>
|
|
|
|
|
|
+<h3>设备访问记录</h3>
|
|
|
|
+<div class="panel panel-default" style="margin: 10px;padding: 10px">
|
|
|
|
+ <div class="btn-group">
|
|
|
|
+ <input type="text" class="form-control" id="url" placeholder="访问地址"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="btn-group">
|
|
|
|
+ <input type="text" class="form-control" id="system" placeholder="系统标识"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="btn-group">
|
|
|
|
+ <input type="text" class="form-control" id="account" placeholder="来源账号"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="btn-group">
|
|
|
|
+ <input type="text" class="form-control" id="loginKey" placeholder="KEY"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="btn-group">
|
|
|
|
+ <input type="text" class="form-control" id="loginToken" placeholder="TOKEN"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="btn-group">
|
|
|
|
+ <a href="#" class="btn btn-info" onclick="doSearch()"> 搜索</a>
|
|
|
|
+ </div>
|
|
|
|
+ <table id="contentTable" class="table">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <th>ID</th>
|
|
|
|
+ <th>访问地址</th>
|
|
|
|
+ <th>系统标识</th>
|
|
|
|
+ <th>设备编号</th>
|
|
|
|
+ <th>网络类型</th>
|
|
|
|
+ <th>设备品牌</th>
|
|
|
|
+ <th>型号</th>
|
|
|
|
+ <th>系统版本号</th>
|
|
|
|
+ <th>APP版本号</th>
|
|
|
|
+ <th>APP更新号</th>
|
|
|
|
+ <th>APP补丁号</th>
|
|
|
|
+ <th>来源账号</th>
|
|
|
|
+ <th>KEY</th>
|
|
|
|
+ <th>TOKEN</th>
|
|
|
|
+ <th>操作时间</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody id="contentDiv"></tbody>
|
|
|
|
+ </table>
|
|
|
|
+ <ul id="contentPager" class="pagination"></ul>
|
|
|
|
+</div>
|
|
<script src="${base}/styles/jquery/jquery-1.9.1.min.js"></script>
|
|
<script src="${base}/styles/jquery/jquery-1.9.1.min.js"></script>
|
|
|
|
+<script src="${base}/page.js"></script>
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
|
|
|
|
$(function () {
|
|
$(function () {
|
|
- loadData();
|
|
|
|
|
|
+ loadData(1, true);
|
|
});
|
|
});
|
|
|
|
|
|
- function loadData() {
|
|
|
|
|
|
+ function doSearch() {
|
|
|
|
+ $("#contentPager").empty();
|
|
|
|
+ loadData(1, true);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function loadData(curPageNo, needCreatePage) {
|
|
|
|
+ $("#contentDiv").empty();
|
|
var params = {};
|
|
var params = {};
|
|
- var pageNo = 1;
|
|
|
|
- var pageSize = 5;
|
|
|
|
|
|
+ params.url = $('#url').val();
|
|
|
|
+ params.system = $('#system').val();
|
|
|
|
+ params.account = $('#account').val();
|
|
|
|
+ params.loginKey = $('#loginKey').val();
|
|
|
|
+ params.loginToken = $('#loginToken').val();
|
|
$.ajax({
|
|
$.ajax({
|
|
- url: '${base}/device/record/list?pageNo=' + pageNo + '&pageSize=' + pageSize,
|
|
|
|
|
|
+ url: '${base}/device/record/list?pageSize=5&pageNo=' + curPageNo,
|
|
contentType: "application/json; charset=UTF-8",
|
|
contentType: "application/json; charset=UTF-8",
|
|
dataType: "json",
|
|
dataType: "json",
|
|
type: "POST",
|
|
type: "POST",
|
|
data: JSON.stringify(params),
|
|
data: JSON.stringify(params),
|
|
success: function (response) {
|
|
success: function (response) {
|
|
if (response && response.success) {
|
|
if (response && response.success) {
|
|
- var html = [];
|
|
|
|
var list = response.data.content;
|
|
var list = response.data.content;
|
|
- for (var n = 0; n < list.length; n++) {
|
|
|
|
- var obj = list[n];
|
|
|
|
- html.push('<p>' + JSON.stringify(obj) + '</p>');
|
|
|
|
|
|
+ if (list && list.length > 0) {
|
|
|
|
+ var html = [];
|
|
|
|
+ for (var n = 0; n < list.length; n++) {
|
|
|
|
+ var obj = list[n];
|
|
|
|
+ html.push('<tr>');
|
|
|
|
+ html.push('<td>' + obj.id + '</td>');
|
|
|
|
+ html.push('<td>' + checkNull(obj.url) + '</td>');
|
|
|
|
+ html.push('<td>' + checkNull(obj.system) + '</td>');
|
|
|
|
+ html.push('<td>' + checkNull(obj.deviceId) + '</td>');
|
|
|
|
+ html.push('<td>' + checkNull(obj.netType) + '</td>');
|
|
|
|
+ html.push('<td>' + checkNull(obj.brand) + '</td>');
|
|
|
|
+ html.push('<td>' + checkNull(obj.model) + '</td>');
|
|
|
|
+ html.push('<td>' + checkNull(obj.sysVersion) + '</td>');
|
|
|
|
+ html.push('<td>' + checkNull(obj.appVersion) + '</td>');
|
|
|
|
+ html.push('<td>' + checkNull(obj.appCode) + '</td>');
|
|
|
|
+ html.push('<td>' + checkNull(obj.patchCode) + '</td>');
|
|
|
|
+ html.push('<td>' + checkNull(obj.account) + '</td>');
|
|
|
|
+ html.push('<td>' + checkNull(obj.loginKey) + '</td>');
|
|
|
|
+ html.push('<td>' + checkNull(obj.loginToken) + '</td>');
|
|
|
|
+ html.push('<td>' + checkNull(obj.createDate) + '</td>');
|
|
|
|
+ html.push('</tr>');
|
|
|
|
+ }
|
|
|
|
+ $("#contentDiv").html(html.join(''));
|
|
|
|
+ if (needCreatePage) {
|
|
|
|
+ $("#contentPager").createPage({
|
|
|
|
+ pageCount: response.data.totalPages,
|
|
|
|
+ current: curPageNo,
|
|
|
|
+ backFn: function (current) {
|
|
|
|
+ loadData(current, false);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- $("#contentDiv").html(html.join(''));
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function checkNull(str) {
|
|
|
|
+ if (!str || str == null) {
|
|
|
|
+ return "无";
|
|
|
|
+ }
|
|
|
|
+ return str;
|
|
|
|
+ }
|
|
</script>
|
|
</script>
|
|
</body>
|
|
</body>
|
|
</html>
|
|
</html>
|