Examination_system/Examination_system-1/.svn/pristine/0d/0d2ca3cafe2bfc7e6f8ea476465...

409 lines
14 KiB
Plaintext
Raw Normal View History

2023-10-30 13:10:40 +08:00
<%@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">
<head>
<%@include file="../baseset.jsp"%>
<%@include file="../systemset.jsp"%>
<%
String nowTime = DateTimeHelper.getNowDate();
%>
<link rel="stylesheet"
href="${bonuspath}/static/plugins/zTree/3.5/zTreeStyle.css" />
<link rel="stylesheet"
href="${bonuspath}/static/js/theme/default/layer.css" />
<link rel="stylesheet"
href="${bonuspath}/static/css/ace/select2.min.css" />
<script
src="${bonuspath}/static/plugins/zTree/3.5/jquery.ztree.core-3.5.min.js"></script>
<script src="${bonuspath}/static/js/layer.js"></script>
<link rel="stylesheet" href="${bonuspath}/static/js/layui/css/layui.css" />
<script src="${bonuspath}/static/js/layui/layui.js"></script>
<script src="${bonuspath}/static/js/ace/select2.full.js"></script>
<script type="text/javascript"
src="${bonuspath}/static/plugins/jquery.jqprint-0.3.js"></script>
<link rel="stylesheet" type="text/css"
href="${bonuspath}/static/EduCationTrainUI/TestDemo/css/bootstrap.css">
<link rel="stylesheet" type="text/css"
href="${bonuspath}/static/EduCationTrainUI/TestDemo/css/font-awesome.min.css">
<link rel="stylesheet"
href="${bonuspath}/static/EduCationTrainUI/TestDemo/css/animate.min.css">
<link rel="stylesheet"
href="${bonuspath}/static/EduCationTrainUI/TestDemo/css/templatemo-style.css">
<link href='${bonuspath}/static/EduCationTrainUI/TestDemo/css/css.css'
rel='stylesheet' type='text/css'>
</head>
<style type="text/css">
h4, h5, a {
color: #666666;
cursor: pointer;
}
#daohangl {
background-image:
url(${bonuspath}/static/EduCationTrainUI/TestDemo/img/heard.png);
}
#bj {
background-repeat: repeat;
background-image:
url(${bonuspath}/static/EduCationTrainUI/TestDemo/img/6.jpg) ;
}
.activeBack {
background-color: black;
}
.welcome {
position: absolute;
margin-left: 20px;
}
/* .majorBtn{
margin-top: -38%;
margin-left: 62%;
background-color: #000;
color: #fff;
width: 10%;
font-size: 15px;
border-radius: 10px;
text-align: center;
} */
button {
left: 2%;
width: 119%;
height: 4%;
background: linear-gradient(to bottom, #4eb5e5 0%,#389ed5 100%); /* W3C */
border: none;
border-radius: 5px;
position: relative;
border-bottom: 4px solid #2b8bc6;
color: #fbfbfb;
font-weight: 600;
font-family: 'Open Sans', sans-serif;
text-shadow: 1px 1px 1px rgba(0,0,0,.4);
font-size: 15px;
text-align: left;
text-indent: 5px;
box-shadow: 0px 3px 0px 0px rgba(0,0,0,.2);
cursor: pointer;
/* Just for presentation */
display: block;
margin: 0 auto;
margin-bottom: 20px;
}
button:active {
box-shadow: 0px 2px 0px 0px rgba(0,0,0,.2);
top: 1px;
}
button.majorBtn:after {
content: "";
width: 0;
height: 0;
display: block;
border-top: 15px solid #187dbc;
border-bottom: 15px solid #187dbc;
border-left: 16px solid transparent;
border-right: 20px solid #187dbc;
position: absolute;
opacity: 0.6;
right: 0;
top: 0;
border-radius: 0 5px 5px 0;
}
/* Button pointing left */
button.back {
text-align: right;
padding-right: 12px;
box-sizing: border-box;
}
button.back:after {
content: "";
width: 0;
height: 0;
display: block;
border-top: 20px solid #187dbc;
border-bottom: 20px solid #187dbc;
border-right: 16px solid transparent;
border-left: 20px solid #187dbc;
position: absolute;
opacity: 0.6;
left: 0;
top: 0;
border-radius: 5px 0 0 5px;
}
/*
.ordinaryGrade{
position: absolute;
top: 76.5%;
width: 5%;
height: 3.8%;
margin-left: 9%;
} */
.testGrades{
margin-top: -74%;
margin-left: 128%;
}
</style>
<div id="daohangl" class="navbar navbar-default ">
<div class="container">
<div class="row">
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a
href="${pageContext.request.contextPath}/backstage/index"
id="index">首页</a></li>
<!-- #66AF33 -->
<c:if test="${sessionUser.ifPermiss ne '1'}">
<li>
<a href="${pageContext.request.contextPath}/backstage/waitExamPage" class="smoothScroll">开始考试</a>
</li>
<li><a onclick="toSelfExamPage()" class="smoothScroll">自测练习</a></li>
</c:if>
<li><a href="#" id="person" onclick="gradeInfo()"
class="smoothScroll activeBack"> 个人中心</a></li>
<li><a href="#" id="person" onclick="logon()"
class="smoothScroll">退出</a></li>
<li class="welcome"><a> <small>欢迎光临,</small> <span
id="user-info-name "> <c:choose>
<c:when test="${!empty sessionUser.name}"> ${sessionUser.name }</c:when>
<c:otherwise>用户</c:otherwise>
</c:choose>
</span>
</a></li>
<c:if test="${sessionUser.ifPermiss eq '1'}">
<li><a href="#" onclick="inter()" class="smoothScroll">进入后台</a></li>
</c:if>
</ul>
</div>
</div>
</div>
</div>
<div>
<img src="${bonuspath}/static/EduCationTrainUI/TestDemo/img/6.jpg" style="width: 100%;height: 300px;" >
</div>
<div class="page-content" style="">
<div style="width: 100%; ">
<div style=" color: white; margin-left: 1%;background: #9291bf;float: left;">成绩展示</div>
<div style="float: left;">
<button class="testGrade" onclick="getbaseList(1,2)" >自测成绩</button>
<button class="testGrades" onclick="getbaseList(1,1)">普考成绩</button>
</div>
</div>
<div class="row-fluid">
<div class="col-xs-12">
<form id="baseForm" class="form-inline" method="POST"
onsubmit="return false;">
<input type='hidden' class='pageNum' name='pageNum' value='1' />
<input type='hidden' class='pageSize' name='pageSize' value='10' />
</form>
<table id="baseTable"
class="table table-striped table-bordered table-hover" >
<thead>
<tr>
<th style="width: 4%" class="center hidden-480">序号</th>
<th style="width: 6%" class="center">考试类型</th>
<th style="width: 10%" class="center">考试名称</th>
<th style="width: 12%" class="center">考试专业</th>
<th style="width: 10%" class="center">考试开始时间</th>
<th style="width: 5%" class="center">考试场次</th>
<th style="width: 10%" class="center">考试结束时间</th>
<th style="width: 6%" class="center">考试人员</th>
<th style="width: 5%" class="center">考试得分</th>
<th style="width: 8%" class="center">是否通过</th>
<th style="width: 5%" class="center">成绩单</th>
<!-- <th style="width: 8%" class="center">操作</th> -->
</tr>
</thead>
<tbody></tbody>
</table>
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-8">
<!--设置分页位置-->
<div id="pageing" class="dataTables_paginate paging_bootstrap">
<ul class="pagination"></ul>
</div>
</div>
</div>
<%@include file="../dialog.jsp"%>
</div>
</div>
</div>
</body>
<script type="text/javascript">
var userId = '${userInfo.loginName}';
var id = '${userInfo.id}';
var examType ="";
$(function() {
getbaseList(1);
var type = "${type}";
console.log("type=", type);
if(type == "endOfTest") { //考试结束后临时进入个人中心30秒
var html = "<h4 style='color:red;'>您的考试已结束</h4>";
var endMsg = layer.confirm(html, {btn: ['关闭']},function(){
layer.close(endMsg);
});
/* setTimeout(function(){
logon();
}, 600000); */
}
});
function toSelfExamPage() {
$(location).attr("href","${bonuspath}/backstage/selfExamPage");
}
function view(examId, id, examType) {
var index = layer.open({
type: 2,
title: "成绩单",
btn:["关闭"],
shade: [0],
area: ['90%', '90%'],
anim: 2,
content: [bonuspath +'/backstage/score/gradeReport?examId='+examId+'&id='+id+'&examType='+examType]
});
}
function getbaseList(init,examType) {
/* alert("init="+init+"==========="+examType+"=examType"); */
if (init == 1)
$("#baseForm.pageNum").val(1);
JY.Model.loading();
JY.Ajax
.doRequest(
"baseForm",
bonuspath + '/backstage/grade/findByPageTwo',
{userId:userId,examType:examType},
function(data) {
$("#baseTable tbody").empty();
var obj = data.obj;
var list = obj.list;
var results = list.results;
var permitBtn = obj.permitBtn;
var pageNum = list.pageNum, pageSize = list.pageSize, totalRecord = list.totalRecord;
var html = "";
if (results != null && results.length > 0) {
var leng = (pageNum - 1) * pageSize;
for (var i = 0; i < results.length; i++) {
var l = results[i];
var examId = l.examId;
html += "<tr>";
html += "<td style='vertical-align:middle;' class='center hidden-480'>"+ (i + leng + 1) + "</td>";
if(l.examType == 1){
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty("普通练习")+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.examName)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.specialName)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.startTime)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.examCount)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.endTime)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.user.name)+ "</td>";
var temp = "待通知";
if(l.viewGrade == 1) { //允许展示成绩
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.grade)+ "</td>";
} else {
html += "<td style='vertical-align:middle;' class='center'>"+ temp + "</td>";
}
if(l.viewGrade == 1) {
if (l.grade >= 90) {
html += "<td style='vertical-align:middle;' class='center'>考试通过</td>";
} else {
html += "<td style='vertical-align:middle;' class='center'>考试不通过</td>";
}
} else {
html += "<td style='vertical-align:middle;' class='center'>"+ temp + "</td>";
}
if(l.viewGrade == 1) {
var rf = "<a href='#' title='查看成绩单' onclick='view(" + examId + ", " + id + ", " + l.examType + ")' class='aBtnNoTD' ><i class='icon-zoom-in color-p bigger-160'></i></a>";
html += "<td style='vertical-align:middle;' class='center'>"+ rf + "</td>";
} else {
html += "<td style='vertical-align:middle;' class='center'>"+ temp + "</td>";
}
}else if(l.examType == 2 || l.examType == "2"){
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty("自测练习")+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>自测练习考试</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.specialName)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.startTime)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>---</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.endTime)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.user.name)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.grade)+ "</td>";
if (l.grade >= 90) {
html += "<td style='vertical-align:middle;' class='center'>考试通过</td>";
} else {
html += "<td style='vertical-align:middle;' class='center'>考试不通过</td>";
}
var rf = "<a href='#' title='查看成绩单' onclick='view(" + examId + ", " + id + ", " + l.examType + ")' class='aBtnNoTD' ><i class='icon-zoom-in color-p bigger-160'></i></a>";
html += "<td style='vertical-align:middle;' class='center'>"+ rf + "</td>";
html += "</tr>";
}
}
$("#baseTable tbody").append(html);
JY.Page.setPage("baseForm", "pageing",
pageSize, pageNum, totalRecord,
"getbaseList");
} else {
html += "<tr><td colspan='10' class='center'>没有相关数据</td></tr>";
$("#baseTable tbody").append(html);
$("#pageing ul").empty();// 清空分页
}
JY.Model.loadingClose();
});
}
function rowFunction(id){
var h="";
h+="<td style='vertical-align:middle;' class='center'>";
h+="<div class='visible-md visible-lg hidden-sm hidden-xs btn-group'>";
h+="<a href='#' title='修改' onclick='details(&apos;" + id + "&apos;)' class='aBtnNoTD' ><i class='icon-edit color-blue bigger-140'></i></a>";
h+="</div>";
h+="</td>";
return h;
}
function details(id){
layer.open({
type: 2,
btn:btns,
title: title,
shade: [0],
area: ['60%', '60%'],
scrollbar: true,
anim: 2,
yes: function(index,layero){
},
content: [bonuspath +'/backstage/grade/details']
});
}
</script>
<script type="text/javascript">
function inter(){
$(location).attr("href","${bonuspath}/intercontroller");
}
function logon(){
$(location).attr("href","${bonuspath}/system_logout");
}
function gradeInfo(){
$(location).attr("href","${bonuspath}/gardeInfo");
}
</script>
</html>