Procházet zdrojové kódy

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	mybusiness/src/main/resources/templates/business/visualization/event.html
tchao před 2 roky
rodič
revize
200d7d771c
39 změnil soubory, kde provedl 225 přidání a 110 odebrání
  1. 5 5
      leiSP-admin/src/main/resources/application-druid.yml
  2. 7 0
      leiSP-admin/src/main/resources/application.yml
  3. binární
      leiSP-admin/src/main/resources/key.keystore
  4. binární
      leiSP-admin/src/main/resources/static/img/appcode.png
  5. 1 1
      leiSP-admin/src/main/resources/templates/index.html
  6. 3 3
      leiSP-admin/src/main/resources/templates/login.html
  7. 3 3
      leiSP-admin/src/main/resources/templates/login_old.html
  8. 5 0
      mybusiness/src/main/java/com/business/slfh/app/login/service/impl/AppLoginServiceImpl.java
  9. 28 14
      mybusiness/src/main/java/com/business/slfh/tools/hik/ArtemisPostTest.java
  10. 1 1
      mybusiness/src/main/resources/templates/business/bigdata/camera3/demo_window_simple_preview_wall.html
  11. 2 2
      mybusiness/src/main/resources/templates/business/manager/firemanager/historyFire.html
  12. 2 1
      mybusiness/src/main/resources/templates/business/visualization/cl.html
  13. 1 0
      mybusiness/src/main/resources/templates/business/visualization/confirm.html
  14. 1 0
      mybusiness/src/main/resources/templates/business/visualization/confirm1.html
  15. 1 0
      mybusiness/src/main/resources/templates/business/visualization/details.html
  16. 1 0
      mybusiness/src/main/resources/templates/business/visualization/evemt.html
  17. 7 14
      mybusiness/src/main/resources/templates/business/visualization/event.html
  18. 1 0
      mybusiness/src/main/resources/templates/business/visualization/event_special_usr.html
  19. 1 0
      mybusiness/src/main/resources/templates/business/visualization/frame.html
  20. 1 0
      mybusiness/src/main/resources/templates/business/visualization/fwcl.html
  21. 1 0
      mybusiness/src/main/resources/templates/business/visualization/hl.html
  22. 2 1
      mybusiness/src/main/resources/templates/business/visualization/jg.html
  23. 1 0
      mybusiness/src/main/resources/templates/business/visualization/jgfs.html
  24. 1 0
      mybusiness/src/main/resources/templates/business/visualization/lwt.html
  25. 2 1
      mybusiness/src/main/resources/templates/business/visualization/lz.html
  26. 1 0
      mybusiness/src/main/resources/templates/business/visualization/map.html
  27. 37 15
      mybusiness/src/main/resources/templates/business/visualization/measure.html
  28. 3 2
      mybusiness/src/main/resources/templates/business/visualization/measure2.html
  29. 92 43
      mybusiness/src/main/resources/templates/business/visualization/measure_size.html
  30. 2 1
      mybusiness/src/main/resources/templates/business/visualization/ry.html
  31. 1 0
      mybusiness/src/main/resources/templates/business/visualization/sk.html
  32. 1 0
      mybusiness/src/main/resources/templates/business/visualization/sl.html
  33. 1 0
      mybusiness/src/main/resources/templates/business/visualization/srs_player.html
  34. 1 0
      mybusiness/src/main/resources/templates/business/visualization/sxt.html
  35. 2 1
      mybusiness/src/main/resources/templates/business/visualization/sy.html
  36. 1 0
      mybusiness/src/main/resources/templates/business/visualization/wrj.html
  37. 2 1
      mybusiness/src/main/resources/templates/business/visualization/wrjDia.html
  38. 1 0
      mybusiness/src/main/resources/templates/business/visualization/wrjdemo.html
  39. 2 1
      mybusiness/src/main/resources/templates/business/visualization/wrjgj.html

+ 5 - 5
leiSP-admin/src/main/resources/application-druid.yml

@@ -9,14 +9,14 @@ spring:
 #                url: jdbc:mysql://192.168.100.11:53306/senlinfanghuo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
 
 
-#                url: jdbc:mysql://127.0.0.1:53306/senlinfanghuo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-#                username: slfh
-#                password: slfh123456
-
-                url: jdbc:mysql://218.27.1.157:53306/senlinfanghuo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#                url: jdbc:mysql://192.168.100.10:53306/senlinfanghuo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: slfh
                 password: slfh123456
 
+                url: jdbc:mysql://192.168.0.200:3306/senlinfanghuo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#                username: slfh
+#                password: slfh123456
+
 
 #                url: jdbc:mysql://36.97.65.105:53306/senlinfanghuo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
 #                username: sjkj

+ 7 - 0
leiSP-admin/src/main/resources/application.yml

@@ -37,6 +37,13 @@ server:
     max-threads: 800
     # Tomcat启动初始化的线程数,默认值25
     min-spare-threads: 30
+  ssl:
+    protocol: TLS
+    key-store: classpath:key.keystore
+    key-alias: tomcat
+    enabled: true
+    key-store-password: 111112
+    key-store-type: JKS
 
 # 日志配置
 logging:

binární
leiSP-admin/src/main/resources/key.keystore


binární
leiSP-admin/src/main/resources/static/img/appcode.png


+ 1 - 1
leiSP-admin/src/main/resources/templates/index.html

@@ -190,7 +190,7 @@
                 </div>
                 <img class="tit_main" src="img/tit.png">
                 <ul class="nav navbar-top-links navbar-right welcome-message">
-                    <li><a title="插件下载" href="http://218.27.1.157:9090/soft/slfhplug.zip" target="_blank">插件下载</a></li>
+                    <li><a title="插件下载" href="https://218.27.1.157:9090/soft/slfhplug.zip" target="_blank">插件下载</a></li>
                     <li><a title="安卓APP" onclick="showappcode()" onmouseover="$('#appcode').show(100)"
                            onmouseout="$('#appcode').hide(100)">安卓APP</a>
                         <image src="img/appcode.png" id="appcode"

+ 3 - 3
leiSP-admin/src/main/resources/templates/login.html

@@ -78,9 +78,9 @@
                 </a>
             </div>
         </div>
-        <div class="checkbox-custom" th:classappend="${captchaEnabled==false} ? 'm-t'">
-            <input type="checkbox" id="rememberme" name="rememberme"> <label for="rememberme">记住我</label>
-        </div>
+        <!--<div class="checkbox-custom" th:classappend="${captchaEnabled==false} ? 'm-t'">-->
+            <!--<input type="checkbox" id="rememberme" name="rememberme"> <label for="rememberme">记住我</label>-->
+        <!--</div>-->
         <button class="btn btn-success btn-block" id="btnSubmit" data-loading="正在验证登录,请稍后...">登录</button>
     </form>
 </div>

+ 3 - 3
leiSP-admin/src/main/resources/templates/login_old.html

@@ -55,9 +55,9 @@
 							</a>
 						</div>
 					</div>
-                    <div class="checkbox-custom" th:classappend="${captchaEnabled==false} ? 'm-t'">
-				        <input type="checkbox" id="rememberme" name="rememberme"> <label for="rememberme">记住我</label>
-				    </div>
+                    <!--<div class="checkbox-custom" th:classappend="${captchaEnabled==false} ? 'm-t'">-->
+				        <!--<input type="checkbox" id="rememberme" name="rememberme"> <label for="rememberme">记住我</label>-->
+				    <!--</div>-->
                     <button class="btn btn-success btn-block" id="btnSubmit" data-loading="正在验证登录,请稍后...">登录</button>
                 </form>
             </div>

+ 5 - 0
mybusiness/src/main/java/com/business/slfh/app/login/service/impl/AppLoginServiceImpl.java

@@ -77,4 +77,9 @@ public class AppLoginServiceImpl extends AppBaseService implements AppLoginServi
 
         return appDataModel;
     }
+
+    public static void main(String[] args){
+        String pass = new Md5Hash("admin" + "123456" + "123456").toHex();
+        System.out.println(pass);
+    }
 }

+ 28 - 14
mybusiness/src/main/java/com/business/slfh/tools/hik/ArtemisPostTest.java

@@ -21,7 +21,7 @@ public class ArtemisPostTest {
      */
     static {
 //        ArtemisConfig.host = "218.27.1.157:443";// 代理API网关nginx服务器ip端口
-        ArtemisConfig.host = "192.168.100.12:443";
+        ArtemisConfig.host = "192.168.100.12:1443";
         ArtemisConfig.appKey = "21925239";// 秘钥appkey
         ArtemisConfig.appSecret = "8x9Ewm2UVcJqtTGvriEH";//
     }
@@ -244,7 +244,7 @@ public class ArtemisPostTest {
     }
 
 
-    public static String playbackURLs(String cameraId,String begintime,String endtime,String protocol) {
+    public static String playbackURLs(String cameraId, String begintime, String endtime, String protocol) {
         //api/video/v2/cameras/playbackURLs
         final String VechicleDataApi = ARTEMIS_PATH + "/api/video/v2/cameras/playbackURLs";
         Map<String, String> path = new HashMap<String, String>(2) {
@@ -255,8 +255,8 @@ public class ArtemisPostTest {
 
         JSONObject jsonBody = new JSONObject();
         jsonBody.put("cameraIndexCode", cameraId);
-        jsonBody.put("beginTime", begintime+"+08:00");
-        jsonBody.put("endTime", endtime+"+08:00");
+        jsonBody.put("beginTime", begintime + "+08:00");
+        jsonBody.put("endTime", endtime + "+08:00");
 //        jsonBody.put("beginTime", "2021-03-24T00:08:00.000+08:00");
 //        jsonBody.put("endTime", "2021-03-24T00:18:05.000+08:00");
         jsonBody.put("protocol", protocol);
@@ -298,27 +298,41 @@ public class ArtemisPostTest {
 
 //        192514  192515
 
-//        eventSubscriptionByEventTypes(169001001L,"http://192.168.100.10:9090/business/app/hikc/cameraHikByEventFire/");
-//        eventSubscriptionByEventTypes(131588L,"http://192.168.100.10:9090/business/app/hikc/cameraHikByEventRcv/");
-//
-//        eventSubscriptionByEventTypes(169001001L,"http://192.168.100.10:9090/business/app/hikc/test/");
-//        eventSubscriptionByEventTypes(131588L,"http://192.168.100.10:9090/business/app/hikc/test/");
+        eventSubscriptionByEventTypes(221001001L, "https://192.168.100.10:9090/business/app/hikc/cameraHikByEventFire/");
+        eventSubscriptionByEventTypes(192513, "https://192.168.100.10:9090/business/app/hikc/cameraHikByEventFire/");
+        eventSubscriptionByEventTypes(192514, "https://192.168.100.10:9090/business/app/hikc/cameraHikByEventFire/");
+        eventSubscriptionByEventTypes(192515L, "https://192.168.100.10:9090/business/app/hikc/cameraHikByEventFire/");
+        eventSubscriptionByEventTypes(169001001, "https://192.168.100.10:9090/business/app/hikc/cameraHikByEventFire/");
+
 
+        eventSubscriptionByEventTypes(131588L,"https://192.168.100.10:9090/business/app/hikc/cameraHikByEventRcv/");
 
+//
+//
+//
+//
+//        eventSubscriptionByEventTypes(221001001L,"https://192.168.100.10:9090/business/app/hikc/test/");
+//        eventSubscriptionByEventTypes(192513L,"https://192.168.100.10:9090/business/app/hikc/test/");
+//        eventSubscriptionByEventTypes(192514L,"https://192.168.100.10:9090/business/app/hikc/test/");
+//        eventSubscriptionByEventTypes(192515L,"https://192.168.100.10:9090/business/app/hikc/test/");
+//        eventSubscriptionByEventTypes(169001001L,"https://192.168.100.10:9090/business/app/hikc/test/");
+//        eventSubscriptionByEventTypes(131588L,"https://192.168.100.10:9090/business/app/hikc/test/");
+//
+//
 
 //
 //
-// 169001001 131588
+// 169001001 131588     169001001  131588 131588,169001001 131329
 //
 //
 //       eventUnSubscriptionByEventTypes(131588L);
 //
-       //String r = ArtemisPostTest.eventSubscriptionView();
+        String r = ArtemisPostTest.eventSubscriptionView();
 
-//        String r = ArtemisPostTest.eventUnSubscriptionByEventTypes(221001001L);
-//        System.out.println(r);
+//        String r = ArtemisPostTest.eventUnSubscriptionByEventTypes(131329L);
+        System.out.println(r);
 
 
-      ArtemisPostTest.playbackURLs("c56c631d58144fb29658a560c0e7b776","2021-03-24T00:08:00.000","2021-03-24T00:18:00.000","rtsp");
+//      ArtemisPostTest.playbackURLs("c56c631d58144fb29658a560c0e7b776","2021-03-24T00:08:00.000","2021-03-24T00:18:00.000","rtsp");
     }
 }

+ 1 - 1
mybusiness/src/main/resources/templates/business/bigdata/camera3/demo_window_simple_preview_wall.html

@@ -246,7 +246,7 @@
             var secret = setEncrypt("8x9Ewm2UVcJqtTGvriEH");   //综合安防管理平台提供的secret,必填
             var ip = "218.27.1.157";                           //综合安防管理平台IP地址,必填
             var playMode = 0;                                  //初始播放模式:0-预览,1-回放
-            var port = 443;                                    //综合安防管理平台端口,若启用HTTPS协议,默认443
+            var port = 1443;                                    //综合安防管理平台端口,若启用HTTPS协议,默认443
             var snapDir = "D:\\SnapDir";                       //抓图存储路径
             var videoDir = "D:\\VideoDir";                     //紧急录像或录像剪辑存储路径
             var layout = "1x1";                                //playMode指定模式的布局

+ 2 - 2
mybusiness/src/main/resources/templates/business/manager/firemanager/historyFire.html

@@ -88,9 +88,9 @@
             addMarkSuccess(e);
         }
 
-        var host = "http://218.27.1.157:8090";
+        var host = "https://218.27.1.157:8090";
         var map, resultLayer,
-            url = "http://218.27.1.157:8090/iserver/services/map-SiPingLinYe4326/rest/maps/1%E6%9E%97%E5%9C%BA%E5%BD%B1%E5%83%8F";
+            url = "https://218.27.1.157:8090/iserver/services/map-SiPingLinYe4326/rest/maps/1%E6%9E%97%E5%9C%BA%E5%BD%B1%E5%83%8F";
         map = L.map('map', {
             preferCanvas: true,
             crs: L.CRS.EPSG4326,

+ 2 - 1
mybusiness/src/main/resources/templates/business/visualization/cl.html

@@ -5,6 +5,7 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <title>智慧梨树监管平台</title>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <link rel="stylesheet" th:href="@{/visualization/images/zhly_body.css}">
     <link rel="stylesheet" th:href="@{/visualization/images/zhly_page.css}">
 </head>
@@ -116,4 +117,4 @@
 <!--  右侧内容  结束-->
 </body>
 
-</html>
+</html>

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/confirm.html

@@ -14,6 +14,7 @@
         }
         .tzff{padding-top:4px }
     </style>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
 </head>
 
 <body class="hold-transition box box-main">

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/confirm1.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="zh" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <th:block th:include="include :: header('消息通知选择用户')"/>
     <th:block th:include="include :: bootstrap-duallistbox-css"/>
     <style>

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/details.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/evemt.html

@@ -2,6 +2,7 @@
 <!--<html lang="en" xmlns:th="http://www.thymeleaf.org">-->
 <html xmlns:th="http://www.w3.org/1999/xhtml" xmlns:shiro="http://www.w3.org/1999/xhtml">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">

+ 7 - 14
mybusiness/src/main/resources/templates/business/visualization/event.html

@@ -294,7 +294,7 @@
 <!--	导航  结束-->
 <!--二维三维 开始-->
 <div class="wei">
-    <ul class="wei_tab">
+    <ul class="wei_tab" >
         <li class="slide1"></li>
         <li class="slide2"></li>
         <li class="slide2"></li>
@@ -313,7 +313,7 @@
 
 <!--二维三维 结束-->
 <!--事件 左侧导航 开始-->
-<div class="left_nav">
+<div class="left_nav" >
     <label><input type="checkbox" checked name="leftNav" id="slfh" />森林防火</label>
     <label><input type="checkbox"  name="leftNav" id="bch" >病虫害</label>
     <label><input type="checkbox"  name="leftNav" id="lwt" />瞭望台</label>
@@ -332,19 +332,12 @@
 </div>
 <!--事件 左侧导航 结束-->
 <!--森林 左侧导航 开始-->
-<div class="left_nav" id="sl_nav">
-    <label><input type="radio"  name="all_event" value="实验林场" id="smzlc" >实验林场</label>
-    <label><input type="radio"  name="all_event" value="石岭镇林场轮廓" id="slzlc" />石岭子林场</label>
-    <label><input type="radio"  name="all_event" value="二龙湖林场轮廓" id="rlhlc" />二龙湖林场</label>
-    <label><input type="radio"  name="all_event" value="叶赫林场轮廓" id="yhlc" />叶赫林场</label>
-    <label><input type="radio"  name="all_event" value="种子园轮廓" id="zzylc" />林木种子园</label>
-
-<!--
+<div class="left_nav" id="sl_nav" style="display: none;">
+    <label><input type="radio"  name="all_event" value="石岭镇林场轮廓" id="slzlc" />石岭林场</label>
     <label><input type="radio"  name="all_event" value="山门镇(城东乡)轮廓" id="smzlc" >山门镇(城东乡)</label>
--->
-
-
-
+    <label><input type="radio"  name="all_event" value="叶赫林场轮廓" id="yhlc" />叶赫林场</label>
+    <label><input type="radio"  name="all_event" value="二龙湖林场轮廓" id="rlhlc" />二龙湖</label>
+    <label><input type="radio"  name="all_event" value="种子园轮廓" id="zzylc" />种子园</label>
 </div>
 <!--森林 左侧导航 结束-->
 <!--	iframe嵌套 开始-->

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/event_special_usr.html

@@ -2,6 +2,7 @@
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <!--<html xmlns:th="http://www.w3.org/1999/xhtml">-->
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/frame.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/fwcl.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/hl.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">

+ 2 - 1
mybusiness/src/main/resources/templates/business/visualization/jg.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
@@ -131,4 +132,4 @@
         "&DEPT_NAME="+dept+"&STATUS="+status+"&STARTTIME="+$("#starttime").val()+"&ENDTIME="+$("#endtime").val();
     }
 </script>
-</html>
+</html>

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/jgfs.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/lwt.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">

+ 2 - 1
mybusiness/src/main/resources/templates/business/visualization/lz.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
@@ -76,4 +77,4 @@
 </script>
 <!--  右侧内容  结束-->
 </body>
-</html>
+</html>

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/map.html

@@ -1,5 +1,6 @@
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">

+ 37 - 15
mybusiness/src/main/resources/templates/business/visualization/measure.html

@@ -2,8 +2,12 @@
 <!--<html lang="en" xmlns:th="http://www.thymeleaf.org">-->
 <html xmlns:th="http://www.w3.org/1999/xhtml">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="UTF-8">
     <title data-i18n="resources.title_measureDistance"></title>
+
+    <script type="text/javascript" th:src="@{/visualization/superMap/dist/leaflet/include-leaflet.js}"></script>
+    <script type="text/javascript" th:src="@{/util/businessutil.js}"></script>
     <script th:src="@{/visualization/superMap/examples/js/include-web.js}"></script>
     <style>
         .leaflet-bottom{
@@ -18,9 +22,9 @@
 <div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
 <script type="text/javascript" src="../../dist/leaflet/include-leaflet.js"></script>
 <script type="text/javascript">
-    var host = "http://218.27.1.157:8090";
+    var host = "https://218.27.1.157:8090";
     var map, resultLayer,
-        url = "http://218.27.1.157:8090/iserver/services/map-SiPingLinYe4326/rest/maps/1%E6%9E%97%E5%9C%BA%E5%BD%B1%E5%83%8F";
+        url = "https://218.27.1.157:8090/iserver/services/map-SiPingLinYe4326/rest/maps/1%E6%9E%97%E5%9C%BA%E5%BD%B1%E5%83%8F";
     map = L.map('map', {
         preferCanvas: true,
         crs: L.CRS.EPSG4326,
@@ -37,32 +41,50 @@
         map.on("click",addMarkSuccess)
     }
 
+    function GetDistance( lat1,  lng1,  lat2,  lng2){
+        var radLat1 = lat1*Math.PI / 180.0;
+        var radLat2 = lat2*Math.PI / 180.0;
+        var a = radLat1 - radLat2;
+        var  b = lng1*Math.PI / 180.0 - lng2*Math.PI / 180.0;
+        var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a/2),2) +
+            Math.cos(radLat1)*Math.cos(radLat2)*Math.pow(Math.sin(b/2),2)));
+        s = s *6378.137 ;// EARTH_RADIUS;
+        s = Math.round(s * 10000) / 10000;
+        return s;
+    }
+
     function offMark() {
+        console.log(pointsArray)
         if(pointsArray.length > 1){
             var distanceLength = 0;
-            for (var i = 0; i < pointsArray.length -  1; i++) {
+            for (var i = 0; i < pointsArray.length -  2; i++) {
                 var polyLine = L.polyline([ pointsArray[i], pointsArray[i + 1] ], {color: "red"});
                 // resultLayer.addLayer(polyLine);
                 var distanceMeasureParam = new SuperMap.MeasureParameters(polyLine);
-                L.supermap.measureService(url).measureDistance(distanceMeasureParam, function (serviceResult) {
-                    distanceLength += serviceResult.result.distance;
-                    $("#distanceLength").html(distanceLength + distanceLength + resources.msg_m);
-                    // alert(i)
-                    // alert(pointsArray.length)
-                    // if(i === pointsArray.length - 2){//最后一个点上显示总长度
-                    //     alert(distanceLength)
-                    //     var content = resources.text_distance + ":" + distanceLength + resources.msg_m;
-                    //     markerFinal.bindPopup(content).openPopup(markerFinal.getLatLng());
-                    // }
-                });
+
+                distanceLength += GetDistance(pointsArray[i][0],pointsArray[i][1],pointsArray[i+1][0],pointsArray[i+1][1])
+
+                // L.supermap.measureService(url).measureDistance(distanceMeasureParam, function (serviceResult) {
+                //     distanceLength += serviceResult.result.distance;
+                //     console.log("dis==="+distanceLength)
+                //     $("#distanceLength").html(distanceLength + distanceLength + resources.msg_m);
+                //     // alert(i)
+                //     // alert(pointsArray.length)
+                //     // if(i === pointsArray.length - 2){//最后一个点上显示总长度
+                //     //     alert(distanceLength)
+                //     //     var content = resources.text_distance + ":" + distanceLength + resources.msg_m;
+                //     //     markerFinal.bindPopup(content).openPopup(markerFinal.getLatLng());
+                //     // }
+                // });
 
             }
         }
-
+        $("#distanceLength").html(distanceLength);
         pointsArray = new Array();
         map.off("click");
     }
     function addMarkSuccess(e) {
+        console.log([e.latlng.lat,e.latlng.lng])
         pointsArray.push([e.latlng.lat,e.latlng.lng]);
         if(pointsArray.length > 1){
             var polyLine = L.polyline([ pointsArray[pointsArray.length-2],[e.latlng.lat,e.latlng.lng] ], {color: "red"});

+ 3 - 2
mybusiness/src/main/resources/templates/business/visualization/measure2.html

@@ -2,6 +2,7 @@
 <!--<html lang="en" xmlns:th="http://www.thymeleaf.org">-->
 <html xmlns:th="http://www.w3.org/1999/xhtml">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="UTF-8">
     <title data-i18n="resources.title_measureDistance"></title>
     <script th:src="@{/visualization/superMap/examples/js/include-web.js}"></script>
@@ -14,9 +15,9 @@
 <div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
 <script type="text/javascript" src="../../dist/leaflet/include-leaflet.js"></script>
 <script type="text/javascript">
-    var host = "http://218.27.1.157:8090";
+    var host = "https://218.27.1.157:8090";
     var map, resultLayer,
-        url = "http://218.27.1.157:8090/iserver/services/map-SiPingLinYe4326/rest/maps/1%E6%9E%97%E5%9C%BA%E5%BD%B1%E5%83%8F";
+        url = "https://218.27.1.157:8090/iserver/services/map-SiPingLinYe4326/rest/maps/1%E6%9E%97%E5%9C%BA%E5%BD%B1%E5%83%8F";
     map = L.map('map', {
         preferCanvas: true,
         crs: L.CRS.EPSG4326,

+ 92 - 43
mybusiness/src/main/resources/templates/business/visualization/measure_size.html

@@ -2,61 +2,110 @@
 <!--<html lang="en" xmlns:th="http://www.thymeleaf.org">-->
 <html xmlns:th="http://www.w3.org/1999/xhtml">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="UTF-8">
     <title data-i18n="resources.title_measureDistance"></title>
+    <link th:href="@{/visualization/superMap/dist/leaflet/iclient-leaflet.css}" rel="stylesheet">
+
     <script th:src="@{/visualization/superMap/examples/js/include-web.js}"></script>
-    <script type="text/javascript" th:src="@{/dist/ol/include-ol.js}"></script>
     <style>
-        .leaflet-bottom{
+        .leaflet-bottom {
             display: none;
         }
     </style>
 </head>
-<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%; position: absolute;top: 0;">
-<div id="map" style="width: 100%;height:100%"></div>
+<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
+<label id="size"></label>
+<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
+
+
+<script include="leaflet.draw" th:src="@{/visualization/superMap/dist/leaflet/include-leaflet.js}"></script>
+
 <script type="text/javascript">
-    var map, interaction, vectorLayer, feature,
-        url = "http://218.27.1.157:8090/iserver/services/map-SiPingLinYe4326/rest/maps/1%E6%9E%97%E5%9C%BA%E5%BD%B1%E5%83%8F";
-    map = new ol.Map({
-        target: 'map',
-        controls: ol.control.defaults({attributionOptions: {collapsed: false}})
-            .extend([new ol.supermap.control.Logo()]),
-        view: new ol.View({
-            //center: [43.15, 124.78],
-            center: [43.10, 124.60],
-            zoom: 10.5,
-            projection: 'EPSG:4326',
-            multiWorld: true
-        })
-    });
-    var layer = new ol.layer.Tile({
-        source: new ol.source.TileSuperMapRest({
-            url: url
-        }),
-        projection: 'EPSG:4326'
+    var host = "https://218.27.1.154:8090";
+    var map, resultLayer,
+        url = "https://218.27.1.154:8090/iserver/services/map-SiPingLinYe4326/rest/maps/1%E6%9E%97%E5%9C%BA%E5%BD%B1%E5%83%8F";
+    map = L.map('map', {
+        crs: L.CRS.EPSG4326,
+        center: [43.10, 124.60],
+        maxZoom: 15,
+        zoom: 10.5
     });
-    map.addLayer(layer);
-    var source = new ol.source.Vector({wrapX: false});
-    vectorLayer = new ol.layer.Vector({
-        source: source
-    });
-    map.addLayer(vectorLayer);
-    interaction = new ol.interaction.Draw({
-        source: source,
-        type: "Polygon",
-    });
-    interaction.on('drawstart', function (evt) {
-        feature = evt.feature;
-    });
-    interaction.on('drawend', function () {
-        var areaMeasureParam = new SuperMap.MeasureParameters(feature.getGeometry());
-        new ol.supermap.MeasureService(url).measureArea(areaMeasureParam, function (serviceResult) {
-            //widgets.alert.showAlert(serviceResult.result.area + resources.msg_sqm, true);
-            alert("面积:" + serviceResult.result.area + resources.msg_sqm);
-        });
+    L.supermap.tiledMapLayer(url).addTo(map);
+    resultLayer = L.featureGroup().addTo(map);
+
+    var options = {
+        position: 'topleft',
+        draw: {
+            polyline: {},
+            polygon: {},
+            circle: {},
+            rectangle: {},
+            marker: {},
+            remove: {}
+        }
+    };
+
+    var pointsArray = new Array();
+
+    var drawControl = new L.Control.Draw(options);
+    map.addControl(drawControl);
+    map.on(L.Draw.Event.CREATED, function (e) {
+        var type = e.layerType,
+            layer = e.layer;
+        switch (type) {
+            case 'rectangle':
+            case 'polygon':
+                measureArea(layer._latlngs);
+
+                break;
+        }
+
     });
 
-    map.addInteraction(interaction);
+    function measureArea(arr) {
+        console.log("arr==",arr)
+        var polygon = L.polygon([arr]).addTo(map);
+        console.log("polygon=",polygon)
+        var geometry = L.Util.transform(polygon, L.CRS.EPSG4326, L.CRS.EPSG3857);
+        var size = computeSignedArea(arr[0])
+        console.log(size)
+        $("#size").html("面积:"+size)
+        // var areaMeasureParam = new L.supermap.MeasureParameters(polygon);
+        // new L.supermap
+        //     .MeasureService(url)
+        //     .measureArea(areaMeasureParam, function (serviceResult) {
+        //         var content = resources.text_area + serviceResult.result.area + resources.msg_sqm;
+        //         polygon.bindPopup(content).openPopup(polygon.getCenter());
+        //     });
+    }
+
+
+    function computeSignedArea(path) {
+        var radius = 6371009
+        var len = path.length;
+        if (len < 3) return 0;
+        var total = 0;
+        var prev = path[len - 1];
+        var prevTanLat = Math.tan(((Math.PI / 2 - prev.lat / 180 * Math.PI) / 2));
+        var prevLng = (prev.lng) / 180 * Math.PI;
+        for (var i in path) {
+            var tanLat = Math.tan((Math.PI / 2 -
+                (path[i].lat) / 180 * Math.PI) / 2);
+            var lng = (path[i].lng) / 180 * Math.PI;
+            total += polarTriangleArea(tanLat, lng, prevTanLat, prevLng);
+            prevTanLat = tanLat;
+            prevLng = lng;
+        }
+        return Math.abs(total * (radius * radius));
+    }
+
+    function polarTriangleArea(tan1, lng1, tan2, lng2) {
+        var deltaLng = lng1 - lng2;
+        var t = tan1 * tan2;
+        return 2 * Math.atan2(t * Math.sin(deltaLng), 1 + t * Math.cos(deltaLng));
+    }
+
 
 </script>
 </body>

+ 2 - 1
mybusiness/src/main/resources/templates/business/visualization/ry.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
@@ -65,7 +66,7 @@
     <ul class="zhly_list3">
         <li th:each="user : ${visualization_users}" >
             <div class="list_xl clearfix">
-                <a class="list_img fl"><img th:src="${user.AVATAR}" th:onclick="draw_trajectoryLine([[${user.USER_ID}]],[[${user.USER_NAME}]],[[${user.PHONENUMBER}]])"/></a>
+                <a class="list_img fl"><img onerror="this.src='http://218.27.1.157:9090/soft/hww.jpg';"  th:src="${user.AVATAR}" th:onclick="draw_trajectoryLine([[${user.USER_ID}]],[[${user.USER_NAME}]],[[${user.PHONENUMBER}]])"/></a>
                 <div class="list_txt fl">
                     <p><b>登录名:</b><i>[[${user.LOGIN_NAME}]]</i></p>
                     <p><b>用户名称:</b><i>[[${user.USER_NAME}]]</i></p>

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/sk.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/sl.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/srs_player.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <title>林火直播</title>
     <meta charset="utf-8">
     <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/sxt.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">

+ 2 - 1
mybusiness/src/main/resources/templates/business/visualization/sy.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
@@ -152,4 +153,4 @@
 <!--  右侧内容  结束-->
 </body>
 
-</html>
+</html>

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/wrj.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">

+ 2 - 1
mybusiness/src/main/resources/templates/business/visualization/wrjDia.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <script src="https://cdn.jsdelivr.net/hls.js/latest/hls.min.js"></script>
 </head>
 <body>
@@ -17,4 +18,4 @@
             video.play();
         });
     }
-</script>
+</script>

+ 1 - 0
mybusiness/src/main/resources/templates/business/visualization/wrjdemo.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="UTF-8">
     <title>摄像头预览</title>
 </head>

+ 2 - 1
mybusiness/src/main/resources/templates/business/visualization/wrjgj.html

@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
+    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
@@ -60,4 +61,4 @@
 </script>
 <!--  右侧内容  结束-->
 </body>
-</html>
+</html>