123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255 |
- <%@ page contentType="text/html;charset=UTF-8" language="java" %>
- <%@ include file="/webpage/include/taglibf.jsp"%>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>${fns:getConfig("productName")}</title>
- <link rel="stylesheet" href="${ctxStaticWeb}/css/base.css" />
- <link rel="stylesheet" href="${ctxStaticWeb}/css/second.css" />
- <link href="${ctx}/static/plugin/layui/dist/css/layui.css" rel="stylesheet" />
- <script src="${ctx}/static/web/js/jquery-2.1.4.js"></script>
- <script src="${ctx}/static/plugin/jquery-validation/1.14.0/jquery.validate.js" type="text/javascript"></script>
- <script src="${ctx}/static/plugin/jquery-validation/1.14.0/localization/messages_zh.min.js" type="text/javascript"></script>
- <script src="${ctxStatic}/plugin/layui/layer/layer.js"></script>
- <script src="${ctxStatic}/plugin/layui/laytpl/laytpl.js"></script>
- <script src="${ctxStatic}/plugin/vue/vue.js"></script>
- <link rel="stylesheet" type="text/css" href="${ctxStaticWeb}/css/dj.css" />
- </head>
- <style>
- /* 使用伪元素清除浮动 */
- .clearfix::before, .clearfix::after {
- content: "";
- height: 0;
- line-height: 0;
- display: block;
- visibility: none;
- clear: both;
- }
- .clearfix {
- *zoom: 1;
- }
- label div {
- display: inline;
- }
- h2 div {
- display: inline;
- }
- .mian_dt .qustion{
- padding: 0px;
- }
- .mian_dt .qustion li{
- width: 100%;
- padding: 5px 15px 5px 15px;
- line-height: 25px;
- border-radius: 4px;
- cursor: pointer;
- margin: 0;
- position: relative;
- min-height: 30px;
- margin-bottom: 10px;
- }
- .mian_dt .qustion li.dt_cw label{
- color: #999;
- }
- .mian_dt .qustion li.dt_dui label{
- color: #333;
- }
- .mian_dt .qustion li.yxz{
- background: #f8efef;
- }
- .mian_dt .qustion li span{
- display: none;
- }
- .mian_dt .qustion li.yxz span{
- display: block;
- color: #c7301e;
- width:60px;
- height: 25px;
- line-height: 25px;
- float:right;
- }
- .mian_dt .qustion li i{
- width:18px;
- height: 18px;
- display: block;
- float:left;
- margin: 3px 0px;
- }
- .mian_dt .qustion li.dt_cw i{
- background: url(${ctxStaticWeb}/img/dt_cw.png) no-repeat center;
- background-size: contain;
- }
- .mian_dt .qustion li.dt_dui i{
- background: url(${ctxStaticWeb}/img/dt_dui.png) no-repeat center;
- background-size: contain;
- }
- .mian_dt .qustion .dt_div{
- padding: 20px 20px 0px 20px;
- }
- .dtj_div{
- width:1200px;
- }
- .dt_div{
- position: relative;
- overflow: hidden;
- }
- .dt_l{
- float:left;
- width:49%;
- }
- .dt_r{
- float: right;
- width: 49%;
- padding-left: 2%;
- }
- </style>
- <script>
- var testsId= "${testsId}";
- /* $(document).ready(function(e) {
- $.ajax({
- type: "POST",
- url: '${ctxF}/exam/answer?',
- data: {testsId : testsId},
- dataType:'json',
- cache: false,
- success: function(data) {
- var str='';
- $("#aaa").html("");
- var questionOptionList = data.questionOptionList;
- var testsDetailList = data.testsDetailList;*/
- /* 试题LIST
- 答题结果LIST
- //循环题目,本场考试所有试题题目
- for(试题LIST){
- //根据试题题目ID,获取该试题下所有答案选项,和该选项是否是正确答案
- ajax请求后台,获取该题目下所有答案选项的LIST,
- for(循环答案选项LIST,并标注是否为正确答案){
- 页面回显,显示答题选项及是否为正确答案。
- if(根据试题LIST中试题ID与答题结果LIST中试题ID 判断,如果相等,表明为统一题){
- for(){
- 举例:答案选项结果为“李清照”,讲 答案选项结果(字段title)去
- 【答题结果LIST】(字段results,可以使用循环活join去遍历比较,根据!#!分组),进行寻找,看是否在 选择结果中。
- 如果在,则在后面加载“已选择” 字样。
- if(){
- }
- }
- }
- }
- }
- */
- /*
- for(var t=0;t<testsDetailList.length;t++){
- str+='<div class="dt_div clearfix">';
- str+=' <div class="">';
- str+=' <h2 :id="t"><strong>'+t+1+'</strong>.<div >'+testsDetailList[t].questionTitle+'</div> ('+testsDetailList[t].points+'分)</h2>'
- for (var i = 0; i < questionOptionList.length; i++) {
- str+=' <ul >';
- str+='<div>';
- if (questionOptionList[i].questionId == testsDetailList[t].questionId) {
- if (questionOptionList[i].isAnswer == '1') {
- str += '<li id="li" class="dt_dui yxz">';
- str += '<i></i>';
- str += '<label>';
- str += '<div>' + testsDetailList[t].questionOptionArray[j] + '</div>';
- str += '</label>';
- } else {
- str += '<li id="li" class="dt_cw yxz">';
- str += '<i></i>';
- str += '<label>';
- str += '<div>' + testsDetailList[t].questionOptionArray[j] + '</div>';
- str += '</label>';
- }
- for (var r = 0; r < testsDetailList[t].resultsArray.length; r++) {
- if(testsDetailList[t].resultsArray[r] == questionOptionList[i].title){
- str+=' <span>已选择</span>'
- }
- }
- str+=' </li>';
- str+='</div>';
- str+='</ul>' ;
- }
- }
- str+='<div class="h"></div> </div></div>';
- }
- $("#aaa").append(str);
- }
- })
- });*/
- </script>
- <body>
- <div class="dtj_div clearfix">
- <div class="mian mian_dt">
- <div class="tit">${testInfo.paperName}(共${sum}题,合计${testInfo.points}分)</div>
- <div class="qustion">
- <c:forEach items="${testsDetailList}" varStatus="status" var="obj" >
- <div class="dt_div clearfix">
- <div class="">
- <h2 id="i"><strong> ${status.index+1}</strong>.<div >${obj.questionTitle}</div> (${obj.points}分)</h2>
- <ul >
- <c:forEach items="${questionOptionList}" var="questionOption">
- <c:if test="${questionOption.qId == obj.questionId}">
- <div >
- <c:if test="${questionOption.isAnswer=='1'}">
- <li id="li" class="dt_dui yxz">
- </c:if>
- <c:if test="${questionOption.isAnswer!='1'}">
- <li id="li" class="dt_cw yxz">
- </c:if>
- <i></i>
- <label>
- <div>${questionOption.title}</div>
- </label>
- <c:forEach items="${obj.resultsArray}" var="resultsArray" >
- <c:if test="${resultsArray==questionOption.title}">
- <span>已选择</span>
- </c:if>
- </c:forEach>
- </li>
- </div>
- </c:if>
- </c:forEach>
- </ul>
- <div class="h"></div>
- </div>
- </div>
- </c:forEach>
- </div>
- </div>
- </div>
- </body>
- </html>
|