209 lines
6.0 KiB
Plaintext
209 lines
6.0 KiB
Plaintext
<%@ page contentType="text/html;charset=UTF-8" %>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
|
<%@ taglib prefix="fns" uri="/WEB-INF/tlds/fns.tld" %>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<%@include file="../baseset.jsp" %>
|
|
<%@include file="../systemset.jsp" %>
|
|
<link rel="stylesheet" href="${bonuspath}/static/plugins/zTree/3.5/zTreeStyle.css" />
|
|
<script src="${bonuspath}/static/plugins/zTree/3.5/jquery.ztree.core-3.5.min.js"></script>
|
|
<title></title>
|
|
<style type="text/css">
|
|
.p{
|
|
margin:1% 2% 0 1%;
|
|
}
|
|
.flag{
|
|
width:15%;
|
|
text-align: right;
|
|
}
|
|
.flag>span{
|
|
padding-right:1em;
|
|
}
|
|
.con{
|
|
width:35%;
|
|
text-align: left;
|
|
}
|
|
.lang{
|
|
valign:middle;
|
|
width:80%;
|
|
text-align: left;
|
|
}
|
|
.inp{
|
|
width:80%;
|
|
}
|
|
|
|
.linp{
|
|
width:91.5%;
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="p">
|
|
<form id="gradeForm" method="POST" onsubmit="return false;" >
|
|
<table id="baseTable" cellspacing="0" cellpadding="0" border="0" style="margin: 2em 1em;" class="customTable">
|
|
<tbody>
|
|
<tr class="FormData">
|
|
<td class="flag"><span><font color="red">*</font>考场:</span></td>
|
|
<td class="con">
|
|
<select id="roomId" name="roomId" class="inp">
|
|
<c:forEach items="${findRoomInfo}" var="post">
|
|
<option value="${post.roomId}"
|
|
<c:if test="${registration.roomId eq post.roomId}">selected="selected"</c:if> >${post.roomName}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr class="FormData">
|
|
<td class="flag"><span><font color="red"></font> </span></td>
|
|
<td class="con">
|
|
<input class="inp" id="orgName" readonly="readonly" value="点击新增摄像头管理" jyValidate="required" type="text" onclick="showRole(); return false;" />
|
|
<div id='orgContent' class="menuContent ztreeMC" style="display: none;width:25%; position: absolute;z-index: 999;background-color: #e7e7e7;">
|
|
<ul id="orgTree" class="ztree accountOrgTree"></ul>
|
|
</div>
|
|
</td>
|
|
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
<table id="baseTable1" cellspacing="0" cellpadding="0" border="0" style="margin: 2em 1em;" class="customTable">
|
|
<tr>
|
|
<td colspan="4">
|
|
<table id="machineTable" class="table table-striped table-bordered table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:5%" class="center hidden-480">序号</th>
|
|
<th style="width:10%" class="center">摄像头</th>
|
|
<th style="width:10%" class="center">摄像头管理座位号</th>
|
|
<th style="width:5%" class="center">操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="list">
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<script type="text/javascript">
|
|
var machines = new Set(); //专业容器
|
|
var size = 1; //序号
|
|
var map =[];
|
|
var mapinfo={};
|
|
var index=0;
|
|
$(function () {
|
|
|
|
});
|
|
|
|
function showRole() {
|
|
index++;
|
|
$("#list").append(renderData(index, 1, 1));
|
|
}
|
|
|
|
function renderData(index,sxt,site){
|
|
var html = "";
|
|
html += "<tr class='pa'>";
|
|
html += "<td class='center'>"+index+"</td>";
|
|
html += "<td class='center'><input filed='cameraName,val'></td>";
|
|
html += "<td class='center'><input readonly filed='cameraSites,val' onclick='site("+index+",this)'/></td>";
|
|
html += "<td class='center'><a onclick='delPartData("+1+",this)'>删除</a></td></tr>";
|
|
return html;
|
|
}
|
|
function site(index,that){
|
|
var index = layer.open({
|
|
type: 2,
|
|
title: "座位号管理",
|
|
btn:["保存","取消"],
|
|
shade: [0],
|
|
area: ['100%', '100%'],
|
|
anim: 2,
|
|
yes: function(index, layero) {
|
|
var obj = $(layero).find("iframe")[0].contentWindow;
|
|
var valid = obj.formValid();
|
|
if(!valid) {
|
|
return;
|
|
}
|
|
var a=obj.addRegistration();
|
|
$(that).val(a);
|
|
layer.close(index);
|
|
},
|
|
content: [bonuspath +'/backstage/camera/siteFormPage']
|
|
});
|
|
}
|
|
|
|
function delPartData(id,that){
|
|
var indexMsg = layer.confirm("<h4 style='color:red'>您确定删除吗?</h4>", {btn: ['确定','取消']},function(){
|
|
layer.close(indexMsg);
|
|
$(that).parent().parent().remove();
|
|
});
|
|
}
|
|
|
|
function formValid(){
|
|
return JY.Validate.form("gradeForm");
|
|
}
|
|
function submitApply(){
|
|
var machines = [];
|
|
var o={};
|
|
if(JY.Validate.newForm("gradeForm")){
|
|
|
|
var obj = paramConversionToObjOfForm("gradeForm");
|
|
var roomId = $("#roomId").val();
|
|
var size = $(".pa").size();
|
|
if(size == 0){
|
|
showMsg("您还没有选择任何需求,请先选择设备") ;
|
|
return;
|
|
}
|
|
var oo = {}
|
|
var arr = [];
|
|
$(".pa").each(function(){
|
|
o = paramConversionToObjOfForm2(this);
|
|
console.log("qqq"+JSON.stringify(o));
|
|
arr.push(o);
|
|
});
|
|
obj.sfb = arr;
|
|
obj.roomId = roomId;
|
|
console.info("obj:",obj)
|
|
debugger;
|
|
var indexMsg = layer.confirm("<h4 style='color:red'>您确定保存该选择结果吗?</h4>", {btn: ['确认','取消']},function(){
|
|
layer.close(indexMsg);
|
|
|
|
var idx = layer.msg('正在提交保存,请稍等...', {
|
|
icon: 16
|
|
,shade: 0.01
|
|
,time:'-1'
|
|
});
|
|
console.info("obj:",obj)
|
|
$.ajax({
|
|
type:"POST",
|
|
url:bonuspath +'/backstage/camera/savecamera',
|
|
data: JSON.stringify(obj),
|
|
contentType:"application/json",
|
|
dataType:"json",
|
|
success:function(data){
|
|
layer.close(idx);
|
|
if(data.res == 1){
|
|
|
|
var i = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
parent.layer.close(i);
|
|
parent.showMsgAndReload(data.resMsg);
|
|
}else{
|
|
var indexMsg = layer.confirm(data.resMsg, {btn: ['关闭']},function(){
|
|
layer.close(indexMsg);
|
|
});
|
|
}
|
|
|
|
},
|
|
error:function(data){
|
|
layer.msg("数据加载失败!",{icon:2,time:2000})
|
|
layer.close(idx);
|
|
}
|
|
}) ;
|
|
}) ;
|
|
}
|
|
}
|
|
|
|
</script> |