223 lines
6.5 KiB
Plaintext
223 lines
6.5 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;
|
||
}
|
||
.topDialog {
|
||
margin-left: 30%;
|
||
background: red;
|
||
position: fixed;
|
||
top: 0;
|
||
height: 25px;
|
||
width: 480px;
|
||
text-align: center;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="backgroundcolor">
|
||
<div id="topDialog" class="topDialog"><span class="fontcolor" style="font-size: 15px;">考试期间请勿直接关闭浏览器,否则无法记录此次考试成绩!
|
||
<a href="#" type="button" style="color: #0044cc; font-size: 12px;" onclick="closeDialog()"> 不再提醒</a></span>
|
||
</div>
|
||
<div style="margin-left: 15%;font-size: 20px;line-height: 7vh;height:7vh;">
|
||
<div class="fontcolor" style="margin-left: -15%;">
|
||
考试人:${sessionUser.name }
|
||
</div>
|
||
|
||
<div>
|
||
<div id="timer" style="color:red;margin-top: -4%;margin-left: 80%;"></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');
|
||
});
|
||
}) */
|
||
|
||
function closeDialog() {
|
||
document.getElementById("topDialog").style.display="none";
|
||
}
|
||
|
||
//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}'};
|
||
localStorage.setItem("examId", '${examId}');
|
||
JY.Model.loading();
|
||
$.ajax({
|
||
type:"POST",
|
||
url:bonuspath +'/backstage/grade/findExamContentPage',
|
||
data: data,
|
||
dataType:"html",
|
||
success:function(data){
|
||
$("#exampagecontent").html("");
|
||
$("#exampagecontent").html(data);
|
||
JY.Model.loadingClose();
|
||
console.log(data);
|
||
},
|
||
error:function(data){
|
||
console.log(data);
|
||
console.log("服务器出错,请查看!");
|
||
}
|
||
})
|
||
}
|
||
}
|
||
}
|
||
|
||
</script>
|
||
</body>
|
||
</html> |