Administrator 2 anos atrás
pai
commit
6a098b9c85
36 arquivos alterados com 1121 adições e 1102 exclusões
  1. 365 565
      .idea/workspace.xml
  2. 5 2
      leiSP-admin/src/main/resources/application-druid.yml
  3. 1 1
      leiSP-admin/src/main/resources/application.yml
  4. BIN
      leiSP-admin/src/main/resources/static/img/hnlyapp.png
  5. 1 1
      leiSP-admin/src/main/resources/templates/index.html
  6. 169 144
      leiSP-admin/src/main/resources/templates/system/role/add.html
  7. 191 152
      leiSP-admin/src/main/resources/templates/system/role/edit.html
  8. 2 0
      leiSP-framework/src/main/java/com/sooka/framework/config/ShiroConfig.java
  9. 12 1
      leiSP-system/src/main/java/com/sooka/system/domain/SysRole.java
  10. 7 3
      leiSP-system/src/main/resources/mapper/system/SysRoleMapper.xml
  11. 8 3
      mybusiness/src/main/java/com/business/slfh/app/event/service/impl/AppEventProcessServiceImpl.java
  12. 20 1
      mybusiness/src/main/java/com/business/slfh/app/event/service/impl/AppEventServiceImpl.java
  13. 2 0
      mybusiness/src/main/java/com/business/slfh/dahua/service/impl/DaHuaMessageServiceImpl.java
  14. 4 3
      mybusiness/src/main/java/com/business/slfh/dahua/util/DahuaUtil.java
  15. 3 8
      mybusiness/src/main/java/com/business/slfh/manager/cameramanager/controller/HikCameraController.java
  16. 1 1
      mybusiness/src/main/java/com/business/slfh/tools/DownLoad.java
  17. 4 2
      mybusiness/src/main/java/com/business/slfh/tools/WebSocketConfig.java
  18. 2 2
      mybusiness/src/main/java/com/business/slfh/tools/controller/WebSocketServer.java
  19. 24 5
      mybusiness/src/main/java/com/business/slfh/visualization/event/controller/Visualization_Event_Controller.java
  20. 3 2
      mybusiness/src/main/java/com/business/slfh/visualization/event/mapper/Visualization_Event_Mapper.java
  21. 1 1
      mybusiness/src/main/java/com/business/slfh/visualization/event/service/Visualization_Event_Service.java
  22. 6 2
      mybusiness/src/main/java/com/business/slfh/visualization/event/service/impl/Visualization_Event_Service_Impl.java
  23. 42 35
      mybusiness/src/main/resources/mapper/grid/visualization/Visualization_Event_Mapper.xml
  24. 1 1
      mybusiness/src/main/resources/templates/business/manager/cameramanager/index.html
  25. 4 4
      mybusiness/src/main/resources/templates/business/manager/othersmanager/index.html
  26. 6 3
      mybusiness/src/main/resources/templates/business/visualization/details.html
  27. 42 42
      mybusiness/src/main/resources/templates/business/visualization/evemt.html
  28. 155 106
      mybusiness/src/main/resources/templates/business/visualization/event.html
  29. 18 0
      mybusiness/src/main/resources/templates/business/visualization/frame.html
  30. 1 1
      mybusiness/src/main/resources/templates/business/visualization/map.html
  31. 1 1
      mybusiness/src/main/resources/templates/business/visualization/ry.html
  32. 1 1
      mybusiness/src/main/resources/templates/business/visualization/sxt.html
  33. 1 1
      mybusiness/src/main/resources/templates/dahua/demo-dsd.html
  34. 1 1
      mybusiness/src/main/resources/templates/dahua/demo-jkd.html
  35. 13 5
      mybusiness/src/main/resources/templates/dahua/lib/on_off_switch.js
  36. 4 2
      mybusiness/src/main/resources/templates/dahua/module/WebVideoCtrl.js

Diferenças do arquivo suprimidas por serem muito extensas
+ 365 - 565
.idea/workspace.xml


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

@@ -7,8 +7,11 @@ spring:
             # 主库数据源
             master:
 
-                url: jdbc:mysql://117.78.49.164:63306/hnly?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-##                url: jdbc:mysql://218.27.1.157:53306/jian?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#                url: jdbc:mysql://117.78.49.164:63306/hnly?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#                url: jdbc:mysql://119.52.253.110:53306/hnly?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://192.168.100.12:53306/hnly?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#
+
 #                username: root
 #                password: sys200888
 #                url: jdbc:mysql://192.168.0.200:3306/jian?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8

+ 1 - 1
leiSP-admin/src/main/resources/application.yml

@@ -25,7 +25,7 @@ leisp:
 # 开发环境配置
 server:
   # 服务器的HTTP端口,默认为80
-  port: 9091
+  port: 9999
   servlet:
     # 应用的访问路径
     context-path: /

BIN
leiSP-admin/src/main/resources/static/img/hnlyapp.png


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

@@ -191,7 +191,7 @@
                 <span class="index-tit">辉南数字乡村高空“鹰眼”综合管理平台</span>
                 <ul class="nav navbar-top-links navbar-right welcome-message">
                     <!--<li><a id="dsq" title="电视墙" onclick="window.open('https://122.141.177.213:9090/dahua/demo-dsd.html?deptId=100')">电视墙</a></li>-->
-                    <li><a title="插件下载" href="http://117.78.49.164:9091/soft/slfhplug.zip" target="_blank">插件下载</a></li>
+                    <li><a title="插件下载" href="http://119.52.253.110:9999/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/hnlyapp.png" id="appcode"

+ 169 - 144
leiSP-admin/src/main/resources/templates/system/role/add.html

@@ -1,151 +1,176 @@
 <!DOCTYPE html>
-<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<html lang="zh" xmlns:th="http://www.thymeleaf.org">
 <head>
-	<th:block th:include="include :: header('新增角色')" />
-	<th:block th:include="include :: ztree-css" />
+    <th:block th:include="include :: header('新增角色')"/>
+    <th:block th:include="include :: ztree-css"/>
 </head>
 <body class="white-bg">
-	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
-		<form class="form-horizontal m" id="form-role-add">
-			<div class="form-group">
-				<label class="col-sm-3 control-label is-required">角色名称:</label>
-				<div class="col-sm-8">
-					<input class="form-control" type="text" name="roleName" id="roleName" required>
-				</div>
-			</div>
-			<div class="form-group">
-				<label class="col-sm-3 control-label is-required">权限字符:</label>
-				<div class="col-sm-8">
-					<input class="form-control" type="text" name="roleKey" id="roleKey" required>
-					<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 控制器中定义的权限字符,如:@RequiresRoles("")</span>
-				</div>
-			</div>
-			<div class="form-group">
-				<label class="col-sm-3 control-label is-required">显示顺序:</label>
-				<div class="col-sm-8">
-					<input class="form-control" type="text" name="roleSort" id="roleSort" required>
-				</div>
-			</div>
-			<div class="form-group">
-				<label class="col-sm-3 control-label">状态:</label>
-				<div class="col-sm-8">
-			        <label class="toggle-switch switch-solid">
-                        <input type="checkbox" id="status" checked>
-                        <span></span>
-                    </label>
-				</div>
-			</div>
-			<div class="form-group">
-				<label class="col-sm-3 control-label">备注:</label>
-				<div class="col-sm-8">
-					<textarea id="remark" name="remark" class="form-control" ></textarea>
+<div class="wrapper wrapper-content animated fadeInRight ibox-content">
+    <form class="form-horizontal m" id="form-role-add">
+        <div class="form-group">
+            <label class="col-sm-3 control-label is-required">角色名称:</label>
+            <div class="col-sm-8">
+                <input class="form-control" type="text" name="roleName" id="roleName" required>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label is-required">权限字符:</label>
+            <div class="col-sm-8">
+                <input class="form-control" type="text" name="roleKey" id="roleKey" required>
+                <span class="help-block m-b-none"><i
+                        class="fa fa-info-circle"></i> 控制器中定义的权限字符,如:@RequiresRoles("")</span>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label is-required">显示顺序:</label>
+            <div class="col-sm-8">
+                <input class="form-control" type="text" name="roleSort" id="roleSort" required>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">状态:</label>
+            <div class="col-sm-8">
+                <label class="toggle-switch switch-solid">
+                    <input type="checkbox" id="status" checked>
+                    <span></span>
+                </label>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">备注:</label>
+            <div class="col-sm-8">
+                <textarea id="remark" name="remark" class="form-control"></textarea>
 
-				</div>
-			</div>
-			<div class="form-group">
-				<label class="col-sm-3 control-label">菜单权限</label>
-				<div class="col-sm-8">
-					<div id="menuTrees" class="ztree"></div>
-				</div>
-			</div>
-		</form>
-	</div>
-	<th:block th:include="include :: footer" />
-	<th:block th:include="include :: ztree-js" />
-	<script type="text/javascript">
-	    $(function() {
-			var url = ctx + "system/menu/roleMenuTreeData";
-			var options = {
-				id: "menuTrees",
-		        url: url,
-		        check: { enable: true },
-		        expandLevel: 0
-		    };
-			$.tree.init(options);
-		});
-		
-		$("#form-role-add").validate({
-			rules:{
-				onkeyup: false,
-				roleName:{
-					remote: {
-		                url: ctx + "system/role/checkRoleNameUnique",
-		                type: "post",
-		                dataType: "json",
-		                data: {
-		                	"roleName" : function() {
-		                		return $.common.trim($("#roleName").val());
-		                    }
-		                },
-		                dataFilter: function(data, type) {
-		                	return $.validate.unique(data);
-		                }
-		            }
-				},
-				roleKey:{
-					remote: {
-		                url: ctx + "system/role/checkRoleKeyUnique",
-		                type: "post",
-		                dataType: "json",
-		                data: {
-		                	"roleKey" : function() {
-		                        return $.common.trim($("#roleKey").val());
-		                    }
-		                },
-		                dataFilter: function(data, type) {
-		                	return $.validate.unique(data);
-		                }
-		            }
-				},
-				roleSort:{
-					digits:true
-				},
-			},
-			messages: {
-		        "roleName": {
-		            remote: "角色名称已经存在"
-		        },
-		        "roleKey": {
-		            remote: "角色权限已经存在"
-		        }
-		    },
-		    focusCleanup: true
-		});
-		
-		function submitHandler() {
-	        if ($.validate.form()) {
-	        	add();
-	        }
-	    }
-	
-		function add() {
-			var roleName = $("input[name='roleName']").val();
-			var roleKey = $("input[name='roleKey']").val();
-			var roleSort = $("input[name='roleSort']").val();
-			var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
-			var remark = $("input[name='remark']").val();
-			var menuIds = $.tree.getCheckedNodes();
-			$.ajax({
-				cache : true,
-				type : "POST",
-				url : ctx + "system/role/add",
-				data : {
-					"roleName": roleName,
-					"roleKey": roleKey,
-					"roleSort": roleSort,
-					"status": status,
-					"remark": remark,
-					"menuIds": menuIds
-				},
-				async : false,
-				error : function(request) {
-					$.modal.alertError("系统错误");
-				},
-				success : function(data) {
-					$.operate.successCallback(data);
-				}
-			});
-		}
-	</script>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">可视化对应:</label>
+            <div class="col-sm-8">
+                森林防火<input th:type="checkbox" th:name="visuSee" th:value="slfh">
+                秸秆禁烧<input th:type="checkbox" th:name="visuSee" th:value="jgjs">
+                防汛防控<input th:type="checkbox" th:name="visuSee" th:value="fxfk">
+                野生动物<input th:type="checkbox" th:name="visuSee" th:value="ysdw">
+                热感云台<input th:type="checkbox" th:name="visuSee" th:value="lwt">
+                扑火队<input th:type="checkbox" th:name="visuSee" th:value="phd">
+                起降点<input th:type="checkbox" th:name="visuSee" th:value="jjd">
+                气象站<input th:type="checkbox" th:name="visuSee" th:value="qxz">
+                防火检查站<input th:type="checkbox" th:name="visuSee" th:value="fhjcz">
+                救援物资<input th:type="checkbox" th:name="visuSee" th:value="jywz">
+                林场<input th:type="checkbox" th:name="visuSee" th:value="lc">
+                水源<input th:type="checkbox" th:name="visuSee" th:value="sy">
+                水渠<input th:type="checkbox" th:name="visuSee" th:value="sq">
+                取水口<input th:type="checkbox" th:name="visuSee" th:value="qsk">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">菜单权限</label>
+            <div class="col-sm-8">
+                <div id="menuTrees" class="ztree"></div>
+            </div>
+        </div>
+    </form>
+</div>
+<th:block th:include="include :: footer"/>
+<th:block th:include="include :: ztree-js"/>
+<script type="text/javascript">
+    $(function () {
+        var url = ctx + "system/menu/roleMenuTreeData";
+        var options = {
+            id: "menuTrees",
+            url: url,
+            check: {enable: true},
+            expandLevel: 0
+        };
+        $.tree.init(options);
+    });
+
+    $("#form-role-add").validate({
+        rules: {
+            onkeyup: false,
+            roleName: {
+                remote: {
+                    url: ctx + "system/role/checkRoleNameUnique",
+                    type: "post",
+                    dataType: "json",
+                    data: {
+                        "roleName": function () {
+                            return $.common.trim($("#roleName").val());
+                        }
+                    },
+                    dataFilter: function (data, type) {
+                        return $.validate.unique(data);
+                    }
+                }
+            },
+            roleKey: {
+                remote: {
+                    url: ctx + "system/role/checkRoleKeyUnique",
+                    type: "post",
+                    dataType: "json",
+                    data: {
+                        "roleKey": function () {
+                            return $.common.trim($("#roleKey").val());
+                        }
+                    },
+                    dataFilter: function (data, type) {
+                        return $.validate.unique(data);
+                    }
+                }
+            },
+            roleSort: {
+                digits: true
+            },
+        },
+        messages: {
+            "roleName": {
+                remote: "角色名称已经存在"
+            },
+            "roleKey": {
+                remote: "角色权限已经存在"
+            }
+        },
+        focusCleanup: true
+    });
+
+    function submitHandler() {
+        if ($.validate.form()) {
+            add();
+        }
+    }
+
+    function add() {
+        var roleName = $("input[name='roleName']").val();
+        var roleKey = $("input[name='roleKey']").val();
+        var roleSort = $("input[name='roleSort']").val();
+        var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
+        var remark = $("input[name='remark']").val();
+        var menuIds = $.tree.getCheckedNodes();
+        var visuSee = "";
+        $("input[name='visuSee']:checked").each(function (index, item) {
+            visuSee += $(item).val() + ',';
+        });
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: ctx + "system/role/add",
+            data: {
+                "roleName": roleName,
+                "roleKey": roleKey,
+                "roleSort": roleSort,
+                "status": status,
+                "remark": remark,
+                "menuIds": menuIds,
+                "visuSee": visuSee
+            },
+            async: false,
+            error: function (request) {
+                $.modal.alertError("系统错误");
+            },
+            success: function (data) {
+                $.operate.successCallback(data);
+            }
+        });
+    }
+</script>
 </body>
 </html>

+ 191 - 152
leiSP-admin/src/main/resources/templates/system/role/edit.html

@@ -1,159 +1,198 @@
 <!DOCTYPE html>
-<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<html lang="zh" xmlns:th="http://www.thymeleaf.org">
 <head>
-	<th:block th:include="include :: header('修改角色')" />
-	<th:block th:include="include :: ztree-css" />
+    <th:block th:include="include :: header('修改角色')"/>
+    <th:block th:include="include :: ztree-css"/>
 </head>
 <body class="white-bg">
-	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
-		<form class="form-horizontal m" id="form-role-edit" th:object="${role}">
-			<input id="roleId" name="roleId" type="hidden" th:field="*{roleId}"/>
-			<div class="form-group">
-				<label class="col-sm-3 control-label is-required">角色名称:</label>
-				<div class="col-sm-8">
-					<input class="form-control" type="text" name="roleName" id="roleName" th:field="*{roleName}" required>
-				</div>
-			</div>
-			<div class="form-group">
-				<label class="col-sm-3 control-label is-required">权限字符:</label>
-				<div class="col-sm-8">
-					<input class="form-control" type="text" name="roleKey" id="roleKey" th:field="*{roleKey}" required>
-					<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 控制器中定义的权限字符,如:@RequiresRoles("")</span>
-				</div>
-			</div>
-			<div class="form-group">
-				<label class="col-sm-3 control-label is-required">显示顺序:</label>
-				<div class="col-sm-8">
-					<input class="form-control" type="text" name="roleSort" id="roleSort" th:field="*{roleSort}" required>
-				</div>
-			</div>
-			<div class="form-group">
-				<label class="col-sm-3 control-label">状态:</label>
-				<div class="col-sm-8">
-					<label class="toggle-switch switch-solid">
-                        <input type="checkbox" id="status" th:checked="${role.status == '0' ? true : false}">
-                        <span></span>
-                    </label>
-				</div>
-			</div>
-			<div class="form-group">
-				<label class="col-sm-3 control-label">备注:</label>
-				<div class="col-sm-8">
-					<textarea id="remark" name="remark" class="form-control"  th:field="*{remark}"></textarea>
-				</div>
-			</div>
-			<div class="form-group">
-				<label class="col-sm-3 control-label">菜单权限</label>
-				<div class="col-sm-8">
-					<div id="menuTrees" class="ztree"></div>
-				</div>
-			</div>
-		</form>
-	</div>
-	<th:block th:include="include :: footer" />
-	<th:block th:include="include :: ztree-js" />
-	<script type="text/javascript">
-	     $(function() {
-			var url = ctx + "system/menu/roleMenuTreeData?roleId=" + $("#roleId").val();
-			var options = {
-				id: "menuTrees",
-		        url: url,
-		        check: { enable: true },
-		        expandLevel: 0
-		    };
-			$.tree.init(options);
-		});
-	
-		$("#form-role-edit").validate({
-			onkeyup: false,
-			rules:{
-				roleName:{
-					remote: {
-		                url: ctx + "system/role/checkRoleNameUnique",
-		                type: "post",
-		                dataType: "json",
-		                data: {
-							"roleId": function() {
-							    return $("#roleId").val();
-							},
-							"roleName": function() {
-							    return $.common.trim($("#roleName").val());
-							}
-		                },
-		                dataFilter: function(data, type) {
-		                	return $.validate.unique(data);
-		                }
-		            }
-				},
-				roleKey:{
-					remote: {
-		                url: ctx + "system/role/checkRoleKeyUnique",
-		                type: "post",
-		                dataType: "json",
-		                data: {
-							"roleId": function() {
-								return $("#roleId").val();
-							},
-							"roleKey": function() {
-							    return $.common.trim($("#roleKey").val());
-							}
-		                },
-		                dataFilter: function(data, type) {
-		                	return $.validate.unique(data);
-		                }
-		            }
-				},
-				roleSort:{
-					digits:true
-				},
-			},
-			messages: {
-		        "roleName": {
-		            remote: "角色名称已经存在"
-		        },
-		        "roleKey": {
-		            remote: "角色权限已经存在"
-		        }
-		    },
-		    focusCleanup: true
-		});
+<div class="wrapper wrapper-content animated fadeInRight ibox-content">
+    <form class="form-horizontal m" id="form-role-edit" th:object="${role}">
+        <input id="roleId" name="roleId" type="hidden" th:field="*{roleId}"/>
+        <div class="form-group">
+            <label class="col-sm-3 control-label is-required">角色名称:</label>
+            <div class="col-sm-8">
+                <input class="form-control" type="text" name="roleName" id="roleName" th:field="*{roleName}" required>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label is-required">权限字符:</label>
+            <div class="col-sm-8">
+                <input class="form-control" type="text" name="roleKey" id="roleKey" th:field="*{roleKey}" required>
+                <span class="help-block m-b-none"><i
+                        class="fa fa-info-circle"></i> 控制器中定义的权限字符,如:@RequiresRoles("")</span>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label is-required">显示顺序:</label>
+            <div class="col-sm-8">
+                <input class="form-control" type="text" name="roleSort" id="roleSort" th:field="*{roleSort}" required>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">状态:</label>
+            <div class="col-sm-8">
+                <label class="toggle-switch switch-solid">
+                    <input type="checkbox" id="status" th:checked="${role.status == '0' ? true : false}">
+                    <span></span>
+                </label>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">备注:</label>
+            <div class="col-sm-8">
+                <textarea id="remark" name="remark" class="form-control" th:field="*{remark}"></textarea>
+            </div>
+        </div>
+        森林防火<input th:type="checkbox" th:name="visuSee" th:value="slfh">
+        秸秆禁烧<input th:type="checkbox" th:name="visuSee" th:value="jgjs">
+        防汛防控<input th:type="checkbox" th:name="visuSee" th:value="fxfk">
+        野生动物<input th:type="checkbox" th:name="visuSee" th:value="ysdw">
+        热感云台<input th:type="checkbox" th:name="visuSee" th:value="lwt">
+        扑火队<input th:type="checkbox" th:name="visuSee" th:value="phd">
+        起降点<input th:type="checkbox" th:name="visuSee" th:value="jjd">
+        气象站<input th:type="checkbox" th:name="visuSee" th:value="qxz">
+        防火检查站<input th:type="checkbox" th:name="visuSee" th:value="fhjcz">
+        救援物资<input th:type="checkbox" th:name="visuSee" th:value="jywz">
+        林场<input th:type="checkbox" th:name="visuSee" th:value="lc">
+        水源<input th:type="checkbox" th:name="visuSee" th:value="sy">
+        水渠<input th:type="checkbox" th:name="visuSee" th:value="sq">
+        取水口<input th:type="checkbox" th:name="visuSee" th:value="qsk">
 
-		function edit() {
-			var roleId = $("input[name='roleId']").val();
-			var roleName = $("input[name='roleName']").val();
-			var roleKey = $("input[name='roleKey']").val();
-			var roleSort = $("input[name='roleSort']").val();
-			var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
-			var remark = $("input[name='remark']").val();
-			var menuIds = $.tree.getCheckedNodes();
-			$.ajax({
-				cache : true,
-				type : "POST",
-				url : ctx + "system/role/edit",
-				data : {
-					"roleId": roleId,
-					"roleName": roleName,
-					"roleKey": roleKey,
-					"roleSort": roleSort,
-					"status": status,
-					"remark": remark,
-					"menuIds": menuIds
-				},
-				async : false,
-				error : function(request) {
-					$.modal.alertError("系统错误");
-				},
-				success : function(data) {
-					$.operate.successCallback(data);
-				}
-			});
-		}
-		
-		function submitHandler() {
-	        if ($.validate.form()) {
-	        	edit();
-	        }
-	    }
-	</script>
+
+        <div class="form-group">
+            <label class="col-sm-3 control-label">菜单权限</label>
+            <div class="col-sm-8">
+                <div id="menuTrees" class="ztree"></div>
+            </div>
+        </div>
+    </form>
+</div>
+<th:block th:include="include :: footer"/>
+<th:block th:include="include :: ztree-js"/>
+<script type="text/javascript" th:inline="javascript">
+    $(function () {
+        var url = ctx + "system/menu/roleMenuTreeData?roleId=" + $("#roleId").val();
+        var visuSee = [[${role.visuSee}]]
+        if(visuSee != undefined && visuSee !=null && visuSee != ""){
+            var a = visuSee.split(",")
+            $(a).each(function (index, item) {
+                $("input[name='visuSee']").each(function (i, t) {
+                    if($(t).val() == item){
+                        $(t).attr("checked", "checked")
+                    }
+                });
+            })
+        }
+
+
+
+        var options = {
+            id: "menuTrees",
+            url: url,
+            check: {enable: true},
+            expandLevel: 0
+        };
+        $.tree.init(options);
+    });
+
+    $("#form-role-edit").validate({
+        onkeyup: false,
+        rules: {
+            roleName: {
+                remote: {
+                    url: ctx + "system/role/checkRoleNameUnique",
+                    type: "post",
+                    dataType: "json",
+                    data: {
+                        "roleId": function () {
+                            return $("#roleId").val();
+                        },
+                        "roleName": function () {
+                            return $.common.trim($("#roleName").val());
+                        }
+                    },
+                    dataFilter: function (data, type) {
+                        return $.validate.unique(data);
+                    }
+                }
+            },
+            roleKey: {
+                remote: {
+                    url: ctx + "system/role/checkRoleKeyUnique",
+                    type: "post",
+                    dataType: "json",
+                    data: {
+                        "roleId": function () {
+                            return $("#roleId").val();
+                        },
+                        "roleKey": function () {
+                            return $.common.trim($("#roleKey").val());
+                        }
+                    },
+                    dataFilter: function (data, type) {
+                        return $.validate.unique(data);
+                    }
+                }
+            },
+            roleSort: {
+                digits: true
+            },
+        },
+        messages: {
+            "roleName": {
+                remote: "角色名称已经存在"
+            },
+            "roleKey": {
+                remote: "角色权限已经存在"
+            }
+        },
+        focusCleanup: true
+    });
+
+    function edit() {
+        var roleId = $("input[name='roleId']").val();
+        var roleName = $("input[name='roleName']").val();
+        var roleKey = $("input[name='roleKey']").val();
+        var roleSort = $("input[name='roleSort']").val();
+        var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
+        var remark = $("input[name='remark']").val();
+        var menuIds = $.tree.getCheckedNodes();
+
+
+        var visuSee = "";
+        $("input[name='visuSee']:checked").each(function (index, item) {
+            visuSee += $(item).val() + ',';
+        });
+
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: ctx + "system/role/edit",
+            data: {
+                "roleId": roleId,
+                "roleName": roleName,
+                "roleKey": roleKey,
+                "roleSort": roleSort,
+                "status": status,
+                "remark": remark,
+                "menuIds": menuIds,
+                "visuSee": visuSee
+            },
+            async: false,
+            error: function (request) {
+                $.modal.alertError("系统错误");
+            },
+            success: function (data) {
+                $.operate.successCallback(data);
+            }
+        });
+    }
+
+    function submitHandler() {
+        if ($.validate.form()) {
+            edit();
+        }
+    }
+</script>
 </body>
 </html>

+ 2 - 0
leiSP-framework/src/main/java/com/sooka/framework/config/ShiroConfig.java

@@ -295,6 +295,8 @@ public class ShiroConfig
         filterChainDefinitionMap.put("/system/user/resetPwdBatch/**", "anon,captchaValidate");
         filterChainDefinitionMap.put("/getDahua2BStr/**", "anon,captchaValidate");
         filterChainDefinitionMap.put("/DahuaDsdController/**", "anon,captchaValidate");
+        filterChainDefinitionMap.put("/business/app/websocket/**", "anon,captchaValidate");
+
 
         // 注册相关
         filterChainDefinitionMap.put("/register", "anon,captchaValidate");

+ 12 - 1
leiSP-system/src/main/java/com/sooka/system/domain/SysRole.java

@@ -9,7 +9,7 @@ import com.sooka.common.core.domain.BaseEntity;
 
 /**
  * 角色表 sys_role
- * 
+ *
  * @author lei_wang
  */
 public class SysRole extends BaseEntity
@@ -46,6 +46,9 @@ public class SysRole extends BaseEntity
     /** 用户是否存在此角色标识 默认不存在 */
     private boolean flag = false;
 
+    /*对应可视化功能,逗号分隔*/
+    private String visuSee;
+
     /** 菜单组 */
     private Long[] menuIds;
 
@@ -77,6 +80,14 @@ public class SysRole extends BaseEntity
         return isAdmin(this.roleId);
     }
 
+    public String getVisuSee() {
+        return visuSee;
+    }
+
+    public void setVisuSee(String visuSee) {
+        this.visuSee = visuSee;
+    }
+
     public static boolean isAdmin(Long roleId)
     {
         return roleId != null && 1L == roleId;

+ 7 - 3
leiSP-system/src/main/resources/mapper/system/SysRoleMapper.xml

@@ -17,11 +17,12 @@
         <result property="updateBy" column="update_by"/>
         <result property="updateTime" column="update_time"/>
         <result property="remark" column="remark"/>
+        <result property="visuSee" column="visu_see"/>
     </resultMap>
 
     <sql id="selectRoleContactVo">
         select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope,
-            r.status, r.del_flag, r.create_time, r.remark
+            r.status, r.del_flag, r.create_time, r.remark,r.visu_see
         from sys_role r
 	        left join sys_user_role ur on ur.role_id = r.role_id
 	        left join sys_user u on u.user_id = ur.user_id
@@ -29,7 +30,7 @@
     </sql>
 
     <sql id="selectRoleVo">
-		select r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status, r.del_flag, r.create_time, r.remark
+		select r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status, r.del_flag, r.create_time, r.remark,r.visu_see
         from sys_role r
 	</sql>
 
@@ -99,6 +100,7 @@
             <if test="status != null and status != ''">status = #{status},</if>
             <if test="remark != null">remark = #{remark},</if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
+            <if test="visuSee != null and updateBy != ''">visu_see = #{visuSee},</if>
             update_time = sysdate()
         </set>
         where role_id = #{roleId}
@@ -114,6 +116,7 @@
         <if test="status != null and status != ''">status,</if>
         <if test="remark != null and remark != ''">remark,</if>
         <if test="createBy != null and createBy != ''">create_by,</if>
+        <if test="visuSee != null and visuSee != ''">visu_see,</if>
         create_time
         )values(
         <if test="roleId != null and roleId != 0">#{roleId},</if>
@@ -124,13 +127,14 @@
         <if test="status != null and status != ''">#{status},</if>
         <if test="remark != null and remark != ''">#{remark},</if>
         <if test="createBy != null and createBy != ''">#{createBy},</if>
+        <if test="visuSee != null and visuSee != ''">#{visuSee},</if>
         sysdate()
         )
     </insert>
 
 
     <select id="app_selectRolesById" parameterType="Long" resultMap="SysRoleResult">
-select r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status, r.del_flag, r.create_time, r.remark
+select r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status, r.del_flag, r.create_time, r.remark,r.visu_see
         from sys_role r,sys_user_role b
 where r.role_id=b.role_id and b.user_id= #{userId}
 	</select>

+ 8 - 3
mybusiness/src/main/java/com/business/slfh/app/event/service/impl/AppEventProcessServiceImpl.java

@@ -44,7 +44,7 @@ public class AppEventProcessServiceImpl extends AppBaseService implements AppEve
             tuEventprocessMapper.insertTUEventprocess(appEventProcessVo);
             //添加附件
 
-            if(appEventProcessVo.getIshaveAttarch()== 1){
+            if (appEventProcessVo.getIshaveAttarch() == 1) {
                 List attachs = appEventProcessVo.getAttachs();
                 if (attachs != null && attachs.size() > 0) {
                     appEventProcessVo.setIshaveAttarch(1L);
@@ -53,6 +53,7 @@ public class AppEventProcessServiceImpl extends AppBaseService implements AppEve
                         tResAttach.setId(UUID_Tools.getUUID());
                         tResAttach.setBusId(appEventProcessVo.getId());
                         tResAttach.setResUrl(attachs.get(i).toString());
+                        tResAttach.setUpper("mobile");
                         tResAttachMapper.insertTResAttach(tResAttach);
                     }
                 }
@@ -78,16 +79,20 @@ public class AppEventProcessServiceImpl extends AppBaseService implements AppEve
             //查询事件过程的附件
             for (int i = 0; i < eventprocess_list.size(); i++) {
                 AppEventProcessVo processVo = eventprocess_list.get(i);
-                if (processVo.getIshaveAttarch() != null && processVo.getIshaveAttarch()== 1) {
+                if (processVo.getIshaveAttarch() != null && processVo.getIshaveAttarch() == 1) {
                     //查附件表
                     TResAttach tResAttach = new TResAttach();
                     tResAttach.setBusId(processVo.getId());
                     List<TResAttach> att_list = tResAttachMapper.selectTResAttachList(tResAttach);
                     processVo.attachs = new ArrayList();
                     String basepath = iSysConfigService.selectConfigByKey("http_basepath");
+                    String dahua_picture_url = iSysConfigService.selectConfigByKey("dahua_picture_url");
                     for (int j = 0; j < att_list.size(); j++) {
                         TResAttach t = att_list.get(j);
-                        t.setResUrl(basepath + t.getResUrl());
+                        if (t.getUpper() != null && t.getUpper().equals("dahua")) {
+                            t.setResUrl(dahua_picture_url + t.getResUrl());
+                        } else if (t.getUpper() != null && t.getUpper().equals("mobile"))
+                            t.setResUrl(basepath + t.getResUrl());
                         processVo.attachs.add(t);
                     }
                 }

+ 20 - 1
mybusiness/src/main/java/com/business/slfh/app/event/service/impl/AppEventServiceImpl.java

@@ -143,7 +143,12 @@ public class AppEventServiceImpl extends AppBaseService implements AppEventServi
             vo.setAttachs(new ArrayList());
             for (int i = 0; i < attalist.size(); i++) {
                 TResAttach t = attalist.get(i);
-                t.setResUrl(basepath + t.getResUrl());
+                if(t.getUpper()!= null && t.getUpper().equals("dahua")){
+                    t.setResUrl(dahua_picture_url + t.getResUrl());
+                }else if(t.getUpper() != null && t.getUpper().equals("mobile")){
+                    t.setResUrl(basepath+ t.getResUrl());
+                }
+
                 vo.getAttachs().add(t);
             }
             appDataModel.data.put("eventdetail", ls.get(0));
@@ -207,6 +212,7 @@ public class AppEventServiceImpl extends AppBaseService implements AppEventServi
                 TResAttach attach = new TResAttach();
                 attach.setId(attach_id);
                 attach.setBusId(event_id);
+                attach.setUpper("mobile");
                 attach.setResUrl(appEventVo.getAttachs().get(i).toString());
                 tResAttachMapper.insertTResAttach(attach);
             }
@@ -261,6 +267,8 @@ public class AppEventServiceImpl extends AppBaseService implements AppEventServi
         WebSocketServerPool.sendMessageToUser(userIds, model);
 
 
+
+
         List<SysUser> list = userMapper.selectUserList(u);
         //App推送消息
 //        SysUser sysUser = new SysUser();
@@ -303,6 +311,17 @@ public class AppEventServiceImpl extends AppBaseService implements AppEventServi
         sendMessageService.sendMessages(sendMessageVO, tUNotice);
 
 
+        Set set = WebSocketServer.webSocketMap.keySet();
+        Iterator iterator = set.iterator();
+        while (iterator.hasNext()) {
+            String key = iterator.next().toString();
+            try {
+                WebSocketServer.sendInfo("着火了", key);
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+
         return appDataModel;
     }
 

+ 2 - 0
mybusiness/src/main/java/com/business/slfh/dahua/service/impl/DaHuaMessageServiceImpl.java

@@ -409,12 +409,14 @@ public class DaHuaMessageServiceImpl implements IDahuaMessageService {
                 t.setId(UUID.fastUUID().toString());
                 t.setBusId(eid);
                 t.setResUrl(s);
+                t.setUpper("dahua");
                 itResAttachService.insertTResAttach(t);
             }
 
             saveFire(tUEventFire, null);
             saveJgfs(tuEventOthers);
             TResAttach tResAttach = new TResAttach();
+            tResAttach.setUpper("dahua");
             tResAttach.setId(UUID.fastUUID().toString());
             tResAttach.setBusId(eid);
             tResAttach.setResUrl(p[0]);

+ 4 - 3
mybusiness/src/main/java/com/business/slfh/dahua/util/DahuaUtil.java

@@ -8,8 +8,8 @@ import java.util.Map;
 
 public class DahuaUtil {
 
-    //        public static String base = "https://119.55.12.182:444";
-    public static String base = "https://119.52.253.110:4430";
+    public static String base = "https://192.168.100.15:4430";
+//    public static String base = "https://119.52.253.110:4430";
     private SSLClient httpClientUtil;
     private String charset = "utf-8";
     String username = "system";
@@ -143,6 +143,7 @@ public class DahuaUtil {
                 + "\"recordSource\":\"3\","
                 + "\"beginTime\":\"" + beginTime + "\","
                 + "\"recordType\":\"0\","
+                + "\"totallength\":\"" + 120 + "\","
                 + "\"endTime\":\"" + endTime + "\""
                 + "}]}";
         System.out.println(result);
@@ -195,7 +196,7 @@ public class DahuaUtil {
         System.out.println("-----------------开始订阅-------------------");
         String url = base + "/admin/API/alarm/eventSubscriptions?token=" + token;
         String result = "{" +
-                "\"eventSubscriptionsAddress\":" + "\"http://117.78.49.164:9091/getDahua2BStr\"," +
+                "\"eventSubscriptionsAddress\":" + "\"http://192.168.100.10:9999/getDahua2BStr\"," +
                 "\"alarmType\": " + "\"5122;5131;302\"" +
                 "}";
         System.out.println(result);

+ 3 - 8
mybusiness/src/main/java/com/business/slfh/manager/cameramanager/controller/HikCameraController.java

@@ -61,18 +61,13 @@ public class HikCameraController {
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
         TUEventFire tuEventFire = ituEventFireService.selectTUEventFireById(ID);
-        System.out.println("=======000000========="+ID);
         Date report_time = tuEventFire.getReportTime();
-        System.out.println("=========111111======="+report_time);
         //计算前后一分钟
-        Date hikplayback_begintime = new Date(report_time.getTime() - 1000 * 60+1000*60*60*12);
-        System.out.println("=========222222======="+hikplayback_begintime);
+        Date hikplayback_begintime = new Date(report_time.getTime() - 1000 * 60);
         String hikplayback_begintime_str = format.format(hikplayback_begintime);
-        System.out.println("=========********======="+hikplayback_begintime_str);
-        Date hikplayback_endtime = new Date(report_time.getTime() + 1000 * 60+1000*60*60*12);
-        System.out.println("=========33333333======="+hikplayback_endtime);
+        Date hikplayback_endtime = new Date(report_time.getTime() + 1000 * 60);
         String hikplayback_endtime_str = format.format(hikplayback_endtime);
-        System.out.println("=========########======="+hikplayback_endtime_str);
+
         //找海康摄像头id
         String hik_cameraid = tuEventFire.getCameraId();
 

+ 1 - 1
mybusiness/src/main/java/com/business/slfh/tools/DownLoad.java

@@ -74,7 +74,7 @@ public class DownLoad {
     }
 
     public static void main(String[] args) {
-        new DownLoad().down("http://218.27.1.157:9091/syslogin/lydl_5.png", "c:/aaa.png");
+        new DownLoad().down("https://119.52.253.110:4430/alarm/20221026/1000055@0/112844_881_6394.jpg", "c:/aaa.jpg");
     }
 }
 

+ 4 - 2
mybusiness/src/main/java/com/business/slfh/tools/WebSocketConfig.java

@@ -2,12 +2,14 @@ package com.business.slfh.tools;
 
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
 import org.springframework.web.socket.server.standard.ServerEndpointExporter;
 
-//@Configuration
+@Configuration
 public class WebSocketConfig {
 
-//    @Bean
+    @Bean
+    @Profile({"dev","test"})
     public ServerEndpointExporter serverEndpointExporter() {
         return new ServerEndpointExporter();
     }

+ 2 - 2
mybusiness/src/main/java/com/business/slfh/tools/controller/WebSocketServer.java

@@ -18,8 +18,8 @@ import org.springframework.stereotype.Component;
 import cn.hutool.log.Log;
 import cn.hutool.log.LogFactory;
 
-//@ServerEndpoint("/business/app/websocket/{userId}")
-//@Component
+@ServerEndpoint("/business/app/websocket/{userId}")
+@Component
 public class WebSocketServer {
     static Log log = LogFactory.get(WebSocketServer.class);
     /**

+ 24 - 5
mybusiness/src/main/java/com/business/slfh/visualization/event/controller/Visualization_Event_Controller.java

@@ -24,14 +24,13 @@ import com.sooka.common.utils.CacheUtils;
 import com.sooka.common.utils.StringUtils;
 import com.sooka.framework.util.ShiroUtils;
 import com.sooka.framework.web.service.DictService;
-import com.sooka.system.domain.SysConfig;
-import com.sooka.system.domain.SysDictData;
-import com.sooka.system.domain.SysDictType;
-import com.sooka.system.domain.SysUser;
+import com.sooka.system.domain.*;
 import com.sooka.system.mapper.SysConfigMapper;
+import com.sooka.system.mapper.SysRoleMapper;
 import com.sooka.system.service.ISysConfigService;
 import com.sooka.system.service.ISysDictDataService;
 import com.sooka.system.service.ISysDictTypeService;
+import com.sooka.system.service.ISysRoleService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -88,6 +87,10 @@ public class Visualization_Event_Controller extends AppBaseController {
     @Autowired
     private ITResForestdeviceService itResForestdeviceService;
 
+    @Resource
+    private ISysRoleService iSysRoleService;
+
+
     @RequestMapping("/getVisualizationEvent")
     public String getVisualizationEvent(ModelMap map, HttpServletRequest request) {
         logger.info("getVisualizationEvent");
@@ -98,6 +101,20 @@ public class Visualization_Event_Controller extends AppBaseController {
         map.put("loginName", ShiroUtils.getLoginName());
         map.put("deptId",ShiroUtils.getSysUser().getDeptId());
         map.put("carCounts", carCounts);
+        String visuSee="";
+
+        SysUser user= ShiroUtils.getSysUser();
+        List<SysRole> roles = iSysRoleService.selectRolesByUserId(user.getUserId());
+
+        for(SysRole r: roles){
+            if(r.getVisuSee()!= null && !r.getVisuSee().equals("")){
+                visuSee += r.getVisuSee();
+            }
+        }
+        if(user.getLoginName().equals("admin")){
+            visuSee = "adminRole";
+        }
+        map.put("visuSee",visuSee);
         return prefix + "/event";
     }
 
@@ -129,7 +146,8 @@ public class Visualization_Event_Controller extends AppBaseController {
         int Visualization_Report_Event_Count =0;
 
         //各类事件数量
-        List <Visualization_Event_Count> Visualization_Event_Each_Count = visualization_event_service.Visualization_Event_Each_Count();
+        Visualization_Event_Count v = new Visualization_Event_Count();
+        List <Visualization_Event_Count> Visualization_Event_Each_Count = visualization_event_service.Visualization_Event_Each_Count(v);
 
         for(int i=0;i<Visualization_Event_Each_Count.size();i++){
             Visualization_Event_Count c = Visualization_Event_Each_Count.get(i);
@@ -332,6 +350,7 @@ public class Visualization_Event_Controller extends AppBaseController {
         map.put("Visualization_Camera_Count", Visualization_Camera_Count);
         map.put("towerName",towerName);
         map.put("superMapId",superMapId);
+
         return prefix + "/lwt";
     }
 

+ 3 - 2
mybusiness/src/main/java/com/business/slfh/visualization/event/mapper/Visualization_Event_Mapper.java

@@ -43,7 +43,7 @@ public interface Visualization_Event_Mapper {
 
     int getCanalCount();
 
-    List<Visualization_SourceWater> Visualization_SourceWater( Visualization_SourceWater visualization_sourceWater);
+    List<Visualization_SourceWater> Visualization_SourceWater(Visualization_SourceWater visualization_sourceWater);
 
     List<Visualization_Canal> Visualization_Canal();
 
@@ -109,7 +109,8 @@ public interface Visualization_Event_Mapper {
 
     List<Visualizaiton_UAV> getWrjGjs();
 
-    List<Visualization_Event_Count> Visualization_Event_Each_Count(@Param("DEPT_ID") String DEPT_ID);
+    //    List<Visualization_Event_Count> Visualization_Event_Each_Count(@Param("DEPT_ID") String DEPT_ID);
+    List<Visualization_Event_Count> Visualization_Event_Each_Count(Visualization_Event_Count v);
 
     List<Visualization_Event_Count> Visualization_ALL_Event_Each_Count(@Param("DEPT_ID") String DEPT_ID);
 }

+ 1 - 1
mybusiness/src/main/java/com/business/slfh/visualization/event/service/Visualization_Event_Service.java

@@ -55,6 +55,6 @@ public interface Visualization_Event_Service {
     void updateEventSign(String eventId,String reservePlanType);
     int getRoleMenu();
     List<Visualization_XF_Resources> getXfResources(String [] typeArr,String DEPT_ID);
-    List<Visualization_Event_Count> Visualization_Event_Each_Count();
+    List<Visualization_Event_Count> Visualization_Event_Each_Count(Visualization_Event_Count v);
     List<Visualization_Event_Count> Visualization_ALL_Event_Each_Count();
 }

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

@@ -12,6 +12,7 @@ import com.sooka.common.annotation.DataScope;
 import com.sooka.common.annotation.DataSource;
 import com.sooka.system.domain.SysRole;
 import com.sooka.system.domain.SysUser;
+import lombok.Data;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Service;
 
@@ -194,6 +195,7 @@ public class Visualization_Event_Service_Impl extends BaseService implements Vis
     }
 
     @Override
+    @DataScope(deptAlias = "dept")
     public List<Visualization_Camera> getAllCamera(Visualization_Camera camera) {
         return Visualization_Event_Mapper.getAllCamera(camera);
 
@@ -276,8 +278,10 @@ public class Visualization_Event_Service_Impl extends BaseService implements Vis
     }
 
     @Override
-    public List<Visualization_Event_Count> Visualization_Event_Each_Count() {
-        return Visualization_Event_Mapper.Visualization_Event_Each_Count(userInfoUtil.getLoginUserInfo().getDeptId().toString());
+    @DataScope(deptAlias = "t")
+    public List<Visualization_Event_Count> Visualization_Event_Each_Count(Visualization_Event_Count v) {
+//        return Visualization_Event_Mapper.Visualization_Event_Each_Count(userInfoUtil.getLoginUserInfo().getDeptId().toString());
+        return Visualization_Event_Mapper.Visualization_Event_Each_Count(v);
     }
 
     @Override

+ 42 - 35
mybusiness/src/main/resources/mapper/grid/visualization/Visualization_Event_Mapper.xml

@@ -335,39 +335,43 @@
         ) AS t
     </select>
 
-    <select id="Visualization_Event_Each_Count" resultType="Visualization_Event_Count">
+    <select id="Visualization_Event_Each_Count" resultType="Visualization_Event_Count" parameterType="com.business.slfh.visualization.event.domain.Visualization_Event_Count">
         SELECT
-            COUNT(t.id) COUNT,RESERVEPLAN_TYPE
+            COUNT(t.id) COUNT,t.RESERVEPLAN_TYPE,t.dept_id dept_id
         FROM
         (
             (
                 SELECT
-                    id,'reserveplan_type_1' as reserveplan_type
+                    id,'reserveplan_type_1' as reserveplan_type,dept_id
                 FROM
                     t_u_event_fire
-                WHERE
-                    1 = 1
-                AND DEPT_ID IN (
-                    <include refid="Depts">
-                        <property name="dept_id" value="#{DEPT_ID}"/>
-                    </include>
-                )
+                <!--WHERE-->
+                    <!--1 = 1-->
+                <!--AND DEPT_ID IN (-->
+                    <!--<include refid="Depts">-->
+                        <!--<property name="dept_id" value="#{DEPT_ID}"/>-->
+                    <!--</include>-->
+                <!--)-->
             )
               UNION
             (
                 SELECT
-                    id,reserveplan_type
+                    id,reserveplan_type,dept_id
                 FROM
                     t_u_event_others
-                WHERE
-                    1 = 1
-                AND DEPT_ID IN (
-                    <include refid="Depts">
-                        <property name="dept_id" value="#{DEPT_ID}"/>
-                    </include>
-                )
+                <!--WHERE-->
+                    <!--1 = 1-->
+                <!--AND DEPT_ID IN (-->
+                    <!--<include refid="Depts">-->
+                        <!--<property name="dept_id" value="#{DEPT_ID}"/>-->
+                    <!--</include>-->
+                <!--)-->
             )
-        ) AS t GROUP BY reserveplan_type
+        ) AS t,sys_dept d
+        where t.dept_id = d.dept_id
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+        GROUP BY reserveplan_type
     </select>
 
     <select id="Visualization_ALL_Event_Each_Count" resultType="Visualization_Event_Count">
@@ -558,11 +562,11 @@
                         t_u_event_fire
                     WHERE
                         event_status in ('event_status_1','event_status_2','event_status_3','event_status_4')
-                    AND DEPT_ID IN (
-                    <include refid="Depts">
-                        <property name="dept_id" value="#{DEPT_ID}"/>
-                    </include>
-                    )
+                    <!--AND DEPT_ID IN (-->
+                    <!--<include refid="Depts">-->
+                        <!--<property name="dept_id" value="#{DEPT_ID}"/>-->
+                    <!--</include>-->
+                    <!--)-->
                 )
                 UNION
                     (
@@ -589,11 +593,11 @@
                             t_u_event_others
                         WHERE
                             event_status in ('event_status_1','event_status_2','event_status_3','event_status_4')
-                        AND DEPT_ID IN (
-                        <include refid="Depts">
-                            <property name="dept_id" value="#{DEPT_ID}"/>
-                        </include>
-                        )
+                        <!--AND DEPT_ID IN (-->
+                        <!--<include refid="Depts">-->
+                            <!--<property name="dept_id" value="#{DEPT_ID}"/>-->
+                        <!--</include>-->
+                        <!--)-->
                     )
             ) AS t
             WHERE 1=1
@@ -994,15 +998,18 @@
         )REMARK,d.RADIUS,
             (SELECT DICT_LABEL FROM SYS_DICT_DATA WHERE DICT_VALUE  = d.MODEL) MODEL,
         d.DEPT_ID,d.HIK_IP,d.HIK_PORT,d.HIK_USERNAME,d.HIK_PASSWORD,d.HIK_DEVICEPORT,d.HIK_CAMERA_ID
-        FROM T_RES_CAMERA d WHERE 1=1
-        AND d.DEPT_ID IN (
-        <include refid="Depts">
-            <property name="dept_id" value="#{DEPTID}"/>
-        </include>
-        )
+        FROM T_RES_CAMERA d ,sys_dept dept
+        WHERE d.dept_id=dept.dept_id
+        <!--AND d.DEPT_ID IN (-->
+        <!--<include refid="Depts">-->
+            <!--<property name="dept_id" value="#{DEPTID}"/>-->
+        <!--</include>-->
+        <!--)-->
         <if test="MODEL != null and MODEL != ''">
             AND MODEL = '${MODEL}'
         </if>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
     </select>
     <select id="getAllUser" resultType="Visualization_User">
         SELECT U.USER_ID,U.USER_NAME,U.PHONENUMBER,T.REC_TIME,T.LONGITUDE,T.LATITUDE FROM SYS_USER U

+ 1 - 1
mybusiness/src/main/resources/templates/business/manager/cameramanager/index.html

@@ -203,7 +203,7 @@
     //function goCamera(hik_ip,hik_port,hik_username,hik_password,hik_deviceport){//展示画面
     function goCamera(hik_ip,hik_port,hik_username,hik_password,hik_deviceport,hik_cameraid){//展示画面
 
-        window.open('http://117.78.49.164:9091/dahua/demo-jkd.html?hik_ip='+hik_ip+'&hik_cameraid='+hik_cameraid+'&hik_deviceport='+hik_deviceport+"&hik_username="+hik_username+"&hik_password="+hik_password+"&port="+hik_port)
+        window.open('http://119.52.253.110:9999/dahua/demo-jkd.html?hik_ip='+hik_ip+'&hik_cameraid='+hik_cameraid+'&hik_deviceport='+hik_deviceport+"&hik_username="+hik_username+"&hik_password="+hik_password+"&port="+hik_port)
         //$.post('http://localhost:8899/camera_id='+hik_ip+","+hik_port+","+hik_username+","+hik_password+","+hik_deviceport,{});
     }
 

+ 4 - 4
mybusiness/src/main/resources/templates/business/manager/othersmanager/index.html

@@ -193,10 +193,10 @@
                         return $.table.selectDictLabel(reserveplan_levelDict, value);
                     }
                 },
-                {
-                    field: 'eventStatus',
-                    title: '事件状态'
-                },
+                // {
+                //     field: 'eventStatus',
+                //     title: '事件状态'
+                // },
                 // {
                 //     field: 'reserveplanType',
                 //     title: '预案类型',

+ 6 - 3
mybusiness/src/main/resources/templates/business/visualization/details.html

@@ -108,7 +108,7 @@
                             <button type="button" class="close" data-dismiss="modal"><span
                                     aria-hidden="true">×</span><span class="sr-only">Close</span>
                             </button>
-                            <h4 class="modal-title">[[${visualization_plan.TITLE}]]</h4>
+                            <!--<h4 class="modal-title">[[${visualization_plan.TITLE}]]</h4>-->
                         </div>
                         <small>
                             <div class="modal-body">
@@ -314,8 +314,9 @@
             }else{
                 drivingOthersEvents(confirm_action,obj);
             }
-
+            $('#qt_iframe').attr('src', $('#qt_iframe').attr('src'));
             parent.$(".layui-layer-btn1").click();
+
             return;
         }
         $.modal.openOptions(options);
@@ -350,6 +351,8 @@
             url += "/confirmFireEvent";
         }
         ajaxPost(url,obj);
+
+
     }
     function drivingOthersEvents(action,obj) {
         var url = "/visualization/confirm";
@@ -449,7 +452,7 @@
 
     function play_preview(hik_ip,hik_port,hik_username,hik_password) {
         // window.open('/business/manager/hikcameracontroller/demo_window_simple_preview?hik_cameraid='+hik_cameraid)
-        window.open('http://117.78.49.164:9091/dahua/demo-jkd.html?hik_ip='+hik_ip+'&hik_username='+hik_username+"&hik_password="+hik_password+"&port="+hik_port)
+        window.open('http://119.52.253.110:9999/dahua/demo-jkd.html?hik_ip='+hik_ip+'&hik_username='+hik_username+"&hik_password="+hik_password+"&port="+hik_port)
     }
 
 

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

@@ -114,47 +114,47 @@
             video[0].pause();
         }
 
-        // var socket;
-        // function openSocket(loginName) {
-        //     if(typeof(WebSocket) == "undefined") {
-        //         console.log("您的浏览器不支持WebSocket");
-        //     }else{
-        //         console.log("您的浏览器支持WebSocket");
-        //         //实现化WebSocket对象,指定要连接的服务器地址与端口  建立连接
-        //         var socketUrl="[[${web_socket_url}]]"+loginName;
-        //         socketUrl=socketUrl.replace("https","ws").replace("http","ws");
-        //         console.log(socketUrl);
-        //         if(socket!=null){
-        //             socket.close();
-        //             socket=null;
-        //         }
-        //         socket = new WebSocket(socketUrl);
-        //         //打开事件
-        //         socket.onopen = function() {
-        //             console.log("websocket已打开");
-        //         };
-        //         //获得消息事件
-        //         socket.onmessage = function(msg) {
-        //             console.log(msg);
-        //             var message = msg.data;
-        //             if(message != "" && message != null){
-        //                 var json =  JSON.parse(message);
-        //                 console.log(json);
-        //                 if(json.deptId != "" && json.deptId != null){
-        //                     location.reload();
-        //                 }
-        //             }
-        //         };
-        //         //关闭事件
-        //         socket.onclose = function() {
-        //             console.log("websocket已关闭");
-        //         };
-        //         //发生了错误事件
-        //         socket.onerror = function() {
-        //             console.log("websocket发生了错误");
-        //         }
-        //     }
-        // }
+        var socket;
+        function openSocket(loginName) {
+            if(typeof(WebSocket) == "undefined") {
+                console.log("您的浏览器不支持WebSocket");
+            }else{
+                console.log("您的浏览器支持WebSocket");
+                //实现化WebSocket对象,指定要连接的服务器地址与端口  建立连接
+                var socketUrl="[[${web_socket_url}]]"+loginName;
+                socketUrl=socketUrl.replace("https","ws").replace("http","ws");
+                console.log(socketUrl);
+                if(socket!=null){
+                    socket.close();
+                    socket=null;
+                }
+                socket = new WebSocket(socketUrl);
+                //打开事件
+                socket.onopen = function() {
+                    console.log("websocket已打开");
+                };
+                //获得消息事件
+                socket.onmessage = function(msg) {
+                    console.log(msg);
+                    var message = msg.data;
+                    if(message != "" && message != null){
+                        var json =  JSON.parse(message);
+                        console.log(json);
+                        if(json.deptId != "" && json.deptId != null){
+                            location.reload();
+                        }
+                    }
+                };
+                //关闭事件
+                socket.onclose = function() {
+                    console.log("websocket已关闭");
+                };
+                //发生了错误事件
+                socket.onerror = function() {
+                    console.log("websocket发生了错误");
+                }
+            }
+        }
 
         var wimadress = "[[${web_socket_url}]]"+loginName;
         wimadress = wimadress.replace("https","ws").replace("http","ws");
@@ -274,7 +274,7 @@
     <div class="fr timing">
         <div class="xl_select fl">
             <div class="se_div clearfix">
-                <p class="on"><span class="jkd"><a href="http://117.78.49.164:9091/dahua/demo-dsd.html">电视墙</a></span><i></i></p>
+                <p class="on"><span class="jkd"><a href="http://119.52.253.110:9999/dahua/demo-dsd.html">电视墙</a></span><i></i></p>
                 <p class="on"><span class="jkd"><a>监控端</a></span><i></i></p>
                 <p><span class="gld"><a th:href="@{/index}" target="_blank">管理端</a></span><i></i></p>
                 <p><span class="dsjd"><a th:href="@{/bigdata/inspection/getBigDataInspection}" target="_blank">大数据端</a></span><i></i></p>

+ 155 - 106
mybusiness/src/main/resources/templates/business/visualization/event.html

@@ -22,10 +22,10 @@
     <script th:src="@{/visualization/js/sj.js}"></script>
     <script>
         var loginName = "[[${loginName}]]";
-        $(function(){
+        $(function () {
             openSocket(loginName);
             var action = "[[${action}]]";
-            $("div[url='"+action+"']").click();
+            $("div[url='" + action + "']").click();
             $('input:checkbox').click(function () {
                 reloadMarks(getCheckedArray());
             });
@@ -42,136 +42,149 @@
             $("a[name='lwt']").click(function () {
                 $("#map")[0].contentWindow.showLwt();
             });
-
+            setVisuSee()
         });
-        function reloadMarks(arr){
+
+
+
+
+
+        function reloadMarks(arr) {
             $("#map")[0].contentWindow.reloadMarks(arr);
         }
 
-        function getCheckedArray(){
+        function getCheckedArray() {
             var arr = new Array();
-            $('input:checkbox[name=leftNav]:checked').each(function(){
+            $('input:checkbox[name=leftNav]:checked').each(function () {
                 arr.push($(this).attr("id"));
             });
             return arr;
         }
 
-        function checkedAll(){
-            $('input:checkbox[name=leftNav]').each(function(){
+        function checkedAll() {
+            $('input:checkbox[name=leftNav]').each(function () {
                 $('input:checkbox[name=leftNav]').prop("checked", true);
             });
         }
 
-        function openDetailsDia(eventId,reservePlanType){
-            var prefix = "[[@{/visualization/event/getVisualizationDetails?eventId=}]]"+eventId+"&reservePlanType="+reservePlanType;
-            $.modal.open('警情信息', prefix,$(document).width(),$(document).height());
+        function openDetailsDia(eventId, reservePlanType) {
+            var prefix = "[[@{/visualization/event/getVisualizationDetails?eventId=}]]" + eventId + "&reservePlanType=" + reservePlanType;
+            $.modal.open('警情信息', prefix, $(document).width(), $(document).height());
         }
-        function revertMap(){
+
+        function revertMap() {
             $(".active").click();
         }
 
-        function audioPlay(){
-            var video = $('#fireaudio');
+        function audioPlay() {
+            var video = $('#fireaudio');
             video[0].play();
         }
-        function audioPause(){
-            var video = $('#fireaudio');
+
+        function audioPause() {
+            var video = $('#fireaudio');
             video[0].pause();
         }
 
-        function showWrjDia(url){
-            var prefix = "[[@{/visualization/event/showWrjDia?url=}]]"+url;
-            $.modal.open('无人机实时画面', prefix,$(document).width(),$(document).height());
+        function showWrjDia(url) {
+            var prefix = "[[@{/visualization/event/showWrjDia?url=}]]" + url;
+            $.modal.open('无人机实时画面', prefix, $(document).width(), $(document).height());
         }
 
         var socket;
+
         function openSocket(loginName) {
-            if(typeof(WebSocket) == "undefined") {
+            if (typeof(WebSocket) == "undefined") {
                 console.log("您的浏览器不支持WebSocket");
-            }else{
+            } else {
                 console.log("您的浏览器支持WebSocket");
                 //实现化WebSocket对象,指定要连接的服务器地址与端口  建立连接
                 //等同于socket = new WebSocket("ws://localhost:8888/xxxx/im/25");
                 //var socketUrl="${request.contextPath}/im/"+$("#userId").val();
-                var socketUrl="http://218.27.1.157:9091/business/app/websocket/"+loginName;
+                var socketUrl = "http://119.52.253.110:9999/business/app/websocket/" + loginName;
+                // var socketUrl = "http://127.0.0.1:9999/business/app/websocket/" + loginName;
                 // var socketUrl="http://127.0.0.1/business/app/websocket/"+loginName;
-                socketUrl=socketUrl.replace("https","ws").replace("http","ws");
+                socketUrl = socketUrl.replace("https", "ws").replace("http", "ws");
                 console.log(socketUrl);
-                if(socket!=null){
+                if (socket != null) {
                     socket.close();
-                    socket=null;
+                    socket = null;
                 }
                 socket = new WebSocket(socketUrl);
                 //打开事件
-                socket.onopen = function() {
+                socket.onopen = function () {
                     console.log("websocket已打开");
                     //socket.send("这是来自客户端的消息" + location.href + new Date());
                 };
                 //获得消息事件
-                socket.onmessage = function(msg) {
+                socket.onmessage = function (msg) {
                     // var text ='{"content":"String content","id":"0d44d0027e424e898f60a456ca8b8a6a","latitude":"5318807.94","longitude":"13874773.35","title":"String title"}';
                     var message = msg.data;
-                    if(message != "" && message != null){
+                    console.log("message ===",message)
+                    if (message != "" && message != null) {
 
                         // var json =  $.parseJSON(msg.data);
-                        var json =  message;
+                        var json = message;
                         console.log(message.content);
                         console.log(json);
                         //防火
-                        if(json.reserveplanType == 'reserveplan_type_1'){
-                            $("#map")[0].contentWindow.slfhMarker(json,function(res){
-                                if(res){
-                                    var video = $('#fireaudio');
+                        if (json.reserveplanType == 'reserveplan_type_1') {
+                            $("#map")[0].contentWindow.slfhMarker(json, function (res) {
+                                if (res) {
+                                    var video = $('#fireaudio');
                                     video[0].play();
                                 }
                             });
                         }
                         //病虫害
-                        if(json.reserveplanType == 'reserveplan_type_2'){
-                            $("#map")[0].contentWindow.bchMarker(json,function(res){
-                                if(res){
-                                    var video = $('#fireaudio');
+                        if (json.reserveplanType == 'reserveplan_type_2') {
+                            $("#map")[0].contentWindow.bchMarker(json, function (res) {
+                                if (res) {
+                                    var video = $('#fireaudio');
                                     video[0].play();
                                 }
                             });
                         }
                         //偷盗
-                        if(json.reserveplanType == 'reserveplan_type_3'){
-                            $("#map")[0].contentWindow.toudMarker(json,function(res){
-                                if(res){
-                                    var video = $('#fireaudio');
+                        if (json.reserveplanType == 'reserveplan_type_3') {
+                            $("#map")[0].contentWindow.toudMarker(json, function (res) {
+                                if (res) {
+                                    var video = $('#fireaudio');
                                     video[0].play();
                                 }
                             });
                         }
                         //乱砍乱伐
-                        if(json.reserveplanType == 'reserveplan_type_4'){
-                            $("#map")[0].contentWindow.lklfMarker(json,function(res){
-                                if(res){
-                                    var video = $('#fireaudio');
+                        if (json.reserveplanType == 'reserveplan_type_4') {
+                            $("#map")[0].contentWindow.lklfMarker(json, function (res) {
+                                if (res) {
+                                    var video = $('#fireaudio');
                                     video[0].play();
                                 }
                             });
                         }
                         //偷沙采石
-                        if(json.reserveplanType == 'reserveplan_type_5'){
-                            $("#map")[0].contentWindow.tscsMarker(json,function(res){
-                                if(res){
-                                    var video = $('#fireaudio');
+                        if (json.reserveplanType == 'reserveplan_type_5') {
+                            $("#map")[0].contentWindow.tscsMarker(json, function (res) {
+                                if (res) {
+                                    var video = $('#fireaudio');
                                     video[0].play();
                                 }
                             });
                         }
                         //刷新iframe
+                        if(message != undefined && message == "着火了"){
+                            window.location.reload(true)
+                        }
                         $('#qt_iframe').attr('src', $('#qt_iframe').attr('src'));
                     }
                 };
                 //关闭事件
-                socket.onclose = function() {
+                socket.onclose = function () {
                     console.log("websocket已关闭");
                 };
                 //发生了错误事件
-                socket.onerror = function() {
+                socket.onerror = function () {
                     console.log("websocket发生了错误");
                 }
             }
@@ -179,12 +192,13 @@
 
     </script>
 </head>
-<body  style="background:#003;">
+<body style="background:#003;">
 <ul style="display: none;" th:each="carCounts : ${carCounts}">
     <input th:id="${carCounts.SM_ID}" th:value="${carCounts.CAR_COUNT}"/>
 </ul>
 <div id="background">
-    <iframe th:src="@{/visualization/event/getVisualizationMap}" id="map" scrolling="no" style="width: 100%;height: 100%;"></iframe>
+    <iframe th:src="@{/visualization/event/getVisualizationMap}" id="map" scrolling="no"
+            style="width: 100%;height: 100%;"></iframe>
     <script>
         //	iframe高度
         var hei = $(document).height();
@@ -203,7 +217,8 @@
                 <p class="on"><span class="jkd"><a>监控端</a></span><i></i></p>
                 <p><span class="gld"><a th:href="@{/index}" target="_blank">管理端</a></span><i></i></p>
                 <!--<p><span class="dsjd"><a th:href="@{/bigdata/inspection/getBigDataInspection}" target="_blank">大数据端</a></span><i></i></p>-->
-                <p><span class="dsq"><a id="dsq" href="http://117.78.49.164:9091/dahua/demo-dsd.html?deptId="[[${deptId}]] >电视墙</a></span><i></i></p>
+                <p><span class="dsq"><a id="dsq" href="http://119.52.253.110:9999/dahua/demo-dsd.html?deptId="
+                                        [[${deptId}]]>电视墙</a></span><i></i></p>
             </div>
 
         </div>
@@ -231,10 +246,10 @@
         </div>
     </div>
     <!--<div class="nav sxt">-->
-        <!--<div class="n_div" url="getVisualizationFrame_SXT">-->
-            <!--<a class="a_img"></a>-->
-            <!--<a class="a_txt">警戒头</a>-->
-        <!--</div>-->
+    <!--<div class="n_div" url="getVisualizationFrame_SXT">-->
+    <!--<a class="a_img"></a>-->
+    <!--<a class="a_txt">警戒头</a>-->
+    <!--</div>-->
     <!--</div>-->
     <div class="nav syjqd">
         <div class="n_div" url="getVisualizationFrame_SYSQ">
@@ -243,16 +258,16 @@
         </div>
     </div>
     <!--<div class="nav sl">-->
-        <!--<div class="n_div" url="getVisualizationFrame_SL">-->
-            <!--<a class="a_img"></a>-->
-            <!--<a class="a_txt">森林</a>-->
-        <!--</div>-->
+    <!--<div class="n_div" url="getVisualizationFrame_SL">-->
+    <!--<a class="a_img"></a>-->
+    <!--<a class="a_txt">森林</a>-->
+    <!--</div>-->
     <!--</div>-->
     <!--<div class="nav cl">-->
-        <!--<div class="n_div" url="getVisualizationFrame_CL">-->
-            <!--<a class="a_img"></a>-->
-            <!--<a class="a_txt">车辆</a>-->
-        <!--</div>-->
+    <!--<div class="n_div" url="getVisualizationFrame_CL">-->
+    <!--<a class="a_img"></a>-->
+    <!--<a class="a_txt">车辆</a>-->
+    <!--</div>-->
     <!--</div>-->
     <div class="nav ry">
         <div class="n_div" url="getVisualizationFrame_RY">
@@ -261,29 +276,29 @@
         </div>
     </div>
     <!--<div class="nav wrj">-->
-        <!--<div class="n_div" onclick="window.open('getWRJdemo')" >-->
-            <!--&lt;!&ndash;url="getVisualizationFrame_WRJ"&ndash;&gt;-->
-            <!--<a class="a_img"></a>-->
-            <!--<a class="a_txt">无人机</a>-->
-        <!--</div>-->
+    <!--<div class="n_div" onclick="window.open('getWRJdemo')" >-->
+    <!--&lt;!&ndash;url="getVisualizationFrame_WRJ"&ndash;&gt;-->
+    <!--<a class="a_img"></a>-->
+    <!--<a class="a_txt">无人机</a>-->
+    <!--</div>-->
     <!--</div>-->
     <!--<div class="nav lz">-->
-        <!--<div class="n_div" url="getVisualizationFrame_WRJGJ">-->
-            <!--<a class="a_img"></a>-->
-            <!--<a class="a_txt">无人机轨迹</a>-->
-        <!--</div>-->
+    <!--<div class="n_div" url="getVisualizationFrame_WRJGJ">-->
+    <!--<a class="a_img"></a>-->
+    <!--<a class="a_txt">无人机轨迹</a>-->
+    <!--</div>-->
     <!--</div>-->
     <!--<div class="nav wrj">-->
-        <!--<div class="n_div" onclick="window.open('getmeasure')">-->
-            <!--<a class="a_img"></a>-->
-            <!--<a class="a_txt">测量</a>-->
-        <!--</div>-->
+    <!--<div class="n_div" onclick="window.open('getmeasure')">-->
+    <!--<a class="a_img"></a>-->
+    <!--<a class="a_txt">测量</a>-->
+    <!--</div>-->
     <!--</div>-->
     <!--<div class="nav wrj">-->
-        <!--<div class="n_div" onclick="window.open('getmeasure_size')">-->
-            <!--<a class="a_img"></a>-->
-            <!--<a class="a_txt">测量面积</a>-->
-        <!--</div>-->
+    <!--<div class="n_div" onclick="window.open('getmeasure_size')">-->
+    <!--<a class="a_img"></a>-->
+    <!--<a class="a_txt">测量面积</a>-->
+    <!--</div>-->
     <!--</div>-->
     <!--<div class="nav lz">-->
     <!--<div class="n_div" url="getVisualizationFrame_LZ">-->
@@ -317,53 +332,87 @@
 <!--二维三维 结束-->
 <!--事件 左侧导航 开始-->
 <div class="left_nav">
-    <label><input type="checkbox" checked name="leftNav" id="slfh" />森林防火</label>
+    <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="lklf" />乱砍滥伐</label>-->
-    <label><input type="checkbox"  name="leftNav" id="jgfs" />秸秆焚烧</label>
-    <label><input type="checkbox"  name="leftNav" id="fxfk" />防汛防控</label>
-    <label><input type="checkbox"  name="leftNav" id="ysdw" />野生动物</label>
+    <label><input type="checkbox" name="leftNav" id="jgfs"/>秸秆焚烧</label>
+    <label><input type="checkbox" name="leftNav" id="fxfk"/>防汛防控</label>
+    <label><input type="checkbox" name="leftNav" id="ysdw"/>野生动物</label>
     <!--<label><input type="checkbox"  name="leftNav" id="tscs" />偷沙采石</label>-->
     <!--<label><input type="checkbox"  name="leftNav" id="toud" />偷盗</label>-->
     <!--<label><input type="checkbox"  name="leftNav" id="lyj" />林业局</label>-->
     <!--<label><input type="checkbox"  name="leftNav" id="sxt" />警戒头</label>-->
-    <label><input type="checkbox"  name="leftNav" id="lwt" />热感云台</label>
-    <label><input type="checkbox"  name="leftNav" id="phd" />扑火队</label>
-    <label><input type="checkbox"  name="leftNav" id="jjd" />起降点</label>
-    <label><input type="checkbox"  name="leftNav" id="qxz" />气象站</label>
-    <label><input type="checkbox"  name="leftNav" id="fhjcz" />防火检查站</label>
-    <label><input type="checkbox"  name="leftNav" id="jywz" />救援物资</label>
-    <label><input type="checkbox"  name="leftNav" id="lc" />林场</label>
-    <label><input type="checkbox"  name="leftNav" id="sy" />水源</label>
-    <label><input type="checkbox"  name="leftNav" id="sq" />水渠</label>
-    <label><input type="checkbox"  name="leftNav" id="qsk" />取水口</label>
+    <label><input type="checkbox" name="leftNav" id="lwt"/>热感云台</label>
+    <label><input type="checkbox" name="leftNav" id="phd"/>扑火队</label>
+    <label><input type="checkbox" name="leftNav" id="jjd"/>起降点</label>
+    <label><input type="checkbox" name="leftNav" id="qxz"/>气象站</label>
+    <label><input type="checkbox" name="leftNav" id="fhjcz"/>防火检查站</label>
+    <label><input type="checkbox" name="leftNav" id="jywz"/>救援物资</label>
+    <label><input type="checkbox" name="leftNav" id="lc"/>林场</label>
+    <label><input type="checkbox" name="leftNav" id="sy"/>水源</label>
+    <label><input type="checkbox" name="leftNav" id="sq"/>水渠</label>
+    <label><input type="checkbox" name="leftNav" id="qsk"/>取水口</label>
 </div>
 <!--事件 左侧导航 结束-->
 <!--森林 左侧导航 开始-->
 <!--<div class="left_nav" id="sl_nav">-->
-    <!--<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>-->
+<!--<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嵌套 开始-->
 <div class="zhly_k">
     <span class="zhly_close "><img th:src="@{/visualization/images/zhly_06.png}"/></span>
-    <iframe th:src="@{/visualization/event/getVisualizationFrame}" id="qt_iframe" scrolling="yes" ></iframe>
+    <iframe th:src="@{/visualization/event/getVisualizationFrame}" id="qt_iframe" scrolling="yes"></iframe>
 </div>
 <!--	iframe嵌套 结束-->
-<audio id="fireaudio" loop  th:src="@{/audio/firelong.wav}" controls="controls" refs="audio" style="display: none;"/>
+<audio id="fireaudio" loop th:src="@{/audio/firelong.wav}" controls="controls" refs="audio" style="display: none;"/>
 </body>
 <script>
-    $("input[name='all_event']").click(function() {
+    $("input[name='all_event']").click(function () {
         $("#map")[0].contentWindow.pushData($(this));
     });
 
     $(document).ready(function () {
-        $("#dsq").attr("href","http://117.78.49.164:9091/dahua/demo-dsd.html?deptId="+[[${deptId}]])
+        $("#dsq").attr("href", "http://117.78.49.164:9091/dahua/demo-dsd.html?deptId=" + [[${deptId}]])
+
     });
+
+
+    function setVisuSee() {
+        alert("1111");
+        var visuSee = "[[${visuSee}]]"
+        if(visuSee != undefined && visuSee != null && visuSee !=""){
+            var arr = visuSee.split(",");
+            alert(arr);
+            if (visuSee != "adminRole") {
+                var menus = $("input[name='leftNav']")
+                for (var i = 0; i < menus.length; i++) {
+                    var ishave = false;
+                    $(arr).each(function (index, item) {
+                        alert($(menus[i]).attr("id") + "*******" + item)
+                        if ($(menus[i]).attr("id") == item) {
+                            ishave = true;
+                            break;
+                        }
+                    })
+                    if (ishave) {
+                        $(menus[i]).attr("display", "block")
+                    } else {
+                        $(menus[i]).attr("display", "none")
+                    }
+                }
+            }
+        }
+    }
+
+    $(document).ready(function () {
+        setVisuSee();
+    })
+
 </script>
 </html>
 

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

@@ -136,6 +136,14 @@
     <div class="zhly_tit">
         <h3>新事件</h3>
     </div>
+    <script th:inline="javascript">
+        var a = [[${Visualization_Pending_List}]]
+        for(var i=0;i<a.length;i++){
+            console.log(a[i])
+        }
+
+    </script>
+
     <ul class="zhly_list1" id="newEvent">
         <li th:each="vpl : ${Visualization_Pending_List}" th:if="${vpl.EVENT_STATUS} eq 'event_status_1'">
             <a th:if="${vpl.EVENT_STATUS eq 'event_status_1' || vpl.EVENT_SIGN eq '0'}" th:onclick="flyTo([[${vpl.LATITUDE}]],[[${vpl.LONGITUDE}]])">
@@ -275,5 +283,15 @@
         $("#treeId").val("");
         $("#treeName").val("");
     }
+
+
+    /**
+     * 偷着请求下后台
+     */
+    function flushpage() {
+        window.location.reload(true)
+    }
+    window.setInterval(flushpage,1000*60*20)
+
 </script>
 </html>

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

@@ -557,7 +557,7 @@
                     window.open("/business/manager/hikcameracontroller/demo_window_simple_preview_wall_special_user?ID="+option.id);
                 }else{
                     // window.open("/business/manager/hikcameracontroller/demo_window_simple_preview_wall_special_user?ID="+option.id);
-                    window.open("https://122.141.177.213:9090/dahua/demo-jkd.html?hik_ip="+option.hik_ip+"&port="+option.hik_port+"&hik_username="+option.hik_username+"&hik_password="+option.hik_password);
+                    window.open("http://119.52.253.110:9999/dahua/demo-jkd.html?hik_ip="+option.hik_ip+"&port="+option.hik_port+"&hik_username="+option.hik_username+"&hik_password="+option.hik_password);
                     // $.ajax({
                     //     url : 'http://localhost:8899/camera_id='+option.hik_ip+","+option.hik_port+","+option.hik_username+","+option.hik_password+","+option.hik_deviceport,
                     //     error :function () {

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

@@ -65,7 +65,7 @@
     <ul class="zhly_list3">
         <li th:each="user : ${visualization_users}" >
             <div class="list_xl clearfix">
-                <a class="list_img fl"><img onerror="this.src='https://122.141.177.213:9090/soft/hww.png';" 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://119.52.253.110:9999/soft/hww.png';" 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 - 1
mybusiness/src/main/resources/templates/business/visualization/sxt.html

@@ -39,7 +39,7 @@
 </div>
 <div class="sxt_4 clearfix">
     <!--<a href="http://localhost:8899/cams">-->
-        <a href="http://117.78.49.164:9091/dahua/demo-dsd.html" target="_blank">
+        <a href="http://119.52.253.110:9999/dahua/demo-dsd.html" target="_blank">
         <!--<a href="/v/index/evenCamera" target="_blank">-->
         <div class="ztt sxt_div">
             <i></i>

+ 1 - 1
mybusiness/src/main/resources/templates/dahua/demo-dsd.html

@@ -308,7 +308,7 @@
             //请求方式
             type: "post",
             //文件位置
-            url: "http://117.78.49.164:9091/business/app/Dahua_Controller/queryAllCameras?deptId=" + deptId,
+            url: "http://119.52.253.110:9999/business/app/Dahua_Controller/queryAllCameras?deptId=" + deptId,
             //返回数据格式为json,也可以是其他格式如
             dataType: "json",
             async: true,

+ 1 - 1
mybusiness/src/main/resources/templates/dahua/demo-jkd.html

@@ -257,7 +257,7 @@
 	</div>
 -->
 <script src="module/foundation.js"></script>
-<script src="module/WebVideoCtrl.js"></script>
+<script src="module/WebVideoCtrl_sign.js"></script>
 <script src="module/modifyUI.js"></script>
 <script src="module/demo_jk.js"></script>
 

+ 13 - 5
mybusiness/src/main/resources/templates/dahua/lib/on_off_switch.js

@@ -3,6 +3,9 @@ var intercalHanler;
 var team_index = 0;
 var count;
 var team_num;
+
+var flush_time;
+
 $(document).ready(function () {
     $("#onoffswitch").on('click', function () {
         clickSwitch()
@@ -46,11 +49,12 @@ function lunbo() {
     team_index = 0;
 
     $.ajax({
-        url :"http://117.78.49.164:9091/DahuaDsdController/getDsdInfo",
+        url :"http://119.52.253.110:9999/DahuaDsdController/getDsdInfo",
         success:function (e) {
             startPlayVideo()
-            var time = parseInt(e.dsd_flush_time)*60000;
-            intercalHanler = window.setInterval(changeTeam, time)
+            flush_time = parseInt(e.dsd_flush_time)*60000;
+            // intercalHanler = window.setInterval(changeTeam, flush_time)
+            window.setTimeout(changeTeam, flush_time)
         }
     })
 
@@ -71,6 +75,8 @@ var hikPassword;
 function changeTeam() {
     team_index++;
     play_inde = 0
+    window.setTimeout(startPlayVideo,flush_time);
+
 }
 
 function startPlayVideo() {
@@ -84,9 +90,11 @@ function startPlayVideo() {
 
         if (play_index >= play_list.length) {
             play_index = 0
+        }else{
+            var o = play_list[play_index];
+            window.setTimeout(clickLogin, 5000, o.hikIp, o.hikPort, o.hikUsername, o.hikPassword)
         }
-        var o = play_list[play_index];
-        window.setTimeout(clickLogin, 5000, o.hikIp, o.hikPort, o.hikUsername, o.hikPassword)
+
     }
 
 

+ 4 - 2
mybusiness/src/main/resources/templates/dahua/module/WebVideoCtrl.js

@@ -605,7 +605,7 @@ var WebVideoCtrl = (function(e)
 	var connectRealVideo = function(sIP,iChannel,iStream,fnSuccess,fnFail){
 
 		pluginObject.GetSelectedNodeIndex().done(function(iNodeIndex){
-			if(isLunBo == true){
+			if(isLunBo != undefined && isLunBo == true){
                 iNodeIndex = play_index++
 			}
             console.log("iNodeIndex::",iNodeIndex)
@@ -620,7 +620,9 @@ var WebVideoCtrl = (function(e)
 								insertPlayer(iWinID,ODeviceInfo.deviceID,iRet,ODeviceInfo.ip,ODeviceInfo.protocol,iChannel,iStream,0);
 							})
 						};
-                        startPlayVideo()
+                        if(isLunBo != undefined && isLunBo == true) {
+                            startPlayVideo()
+                        }
 					}
 					else if(iRet <= 0){
 						if(typeof fnSuccess != "undefined"){