207 lines
6.0 KiB
Plaintext
207 lines
6.0 KiB
Plaintext
|
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
|||
|
|
<!DOCTYPE html >
|
|||
|
|
<html lang="en">
|
|||
|
|
<head>
|
|||
|
|
<%@include file="../baseset.jsp" %>
|
|||
|
|
<%@include file="../systemset.jsp" %>
|
|||
|
|
<style type="text/css">
|
|||
|
|
.fontcolor{
|
|||
|
|
color: #fff;
|
|||
|
|
}
|
|||
|
|
.backgroundcolor{
|
|||
|
|
background-color: #262626;
|
|||
|
|
}
|
|||
|
|
.fontc{
|
|||
|
|
margin-top: 20%;
|
|||
|
|
margin-bottom: 20%;
|
|||
|
|
color: #fff;
|
|||
|
|
margin-left: 50%;
|
|||
|
|
}
|
|||
|
|
html ,
|
|||
|
|
body {
|
|||
|
|
height: 100%;
|
|||
|
|
}
|
|||
|
|
.titleselect{
|
|||
|
|
margin-top: 2%;
|
|||
|
|
margin-bottom: 7%;
|
|||
|
|
}
|
|||
|
|
.selectContent{
|
|||
|
|
background-color: #eee;
|
|||
|
|
width: 95%;
|
|||
|
|
border-radius: 5px;
|
|||
|
|
padding-left: 2%;
|
|||
|
|
margin-top: 1%;
|
|||
|
|
margin-bottom: 1%;
|
|||
|
|
}
|
|||
|
|
.btns{
|
|||
|
|
background-color: #000;
|
|||
|
|
color: #fff;
|
|||
|
|
font-size: 15px;
|
|||
|
|
border-radius: 5px;
|
|||
|
|
}
|
|||
|
|
.dian{
|
|||
|
|
color: #fff;
|
|||
|
|
}
|
|||
|
|
</style>
|
|||
|
|
</head>
|
|||
|
|
<body>
|
|||
|
|
<div class="backgroundcolor">
|
|||
|
|
<div style="margin-left: 15%;font-size: 20px;line-height: 7vh;height:7vh;">
|
|||
|
|
<div class="fontcolor">
|
|||
|
|
考试人:${sessionUser.name }
|
|||
|
|
</div>
|
|||
|
|
<div>
|
|||
|
|
<div id="timer" style="color:red;margin-top: -4%;margin-left: 75%;"></div>
|
|||
|
|
<!-- <div id="warring" style="color:red"></div> -->
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div style="height:93vh;">
|
|||
|
|
<div class="backgroundcolor" style="width: 15%;float: left;font-size: 20px;height: 100%;">
|
|||
|
|
<div class="titleselect" id="titleselect1">
|
|||
|
|
<input type="hidden" value="1"><span class="fontc"><span class="dian">·</span>单选题</span>
|
|||
|
|
</div>
|
|||
|
|
<div class="titleselect" id="titleselect2">
|
|||
|
|
<input type="hidden" value="2"><span class="fontc"><span class="dian">·</span>多选题</span>
|
|||
|
|
</div>
|
|||
|
|
<div class="titleselect" id="titleselect3">
|
|||
|
|
<input type="hidden" value="3"><span class="fontc"><span class="dian">·</span>判断题</span>
|
|||
|
|
</div>
|
|||
|
|
<div class="titleselect" id="titleselect4">
|
|||
|
|
<input type="hidden" value="4"><span class="fontc"><span class="dian">·</span>填空题</span>
|
|||
|
|
</div>
|
|||
|
|
<div class="titleselect" id="titleselect5">
|
|||
|
|
<input type="hidden" value="5"><span class="fontc"><span class="dian">·</span>简答题</span>
|
|||
|
|
</div>
|
|||
|
|
<div class="titleselect" id="titleselect6">
|
|||
|
|
<input type="hidden" value="6"><span class="fontc"><span class="dian">·</span>案例分析</span>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div style="width: 85%;float: right;background-color: #eee;height: 93vh;">
|
|||
|
|
<div style="width:96%;height: 96%;background-color: #fff;margin-top: 1%;margin-left: 2%;border-radius: 10px;box-shadow: -5px -5px 10px #888888;">
|
|||
|
|
<div style="padding-top: 2%; padding-left: 2%;" id="exampagecontent">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
|
|||
|
|
$(function() {
|
|||
|
|
|
|||
|
|
history.replaceState(null, null, '${bonuspath}/backstage/waitExamPage');
|
|||
|
|
window.addEventListener("popstate", function() {
|
|||
|
|
// 取出 设置好的 history.state 值,做判断
|
|||
|
|
history.replaceState(null, null, '${bonuspath}/backstage/waitExamPage');
|
|||
|
|
});
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
//var time = localStorage.getItem( "kssj");
|
|||
|
|
var time='${kssj}';
|
|||
|
|
var a = time /1000 ;
|
|||
|
|
var maxtime = 60*60 *2; //一个小时,按秒计算,自己调整!
|
|||
|
|
function CountDown() {
|
|||
|
|
if (a >= 0) {
|
|||
|
|
hour = Math.floor(a / 60 /60);
|
|||
|
|
minutes = Math.floor(a/60% 60 );
|
|||
|
|
seconds = Math.floor(a % 60);
|
|||
|
|
msg = "距离结束还有"+hour+"时" + minutes + "分" + seconds + "秒";
|
|||
|
|
document.all["timer"].innerHTML = msg;
|
|||
|
|
--a;
|
|||
|
|
if(hour == 0 && minutes == 3 && seconds == 0) {
|
|||
|
|
var indexMsg = layer.confirm("<h4 style='color:red'>距离考试结束还有3分钟,请注意当前题型的提交</h4>", {btn: ['确认','取消']},function(){
|
|||
|
|
layer.close(indexMsg);
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
} else{
|
|||
|
|
clearInterval(timer);
|
|||
|
|
/* for(var i = 1; i <= 6; i++) {
|
|||
|
|
var nowId = "#titleselect"+i;
|
|||
|
|
var x = $(nowId).find(".fontc").prop("style").color;
|
|||
|
|
if(x == "rgb(0, 0, 0)"){ //当前页面
|
|||
|
|
if(i == 1) {
|
|||
|
|
var add = $("#add").val();
|
|||
|
|
alert("add=", add);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
} */
|
|||
|
|
$(location).attr("href","${bonuspath}/gardeInfoShort");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
timer = setInterval("CountDown()", 1000);
|
|||
|
|
|
|||
|
|
var danxuanNum = 0;
|
|||
|
|
$(function() {
|
|||
|
|
menuClick(1);
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
var selectValue = "";
|
|||
|
|
|
|||
|
|
$(".titleselect").click(function () {
|
|||
|
|
var selectNum = $(this).find("input").val();
|
|||
|
|
console.log(selectNum);
|
|||
|
|
menuClick(selectNum);
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
/*function saveQuestionContent(questionId,examId,userId,answer,grade) {
|
|||
|
|
var data = {
|
|||
|
|
questionId: questionId,
|
|||
|
|
examId: examId,
|
|||
|
|
userId: userId,
|
|||
|
|
answer: answer,
|
|||
|
|
grade: grade
|
|||
|
|
};
|
|||
|
|
$.ajax({
|
|||
|
|
type:"POST",
|
|||
|
|
url:bonuspath +'/backstage/grade/saveQuestionContent',
|
|||
|
|
data: data,
|
|||
|
|
success:function(data){
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
error:function(data){
|
|||
|
|
alert(JSON.stringify(data))
|
|||
|
|
console.log("服务器出错,请查看!");
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}*/
|
|||
|
|
|
|||
|
|
function menuClick(selectValue){
|
|||
|
|
for(var i=1;i<=6;i++){
|
|||
|
|
if(i==selectValue){
|
|||
|
|
var nowId = "#titleselect"+i;
|
|||
|
|
$(nowId).css("background-color","#eee");
|
|||
|
|
$(nowId).children().css("color","#000");
|
|||
|
|
$(nowId).nextAll().css("background-color","#262626");
|
|||
|
|
$(nowId).nextAll().children().css("color","#fff");
|
|||
|
|
$(nowId).prevAll().css("background-color","#262626");
|
|||
|
|
$(nowId).prevAll().children().css("color","#fff");
|
|||
|
|
selectValue = $(nowId).find("input").val();
|
|||
|
|
//console.log("selectValue=",selectValue);
|
|||
|
|
var data = {selectValue:selectValue,examId:'${examId}',testId:'${testId}'};
|
|||
|
|
localStorage.setItem("examId", '${examId}');
|
|||
|
|
localStorage.setItem("typeId", '${typeId}');
|
|||
|
|
localStorage.setItem("testId", '${testId}');
|
|||
|
|
JY.Model.loading();
|
|||
|
|
$.ajax({
|
|||
|
|
type:"POST",
|
|||
|
|
url:bonuspath +'/backstage/grade/findExamSelfContentPage',
|
|||
|
|
data: data,
|
|||
|
|
dataType:"html",
|
|||
|
|
success:function(data){
|
|||
|
|
$("#exampagecontent").html("");
|
|||
|
|
$("#exampagecontent").html(data);
|
|||
|
|
JY.Model.loadingClose();
|
|||
|
|
},
|
|||
|
|
error:function(data){
|
|||
|
|
alert(JSON.stringify(data))
|
|||
|
|
console.log("服务器出错,请查看!");
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
</script>
|
|||
|
|
</body>
|
|||
|
|
</html>
|