292 lines
13 KiB
Plaintext
292 lines
13 KiB
Plaintext
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
|
||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||
|
||
<style type="text/css">
|
||
.select2-container .select2-selection--single{
|
||
height:34px;
|
||
line-height: 34px;
|
||
}
|
||
.select2-selection__arrow{
|
||
margin-top:3px;
|
||
}
|
||
/* .modal{
|
||
padding-left: 0px !important;
|
||
} */
|
||
</style>
|
||
<script type="text/javascript">
|
||
function dosave() {
|
||
// $("#subForm").bootstrapValidator('validate');//提交验证
|
||
// if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||
$.post(ext.contextPath + "/exam/daytestrecord/publishdaytest.do", $("#subForm").serialize(), function(data) {
|
||
console.log(data);
|
||
var arr= JSON.parse(JSON.stringify(data));
|
||
if (arr.res == 1){
|
||
$(".modal-backdrop").remove();
|
||
closeModal('subModal');
|
||
swal("题目准备完毕!");
|
||
dodaytestpapaer(arr.daytestRecordid);
|
||
}else if(arr.res == 0){
|
||
swal("题目准备失败!");
|
||
}else{
|
||
showAlert('d',data.res);
|
||
}
|
||
},'json');
|
||
// }
|
||
}
|
||
|
||
//打开每日一练
|
||
var dodaytestpapaer = function(id) {
|
||
var daytestrecordid = id;
|
||
$.post(ext.contextPath + '/exam/daytestrecord/daytestpaper.do',{daytestrecordid:daytestrecordid}, function(data) {
|
||
// console.log(data);
|
||
$("#subDiv").html(data);
|
||
openModal('subModal');
|
||
});
|
||
};
|
||
|
||
function doclose() {
|
||
closeModal('subModal');
|
||
}
|
||
var showSubject4SelectsFun = function() {
|
||
var userIds= $("#subjecttypeids").val();
|
||
$.post(ext.contextPath + '/question/subjecttype/subjectForSelect.do', {formId:"subForm2",hiddenId:"subjecttypeids",textId:"subjectName",userIds:userIds} , function(data) {
|
||
$("#user4SelectDiv").html(data);
|
||
openModal("user4SelectModal");
|
||
});
|
||
};
|
||
var showRanktype4SelectsFun = function() {
|
||
var userIds= $("#ranktypeids").val();
|
||
$.post(ext.contextPath + '/question/ranktype/rankForSelect.do', {formId:"subForm2",hiddenId:"ranktypeids",textId:"rankName",userIds:userIds} , function(data) {
|
||
$("#user4SelectDiv").html(data);
|
||
openModal("user4SelectModal");
|
||
});
|
||
};
|
||
var showQuesttype4SelectsFun = function() {
|
||
var userIds= $("#questtypeids").val();
|
||
$.post(ext.contextPath + '/question/questtype/questForSelect.do', {formId:"subForm2",hiddenId:"questtypeids",textId:"questName",userIds:userIds} , function(data) {
|
||
$("#user4SelectDiv").html(data);
|
||
openModal("user4SelectModal");
|
||
});
|
||
};
|
||
|
||
function selectnode(){
|
||
// console.log($('#companytree1').treeview('getChecked'));
|
||
var arr = $('#companytree1').treeview('getChecked');
|
||
var ids = "";
|
||
var texts = "";
|
||
for(var i=0;i<arr.length;i++){
|
||
ids+= arr[i].id+",";
|
||
texts+= arr[i].text+",";
|
||
}
|
||
// console.log(ids);
|
||
$("#cname_input1").val(texts);
|
||
$("#subjecttypeids").val(ids);
|
||
document.getElementById('company_select').style.display = "none";
|
||
$("ul#company_select").hide();
|
||
}
|
||
|
||
function selected(data){
|
||
if(data.fatherId == undefined){
|
||
for (var i = 0; i < data.nodes.length; i++) {
|
||
$("#companytree1").treeview('checkNode', [ data.nodes[i], {silent: true}]);
|
||
}
|
||
}else{
|
||
var parentNode = $('#companytree1').treeview('getParent', data.nodeId);
|
||
$("#companytree1").treeview('checkNode', [ parentNode, {silent: true}]);
|
||
}
|
||
}
|
||
|
||
function unSelected(node){
|
||
if(node.fatherId == undefined){
|
||
for (var i = 0; i < node.nodes.length; i++) {
|
||
$("#companytree1").treeview('uncheckNode', [ node.nodes[i], {silent: true}]);
|
||
}
|
||
}else{
|
||
var parentNode = $('#companytree1').treeview('getParent', node.nodeId);
|
||
var num;
|
||
for (var i = 0; i < parentNode.nodes.length; i++) {
|
||
if(parentNode.nodes[i].state.checked == true){
|
||
num=1;
|
||
}
|
||
}
|
||
if(num!=1){
|
||
$("#companytree1").treeview('uncheckNode', [ parentNode, {silent: true}]);
|
||
}
|
||
console.log(parentNode);
|
||
}
|
||
}
|
||
|
||
//输入框验证
|
||
// $("#subForm").bootstrapValidator({
|
||
// live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||
// fields: {
|
||
// project: {
|
||
// validators: {
|
||
// notEmpty: {
|
||
// message: '名称不能为空'
|
||
// }
|
||
// }
|
||
// }
|
||
// }
|
||
// });
|
||
|
||
$(function () {
|
||
//树(工作领域)
|
||
$.post(ext.contextPath + '/question/subjecttype/getSubjecttypeJson.do', { ng: '' }, function (data) {
|
||
//console.log("data",data[0]);
|
||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||
$("#search_pid1").val(data[0].id);
|
||
$("#companyselect1").hide();
|
||
$("#companyName1").text("公司:" + data[0].text);
|
||
// showtable();
|
||
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
|
||
//第一次加载时赋值
|
||
// $("#search_pid1").val(data[0].id);
|
||
// $("#cname_input1").val(data[0].text);
|
||
// showtable();
|
||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||
$('#companytree1').treeview({
|
||
data: data,
|
||
showBorder: false,
|
||
showCheckbox: true,
|
||
levels: 1,
|
||
hierarchicalCheck:true,//级联勾选
|
||
// onNodeChecked : function(event, data) {
|
||
// //点击选中
|
||
// selected(data);
|
||
// },
|
||
// onNodeUnchecked : function(event, node){
|
||
// //点击取消
|
||
// unSelected(node);
|
||
// }
|
||
});
|
||
// $('#companytree1').on('nodeSelected', function (event, data) {
|
||
// var nodesnum=0;
|
||
// if(data.nodes!=null){
|
||
// nodesnum=data.nodes.length;
|
||
// }else{
|
||
// nodesnum=nodesnum;
|
||
// }
|
||
|
||
// if(nodesnum==0){
|
||
// $("#search_pid1").val(data.id);
|
||
// $("#cname_input1").val(data.text);
|
||
// document.getElementById('company_select').style.display = "none";
|
||
// $("ul#company_select").hide();
|
||
// $("#table").bootstrapTable('refresh');
|
||
// }
|
||
|
||
|
||
// // $("ul#company_select").hide();
|
||
// });
|
||
} else {
|
||
//待完善
|
||
};
|
||
}, 'json');
|
||
|
||
//防止点击树收起下拉框
|
||
$("#company_select").on("click", function (e) {
|
||
event.stopPropagation();
|
||
});
|
||
|
||
//点击树之外其他区域收起
|
||
$(document).click(function(){
|
||
$("#company_select").hide();
|
||
});
|
||
|
||
});
|
||
|
||
|
||
</script>
|
||
<div class="modal fade" id="subModal">
|
||
<div class="modal-dialog">
|
||
<div class="modal-content" style="width: 100%;height: auto;">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||
<span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title">答题反馈</h4>
|
||
</div>
|
||
<div class="modal-body" style="width: 100%;height: auto;">
|
||
<!-- 新增界面formid强制为subForm -->
|
||
<div style="width: 2%;height: auto;"></div>
|
||
<div style="width: 96%;height: auto;">
|
||
<div style="width: 100%;">本次练习您共完成${numcount}题,其中答对${rightnum}题,答错${errornum}题。</div>
|
||
<div style="width: 100%;">答题情况</div>
|
||
<!--开始循环题目类型-->
|
||
<c:forEach var="analysislist" items="${analysislist}">
|
||
<c:if test="${analysislist.questypename=='判断题'}">
|
||
<div style="width: 100%;font-weight: 600;">${analysislist.ord}、${analysislist.questypename}(每题只有一个正确答案)(共${analysislist.questypenum}道)</div>
|
||
</c:if>
|
||
<c:if test="${analysislist.questypename=='单选题'}">
|
||
<div style="width: 100%;font-weight: 600;">${analysislist.ord}、${analysislist.questypename}(每题只有一个正确答案)(共${analysislist.questypenum}道)</div>
|
||
</c:if>
|
||
<c:if test="${analysislist.questypename=='多选题'}">
|
||
<div style="width: 100%;font-weight: 600;">${analysislist.ord}、${analysislist.questypename}(每题有多个正确答案)(共${analysislist.questypenum}道)</div>
|
||
</c:if>
|
||
<c:if test="${analysislist.questypename=='填空题'}">
|
||
<div style="width: 100%;font-weight: 600;">${analysislist.ord}、${analysislist.questypename}(每题只有一个正确答案)(共${analysislist.questypenum}道)</div>
|
||
</c:if>
|
||
<!--开始循环titlelist-->
|
||
<c:forEach var="titlelist" items="${analysislist.titlelist}">
|
||
<c:if test="${titlelist.status=='正确'}">
|
||
<div style="width: 100%;">${titlelist.quesnum}.(${titlelist.questypename})${titlelist.questitle}</div>
|
||
<!--开始循环选项-->
|
||
<c:forEach var="optionlist" items="${titlelist.optionlist}">
|
||
<div style="width: 100%;">
|
||
<c:if test="${optionlist.optionvalue=='T'}">
|
||
<input type="checkbox" name="option" id="${optionlist.optionid}" value="${optionlist.optionid}" style="zoom: 100%;" checked="checked"/>
|
||
${optionlist.optioncontent}
|
||
</c:if>
|
||
<c:if test="${optionlist.optionvalue=='F'}">
|
||
<input type="checkbox" name="option" id="${optionlist.optionid}" value="${optionlist.optionid}" style="zoom: 100%;"/>
|
||
${optionlist.optioncontent}
|
||
</c:if>
|
||
</div>
|
||
</c:forEach>
|
||
<!--答案解析-->
|
||
<div style="width: 100%;height: 5px;"></div>
|
||
<div style="width: 100%;">您的答案:${titlelist.useranswer}</div>
|
||
<div style="width: 100%;">答案解析:${titlelist.analysis},本题正确答案为 ${titlelist.rightanswer}</div>
|
||
<div style="width: 100%;height: 5px;"></div>
|
||
</c:if>
|
||
|
||
<c:if test="${titlelist.status=='错误' || titlelist.status=='' || titlelist.status==null}">
|
||
<div style="width: 100%;color: red;">${titlelist.quesnum}.(${titlelist.questypename})${titlelist.questitle}</div>
|
||
<!--开始循环选项-->
|
||
<c:forEach var="optionlist" items="${titlelist.optionlist}">
|
||
<div style="width: 100%;color: red;">
|
||
<c:if test="${optionlist.optionvalue=='T'}">
|
||
<input type="checkbox" name="option" id="${optionlist.optionid}" value="${optionlist.optionid}" style="zoom: 100%;" checked="checked"/>
|
||
${optionlist.optioncontent}
|
||
</c:if>
|
||
<c:if test="${optionlist.optionvalue=='F'}">
|
||
<input type="checkbox" name="option" id="${optionlist.optionid}" value="${optionlist.optionid}" style="zoom: 100%;"/>
|
||
${optionlist.optioncontent}
|
||
</c:if>
|
||
</div>
|
||
</c:forEach>
|
||
<!--答案解析-->
|
||
<div style="width: 100%;height: 5px;"></div>
|
||
<div style="width: 100%;color: red;">您的答案:${titlelist.useranswer}</div>
|
||
<div style="width: 100%;color: red;">答案解析:${titlelist.analysis},本题正确答案为 ${titlelist.rightanswer}</div>
|
||
<div style="width: 100%;height: 5px;"></div>
|
||
</c:if>
|
||
</c:forEach>
|
||
</c:forEach>
|
||
|
||
</div>
|
||
<div style="width: 2%;height: auto;"></div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" onclick="doclose()">关闭</button>
|
||
<!-- <button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">确定</button> -->
|
||
</div>
|
||
</div>
|
||
<!-- /.modal-content -->
|
||
</div>
|
||
<!-- /.modal-dialog -->
|
||
</div>
|