271 lines
8.0 KiB
Plaintext
271 lines
8.0 KiB
Plaintext
<%@ page contentType="text/html;charset=UTF-8" %>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
|
<!DOCTYPE html >
|
|
<html lang="en">
|
|
<head>
|
|
<%@include file="../baseset.jsp" %>
|
|
<%@include file="../systemset.jsp" %>
|
|
<link rel="stylesheet" href="${bonuspath}/static/plugins/zTree/3.5/zTreeStyle.css" />
|
|
<style type="text/css">
|
|
.exp{
|
|
postion:absolute;
|
|
max-hight: 36px;
|
|
line-height: 25px;
|
|
background-color:#1761c1;
|
|
border-radius:5px;
|
|
text-align:center;
|
|
padding:0.3%;
|
|
color:white;
|
|
border:none;
|
|
margin-top:-5%;
|
|
font-size: smaller;
|
|
}
|
|
|
|
</style>
|
|
<script src="${bonuspath}/static/plugins/zTree/3.5/jquery.ztree.all.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="page-content">
|
|
<div class="row-fluid">
|
|
<div class="col-xs-12">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<form id="baseForm" class="form-inline" method="POST" onsubmit="return false;">
|
|
<div class="widget-header widget-header-large" style="padding:10px;">
|
|
<div class="widget-main customBtn" >
|
|
<input id="keyWord" type="text" name="keyWord" placeholder="请输入关键词查询..." />
|
|
<button class="btn btn-success btn-sm" onclick="getbaseList(1)" id="search" title="查询" type="button">查询</button>
|
|
</div>
|
|
<div class="widget-toolbar customBtn">
|
|
<a title="新增" onclick="add()" class="lrspace3" ><i class='icon-plus-sign color bigger-180'></i></a>
|
|
<a title="刷新" id="searchBtn" onclick="getbaseList()" class="lrspace3" ><i class='icon-refresh bigger-180 orange'></i></a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<table id="baseTable" class="table table-striped table-bordered table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:4%" class='center'>序号</th>
|
|
<th style="width:10%" class='center'>考场</th>
|
|
<th style="width:15%" class="center">场次编号</th>
|
|
<th style="width:17%" class="center">摄像头</th>
|
|
<th style="width:18%" class="center">摄像头管辖座位号</th>
|
|
<th style="width:10%" class="center">备注</th>
|
|
<th style="width:10%" class="center">操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!-- #dialog-confirm -->
|
|
<%@include file="../dialog.jsp" %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
var obj = {};
|
|
|
|
$(function(){
|
|
getbaseList(1);
|
|
$("#keyWord").keydown(function(e) {
|
|
keycode = e.which || e.keyCode;
|
|
if (keycode == 13) {
|
|
search();
|
|
}
|
|
});
|
|
});
|
|
|
|
function add() {
|
|
var index = layer.open({
|
|
type: 2,
|
|
title: "新增报考人员",
|
|
btn:["保存","取消"],
|
|
shade: [0],
|
|
area: ['90%', '90%'],
|
|
anim: 2,
|
|
yes: function(index, layero) {
|
|
var obj = $(layero).find("iframe")[0].contentWindow;
|
|
var valid = obj.formValid();
|
|
if(!valid) {
|
|
return;
|
|
}
|
|
obj.submitApply();
|
|
},
|
|
content: [bonuspath +'/backstage/camera/cameraFormPage']
|
|
});
|
|
}
|
|
|
|
function view(registrationId) {
|
|
var index = layer.open({
|
|
type: 2,
|
|
title: "人员查看",
|
|
btn:["取消"],
|
|
shade: [0],
|
|
area: ['60%', '60%'],
|
|
anim: 2,
|
|
content: [bonuspath +'/backstage/registration/findRegistrationForm?registrationId='+registrationId+'&type=view']
|
|
});
|
|
}
|
|
|
|
function edit(registrationId) {
|
|
var index = layer.open({
|
|
type: 2,
|
|
title: "人员信息修改",
|
|
btn:["保存","取消"],
|
|
shade: [0],
|
|
area: ['60%', '60%'],
|
|
anim: 2,
|
|
yes: function(index, layero) {
|
|
var obj = $(layero).find("iframe")[0].contentWindow;
|
|
var valid = obj.formValid();
|
|
if(!valid) {
|
|
return;
|
|
}
|
|
obj.updateRegistration();
|
|
},
|
|
content: [bonuspath +'/backstage/registration/findRegistrationForm?registrationId='+registrationId+'&type=edit']
|
|
});
|
|
}
|
|
|
|
function getbaseList(init){
|
|
obj = {};
|
|
if(!JY.Object.notNull(init)){
|
|
init = $("#pageNum").val();
|
|
}
|
|
var size = $("#pageSize").val();
|
|
var data = {pageNum:init,pageSize:size};
|
|
data.obj = getObjParam("baseForm");
|
|
var idx = layer.msg('正在加载数据,请稍等...', {
|
|
icon: 16
|
|
,shade: 0.01
|
|
,time:'-1'
|
|
});
|
|
$.ajax({
|
|
type:"POST",
|
|
url:bonuspath +'/backstage/camera/findByPage',
|
|
data: JSON.stringify(data),
|
|
dataType:"html",
|
|
contentType:"application/json",
|
|
success:function(data){
|
|
$("#baseTable tbody").html(data);
|
|
layer.close(idx);
|
|
}
|
|
})
|
|
}
|
|
|
|
//删除
|
|
function del(registrationId) {
|
|
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'
|
|
});
|
|
$.ajax({
|
|
type:"POST",
|
|
url:bonuspath +'/backstage/registration/deleteApply',
|
|
data:{registrationId: registrationId},
|
|
success:function(data) {
|
|
layer.close(idx);
|
|
var datas = JSON.parse(data);
|
|
var indexMsg = layer.confirm("<h3 style='color:red'>"+datas.resMsg+"</h3>", {btn: ['关闭']},function(){
|
|
layer.close(indexMsg);
|
|
getbaseList();
|
|
});
|
|
},
|
|
error:function(data){
|
|
layer.close(idx);
|
|
var indexMsg = layer.confirm('请求发送失败', {btn: ['关闭']},function(){
|
|
layer.close(indexMsg);
|
|
});
|
|
}
|
|
})
|
|
});
|
|
}
|
|
|
|
//全选checkbox功能
|
|
function checkAllId() {
|
|
var checkAll = document.getElementById("checkAll");
|
|
var checked = $(checkAll).prop('checked');
|
|
var ids = document.getElementsByName("ids");
|
|
if(checked){
|
|
for(var i in ids){
|
|
ids[i].checked = true;
|
|
}
|
|
}else{
|
|
for(var i in ids){
|
|
ids[i].checked = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
//获取多选ID
|
|
function checkIdList(){
|
|
var ids = '';
|
|
$("input[type='checkbox']:checked").each(function() {
|
|
var id = $(this).val();
|
|
ids += id + ',';
|
|
|
|
})
|
|
return ids;
|
|
}
|
|
|
|
function importData() {
|
|
var formData = new FormData($('form')[0]);
|
|
var name = $("#articleImageFile").val();
|
|
if(name==null|| name == "") {
|
|
return;
|
|
}else{
|
|
if(!(name.endsWith(".xls") || name.endsWith(".xlsx") || name.endsWith(".xlsm"))) {
|
|
alert("请上传正确的Excel表格!");
|
|
$("#articleImageFile").val("");
|
|
return;
|
|
}else{
|
|
formData.append("file", $("#articleImageFile")[0].files[0]);
|
|
var idx = layer.msg('正在提交数据,请稍等...', {
|
|
icon: 16
|
|
,shade: 0.01
|
|
,time:'-1'
|
|
});
|
|
$.ajax({
|
|
url : bonuspath + "/backstage/registration/import",
|
|
type : 'POST',
|
|
async : true,
|
|
data : formData,
|
|
timeout:20000,
|
|
// 告诉jQuery不要去处理发送的数据
|
|
processData : false,
|
|
// 告诉jQuery不要去设置Content-Type请求头
|
|
contentType : false,
|
|
success : function(data) {
|
|
layer.close(idx);
|
|
var datas = JSON.parse(data);
|
|
var indexMsg = layer.confirm("<h3 style='color:red'>"+datas.resMsg+"</h3>", {btn: ['关闭']},function(){
|
|
layer.close(indexMsg);
|
|
getbaseList();
|
|
});
|
|
},
|
|
error:function(XMLHttpRequest, textStatus, errorThrown) {
|
|
console.log(JSON.stringify(errorThrown));
|
|
layer.close(idx);
|
|
var datas = JSON.parse(data);
|
|
var indexMsg = layer.confirm("<h3 style='color:red'>"+datas.resMsg+"</h3>", {btn: ['关闭']},function(){
|
|
layer.close(indexMsg);
|
|
});
|
|
}
|
|
});
|
|
$("#articleImageFile").val("");
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
</body>
|
|
</html> |