You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
184 lines
5.5 KiB
184 lines
5.5 KiB
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
|
pageEncoding="UTF-8"%>
|
|
<%@ page import="com.lp.cfg.ProConfig"%>
|
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<%@ include file="/WEB-INF/oss/iot/common/variable.jsp"%>
|
|
<%@ include file="/WEB-INF/oss/iot/common/variable_js.jsp"%>
|
|
<%@ include file="/WEB-INF/oss/iot/common/resource_lib.jsp"%>
|
|
<style type="text/css">
|
|
.index_theLeft ul {
|
|
width: 100%;
|
|
padding: 0px;
|
|
margin: 0px;
|
|
overflow: auto;
|
|
}
|
|
|
|
.mapContainer{
|
|
height: 550px;width:100%;padding-left:170px;
|
|
}
|
|
|
|
.app-container{
|
|
background: #f2f2f2;width: 100%;border-top:1px solid #ecf0f5;
|
|
}
|
|
|
|
.box-white {
|
|
width: 97%;
|
|
min-width: 897px;
|
|
padding-bottom: 0;
|
|
margin: 0 auto;
|
|
}
|
|
.box {
|
|
padding: 10px;
|
|
padding-top:1px;
|
|
border-left: 1px solid #d2d6de;
|
|
border-right: 1px solid #d2d6de;
|
|
border-bottom: 1px solid #d2d6de;
|
|
}
|
|
.box {
|
|
border: 0!important;
|
|
box-shadow: 0 0 2px 1px rgba(13,5,9,.08)!important;
|
|
}
|
|
.box {
|
|
position: relative;
|
|
border-radius: 3px;
|
|
background: #fff;
|
|
border-top: 3px solid #d2d6de;
|
|
margin-bottom: 20px;
|
|
width: 100%;
|
|
box-shadow: 0 1px 1px rgba(0,0,0,.1);
|
|
}
|
|
|
|
.sceneList-info{
|
|
padding-top: 10px;
|
|
padding-left: 10px;
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div>
|
|
<div>
|
|
<!-- 左边栏 -->
|
|
<div class="float-left index_theLeft" style="width:170px;">
|
|
<div class="prolist">
|
|
<span>项目列表</span>
|
|
</div>
|
|
<ul class="dashboard-menu">
|
|
<c:forEach items="${info.data.getData()}" varStatus="status" var="obj">
|
|
<li onclick="changeScene(this)"
|
|
<c:if test="${id !=null }">
|
|
<c:if test="${obj.id ==id}">
|
|
class="active"
|
|
</c:if>
|
|
</c:if>
|
|
<c:if test="${id ==null }">
|
|
<c:if test="${status.index ==0}">
|
|
class="active"
|
|
</c:if>
|
|
</c:if>
|
|
sid="${obj.id}">
|
|
<span class="icon-stack-overflow"></span> ${obj.name }
|
|
</li>
|
|
</c:forEach>
|
|
</ul>
|
|
</div>
|
|
<div class="mapContainer" >
|
|
<div class="app-container">
|
|
<div class="container-layout sceneList-info">
|
|
<div class="box join-device-box">
|
|
|
|
<div class="search-container jui-search_table" data-options="submit:'#searchbtns',table:'#init-table'">
|
|
<span class="titleName">摄像头管理</span>
|
|
|
|
<input type-name="name" placeholder="摄像头名称查询" class="input input-self" />
|
|
<button id="searchbtns" class="button ml-20 bg-iot "><span class="icon-search"></span> 查询</button>
|
|
<input type-name="scene_id" class="scene_id" type="hidden" />
|
|
<button onclick="addVideo()" class="button ml-20 bg-iot float-right"><span class="icon-plus"></span> 新增摄像头</button>
|
|
<button id="synchroniz" class="button ml-20 bg-iot float-right"><span class="icon-refresh"></span> 同步设备</button>
|
|
</div>
|
|
|
|
<div style="margin-top:10px;">
|
|
<div id="init-table" type-option="table" config-option="'url':'/page/video',
|
|
param:{ scene_id:'$.scene_id$' },
|
|
columns:[
|
|
{'name':'序号','type':'seq','value':'seq','width':'6%'},
|
|
{'name':'摄像头名称','value':'name','width':'15%'},
|
|
{'name':'设备序列号','value':'device_serial','width':'15%'},
|
|
{'name':'所属项目','value':'scene_name','width':'10%'},
|
|
{'name':'类型','type':'category','value':'video_type','width':'10%'},
|
|
{'name':'新增时间','type':'time','value':'atime','width':'15%'},
|
|
{'name':'操作','type':'self','value_callback':'value_function','width':'10%'}]" >
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
<script type="text/javascript">
|
|
function changeScene(obj){
|
|
$(".dashboard-menu li").removeClass("active");
|
|
$(obj).addClass("active");
|
|
$(".scene_id").val($(".dashboard-menu li.active").attr("sid"));
|
|
reflash( $(".dashboard-menu li.active").attr("sid"));
|
|
}
|
|
function reflash(id){
|
|
$("#init-table").data("params",{ scene_id: $(".scene_id").val() });
|
|
$("#init-table").tableAdaptor();
|
|
}
|
|
function value_function(data,seq){
|
|
return "<span tag='编辑' onclick='t_edit(this,"+data.id+")' class='self-icon icon-edit'></span>"+
|
|
"<span tag='删除' onclick='t_delete(this,"+data.id+")' class='self-icon icon-bitbucket'></span>";
|
|
}
|
|
function t_edit(obj,id){
|
|
forwardUrl("/iot/video_info_detail?id="+ $(".scene_id").val() +"&sid="+id);
|
|
}
|
|
function t_delete(obj,id){
|
|
lcomfirm('是否确定删除该摄像头?',function(){
|
|
commonAjax("DELETE",localUrl+"/video?id="+id, "",function(data){
|
|
if(isOK(data)){
|
|
tip("删除成功");
|
|
setTimeout(function(){
|
|
closeAll();
|
|
$("#init-table").tableAdaptor();
|
|
},1000)
|
|
}else{
|
|
tip( data.statusMsg );
|
|
}
|
|
});
|
|
});
|
|
}
|
|
|
|
function addVideo(){
|
|
if($(".scene_id").val()!=null && $(".scene_id").val()!= ''){
|
|
forwardUrl("/iot/video_info_detail?id="+ $(".scene_id").val());
|
|
}else{
|
|
tip("请先添加项目信息");
|
|
}
|
|
}
|
|
$("#synchroniz").click(function(){
|
|
var scene_id = $(".dashboard-menu li.active").attr("sid");
|
|
lcomfirm('是否同步萤石摄像头,确认将同步所有摄像头到当前项目?',function(){
|
|
commonAjax("POST",localUrl+"/synchroniz/device.json", {scene_id:scene_id},function(){
|
|
tip("已同步");
|
|
setTimeout(function(){
|
|
closeAll();
|
|
$("#init-table").tableAdaptor();
|
|
},1000)
|
|
});
|
|
});
|
|
})
|
|
|
|
$(function(){
|
|
$(".scene_id").val($(".dashboard-menu li.active").attr("sid"));
|
|
})
|
|
</script>
|
|
</html>
|