834 lines
34 KiB
Plaintext
834 lines
34 KiB
Plaintext
<!DOCTYPE html
|
||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||
<style type="text/css">
|
||
.select2-container .select2-selection--single {
|
||
height: 34px;
|
||
line-height: 34px;
|
||
}
|
||
|
||
.select2-selection__arrow {
|
||
margin-top: 3px;
|
||
}
|
||
|
||
|
||
.hiddenscroll::-webkit-scrollbar{
|
||
display: none;
|
||
width: 0;
|
||
height: 0;
|
||
}
|
||
</style>
|
||
<script type="text/javascript">
|
||
function doupdate() {
|
||
$("#editForm").bootstrapValidator('validate');//提交验证
|
||
if ($("#editForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||
$.post(ext.contextPath + "/exam/examplan/updateExamPlan.do", $("#editForm").serialize(), function (result) {
|
||
if (result == 1) {
|
||
closeModal('subModal');
|
||
$("#table").bootstrapTable('refresh');
|
||
} else if (result == 0) {
|
||
showAlert('d', '用户信息保存失败');
|
||
} else {
|
||
showAlert('d', result);
|
||
}
|
||
}, 'json');
|
||
}
|
||
}
|
||
|
||
$("#editForm").bootstrapValidator({
|
||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||
fields: {
|
||
passscore: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '及格分数不能为空'
|
||
}
|
||
}
|
||
},
|
||
examnum: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '允许考试次数不能为空'
|
||
},
|
||
regexp: {
|
||
regexp: /^[0-9]*$/,
|
||
message: '允许考试次数必须为数字'
|
||
}
|
||
}
|
||
},
|
||
// releasetime: {
|
||
// validators: {
|
||
// notEmpty: {
|
||
// message: '发布时间不能为空'
|
||
// }
|
||
// }
|
||
// },
|
||
// startdate: {
|
||
// validators: {
|
||
// notEmpty: {
|
||
// message: '考试开始日期不能为空'
|
||
// }
|
||
// }
|
||
// },
|
||
// enddate: {
|
||
// validators: {
|
||
// notEmpty: {
|
||
// message: '考试结束日期不能为空'
|
||
// }
|
||
// }
|
||
// },
|
||
examminutes: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '考试时间(分钟)不能为空'
|
||
},
|
||
regexp: {
|
||
regexp: /^[0-9]*$/,
|
||
message: '考试时间(分钟)必须为数字'
|
||
}
|
||
}
|
||
},
|
||
examuserids: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '考试人员不能为空'
|
||
}
|
||
}
|
||
}
|
||
}
|
||
});
|
||
var addDetailFun = function() {
|
||
var questitleid=$('#id').val();
|
||
// stopBubbleDefaultEvent();
|
||
$.post(ext.contextPath + '/exam/examTitleRange/showExamTitleRangeAdd.do' ,{questitleid:questitleid}, function(data) {
|
||
$("#subDetailDiv").html(data);
|
||
openModal('subDetailModal');
|
||
});
|
||
};
|
||
|
||
var editDetailFun = function(id) {
|
||
// stopBubbleDefaultEvent();
|
||
$.post(ext.contextPath + '/exam/examTitleRange/showExamTitleRangeEdit.do', {id:id} , function(data) {
|
||
$("#subDetailDiv").html(data);
|
||
openModal('subDetailModal');
|
||
});
|
||
};
|
||
var deleteDetailFun = function(id) {
|
||
// stopBubbleDefaultEvent();
|
||
if(confirm("信息删除后不能恢复,请问要执行删除操作吗?")){
|
||
$.post(ext.contextPath + '/exam/examTitleRange/deleteExamTitleRange.do', {id : id}, function(data) {
|
||
if(data==1){
|
||
$("#table_Detail").bootstrapTable('refresh');
|
||
}else{
|
||
showAlert('d','删除失败','mainAlertDetaildiv');
|
||
}
|
||
});
|
||
}
|
||
};
|
||
|
||
var deletesDetailFun = function() {
|
||
var checkedItems = $("#table_Detail").bootstrapTable('getSelections');
|
||
var datas="";
|
||
$.each(checkedItems, function(index, item){
|
||
datas+=item.id+",";
|
||
});
|
||
if(datas==""){
|
||
showAlert('d','请先选择记录','mainAlertDetaildiv');
|
||
}else{
|
||
if(confirm("信息删除后不能恢复,请问要执行删除操作吗?")){
|
||
$.post(ext.contextPath + '/exam/examTitleRange/deleteExamTitleRanges.do', {ids:datas} , function(data) {
|
||
if(data>0){
|
||
$("#table_Detail").bootstrapTable('refresh');
|
||
}else{
|
||
showAlert('d','删除失败','mainAlertDetaildiv');
|
||
}
|
||
});
|
||
}
|
||
|
||
}
|
||
};
|
||
var showUser4SelectsFun = function() {
|
||
var userIds= $("#examuserids").val();
|
||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"editForm",hiddenId:"examuserids",textId:"_auditMan",userIds:userIds} , function(data) {
|
||
$("#user4SelectDiv").html(data);
|
||
openModal("user4SelectModal");
|
||
});
|
||
};
|
||
var typechange = function(){
|
||
if($("#examtype").val()=="正式考试"){
|
||
$("#frequency-div").hide();
|
||
// $("#frequency").attr("value","");
|
||
}else if($("#examtype").val()=="模拟考试"){
|
||
$("#frequency-div").show();
|
||
}
|
||
}
|
||
|
||
//下一题
|
||
var donext = function() {
|
||
var quesnum = $("#quesnum");
|
||
$.post(ext.contextPath + '/exam/examrecord/donext.do', {quesnum:quesnum} , function(data) {
|
||
|
||
});
|
||
};
|
||
|
||
//初始化题目
|
||
var init = function(){
|
||
var quesnum = $("#quesnum");
|
||
var examrecordid = $('#examrecordid');
|
||
// console.log(quesnum);
|
||
// console.log(examrecordid);
|
||
$.post(ext.contextPath + '/exam/examrecord/doexamhtml.do', {quesnum:quesnum,examrecordid:examrecordid} , function(data) {
|
||
$('#examhtml').html(data);
|
||
});
|
||
};
|
||
// 保存用户答案
|
||
var saveanswer = function(){
|
||
var quesid = $("#quesid").val();
|
||
var examrecordid = $('#examrecordid').val();
|
||
var questype = $('#questype').val();
|
||
var useranswer = '';
|
||
// console.log(questype);
|
||
if(questype == '填空题'){
|
||
// console.log("1");
|
||
useranswer= $('#useranswer').val();
|
||
// console.log(useranswer);
|
||
}else{
|
||
var id_array=new Array();
|
||
$('input[name="option"]:checked').each(function(){
|
||
id_array.push($(this).attr('id'));//向数组中添加元素
|
||
});
|
||
useranswer=id_array.join(',');//将数组元素连接起来以构建一个字符串
|
||
// console.log("2"+useranswer);
|
||
}
|
||
$.post(ext.contextPath + '/exam/examrecord/dosaveanswer.do', {quesid:quesid,useranswer:useranswer,questype:questype} , function(data) {
|
||
|
||
});
|
||
};
|
||
|
||
/*
|
||
切换上下题
|
||
*/
|
||
function doSwitch(switchtype){//switchtype为上一个/下一个的切换类型 quesnum 为当前题序号
|
||
//切换之前先保存用户答案
|
||
saveanswer();
|
||
//变色
|
||
var quescolorid = $('#quesid').val();
|
||
console.log("-----"+quescolorid);
|
||
$("#"+quescolorid).css({
|
||
"border-color":"#568dbd",
|
||
"background":"#568dbd",
|
||
});
|
||
$("#"+quescolorid+"000").css({
|
||
'color':'white',
|
||
});
|
||
|
||
var quesnum = $('#quesnum').val();
|
||
var examrecordid = $('#examrecordid').val();
|
||
// console.log(examrecordid);
|
||
$.post("<%=request.getContextPath()%>/exam/examrecord/doexamhtml.do",{switchtype:switchtype,quesnum:quesnum,examrecordid:examrecordid},function(data){
|
||
if(data==1){
|
||
swal("没有上一道题了");
|
||
}else if(data == 2){
|
||
swal("没有下一道题了");
|
||
// fullscreen();
|
||
}else{
|
||
var arr= JSON.parse(data);
|
||
var questitlediv = '<div>'+arr.quesnum+'、'+arr.quesdescript+'</div>';
|
||
var questoptiondiv = '';
|
||
// console.log(arr.rows);
|
||
if(arr.questype=='填空题'){
|
||
questoptiondiv += '<div><input type="text" name="useranswer" id="useranswer" style="width: 90%;" value="'+arr.useranswer+'" placeholder="请将正确答案填写此处 多个答案用,隔开"/>'+
|
||
'</div>';
|
||
}else if(arr.questype=='多选题'){
|
||
var array = arr.useranswer.split(",");
|
||
for(var i = 0;i<arr.rows.length;i++){
|
||
var count = 0;
|
||
for(var j = 0;j<array.length;j++){
|
||
count++;
|
||
if(arr.rows[i].optionid == array[j]){
|
||
questoptiondiv += '<div><input type="checkbox" style="zoom: 140%;" name="option" id="'+arr.rows[i].optionid+'" value="'+arr.rows[i].optionid+'" checked="checked"/>'+
|
||
''+arr.rows[i].optionx+'.'+arr.rows[i].optioncontent+'</div>';
|
||
break;
|
||
}else{
|
||
if(count == array.length){
|
||
questoptiondiv += '<div><input type="checkbox" style="zoom: 140%;" name="option" id="'+arr.rows[i].optionid+'" value="'+arr.rows[i].optionid+'" />'+
|
||
''+arr.rows[i].optionx+'.'+arr.rows[i].optioncontent+'</div>';
|
||
break;
|
||
}
|
||
|
||
}
|
||
}
|
||
// console.log("aaa"+i);
|
||
}
|
||
}else if(arr.questype=='单选题' || arr.questype=='判断题'){
|
||
for(var i = 0;i<arr.rows.length;i++){
|
||
if(arr.rows[i].optionid == arr.useranswer){
|
||
questoptiondiv += '<div><input type="radio" style="zoom: 140%;" name="option" id="'+arr.rows[i].optionid+'" value="'+arr.rows[i].optionid+'" checked="checked"/>'+
|
||
''+arr.rows[i].optionx+'.'+arr.rows[i].optioncontent+'</div>';
|
||
}else{
|
||
questoptiondiv += '<div><input type="radio" style="zoom: 140%;" name="option" id="'+arr.rows[i].optionid+'" value="'+arr.rows[i].optionid+'" />'+
|
||
''+arr.rows[i].optionx+'.'+arr.rows[i].optioncontent+'</div>';
|
||
}
|
||
|
||
}
|
||
}
|
||
$('#questitlediv').html(questitlediv);
|
||
$('#questoptiondiv').html(questoptiondiv);
|
||
$("#quesnum").val(arr.quesnum);
|
||
$("#quesid").val(arr.quesid);
|
||
$('#questype').val(arr.questype);
|
||
if(arr.questype=='单选题' || arr.questype=='判断题'){
|
||
$('#leftquesttype').html(arr.questype+":(每题"+arr.singlyscore+"分,只有一个正确答案)");
|
||
}else if(arr.questype=='多选题'){
|
||
$('#leftquesttype').html(arr.questype+":(每题"+arr.singlyscore+"分,有多个正确答案)");
|
||
}else if(arr.questype=='填空题'){
|
||
$('#leftquesttype').html(arr.questype+":(每题"+arr.singlyscore+"分,请将答案填写在输入框内并用,隔开)");
|
||
}
|
||
// $('#leftquesttype').html(arr.questype);
|
||
}
|
||
|
||
|
||
})
|
||
}
|
||
|
||
function dojumpques(id){
|
||
var examrecordid = $('#examrecordid').val();
|
||
var questitleid = id;
|
||
$.post(ext.contextPath + '/exam/examrecord/dojumpques.do', {examrecordid:examrecordid,questitleid:questitleid} , function(data) {
|
||
// console.log(data);
|
||
var arr= JSON.parse(data);
|
||
var questitlediv = '<div>'+arr.quesnum+'、'+arr.quesdescript+'</div>';
|
||
var questoptiondiv = '';
|
||
console.log(arr.rows);
|
||
if(arr.questype=='填空题'){
|
||
questoptiondiv += '<div><input type="text" name="useranswer" id="useranswer" style="width: 90%;" value="'+arr.useranswer+'" placeholder="请将正确答案填写此处 多个答案用,隔开"/>'+
|
||
'</div>';
|
||
}else if(arr.questype=='多选题'){
|
||
var array = arr.useranswer.split(",");
|
||
for(var i = 0;i<arr.rows.length;i++){
|
||
var count = 0;
|
||
for(var j = 0;j<array.length;j++){
|
||
count++;
|
||
if(arr.rows[i].optionid == array[j]){
|
||
questoptiondiv += '<div><input type="checkbox" style="zoom: 140%;" name="option" id="'+arr.rows[i].optionid+'" value="'+arr.rows[i].optionid+'" checked="checked"/>'+
|
||
''+arr.rows[i].optionx+'.'+arr.rows[i].optioncontent+'</div>';
|
||
break;
|
||
}else{
|
||
if(count == array.length){
|
||
questoptiondiv += '<div><input type="checkbox" style="zoom: 140%;" name="option" id="'+arr.rows[i].optionid+'" value="'+arr.rows[i].optionid+'" />'+
|
||
''+arr.rows[i].optionx+'.'+arr.rows[i].optioncontent+'</div>';
|
||
break;
|
||
}
|
||
|
||
}
|
||
}
|
||
// console.log("aaa"+i);
|
||
}
|
||
}else if(arr.questype=='单选题' || arr.questype=='判断题'){
|
||
for(var i = 0;i<arr.rows.length;i++){
|
||
if(arr.rows[i].optionid == arr.useranswer){
|
||
questoptiondiv += '<div><input type="radio" style="zoom: 140%;" name="option" id="'+arr.rows[i].optionid+'" value="'+arr.rows[i].optionid+'" checked="checked"/>'+
|
||
''+arr.rows[i].optionx+'.'+arr.rows[i].optioncontent+'</div>';
|
||
}else{
|
||
questoptiondiv += '<div><input type="radio" style="zoom: 140%;" name="option" id="'+arr.rows[i].optionid+'" value="'+arr.rows[i].optionid+'" />'+
|
||
''+arr.rows[i].optionx+'.'+arr.rows[i].optioncontent+'</div>';
|
||
}
|
||
|
||
}
|
||
}
|
||
$('#questitlediv').html(questitlediv);
|
||
$('#questoptiondiv').html(questoptiondiv);
|
||
$("#quesnum").val(arr.quesnum);
|
||
$("#quesid").val(arr.quesid);
|
||
$('#questype').val(arr.questype);
|
||
if(arr.questype=='单选题' || arr.questype=='判断题'){
|
||
$('#leftquesttype').html(arr.questype+":(每题"+arr.singlyscore+"分,只有一个正确答案)");
|
||
}else if(arr.questype=='多选题'){
|
||
$('#leftquesttype').html(arr.questype+":(每题"+arr.singlyscore+"分,有多个正确答案)");
|
||
}else if(arr.questype=='填空题'){
|
||
$('#leftquesttype').html(arr.questype+":(每题"+arr.singlyscore+"分,请将答案填写在输入框内并用,隔开)");
|
||
}
|
||
// $('#leftquesttype').html(arr.questype);
|
||
});
|
||
}
|
||
|
||
|
||
//交卷功能
|
||
var dosendpaper = function() {
|
||
//交卷之前先保存用户最后一题答案
|
||
saveanswer();
|
||
|
||
var examrecordid = $("#examrecordid").val();
|
||
|
||
swal({
|
||
title: "您确定要交卷吗?",
|
||
// text:"这将花费大约几秒的时间",
|
||
dangerMode: true,
|
||
icon: "warning",
|
||
buttons: {
|
||
cancel: {
|
||
text: "取消",
|
||
value: null,
|
||
visible: true,
|
||
className: "btn btn-default btn-sm",
|
||
closeModal: true,
|
||
},
|
||
confirm: {
|
||
text: "确定",
|
||
value: true,
|
||
visible: true,
|
||
className: "btn btn-danger btn-sm",
|
||
closeModal: true
|
||
}
|
||
}
|
||
})
|
||
.then(function (willDelete) {
|
||
if (willDelete) {
|
||
|
||
$.post(ext.contextPath + '/exam/examrecord/dosendpaper.do', {examrecordid:examrecordid} , function(data) {
|
||
exitfullscreen();
|
||
swal("交卷成功!");
|
||
closeModal('subModal');
|
||
location.reload();
|
||
});
|
||
|
||
}
|
||
});
|
||
|
||
};
|
||
|
||
|
||
|
||
//获取当前时间
|
||
function time() {
|
||
//获得显示时间的div
|
||
t_div = document.getElementById('nowtime');
|
||
var now = new Date()
|
||
//替换div内容
|
||
// t_div.innerHTML = "现在是" + now.getFullYear() + "年" + (now.getMonth() + 1) + "月" + now.getDate() + "日" + now.getHours() + "时" + now.getMinutes() + "分" + now.getSeconds() + "秒";
|
||
var hours = now.getHours();
|
||
var min = now.getMinutes();
|
||
var sec = now.getSeconds();
|
||
if(hours<10){
|
||
hours = "0"+hours;
|
||
}
|
||
if(min<10){
|
||
min = "0"+min;
|
||
}
|
||
if(sec<10){
|
||
sec = "0"+sec;
|
||
}
|
||
t_div.innerHTML = hours + ":" + min + ":" + sec;
|
||
//等待一秒钟后调用time方法,由于settimeout在time方法内,所以可以无限调用
|
||
setTimeout(time, 1000);
|
||
}
|
||
|
||
//全屏功能 F11
|
||
function fullscreen(){
|
||
//全屏
|
||
var docElm = document.documentElement;
|
||
//W3C
|
||
if(docElm.requestFullscreen) {
|
||
docElm.requestFullscreen();
|
||
}
|
||
|
||
//FireFox
|
||
else if(docElm.mozRequestFullScreen) {
|
||
docElm.mozRequestFullScreen();
|
||
}
|
||
|
||
//Chrome等
|
||
else if(docElm.webkitRequestFullScreen) {
|
||
docElm.webkitRequestFullScreen();
|
||
}
|
||
|
||
//IE11
|
||
else if(elem.msRequestFullscreen) {
|
||
elem.msRequestFullscreen();
|
||
}
|
||
}
|
||
|
||
//退出全屏
|
||
function exitfullscreen(){
|
||
//W3C
|
||
if (document.exitFullscreen) {
|
||
document.exitFullscreen();
|
||
}
|
||
//FireFox
|
||
else if (document.mozCancelFullScreen) {
|
||
document.mozCancelFullScreen();
|
||
}
|
||
//Chrome等
|
||
else if (document.webkitCancelFullScreen) {
|
||
document.webkitCancelFullScreen();
|
||
}
|
||
//IE11
|
||
else if (document.msExitFullscreen) {
|
||
document.msExitFullscreen();
|
||
}
|
||
}
|
||
|
||
//题目标记功能
|
||
function domarkques(){
|
||
var testpaperid = $('#quesid').val();
|
||
$.post(ext.contextPath + '/exam/examrecord/domarkques.do', {testpaperid:testpaperid} , function(data) {
|
||
console.log(data);
|
||
$("#"+data).css({
|
||
"border-color":"#E7505A",
|
||
"background":"#E7505A",
|
||
});
|
||
$("#"+data+"000").css({
|
||
'color':'white',
|
||
});
|
||
|
||
swal("标记成功");
|
||
|
||
});
|
||
}
|
||
|
||
|
||
|
||
$(function () {
|
||
// $("#status").select2({ minimumResultsForSearch: -1 }).val("${rankType.status}").trigger("change");
|
||
// init();
|
||
time();
|
||
fullscreen();
|
||
typechange();
|
||
|
||
$("#examtype").change(function(){
|
||
typechange();
|
||
})
|
||
|
||
$("#startdate").datepicker({
|
||
language: 'zh-CN',
|
||
autoclose: true,
|
||
todayHighlight: true,
|
||
format:'yyyy-mm-dd',
|
||
})
|
||
$("#enddate").datepicker({
|
||
language: 'zh-CN',
|
||
autoclose: true,
|
||
todayHighlight: true,
|
||
format:'yyyy-mm-dd',
|
||
})
|
||
|
||
var examPlanId=$('#id').val();
|
||
|
||
});
|
||
|
||
function doclose() {
|
||
exitfullscreen();
|
||
closeModal('subModal');
|
||
}
|
||
|
||
//退出全屏
|
||
function exitfullscreen(){
|
||
//W3C
|
||
if (document.exitFullscreen) {
|
||
document.exitFullscreen();
|
||
}
|
||
//FireFox
|
||
else if (document.mozCancelFullScreen) {
|
||
document.mozCancelFullScreen();
|
||
}
|
||
//Chrome等
|
||
else if (document.webkitCancelFullScreen) {
|
||
document.webkitCancelFullScreen();
|
||
}
|
||
//IE11
|
||
else if (document.msExitFullscreen) {
|
||
document.msExitFullscreen();
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<div class="modal fade hiddenscroll" id="subModal">
|
||
<input type="hidden" name="quesnum" id="quesnum" value="${quesnum}" />
|
||
<input type="hidden" name="quesid" id="quesid" value="${quesid}" />
|
||
<input type="hidden" name="questype" id="questype" value="${questype}" />
|
||
<input type="hidden" name="questitlenum" id="questitlenum" value="${questitlenum}" />
|
||
<input type="hidden" name="examrecordid" id="examrecordid" value="${examrecordid}" />
|
||
<input type="hidden" name="examtime" id="examtime" value="${examtime}" />
|
||
<!-- <input type="hidden" name="questitleid" id="questitleid" value="${questitleid}"> -->
|
||
<div>
|
||
<div class="modal-content">
|
||
<!-- <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">
|
||
<div style="width: 100%;height: 100%;background-color: #568DBD;">
|
||
<div id="margintopdiv" style="width: 100%;height: 2%;"></div>
|
||
|
||
<div id="topdiv" style="width: 100%;height: 10%;">
|
||
<div style="width:15%;height: 100%;float: left;"></div>
|
||
<div id="logo" style="width:13%;height: 100%;float: left;">
|
||
<div style="width: 100%;height:10%;"></div>
|
||
<div style="width: 100%;height: 80%;">
|
||
<img src="<%=request.getContextPath()%>/IMG/login/bksw1.png" style="width: 100%;height: 100%;">
|
||
</div>
|
||
</div>
|
||
<div style="width:0.5%;height:100%;float:left;"></div>
|
||
<div style="width:0.1%;height:100%;float:left;background-color:#EEEEEE"></div>
|
||
<div style="width:0.5%;height:100%;float:left;color: white;"></div>
|
||
<div id="logotitle" style="width:28%;height: 100%;float: left;">
|
||
<div style="width: 100%;height: 34%;color: white;font-weight: 600;font-size: x-large;">
|
||
北 控 水 务 集 团 有 限 公 司
|
||
</div>
|
||
<div style="width: 100%;height: 32%;"></div>
|
||
<div style="width: 100%;height: 34%;color: white;font-weight: 600;font-size: x-large;">
|
||
广东业务区技能实训平台应知考试
|
||
</div>
|
||
</div>
|
||
<div style="width: 26%;height: 100%;float: left;">
|
||
</div>
|
||
<div style="width: 15%;height: 100%;float: left;">
|
||
<div style="width: 100%;height: 35%;color: white;font-weight: 900;font-size: medium;">
|
||
<div style="width: 80%;height: 100%;float: left;">考生编号 : ${examusernumber}</div>
|
||
<div style="width: 20%;height: 100%;float: left;">
|
||
<button type="button" class="btn btn-danger" onclick="doclose()">关闭</button>
|
||
</div>
|
||
|
||
</div>
|
||
<div style="width: 100%;height: 50%;color: white;font-weight: 900;font-size: medium;">
|
||
考生姓名 : ${examusername}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="maindiv" style="width: 100%;height: 90%;">
|
||
<div id="marginleft" style="width: 2%;height:100%;float: left;"></div>
|
||
<div id="leftmain" style="width:78%;height: 100%;float: left;">
|
||
<div id="lefttop" style="width: 100%;height:2.5%;text-align: right;color: blanchedalmond;">
|
||
考试类别:${examtype}
|
||
</div>
|
||
|
||
<div id="leftmid" style="width:100%;height:90.5%;">
|
||
<!-- <div style="width: 100%;height: 2.5%;"></div> -->
|
||
<div id="lefttitle" style="width: 100%;height: 5%;background-color: white;color: #568DBD;text-align: center;font-weight: 600;font-size: x-large;">${examname}</div>
|
||
|
||
<div id="leftquesttype" style="width: 100%;height: 3%;background-color:#EBEBEB;color: black;text-align: left;font-weight: 600;">
|
||
<c:if test="${questype == '判断题'}">
|
||
${questype}:(每题${singlyscore}分,只有一个正确答案)
|
||
</c:if>
|
||
<c:if test="${questype == '单选题'}">
|
||
${questype}:(每题${singlyscore}分,只有一个正确答案)
|
||
</c:if>
|
||
<c:if test="${questype == '多选题'}">
|
||
${questype}:(每题${singlyscore}分,有多个正确答案)
|
||
</c:if>
|
||
<c:if test="${questype == '填空题'}">
|
||
${questype}:(每题${singlyscore}分,请将答案填写在输入框内并用,隔开)
|
||
</c:if>
|
||
|
||
</div>
|
||
<!--竖版-->
|
||
<!-- <div id="leftques" style="width: 100%;height: 92.5%;">
|
||
<div id="questitledivout" style="width: 24%;height: 100%;background-color: white;float: left;">
|
||
<div style="width: 10%;height: 100%;float: left;"></div>
|
||
<div style="width: 80%;height: 100%;float: left;">
|
||
<div style="width: 100%;height: 20%;"></div>
|
||
<div id="questitlediv" style="width: 100%;height: 60%;font-size: x-large;"> ${quesnum}、${questitlelist.quesdescript} </div>
|
||
</div>
|
||
|
||
</div>
|
||
<div style="width:1%;height: 100%;background-color: #EBEBEB;float: left;"></div>
|
||
<div id="questoptiondivout" style="width: 75%;height: 100%;background-color: white;float: left;">
|
||
<div style="width: 10%;height: 100%;float: left;"></div>
|
||
<div style="width: 80%;height: 100%;float: left;">
|
||
<div style="width: 100%;height: 20%;"></div>
|
||
<div id="questoptiondiv" style="width: 100%;height: 60%;font-size: x-large;">
|
||
判断填空题
|
||
<c:if test="${questypename == '填空题'}">
|
||
<div>
|
||
<input type="text" name="useranswer" id="useranswer" style="width: 90%;" value="" placeholder="请将正确答案填写此处 多个答案用,隔开"/>'+
|
||
</div>
|
||
</c:if>
|
||
|
||
<c:if test="${questypename == '多选题'}">
|
||
<c:forEach var="quesoptionlist" items="${quesoptionlist}">
|
||
<div>
|
||
<input type="checkbox" name="option" id="${quesoptionlist.optionid}" value="${quesoptionlist.optionid}" style="zoom: 140%;"/>
|
||
${quesoptionlist.optioncontent}
|
||
</div>
|
||
</c:forEach>
|
||
</c:if>
|
||
|
||
<c:if test="${questypename == '单选题' || questypename == '判断题'}">
|
||
<c:forEach var="quesoptionlist" items="${quesoptionlist}">
|
||
<div>
|
||
<input type="radio" name="option" id="${quesoptionlist.optionid}" value="${quesoptionlist.optionid}" style="zoom: 140%;"/>
|
||
${quesoptionlist.optioncontent}
|
||
</div>
|
||
</c:forEach>
|
||
</c:if>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div> -->
|
||
<!--横版-->
|
||
<div id="leftques" style="width: 100%;height: 92.5%;background-color: white;">
|
||
<div style="width: 10%;height: 100%;float: left;"></div>
|
||
<div style="width: 80%;height: 100%;float: left;">
|
||
<div style="width: 100%;height: 10%;"></div>
|
||
<div id="questitlediv" style="width: 100%;height: auto; min-height:15%;font-size: x-large;border-bottom: 3px solid #EBEBEB;">${quesnum}、${questitlelist.quesdescript}</div>
|
||
<!-- <div style="width: 100%;height: 0.5%;background-color: #EBEBEB;"></div> -->
|
||
<div style="width: 100%;height: 5%;"></div>
|
||
<div id="questoptiondiv" style="width:100%;height:60%;font-size: x-large;">
|
||
<!--判断填空题-->
|
||
<c:if test="${questypename == '填空题'}">
|
||
<div>
|
||
<input type="text" name="useranswer" id="useranswer" style="width: 90%;" value="" placeholder="请将正确答案填写此处 多个答案用,隔开"/>'+
|
||
</div>
|
||
</c:if>
|
||
|
||
<c:if test="${questypename == '多选题'}">
|
||
<c:forEach var="quesoptionlist" items="${quesoptionlist}">
|
||
<div>
|
||
<input type="checkbox" name="option" id="${quesoptionlist.optionid}" value="${quesoptionlist.optionid}" style="zoom: 140%;"/>
|
||
${quesoptionlist.optionx}.${quesoptionlist.optioncontent}
|
||
</div>
|
||
</c:forEach>
|
||
</c:if>
|
||
|
||
<c:if test="${questypename == '单选题' || questypename == '判断题'}">
|
||
<c:forEach var="quesoptionlist" items="${quesoptionlist}">
|
||
<div>
|
||
<input type="radio" name="option" id="${quesoptionlist.optionid}" value="${quesoptionlist.optionid}" style="zoom: 140%;"/>
|
||
${quesoptionlist.optionx}.${quesoptionlist.optioncontent}
|
||
</div>
|
||
</c:forEach>
|
||
</c:if>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div id="marginmid" style="width:2%;height:100%;float:left;"></div>
|
||
|
||
<div id="rightmain" style="width: 16%;height: 100%;float: left;">
|
||
<div id="lefttop" style="width: 100%;height:4%;"></div>
|
||
|
||
<div style="width: 100%;height:2%;color: white;">北京时间</div>
|
||
<div id="nowtime" style="width: 100%;height:5%;color: white;font-weight: 600;"></div>
|
||
<div style="width:100%;height:2%;color: white;">剩余时间</div>
|
||
<div id="timer" style="width:100%;height:5%;color: white;font-weight: 600;"></div>
|
||
<!-- 题目跳转卡片 -->
|
||
<!-- <div id="selectques" style="width: 100%;height: 50%;cursor: pointer;" onclick="doSwitch('prev')">
|
||
<img src="<%=request.getContextPath()%>/IMG/main/selectques.png" style="width: 100%;height: 100%;">
|
||
</div> -->
|
||
|
||
<div id="selectques" style="width: 100%;height: 56%;background-color: #EBEBEB;">
|
||
<div style="width: 1%;height: 100%;float: left;"></div>
|
||
|
||
<div style="width: 98%;height: 100%;float: left;">
|
||
<div style="width: 100%;height: 1%;"></div>
|
||
|
||
|
||
<div class="hiddenscroll" style="width: 100%;height: 98%;overflow-x: hidden;overflow-y: auto;word-break: break-all;word-wrap: break-word;">
|
||
<!-- 循环题型 -->
|
||
<c:forEach var="selectcard" items="${selectcard}">
|
||
<div style="width: 100%;">${selectcard.ord}、${selectcard.questypename}(共${selectcard.questypenum}题)</div>
|
||
<div style="width: 100%;height: auto;background-color: white;">
|
||
<!-- <div style="width: 100%;height: 10%;"></div> -->
|
||
<div class="hiddenscroll" style="width:100%;overflow-x: hidden;overflow-y: auto;word-break: break-all;word-wrap: break-word;">
|
||
<c:forEach var="selecttitlelist" items="${selectcard.selecttitlelist}">
|
||
<div id="${selecttitlelist.questitleid}" class="cricle" style="border-style:solid;border-color:#568DBD;border-width:1px;border-radius: 50%;height: 28px;width: 12%;margin: 2% 3.5%;display: inline-block;background: #FFFFFF;vertical-align: top;cursor: pointer;" onclick="dojumpques('${selecttitlelist.questitleid}')">
|
||
<div id="${selecttitlelist.questitleid}000" style="display: block;color: #568DBD;height: 20px;line-height: 28px;text-align: center">${selecttitlelist.questitlenum}</div>
|
||
</div>
|
||
</c:forEach>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</c:forEach>
|
||
|
||
</div>
|
||
|
||
<div style="width: 100%;height: 1%;"></div>
|
||
</div>
|
||
|
||
<div style="width: 1%;height: 100%;float: left;"></div>
|
||
</div>
|
||
|
||
|
||
<div style="width:100%;height:2%"></div>
|
||
|
||
<div style="width:100%;height:5%;cursor: pointer;" onclick="domarkques()">
|
||
<img src="<%=request.getContextPath()%>/IMG/main/mark.png" style="width: 35%;height: 100%;">
|
||
</div>
|
||
<div style="width:100%;height:1.3%"></div>
|
||
<div style="width:100%;height:5%;cursor: pointer;" onclick="doSwitch('next')">
|
||
<img src="<%=request.getContextPath()%>/IMG/main/nextques.png" style="width: 35%;height: 100%;">
|
||
</div>
|
||
<div style="width:100%;height:1.3%"></div>
|
||
<div style="width:100%;height:5%;cursor: pointer;" onclick="dosendpaper()">
|
||
<img src="<%=request.getContextPath()%>/IMG/main/sendpaper.png" style="width: 35%;height: 100%;">
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<!-- <div id="examhtml">
|
||
<div>
|
||
${quesnum}、${questitlelist.quesdescript}
|
||
</div>
|
||
<c:forEach var="quesoptionlist" items="${quesoptionlist}">
|
||
<div>
|
||
<input type="checkbox" name="option" id="${quesoptionlist.optionid}" value="${quesoptionlist.optionid}" />
|
||
${quesoptionlist.optioncontent}
|
||
</div>
|
||
</c:forEach>
|
||
</div>
|
||
</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="dosendpaper()">交卷</button>
|
||
<button type="button" class="btn btn-primary" onclick="doSwitch('prev')">上一题</button>
|
||
<button type="button" class="btn btn-primary" onclick="doSwitch('next')">下一题</button>
|
||
</div> -->
|
||
</div>
|
||
<!-- /.modal-content -->
|
||
</div>
|
||
<!-- /.modal-dialog -->
|
||
</div>
|
||
<script>
|
||
//倒计时功能
|
||
var oBox= document.getElementById('timer');
|
||
var maxtime = $("#examtime").val() * 60;
|
||
function CountDown() {
|
||
if (maxtime >= 0) {
|
||
minutes = Math.floor(maxtime / 60);
|
||
seconds = Math.floor(maxtime % 60);
|
||
if(minutes < 10){
|
||
minutes = "0"+minutes;
|
||
}
|
||
if(seconds < 10){
|
||
seconds = "0"+seconds;
|
||
}
|
||
msg = minutes + ":" + seconds ;
|
||
oBox.innerHTML = msg;
|
||
if (maxtime == 5 * 60)swal("还剩5分钟!请考生仔细检查试卷");
|
||
--maxtime;
|
||
} else{
|
||
clearInterval(timer);
|
||
swal("时间到,考试结束!");
|
||
closeModal('subModal');
|
||
}
|
||
}
|
||
timer = setInterval("CountDown()", 1000);
|
||
|
||
</script> |