Examination_system/Examination_system-1/.svn/pristine/30/30570a43b3b1c30aa36a656e46a...

184 lines
6.5 KiB
Plaintext

<%@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);
}
.activeBack {
background-color: black;
}
.welcome {
position: absolute;
margin-left: 20px;
}
</style>
<div class="page-content" style="margin-top: 30%">
<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>
</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.id}';
$(function() {
getbaseList(1);
});
function getbaseList(init) {
if (init == 1)
$("#baseForm.pageNum").val(1);
JY.Model.loading();
JY.Ajax
.doRequest(
"baseForm",
bonuspath + '/backstage/grade/find',
{userId:userId},
function(data) {
console.log(JSON.stringify(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];
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.startTimeDetails)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.endTimeDetails)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.singleAnswer)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.multiAnswer)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.judgeAnswer)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.fillAnswer)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.caseAnswer)+ "</td>";
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.soluAnswer)+ "</td>";
if (l.grade > 90) {
html += "<td style='vertical-align:middle;' class='center'>考试通过</td>";
} else {
html += "<td style='vertical-align:middle;' class='center'>考试不通过</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>
</html>