555 lines
17 KiB
Plaintext
555 lines
17 KiB
Plaintext
|
|
<%@page import="com.bonus.core.DateTimeHelper"%>
|
||
|
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
||
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||
|
|
<!DOCTYPE html >
|
||
|
|
<html lang="en">
|
||
|
|
<meta name="renderer" content="webkit">
|
||
|
|
<head>
|
||
|
|
<%@include file="../baseset.jsp" %>
|
||
|
|
<%@include file="../systemset.jsp" %>
|
||
|
|
</head>
|
||
|
|
<style type="text/css">
|
||
|
|
.widget-toolbar a{
|
||
|
|
vertical-align:middle;
|
||
|
|
}
|
||
|
|
.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;
|
||
|
|
}
|
||
|
|
.ui-state-focus{
|
||
|
|
display: none !important;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
<body>
|
||
|
|
<div class="page-content" >
|
||
|
|
<div class="row-fluid">
|
||
|
|
<div class="col-xs-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="试卷名称关键字查询" />
|
||
|
|
<input style="width: 10%;" placeholder="选择开始发布时间" readonly="readonly" class="t" id="startTime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'',maxDate:''})" name="startTime" type="text">-
|
||
|
|
-<input style="width: 10%;" placeholder="选择结束发布时间" readonly="readonly" class="t" id="endTime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'',maxDate:''})" name="endTime" type="text">
|
||
|
|
<button class="btn btn-success btn-sm" onclick="getTime()" id="searchBtn" title="查询" type="button">查询</button>
|
||
|
|
</div>
|
||
|
|
<div class="widget-toolbar customBtn">
|
||
|
|
<a href="#" title="新增" id="addBtn" class="lrspace3"><i class="icon-plus-sign color bigger-180"></i></a>
|
||
|
|
<button type="button" class="exp" onclick="exportallpeople()" style="width:78px;">导出考试成绩</button>
|
||
|
|
<a title="打印" onclick="print()" class="lrspace3" ><i class='icon-print color-green bigger-180'></i></a>
|
||
|
|
<a href="#" title="刷新" onclick="getbaseList(1)" 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:2%" class="center">
|
||
|
|
<input type="checkbox" id="checkAll" onclick="checkAllId()"/>
|
||
|
|
</th>
|
||
|
|
<th style="width:3%" class="center">序号</th>
|
||
|
|
<th style="width:10%" class="center">试卷名称</th>
|
||
|
|
<th style="width:7%" class="center">发布时间</th>
|
||
|
|
<th style="width:7%" class="center">开始时间</th>
|
||
|
|
<th style="width:3%" class="center">考试时长/分钟</th>
|
||
|
|
<th style="width:6%" class="center">发布考试人员</th>
|
||
|
|
<th style="width:6%" class="center">考试场次</th>
|
||
|
|
<th style="width:6%" class="center">考试状态</th>
|
||
|
|
<th style="width:11%" class="center">操作</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody></tbody>
|
||
|
|
</table>
|
||
|
|
<div class="row">
|
||
|
|
<div class="col-sm-3">
|
||
|
|
</div>
|
||
|
|
<div class="col-sm-9">
|
||
|
|
<!--设置分页位置-->
|
||
|
|
<div id="pageing" class="dataTables_paginate paging_bootstrap">
|
||
|
|
<ul class="pagination"></ul>
|
||
|
|
</div>
|
||
|
|
</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 exportcj(examId,examName){
|
||
|
|
var idx = layer.msg('请稍等...', {
|
||
|
|
icon: 16
|
||
|
|
,shade: 0.01
|
||
|
|
,time:'-1'
|
||
|
|
});
|
||
|
|
$(location).attr("href",bonuspath +'/backstage/score/exportcj?examId='+examId+'&filename='+examName);
|
||
|
|
layer.close(idx);
|
||
|
|
}
|
||
|
|
|
||
|
|
/*
|
||
|
|
function exportallpeople(examId,examName){
|
||
|
|
$(location).attr("href",bonuspath +'/backstage/score/exportallpeople?examId='+examId+'&filename='+examName);
|
||
|
|
}
|
||
|
|
*/
|
||
|
|
function exportallpeople(){
|
||
|
|
if(validCheckboxCheckedNum(1)) {
|
||
|
|
var oo = $(".cb:checkbox:checked:eq(0)");
|
||
|
|
var id = oo.val();
|
||
|
|
//查询考试是否结束
|
||
|
|
$.ajax({
|
||
|
|
type:'POST',
|
||
|
|
url:bonuspath +'/backstage/grade/findIsEnd',
|
||
|
|
data: {examId:id},
|
||
|
|
success:function(data) {
|
||
|
|
var d = data.trim();
|
||
|
|
if(d.indexOf("考试已结束") != -1) {
|
||
|
|
$(location).attr("href", bonuspath +'/backstage/score/exportallpeople?examId='+id);
|
||
|
|
} else {
|
||
|
|
var html = "<h4 style='color:red;'>考试未结束,无法导出</h4>";
|
||
|
|
var idcardMsg = layer.confirm(html, {btn: ['关闭']},function(){
|
||
|
|
layer.close(idcardMsg);
|
||
|
|
});
|
||
|
|
}
|
||
|
|
},
|
||
|
|
error:function(data){
|
||
|
|
var html = "<h4 style='color:red;'>导出异常</h4>";
|
||
|
|
var idcardMsg = layer.confirm(html, {btn: ['关闭']},function(){
|
||
|
|
layer.close(idcardMsg);
|
||
|
|
});
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
// 停止考试
|
||
|
|
function stopExam(examId) {
|
||
|
|
layer.open({
|
||
|
|
type: 2,
|
||
|
|
title: "查看考试结果",
|
||
|
|
shade: [0],
|
||
|
|
btn: ['确认终止','取消'], //按钮组
|
||
|
|
area: ['80%', '80%'],
|
||
|
|
scrollbar: true,
|
||
|
|
shadeClose: true, //点击遮罩区域是否关闭页面
|
||
|
|
anim: 2,
|
||
|
|
yes: function(index,layero){
|
||
|
|
// var obj = $(layero).find("iframe")[0].contentWindow;
|
||
|
|
// var data=obj.getInfo();
|
||
|
|
// console.log(data);
|
||
|
|
$.ajax({
|
||
|
|
type:'POST',
|
||
|
|
url:bonuspath +'/backstage/grade/stopExam',
|
||
|
|
data: {examId:examId},
|
||
|
|
success:function(data) {
|
||
|
|
var da = JSON.parse(data);
|
||
|
|
console.log("da=",da);
|
||
|
|
layer.close(index);
|
||
|
|
showMsgAndReload(da.resMsg);
|
||
|
|
},
|
||
|
|
error:function(data){
|
||
|
|
console.log("data=",data);
|
||
|
|
layer.msg('请求发送失败',{icon:2,time:2000})
|
||
|
|
}
|
||
|
|
});
|
||
|
|
},
|
||
|
|
content: [bonuspath +'/backstage/grade/showPersonScoreResult?id='+examId]
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
// 选座
|
||
|
|
function selectSeat(examId,examPersonNum) {
|
||
|
|
layer.open({
|
||
|
|
type: 2,
|
||
|
|
title: "选择考试座位",
|
||
|
|
shade: [0],
|
||
|
|
btn: ['确认','取消'], //按钮组
|
||
|
|
area: ['80%', '80%'],
|
||
|
|
scrollbar: true,
|
||
|
|
shadeClose: true, //点击遮罩区域是否关闭页面
|
||
|
|
anim: 2,
|
||
|
|
yes: function(index,layero){
|
||
|
|
var obj = $(layero).find("iframe")[0].contentWindow;
|
||
|
|
var data=obj.getInfo();
|
||
|
|
data.examId = examId;
|
||
|
|
console.log("关闭座位:",data);
|
||
|
|
var dataSp = data.seatNumArrs.split(";").length-1;
|
||
|
|
console.log(examPersonNum);
|
||
|
|
if(dataSp < examPersonNum) {
|
||
|
|
var indexMsg = layer.confirm("<span style='color: red'>您已选择"+dataSp+"个座位,但本场考试有"+examPersonNum+"人报名,请选择足够数量的座位!!!</span>", {btn: ['关闭']},function(){
|
||
|
|
layer.close(indexMsg);
|
||
|
|
});
|
||
|
|
}else{
|
||
|
|
$.ajax({
|
||
|
|
type:'POST',
|
||
|
|
url:bonuspath +'/backstage/seat/saveSeatNum',
|
||
|
|
data: data,
|
||
|
|
success:function(data) {
|
||
|
|
var da = JSON.parse(data);
|
||
|
|
console.log("da=",da);
|
||
|
|
layer.close(index);
|
||
|
|
showMsgAndReload(da.resMsg);
|
||
|
|
},
|
||
|
|
error:function(data){
|
||
|
|
console.log("data=",data);
|
||
|
|
layer.msg('请求发送失败',{icon:2,time:2000})
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
},
|
||
|
|
content: [bonuspath +'/backstage/seat/selectSeat?id='+examId]
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
// 选座
|
||
|
|
function checkSeat(examId,examPersonNum) {
|
||
|
|
layer.open({
|
||
|
|
type: 2,
|
||
|
|
title: "查看考场人员座位情况",
|
||
|
|
shade: [0],
|
||
|
|
btn: ['关闭'], //按钮组
|
||
|
|
area: ['80%', '80%'],
|
||
|
|
scrollbar: true,
|
||
|
|
shadeClose: true, //点击遮罩区域是否关闭页面
|
||
|
|
anim: 2,
|
||
|
|
/*yes: function(index,layero){
|
||
|
|
var obj = $(layero).find("iframe")[0].contentWindow;
|
||
|
|
var data=obj.getInfo();
|
||
|
|
data.examId = examId;
|
||
|
|
console.log("关闭座位:",data);
|
||
|
|
var dataSp = data.seatNumArrs.split(";").length-1;
|
||
|
|
debugger;
|
||
|
|
console.log(examPersonNum);
|
||
|
|
if(dataSp < examPersonNum) {
|
||
|
|
var indexMsg = layer.confirm("<span style='color: red'>您已选择"+dataSp+"个座位,但本场考试有"+examPersonNum+"人报名,请选择足够数量的座位!!!</span>", {btn: ['关闭']},function(){
|
||
|
|
layer.close(indexMsg);
|
||
|
|
});
|
||
|
|
}else{
|
||
|
|
$.ajax({
|
||
|
|
type:'POST',
|
||
|
|
url:bonuspath +'/backstage/seat/saveSeatNum',
|
||
|
|
data: data,
|
||
|
|
success:function(data) {
|
||
|
|
var da = JSON.parse(data);
|
||
|
|
console.log("da=",da);
|
||
|
|
layer.close(index);
|
||
|
|
showMsgAndReload(da.resMsg);
|
||
|
|
},
|
||
|
|
error:function(data){
|
||
|
|
console.log("data=",data);
|
||
|
|
layer.msg('请求发送失败',{icon:2,time:2000})
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
},*/
|
||
|
|
content: [bonuspath +'/backstage/seat/checkSeat?id='+examId+'&examPersonNum='+examPersonNum]
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
//删除
|
||
|
|
function del(id, isActive) {
|
||
|
|
if(isActive == '1') {
|
||
|
|
var html = "<h4 style='color:red;'>考试进行中,无法删除</h4>";
|
||
|
|
var idcardMsg = layer.confirm(html, {btn: ['关闭']},function(){
|
||
|
|
layer.close(idcardMsg);
|
||
|
|
});
|
||
|
|
} else if(isActive == '2') {
|
||
|
|
var html = "<h4 style='color:red;'>考试已结束,无法删除</h4>";
|
||
|
|
var idcardMsg = layer.confirm(html, {btn: ['关闭']},function(){
|
||
|
|
layer.close(idcardMsg);
|
||
|
|
});
|
||
|
|
} else {
|
||
|
|
JY.Model.confirm("确认要删除选中的数据吗?",function(){
|
||
|
|
JY.Ajax.doRequest(null,bonuspath +'/backstage/grade/delgrade',{examId:id},function(data){
|
||
|
|
JY.Model.info(data.resMsg,function(){
|
||
|
|
getbaseList(1);});
|
||
|
|
});
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
// 修改
|
||
|
|
function edit(id, isActive, examCount) {
|
||
|
|
if(isActive == '1') {
|
||
|
|
var html = "<h4 style='color:red;'>考试进行中,无法修改</h4>";
|
||
|
|
var idcardMsg = layer.confirm(html, {btn: ['关闭']},function(){
|
||
|
|
layer.close(idcardMsg);
|
||
|
|
});
|
||
|
|
} else if(isActive == '2') {
|
||
|
|
var html = "<h4 style='color:red;'>考试已结束,无法修改</h4>";
|
||
|
|
var idcardMsg = layer.confirm(html, {btn: ['关闭']},function(){
|
||
|
|
layer.close(idcardMsg);
|
||
|
|
});
|
||
|
|
} else {
|
||
|
|
layer.open({
|
||
|
|
type: 2,
|
||
|
|
title: "考试修改",
|
||
|
|
shade: [0],
|
||
|
|
btn: ['修改', '取消'], //按钮组
|
||
|
|
area: ['70%', '70%'],
|
||
|
|
scrollbar: true,
|
||
|
|
shadeClose: true, //点击遮罩区域是否关闭页面
|
||
|
|
anim: 2,
|
||
|
|
yes: function(index,layero){
|
||
|
|
var obj = $(layero).find("iframe")[0].contentWindow;
|
||
|
|
var valid = obj.formValid();
|
||
|
|
if(!valid) {
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
var data=obj.getInfo(2, id, examCount);
|
||
|
|
},
|
||
|
|
content: [bonuspath +'/backstage/grade/addFormPage?id='+id]
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
//查看
|
||
|
|
function view(id) {
|
||
|
|
layer.open({
|
||
|
|
type: 2,
|
||
|
|
title: "考试查看",
|
||
|
|
shade: [0],
|
||
|
|
btn: ['取消'], //按钮组
|
||
|
|
area: ['70%', '70%'],
|
||
|
|
scrollbar: true,
|
||
|
|
shadeClose: true, //点击遮罩区域是否关闭页面
|
||
|
|
anim: 2,
|
||
|
|
yes: function(index,layero){
|
||
|
|
var obj = $(layero).find("iframe")[0].contentWindow;
|
||
|
|
var data=obj.getInfo();
|
||
|
|
//alert(JSON.stringify(data))
|
||
|
|
console.log("data=",data);
|
||
|
|
},
|
||
|
|
content: [bonuspath +'/backstage/grade/addFormPage?id='+id]
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
function search(){
|
||
|
|
$("#search").trigger("click")
|
||
|
|
}
|
||
|
|
|
||
|
|
function viewExamPerson(examId, isActive) {
|
||
|
|
if(isActive == '2') { //考试结束后查看所有人成绩
|
||
|
|
layer.open({
|
||
|
|
type: 2,
|
||
|
|
title: "查看考试人员",
|
||
|
|
shade: [0],
|
||
|
|
btn: ['关闭'], //按钮组
|
||
|
|
area: ['80%', '80%'],
|
||
|
|
scrollbar: true,
|
||
|
|
shadeClose: true, //点击遮罩区域是否关闭页面
|
||
|
|
anim: 2,
|
||
|
|
content: [bonuspath +'/backstage/grade/showPersonScore?id='+examId]
|
||
|
|
});
|
||
|
|
} else if(isActive == '0' || isActive == '1') { //考试开始前和进行中查看所有人状态
|
||
|
|
layer.open({
|
||
|
|
type: 2,
|
||
|
|
title: "查看考试人员",
|
||
|
|
shade: [0],
|
||
|
|
btn: ['关闭'], //按钮组
|
||
|
|
area: ['80%', '80%'],
|
||
|
|
scrollbar: true,
|
||
|
|
shadeClose: true, //点击遮罩区域是否关闭页面
|
||
|
|
anim: 2,
|
||
|
|
content: [bonuspath +'/backstage/grade/showExamingPerson?id='+examId]
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function viewExam(examId, examCount) {
|
||
|
|
layer.open({
|
||
|
|
type: 2,
|
||
|
|
title: "查看考试人员",
|
||
|
|
shade: [0],
|
||
|
|
btn: ['确认', '取消'], //按钮组
|
||
|
|
area: ['80%', '80%'],
|
||
|
|
scrollbar: true,
|
||
|
|
shadeClose: true, //点击遮罩区域是否关闭页面
|
||
|
|
anim: 2,
|
||
|
|
yes: function(index,layero){
|
||
|
|
var html = "<h4 style='color:red;'>是否确定本场的考试人员,确认后不可修改</h4>";
|
||
|
|
var idcardMsg = layer.confirm(html, {btn: ['确认', '取消']},function(){
|
||
|
|
layer.close(idcardMsg);
|
||
|
|
var idx = layer.msg('请稍等...', {
|
||
|
|
icon: 16
|
||
|
|
,shade: 0.01
|
||
|
|
,time:'-1'
|
||
|
|
});
|
||
|
|
$.ajax({
|
||
|
|
type:"POST",
|
||
|
|
url:bonuspath +'/backstage/grade/toStartStatus?times='+examCount,
|
||
|
|
data: {examId:examId},
|
||
|
|
success:function(data){
|
||
|
|
layer.close(index);
|
||
|
|
layer.close(idx);
|
||
|
|
location.reload();
|
||
|
|
},
|
||
|
|
error:function(data){
|
||
|
|
layer.close(idx);
|
||
|
|
console.log("服务器出错,请查看!");
|
||
|
|
}
|
||
|
|
})
|
||
|
|
});
|
||
|
|
},
|
||
|
|
|
||
|
|
content: [bonuspath +'/backstage/grade/showExamPerson?id='+examId+'×='+examCount]
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
$("#addBtn").click(function() {
|
||
|
|
layer.open({
|
||
|
|
type: 2,
|
||
|
|
title: "发布考试",
|
||
|
|
shade: [0],
|
||
|
|
btn: ['保存', '取消'], //按钮组
|
||
|
|
area: ['70%', '70%'],
|
||
|
|
scrollbar: true,
|
||
|
|
shadeClose: true, //点击遮罩区域是否关闭页面
|
||
|
|
anim: 2,
|
||
|
|
yes: function(index,layero){
|
||
|
|
var obj = $(layero).find("iframe")[0].contentWindow;
|
||
|
|
var valid = obj.formValid();
|
||
|
|
if(!valid) {
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
var data=obj.getInfo(1, 1, 0);
|
||
|
|
},
|
||
|
|
|
||
|
|
content: [bonuspath +'/backstage/grade/addFormPage']
|
||
|
|
});
|
||
|
|
})
|
||
|
|
/**
|
||
|
|
* @author 守约
|
||
|
|
* @date 2020-11-17
|
||
|
|
* @function 初始化页面ajax请求 返回html页面
|
||
|
|
* @returns
|
||
|
|
*/
|
||
|
|
|
||
|
|
function getTime(){
|
||
|
|
var startTime = $("#startTime").val();
|
||
|
|
var endTime = $("#endTime").val();
|
||
|
|
if(startTime.length>0 && endTime.length>0){
|
||
|
|
var startTmp=startTime.split("-");
|
||
|
|
var endTmp=endTime.split("-");
|
||
|
|
var sd=new Date(startTmp[0],startTmp[1],startTmp[2]);
|
||
|
|
var ed=new Date(endTmp[0],endTmp[1],endTmp[2]);
|
||
|
|
if(sd.getTime()>ed.getTime()){
|
||
|
|
alert("开始日期不能大于结束日期");
|
||
|
|
}else{
|
||
|
|
getbaseList();
|
||
|
|
}
|
||
|
|
}else{
|
||
|
|
getbaseList();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
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/grade/findByPage',
|
||
|
|
data: JSON.stringify(data),
|
||
|
|
dataType:"html",
|
||
|
|
contentType:"application/json",
|
||
|
|
success:function(data){
|
||
|
|
$("#baseTable tbody").html(data);
|
||
|
|
layer.close(idx);
|
||
|
|
},
|
||
|
|
error:function(data){
|
||
|
|
console.log("服务器出错,请查看!");
|
||
|
|
}
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
function startExam(examId, examTime,re) {
|
||
|
|
if(re==1){
|
||
|
|
var indexMsg = layer.confirm("<h4 style='color:red'>当前有考试进行中,请等待该场考试结束再进行操作!</h4>", {btn: ['确认','取消']},function(){
|
||
|
|
layer.close(indexMsg);
|
||
|
|
});
|
||
|
|
}else{
|
||
|
|
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/grade/startExam',
|
||
|
|
data:{examId:examId, examTime:examTime},
|
||
|
|
dataType:"json",
|
||
|
|
success:function(data) {
|
||
|
|
layer.close(idx);
|
||
|
|
showMsgAndReload(data.resMsg);
|
||
|
|
},
|
||
|
|
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;
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
</body>
|
||
|
|
</html>
|