453 lines
11 KiB
Plaintext
453 lines
11 KiB
Plaintext
<%@ page contentType="text/html;charset=UTF-8" %>
|
||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||
<%@ taglib prefix="fns" uri="/WEB-INF/tlds/fns.tld" %>
|
||
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<%@include file="../baseset.jsp" %>
|
||
<%@include file="../systemset.jsp" %>
|
||
<link rel="stylesheet" href="${bonuspath}/static/plugins/zTree/3.5/zTreeStyle.css" />
|
||
|
||
<script src="${bonuspath}/static/plugins/zTree/3.5/jquery.ztree.all.min.js"></script>
|
||
<title></title>
|
||
<style type="text/css">
|
||
.waitTop{
|
||
background-color: #000;
|
||
color: #fff;
|
||
font-size: 20px;
|
||
line-height: 6vh;
|
||
height: 6vh;
|
||
padding-left: 2%;
|
||
}
|
||
.waitmain{
|
||
height: 85vh;
|
||
margin-top: 1vh;
|
||
border-radius: 10px;
|
||
border: 1px solid #000;
|
||
width: 94%;
|
||
margin-left: 1%;
|
||
box-shadow: -5px -5px 5px #a5a5a5;
|
||
}
|
||
.waitmaininside{
|
||
width: 100%;
|
||
height: 80%;
|
||
margin-left: 5%;
|
||
margin-top: 5%;
|
||
}
|
||
.waitmaincontent{
|
||
margin-top: 2%;
|
||
margin-left:3%;
|
||
font-size: 15px;
|
||
}
|
||
.exambtn{
|
||
margin-top:37.5%;
|
||
margin-left: 40%;
|
||
background-color: #000;
|
||
color: #fff;
|
||
width: 10%;
|
||
font-size: 15px;
|
||
border-radius: 10px;
|
||
text-align: center;
|
||
}
|
||
.majorBtn{
|
||
margin-top: 2%;
|
||
margin-left: 20%;
|
||
background-color: #000;
|
||
color: #fff;
|
||
width: 10%;
|
||
font-size: 15px;
|
||
border-radius: 10px;
|
||
text-align: center;
|
||
}
|
||
button {
|
||
width: 130px;
|
||
height: 40px;
|
||
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:after {
|
||
content: "";
|
||
width: 0;
|
||
height: 0;
|
||
display: block;
|
||
border-top: 20px solid #187dbc;
|
||
border-bottom: 20px 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.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;
|
||
}
|
||
.top{
|
||
margin-top:-2%;
|
||
width: 90%;
|
||
height: 100%;
|
||
border: 1px solid black;
|
||
}
|
||
.left{
|
||
width:40%;
|
||
height:100%;
|
||
float:left;
|
||
border-right: 1px solid black;
|
||
}
|
||
.right{
|
||
width:60%;
|
||
height:100%;
|
||
float:left;
|
||
}
|
||
.Ltop{
|
||
width: 100%;
|
||
height: 10%;
|
||
border-bottom: 1px solid black;
|
||
}
|
||
.Lbot{
|
||
width: 100%;
|
||
height: 90%;
|
||
overflow: auto;
|
||
}
|
||
|
||
.Lbot::-webkit-scrollbar {
|
||
/*滚动条整体样式*/
|
||
width : 10px; /*高宽分别对应横竖滚动条的尺寸*/
|
||
height: 1px;
|
||
}
|
||
.Lbot::-webkit-scrollbar-thumb {
|
||
/*滚动条里面小方块*/
|
||
border-radius : 10px;
|
||
background-color: skyblue;
|
||
background-image: -webkit-linear-gradient(
|
||
45deg,
|
||
rgba(255, 255, 255, 0.2) 25%,
|
||
transparent 25%,
|
||
transparent 50%,
|
||
rgba(255, 255, 255, 0.2) 50%,
|
||
rgba(255, 255, 255, 0.2) 75%,
|
||
transparent 75%,
|
||
transparent
|
||
);
|
||
}
|
||
.Lbot::-webkit-scrollbar-track {
|
||
/*滚动条里面轨道*/
|
||
box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2);
|
||
background : #ededed;
|
||
border-radius: 10px;
|
||
}
|
||
|
||
.LTleft{
|
||
width: 50%;
|
||
height: 100%;
|
||
float:left;
|
||
border-right: 1px solid black;
|
||
}
|
||
.LTreft{
|
||
width: 50%;
|
||
height: 100%;
|
||
float:left;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="waitExamPage">
|
||
<div class="waitTop">宿州教育培训考试系统 <button onclick="goback()" title="回到首页" class="back" style="background-color: #fff;margin-top: 0.2%;float: right;margin-right: 6%;text-align:center;line-height: 40px">返回</button></div>
|
||
<div class="waitmain">
|
||
<div class="waitmaininside">
|
||
<div class="top">
|
||
<div class="left">
|
||
<div class="Ltop">
|
||
<div class="LTleft">
|
||
<button class="majorBtn" onclick="sheng()" style="width: 60%; height: 60%; margin-top: 4%;">省公司自测</button>
|
||
</div>
|
||
<div class="LTreft">
|
||
<button class="majorBtn" onclick="shi()" style="width: 60%; height: 30px; margin-top: 4%;">市公司自测</button>
|
||
</div>
|
||
</div>
|
||
<div class="Lbot">
|
||
<ul id="roleTree" class="ztree roleTree"></ul>
|
||
</div>
|
||
</div>
|
||
<div class="right">
|
||
<h2 style="margin-left: 3%">考生须知</h2>
|
||
<div class="waitmaincontent" id="shi">
|
||
<span>考试项目: </span><span>宿州教育培训自测练习</span><br>
|
||
<span>考试总分: </span><span>100分</span><br>
|
||
<span>考试描述: </span><span>${page.examName}</span><br>
|
||
<span>考试场次: </span><span>第${page.examCount}场</span><br>
|
||
<div>考试内容:
|
||
<div style="margin-left: 5%;">
|
||
<span>单选题: </span><span>一题一分</span><br>
|
||
<span>多选题: </span><span>一题两分</span><br>
|
||
<span>判断题: </span><span>一题一分</span><br>
|
||
<span>填空题: </span><span>一题两分</span><br>
|
||
<span>简答题: </span><span>一题五分</span><br>
|
||
<span>案例分析: </span><span>一题十分</span>
|
||
</div>
|
||
</div><br>
|
||
<span>扣分规则: </span>
|
||
<span>
|
||
多选题:答对一个选项+0.5分,选错得0分;请谨慎作答;
|
||
</span><br>
|
||
<span>注意事项: </span>
|
||
<span>
|
||
不要在练习期间对试卷进行拍照,录屏等;禁止通过微信,QQ等聊天软件交流试卷答案;禁止通过浏览器搜索试卷答案;
|
||
</span>
|
||
</div>
|
||
<div class="waitmaincontent" id="sheng">
|
||
<span>考试项目: </span><span>宿州教育培训自测练习</span><br>
|
||
<span>考试总分: </span><span>100分</span><br>
|
||
<span>考试描述: </span><span>${page.examName}</span><br>
|
||
<span>考试场次: </span><span>第${page.examCount}场</span><br>
|
||
<div>考试内容:
|
||
<div style="margin-left: 5%;">
|
||
<span>单选题: </span><span>一题两分</span><br>
|
||
<span>多选题: </span><span>一题两分</span><br>
|
||
<span>判断题: </span><span>一题两分</span><br>
|
||
</div>
|
||
</div><br>
|
||
<span>扣分规则: </span>
|
||
<span>
|
||
多选题:答对一个选项+0.5分,选错得0分;请谨慎作答;
|
||
</span><br>
|
||
<span>注意事项: </span>
|
||
<span>
|
||
不要在练习期间对试卷进行拍照,录屏等;禁止通过微信,QQ等聊天软件交流试卷答案;禁止通过浏览器搜索试卷答案;
|
||
</span>
|
||
</div>
|
||
</div>
|
||
|
||
<button class="exambtn" onclick="toExampage(1)" style="width: 20%; height: 8%; margin-top: 41%;">确定进入练习</button>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
|
||
$(function() {
|
||
// 初始化树
|
||
//getRoleTreeData();
|
||
sheng();
|
||
$("#sheng").show();
|
||
$("#shi").hide();
|
||
});
|
||
|
||
function goback() {
|
||
window.history.go(-1);
|
||
}
|
||
//树的设置
|
||
var setting1 = {
|
||
view : {
|
||
selectedMulti : false
|
||
},
|
||
data : {
|
||
simpleData : {
|
||
enable : true
|
||
}
|
||
},
|
||
edit : {
|
||
enable : false,
|
||
} ,
|
||
callback : {
|
||
onClick : onTreeClick,
|
||
// 点击前
|
||
beforeClick : beforeClick,
|
||
// 不允许拖拽
|
||
beforeDrag : beforeDrag
|
||
}
|
||
};
|
||
|
||
|
||
function beforeClick(treeId, treeNode) {
|
||
if (treeNode.id == 0) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
|
||
// 不允许拖拽
|
||
function beforeDrag(treeId, treeNodes) {
|
||
return false;
|
||
}
|
||
|
||
//定义树节点初始数据
|
||
var zNodes1 = [{
|
||
id : 0,
|
||
pId : -1,
|
||
open : true,
|
||
name : "专业列表",
|
||
icon : bonuspath + "/static/css/sys/images/user.gif"
|
||
}];
|
||
|
||
//获取数据初始化树
|
||
function getRoleTreeData(city) {
|
||
$.ajax({
|
||
type : 'POST',
|
||
url : bonuspath + '/backstage/getOrgTreeList',
|
||
data : {city:city},
|
||
success : function(result) {
|
||
var nodes = zNodes1.concat(result.obj);
|
||
$.fn.zTree.init($("#roleTree"), setting1, nodes);
|
||
openFirstTreenode();
|
||
},
|
||
error : function(e) {
|
||
JY.Model.info(e.resMsg);
|
||
},
|
||
dataType : 'json'
|
||
});
|
||
}
|
||
|
||
function sheng(){
|
||
$("#sheng").show();
|
||
$("#shi").hide();
|
||
getRoleTreeData("2");
|
||
}
|
||
function shi(){
|
||
$("#sheng").hide();
|
||
$("#shi").show();
|
||
getRoleTreeData("1");
|
||
}
|
||
|
||
/**
|
||
* 展开树节点的第一层
|
||
*/
|
||
function openFirstTreenode(){
|
||
// 获取树对象
|
||
var treeObj = $.fn.zTree.getZTreeObj("roleTree");
|
||
/* 获取所有树节点 */
|
||
var nodes = treeObj.transformToArray(treeObj.getNodes());
|
||
//展开第一级树
|
||
treeObj.expandNode(nodes[1], true);
|
||
}
|
||
|
||
var examPerfession = null;
|
||
var isParent = null;
|
||
var typeId = null;
|
||
|
||
function onTreeClick(event, treeId, treeNode, clickFlag) {
|
||
examPerfession = treeNode.id;
|
||
isParent = treeNode.isParent;
|
||
typeId = treeNode.type;
|
||
console.log("typeIdtypeIdtypeIdtypeIdtypeId"+typeId)
|
||
xzShow(typeId);
|
||
}
|
||
|
||
function xzShow(typeId){
|
||
console.log("typeId"+typeId)
|
||
if(typeId == '2'){
|
||
$("#sheng").show();
|
||
$("#shi").hide();
|
||
}else{
|
||
$("#sheng").hide();
|
||
$("#shi").show();
|
||
}
|
||
}
|
||
|
||
function toExampage(testId) {
|
||
if(isParent || isParent == null){
|
||
layer.msg('请选择正确的专业!', {icon: 5});
|
||
}else{
|
||
var difficultId = "1";
|
||
var idx = layer.msg('系统随机出题中,请稍等...', {
|
||
icon: 16
|
||
,shade: 0.01
|
||
,time:'-1'
|
||
});
|
||
|
||
//系统出题
|
||
var data = {
|
||
difficultId: difficultId,
|
||
examPerfession: examPerfession,
|
||
typeId:typeId
|
||
};
|
||
$.ajax({
|
||
type:"POST",
|
||
url:bonuspath +'/backstage/grade/toSelfExam',
|
||
data: JSON.stringify(data),
|
||
dataType:"json",
|
||
contentType:"application/json",
|
||
success:function(data){
|
||
console.log(JSON.stringify(data))
|
||
var examId = data.obj.examId;
|
||
var type = data.obj.typeId;
|
||
layer.close(idx);
|
||
location.href="${bonuspath}/backstage/grade/toExamingPage?examId="+examId+'&typeId='+type+'&testId='+testId;
|
||
},
|
||
error:function(data){
|
||
console.log("服务器出错,请查看!");
|
||
}
|
||
})
|
||
}
|
||
|
||
}
|
||
|
||
|
||
|
||
|
||
</script>
|
||
</body>
|
||
</html> |