deason 7 anos atrás
pai
commit
73030e015b
2 arquivos alterados com 48 adições e 60 exclusões
  1. 18 27
      pom.xml
  2. 30 33
      src/main/resources/templates/deviceRecord/list.ftl

+ 18 - 27
pom.xml

@@ -41,24 +41,6 @@
     </pluginRepositories>
 
     <dependencies>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-freemarker</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-data-jpa</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-test</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-            <version>5.1.46</version>
-        </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
@@ -116,17 +98,27 @@
                 </exclusion>
             </exclusions>
         </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>5.1.46</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-freemarker</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-                <includes>
-                    <include>**/*</include>
-                </includes>
-            </resource>
-        </resources>
         <plugins>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
@@ -134,5 +126,4 @@
             </plugin>
         </plugins>
     </build>
-
 </project>

+ 30 - 33
src/main/resources/templates/deviceRecord/list.ftl

@@ -7,9 +7,18 @@
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
     <link href="${base}/styles/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
+    <style type="text/css">
+        input {
+            margin-bottom: 10px;
+        }
+
+        span {
+            margin-right: 20px;
+        }
+    </style>
 </head>
 <body>
-<h3>设备访问记录</h3>
+<h3 style="margin-left: 10px">设备访问记录</h3>
 <div class="panel panel-default" style="margin: 10px;padding: 10px">
     <div class="btn-group">
         <input type="text" class="form-control" id="url" placeholder="访问地址"/>
@@ -53,24 +62,11 @@
     <div class="btn-group">
         <a href="#" class="btn btn-info" onclick="doSearch()"> 搜索</a>
     </div>
-    <table id="contentTable" class="table" style="margin-top: 10px">
+    <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>
+            <th style="width: 150px">操作时间</th>
+            <th>操作内容</th>
         </tr>
         </thead>
         <tbody id="contentDiv"></tbody>
@@ -107,7 +103,7 @@
         params.loginKey = $('#loginKey').val();
         params.loginToken = $('#loginToken').val();
         $.ajax({
-            url: '${base}/device/record/list?pageSize=10&pageNo=' + curPageNo,
+            url: '${base}/device/record/list?pageSize=5&pageNo=' + curPageNo,
             contentType: "application/json; charset=UTF-8",
             dataType: "json",
             type: "POST",
@@ -120,21 +116,22 @@
                         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('<td curId=' + obj.id + '>' + checkNull(obj.createDate) + '</td>');
+                            html.push('<td>');
+                            html.push('<span> <b>访问地址:</b>' + checkNull(obj.url) + '</span></br>');
+                            html.push('<span> <b>KEY:</b>' + checkNull(obj.loginKey) + '</span>');
+                            html.push('<span> <b>TOKEN:</b>' + checkNull(obj.loginToken) + '</span>');
+                            html.push('<span> <b>来源账号:</b>' + checkNull(obj.account) + '</span></br>');
+                            html.push('<span> <b>系统标识:</b>' + checkNull(obj.system) + '</span>');
+                            html.push('<span> <b>设备编号:</b>' + checkNull(obj.deviceId) + '</span>');
+                            html.push('<span> <b>网络类型:</b>' + checkNull(obj.netType) + '</span>');
+                            html.push('<span> <b>设备品牌:</b>' + checkNull(obj.brand) + '</span>');
+                            html.push('<span> <b>型号:</b>' + checkNull(obj.model) + '</span></br>');
+                            html.push('<span> <b>系统版本号:</b>' + checkNull(obj.sysVersion) + '</span>');
+                            html.push('<span> <b>APP版本号:</b>' + checkNull(obj.appVersion) + '</span>');
+                            html.push('<span> <b>APP更新号:</b>' + checkNull(obj.appCode) + '</span>');
+                            html.push('<span> <b>APP补丁号:</b>' + checkNull(obj.patchCode) + '</span>');
+                            html.push('</td>');
                             html.push('</tr>');
                         }
                         $("#contentDiv").html(html.join(''));