瀏覽代碼

地图页面改造

limeng 3 年之前
父節點
當前提交
949a084d78

+ 1 - 0
mybusiness/src/main/java/com/business/slfh/visualization/event/service/impl/Visualization_Event_Service_Impl.java

@@ -251,6 +251,7 @@ public class Visualization_Event_Service_Impl extends BaseService implements Vis
         map.put("loginName", ShiroUtils.getLoginName());
         map.put("carCounts", carCounts);
         map.put("cameras", cameras);
+        map.put("isSpecialUsr", true);
         return "business/visualization/event_special_usr";
     }
 

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

@@ -1,6 +1,6 @@
 <!DOCTYPE html>
-<!--<html lang="en" xmlns:th="http://www.thymeleaf.org">-->
-<html xmlns:th="http://www.w3.org/1999/xhtml">
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<!--<html xmlns:th="http://www.w3.org/1999/xhtml">-->
 <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -219,6 +219,7 @@
     <div class="fr timing">
         <div class="xl_select fl">
             <div class="se_div clearfix">
+                <input id="flag" type="hidden" th:value="${isSpecialUsr}">
                 <p class="on"><span class="jkd"><a>监控端</a></span><i></i></p>
                 <p class="on"><span class="jkd"><a th:href="@{/business/manager/hikcameracontroller/demo_window_simple_preview_wall}" target="_blank">电视墙</a></span><i></i></p>
             </div>

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

@@ -423,7 +423,23 @@
         });
 
         markName.on("click", function(){
-            window.open("/business/manager/hikcameracontroller/demo_window_simple_preview_wall_special_user?ID="+option.id);
+            let flag = $("#flag", window.parent.document).val();
+            console.log(typeof flag != "undefined" && flag );
+            try{
+                if(typeof flag != "undefined" && flag ){
+                    window.open("/business/manager/hikcameracontroller/demo_window_simple_preview_wall_special_user?ID="+option.id);
+                }else{
+                    $.ajax({
+                        url : 'http://localhost:8899/camera_id='+res.hikIp+","+res.hikPort+","+res.hikUsername+","+res.hikPassword+","+res.hikDeviceport,
+                        error :function () {
+
+                        }
+                    })
+                }
+            }catch (e) {
+
+            }
+
 
 
             //window.open('http://localhost:8899/camera_id='+option.hik_ip+","+option.hik_port+","+option.hik_username+","+option.hik_password+","+option.hik_deviceport)