Examination_system/Examination_system-1/.svn/pristine/87/87111b2ff9b1d20c9599c0a22c9...

282 lines
9.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@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;
}
</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>
</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="position: absolute;width: 100%;height: 62%;" >
</div>
<div class="page-content" style="margin-top: 33%">
<div style=" color: white; margin-left: 1%;width: 5%;background: #9291bf;">成绩展示</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: 5%" class="center hidden-480">序号</th>
<th style="width: 10%" class="center">考试名称</th>
<th style="width: 10%" class="center">考试开始时间</th>
<th style="width: 10%" class="center">考试场次</th>
<th style="width: 10%" class="center">考试结束时间</th>
<th style="width: 10%" class="center">考试人员</th>
<th style="width: 10%" class="center">考试得分</th>
<th style="width: 8%" class="center">是否通过</th>
<th style="width: 8%" 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}';
$(function() {
getbaseList(1);
var type = "${type}";
console.log("type=", type);
if(type == "endOfTest") { //考试结束后临时进入个人中心30秒
var html = "<h4 style='color:red;'>您的练习已结束系统将于1分钟后退出</h4>";
var endMsg = layer.confirm(html, {btn: ['关闭']},function(){
layer.close(endMsg);
});
setTimeout(function(){
logon();
}, 60000);
}
});
function view(examId, id) {
var index = layer.open({
type: 2,
title: "成绩单1",
btn:["取消"],
shade: [0],
area: ['90%', '90%'],
anim: 2,
content: [bonuspath +'/backstage/score/gradeReport?examId='+examId+'&id='+id]
});
}
function getbaseList(init) {
if (init == 1)
$("#baseForm.pageNum").val(1);
JY.Model.loading();
JY.Ajax
.doRequest(
"baseForm",
bonuspath + '/backstage/grade/findByPageTwo',
{userId:userId},
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>";
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.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 + ")' 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>";
}
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>