diff --git a/sec-beidou/src/main/java/com/imdroid/beidou/controller/IndexController.java b/sec-beidou/src/main/java/com/imdroid/beidou/controller/IndexController.java index 2d5646ad..a675da19 100644 --- a/sec-beidou/src/main/java/com/imdroid/beidou/controller/IndexController.java +++ b/sec-beidou/src/main/java/com/imdroid/beidou/controller/IndexController.java @@ -52,6 +52,7 @@ public class IndexController extends BasicController{ statusQueryWrapper.ne("tenantid", tenantId); statusQueryWrapper.isNotNull("latitude"); statusQueryWrapper.isNotNull("longitude"); + statusQueryWrapper.orderByAsc("warning"); deviceList = statusMapper.selectList(statusQueryWrapper); statusQueryWrapper = new QueryWrapper<>(); diff --git a/sec-beidou/src/main/resources/static/images/loc1_orange.png b/sec-beidou/src/main/resources/static/images/loc1_orange.png new file mode 100644 index 00000000..e70a5a15 Binary files /dev/null and b/sec-beidou/src/main/resources/static/images/loc1_orange.png differ diff --git a/sec-beidou/src/main/resources/static/images/loc1_red.png b/sec-beidou/src/main/resources/static/images/loc1_red.png new file mode 100644 index 00000000..a19d0e8d Binary files /dev/null and b/sec-beidou/src/main/resources/static/images/loc1_red.png differ diff --git a/sec-beidou/src/main/resources/static/images/loc_blue.png b/sec-beidou/src/main/resources/static/images/loc_blue.png deleted file mode 100644 index 791c8bf3..00000000 Binary files a/sec-beidou/src/main/resources/static/images/loc_blue.png and /dev/null differ diff --git a/sec-beidou/src/main/resources/static/images/loc_green.png b/sec-beidou/src/main/resources/static/images/loc_green.png index b61acf20..b79b8fdd 100644 Binary files a/sec-beidou/src/main/resources/static/images/loc_green.png and b/sec-beidou/src/main/resources/static/images/loc_green.png differ diff --git a/sec-beidou/src/main/resources/static/images/loc_orange.png b/sec-beidou/src/main/resources/static/images/loc_orange.png new file mode 100644 index 00000000..edd06583 Binary files /dev/null and b/sec-beidou/src/main/resources/static/images/loc_orange.png differ diff --git a/sec-beidou/src/main/resources/static/images/loc_red.png b/sec-beidou/src/main/resources/static/images/loc_red.png index 750c6b4c..3cbd3679 100644 Binary files a/sec-beidou/src/main/resources/static/images/loc_red.png and b/sec-beidou/src/main/resources/static/images/loc_red.png differ diff --git a/sec-beidou/src/main/resources/templates/page/device_overview.html b/sec-beidou/src/main/resources/templates/page/device_overview.html index 9b36344c..a9c42f05 100644 --- a/sec-beidou/src/main/resources/templates/page/device_overview.html +++ b/sec-beidou/src/main/resources/templates/page/device_overview.html @@ -90,11 +90,16 @@ [# th:each="device : ${deviceList}"] {deviceid:[[${device.deviceid}]], latitude:[[${device.latitude}]], - longitude:[[${device.longitude}]]}, + longitude:[[${device.longitude}]], + warning:[[${device.warning}]]}, [/] ]; + let batch_id = 0; + var convertor = new BMapGL.Convertor(); + var loc_green = new BMapGL.Icon("../images/loc1_green.png", new BMapGL.Size(18, 24)); var loc_red = new BMapGL.Icon("../images/loc1_red.png", new BMapGL.Size(18, 24)); + var loc_orange = new BMapGL.Icon("../images/loc1_orange.png", new BMapGL.Size(18, 24)); //console.log(deviceList); for(var i=0; i { + timer(); + }, 500); } } - let batch_id = 0; - var convertor = new BMapGL.Convertor(); - //每秒转换10个坐标,否则会受百度并发限制 function timer() { var pointArr = []; @@ -136,16 +167,9 @@ convertor.translate(pointArr, 1, 5, translateCallback); - batch_id+=10; - // 函数内定时器的回调函数会继续调用 timer() - if(batch_id { - timer(); - }, 500); - } } // 启动函数 - timer() + timer(); }