examResultInfo.jsp 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  2. <%@ include file="/webpage/include/taglibf.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <meta charset="utf-8">
  7. <title>${fns:getConfig("productName")}</title>
  8. <link rel="stylesheet" href="${ctxStaticWeb}/css/base.css" />
  9. <link rel="stylesheet" href="${ctxStaticWeb}/css/second.css" />
  10. <link href="${ctx}/static/plugin/layui/dist/css/layui.css" rel="stylesheet" />
  11. <script src="${ctx}/static/web/js/jquery-2.1.4.js"></script>
  12. <script src="${ctx}/static/plugin/jquery-validation/1.14.0/jquery.validate.js" type="text/javascript"></script>
  13. <script src="${ctx}/static/plugin/jquery-validation/1.14.0/localization/messages_zh.min.js" type="text/javascript"></script>
  14. <script src="${ctxStatic}/plugin/layui/layer/layer.js"></script>
  15. <script src="${ctxStatic}/plugin/layui/laytpl/laytpl.js"></script>
  16. <script src="${ctxStatic}/plugin/vue/vue.js"></script>
  17. <link rel="stylesheet" type="text/css" href="${ctxStaticWeb}/css/dj.css" />
  18. </head>
  19. <style>
  20. /* 使用伪元素清除浮动 */
  21. .clearfix::before, .clearfix::after {
  22. content: "";
  23. height: 0;
  24. line-height: 0;
  25. display: block;
  26. visibility: none;
  27. clear: both;
  28. }
  29. .clearfix {
  30. *zoom: 1;
  31. }
  32. label div {
  33. display: inline;
  34. }
  35. h2 div {
  36. display: inline;
  37. }
  38. .mian_dt .qustion{
  39. padding: 0px;
  40. }
  41. .mian_dt .qustion li{
  42. width: 100%;
  43. padding: 5px 15px 5px 15px;
  44. line-height: 25px;
  45. border-radius: 4px;
  46. cursor: pointer;
  47. margin: 0;
  48. position: relative;
  49. min-height: 30px;
  50. margin-bottom: 10px;
  51. }
  52. .mian_dt .qustion li.dt_cw label{
  53. color: #999;
  54. }
  55. .mian_dt .qustion li.dt_dui label{
  56. color: #333;
  57. }
  58. .mian_dt .qustion li.yxz{
  59. background: #f8efef;
  60. }
  61. .mian_dt .qustion li span{
  62. display: none;
  63. }
  64. .mian_dt .qustion li.yxz span{
  65. display: block;
  66. color: #c7301e;
  67. width:60px;
  68. height: 25px;
  69. line-height: 25px;
  70. float:right;
  71. }
  72. .mian_dt .qustion li i{
  73. width:18px;
  74. height: 18px;
  75. display: block;
  76. float:left;
  77. margin: 3px 0px;
  78. }
  79. .mian_dt .qustion li.dt_cw i{
  80. background: url(${ctxStaticWeb}/img/dt_cw.png) no-repeat center;
  81. background-size: contain;
  82. }
  83. .mian_dt .qustion li.dt_dui i{
  84. background: url(${ctxStaticWeb}/img/dt_dui.png) no-repeat center;
  85. background-size: contain;
  86. }
  87. .mian_dt .qustion .dt_div{
  88. padding: 20px 20px 0px 20px;
  89. }
  90. .dtj_div{
  91. width:1200px;
  92. }
  93. .dt_div{
  94. position: relative;
  95. overflow: hidden;
  96. }
  97. .dt_l{
  98. float:left;
  99. width:49%;
  100. }
  101. .dt_r{
  102. float: right;
  103. width: 49%;
  104. padding-left: 2%;
  105. }
  106. </style>
  107. <script>
  108. var testsId= "${testsId}";
  109. /* $(document).ready(function(e) {
  110. $.ajax({
  111. type: "POST",
  112. url: '${ctxF}/exam/answer?',
  113. data: {testsId : testsId},
  114. dataType:'json',
  115. cache: false,
  116. success: function(data) {
  117. var str='';
  118. $("#aaa").html("");
  119. var questionOptionList = data.questionOptionList;
  120. var testsDetailList = data.testsDetailList;*/
  121. /* 试题LIST
  122. 答题结果LIST
  123. //循环题目,本场考试所有试题题目
  124. for(试题LIST){
  125. //根据试题题目ID,获取该试题下所有答案选项,和该选项是否是正确答案
  126. ajax请求后台,获取该题目下所有答案选项的LIST,
  127. for(循环答案选项LIST,并标注是否为正确答案){
  128. 页面回显,显示答题选项及是否为正确答案。
  129. if(根据试题LIST中试题ID与答题结果LIST中试题ID 判断,如果相等,表明为统一题){
  130. for(){
  131. 举例:答案选项结果为“李清照”,讲 答案选项结果(字段title)去
  132. 【答题结果LIST】(字段results,可以使用循环活join去遍历比较,根据!#!分组),进行寻找,看是否在 选择结果中。
  133. 如果在,则在后面加载“已选择” 字样。
  134. if(){
  135. }
  136. }
  137. }
  138. }
  139. }
  140. */
  141. /*
  142. for(var t=0;t<testsDetailList.length;t++){
  143. str+='<div class="dt_div clearfix">';
  144. str+=' <div class="">';
  145. str+=' <h2 :id="t"><strong>'+t+1+'</strong>.<div >'+testsDetailList[t].questionTitle+'</div> ('+testsDetailList[t].points+'分)</h2>'
  146. for (var i = 0; i < questionOptionList.length; i++) {
  147. str+=' <ul >';
  148. str+='<div>';
  149. if (questionOptionList[i].questionId == testsDetailList[t].questionId) {
  150. if (questionOptionList[i].isAnswer == '1') {
  151. str += '<li id="li" class="dt_dui yxz">';
  152. str += '<i></i>';
  153. str += '<label>';
  154. str += '<div>' + testsDetailList[t].questionOptionArray[j] + '</div>';
  155. str += '</label>';
  156. } else {
  157. str += '<li id="li" class="dt_cw yxz">';
  158. str += '<i></i>';
  159. str += '<label>';
  160. str += '<div>' + testsDetailList[t].questionOptionArray[j] + '</div>';
  161. str += '</label>';
  162. }
  163. for (var r = 0; r < testsDetailList[t].resultsArray.length; r++) {
  164. if(testsDetailList[t].resultsArray[r] == questionOptionList[i].title){
  165. str+=' <span>已选择</span>'
  166. }
  167. }
  168. str+=' </li>';
  169. str+='</div>';
  170. str+='</ul>' ;
  171. }
  172. }
  173. str+='<div class="h"></div> </div></div>';
  174. }
  175. $("#aaa").append(str);
  176. }
  177. })
  178. });*/
  179. </script>
  180. <body>
  181. <div class="dtj_div clearfix">
  182. <div class="mian mian_dt">
  183. <div class="tit">${testInfo.paperName}(共${sum}题,合计${testInfo.points}分)</div>
  184. <div class="qustion">
  185. <c:forEach items="${testsDetailList}" varStatus="status" var="obj" >
  186. <div class="dt_div clearfix">
  187. <div class="">
  188. <h2 id="i"><strong> ${status.index+1}</strong>.<div >${obj.questionTitle}</div> (${obj.points}分)</h2>
  189. <ul >
  190. <c:forEach items="${questionOptionList}" var="questionOption">
  191. <c:if test="${questionOption.qId == obj.questionId}">
  192. <div >
  193. <c:if test="${questionOption.isAnswer=='1'}">
  194. <li id="li" class="dt_dui yxz">
  195. </c:if>
  196. <c:if test="${questionOption.isAnswer!='1'}">
  197. <li id="li" class="dt_cw yxz">
  198. </c:if>
  199. <i></i>
  200. <label>
  201. <div>${questionOption.title}</div>
  202. </label>
  203. <c:forEach items="${obj.resultsArray}" var="resultsArray" >
  204. <c:if test="${resultsArray==questionOption.title}">
  205. <span>已选择</span>
  206. </c:if>
  207. </c:forEach>
  208. </li>
  209. </div>
  210. </c:if>
  211. </c:forEach>
  212. </ul>
  213. <div class="h"></div>
  214. </div>
  215. </div>
  216. </c:forEach>
  217. </div>
  218. </div>
  219. </div>
  220. </body>
  221. </html>