118 lines
5.0 KiB
Plaintext
118 lines
5.0 KiB
Plaintext
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||
<style type="text/css">
|
||
.select2-container .select2-selection--single{
|
||
height:34px;
|
||
line-height: 34px;
|
||
}
|
||
.select2-selection__arrow{
|
||
margin-top:3px;
|
||
}
|
||
/* table[ip] tr th,table[ip] tr td{
|
||
border: 1px solid grey;
|
||
text-align: center;
|
||
height: 30px;
|
||
width:25%;
|
||
} */
|
||
</style>
|
||
<script type="text/javascript">
|
||
|
||
function docameraupdate(){
|
||
|
||
$.post(ext.contextPath + "/work/cameraNVR/update.do", $("#subFormnvr").serialize(), function(data) {
|
||
if (data.res == 1) {
|
||
$("#table_nvr_Detail").bootstrapTable('refresh');
|
||
document.getElementById("subNVRModal").setAttribute("class", "modal hidden fade");
|
||
$(".modal-backdrop").remove();
|
||
}else if(data.res == 0){
|
||
showAlert('d','保存失败');
|
||
}else{
|
||
showAlert('d',data.res);
|
||
}
|
||
},'json');
|
||
|
||
}
|
||
|
||
$("#subFormnvr").bootstrapValidator({
|
||
// live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||
// fields: {
|
||
// name: {
|
||
// validators: {
|
||
// notEmpty: {
|
||
// message: '用户名不能为空'
|
||
// }
|
||
// }
|
||
// },
|
||
// }
|
||
});
|
||
|
||
$(function() {
|
||
});
|
||
|
||
|
||
var showAreaManage4SelectFun = function() {
|
||
$.post(ext.contextPath + '/work/areaManage/showList4Select.do', {formId:"subFormnvr",hiddenId:"areamanageid",textId:"aname"} , function(data) {
|
||
$("#fault4SelectNVRDiv").html(data);
|
||
openModal('fault4SelectModal');
|
||
});
|
||
};
|
||
</script>
|
||
<div class="modal fade" id="subNVRModal">
|
||
<div class="modal-dialog modal-lg">
|
||
<div class="modal-content" style="width: 850px;">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||
<span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title">编辑视频回放地址</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<!-- 新增界面formid强制为subForm -->
|
||
<form class="form-horizontal" id="subFormnvr" enctype="multipart/form-data" >
|
||
<div id="fault4SelectDiv"></div>
|
||
<!-- 界面提醒div强制id为alertDiv -->
|
||
<input type="hidden" id="id" name="id" value="${cameraNVR.id}">
|
||
<div id="alertDiv"></div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">NVR名称</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" id="name" name="name" class="form-control pull-right" value="${cameraNVR.name}" placeholder="NVR名称">
|
||
</div>
|
||
<label class="col-sm-2 control-label">所属区域</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" class="form-control" id="aname" name ="aname" placeholder="上级区域" value="${cameraNVR.areaManage.name}" onclick="showAreaManage4SelectFun();" ></input>
|
||
<input id="areamanageid" name="areamanageid" value="${cameraNVR.areaManage.id}" type="hidden"/>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">用户名</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" id="username" name="username" class="form-control pull-right" value="${cameraNVR.username}" placeholder="NVR用户名">
|
||
</div>
|
||
<label class="col-sm-2 control-label">密码</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" id="password" name="password" class="form-control pull-right" value="${cameraNVR.password}" placeholder="NVR密码">
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">NVR地址</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" id="ip" name="ip" class="form-control pull-right" value="${cameraNVR.ip}" placeholder="NVR地址">
|
||
</div>
|
||
<label class="col-sm-2 control-label">NVR通道</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" id="channel" name="channel" class="form-control pull-right" value="${cameraNVR.channel}" placeholder="1">
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||
<button type="button" class="btn btn-primary" onclick="docameraupdate()" >保存</button>
|
||
</div>
|
||
</div>
|
||
<!-- /.modal-content -->
|
||
</div>
|
||
<!-- /.modal-dialog -->
|
||
</div>
|