Commit 57b1e143274b7acca49f82f5a4a1023b4b367b46
Merge branch 'develop' of http://120.78.57.84/Elvis/SunvoteEducation into develop
Showing
4 changed files
with
1015 additions
and
49 deletions
WebRoot/WEB-INF/jsp/sunvote/homework/homework_item_report.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" | ||
2 | + pageEncoding="UTF-8"%> | ||
3 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
4 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
5 | +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> | ||
6 | +<%@ taglib prefix="myelfun" uri="/WEB-INF/tld/elfun.tld"%> | ||
7 | +<% | ||
8 | + String path = request.getContextPath(); | ||
9 | + String basePath = request.getScheme() + "://" | ||
10 | + + request.getServerName() + ":" + request.getServerPort() | ||
11 | + + path + "/"; | ||
12 | +%> | ||
13 | + | ||
14 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
15 | +<html> | ||
16 | +<head> | ||
17 | +<base href="<%=basePath%>"> | ||
18 | + | ||
19 | +<title>${info.CLASS_NAME}成绩报表</title> | ||
20 | +<base href="<%=basePath%>"> | ||
21 | +<!-- 下拉框 --> | ||
22 | +<link rel="stylesheet" href="static/ace/css/chosen.css" /> | ||
23 | + <link type="text/css" href="static/css/tablescroller.css" rel="stylesheet" /> | ||
24 | + | ||
25 | +<link | ||
26 | + href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" | ||
27 | + rel="stylesheet"> | ||
28 | +<!-- 日期框 --> | ||
29 | +<link rel="stylesheet" href="static/ace/css/datepicker.css" /> | ||
30 | +<style> | ||
31 | + .font span{ font-size: 12px; | ||
32 | + font-weight: initial;color:#000;} | ||
33 | + .search_btn{width:30px;} | ||
34 | + .btn{margin:0 5px;} | ||
35 | + </style> | ||
36 | +</head> | ||
37 | + | ||
38 | +<body style="background:#fff;"> | ||
39 | + | ||
40 | + | ||
41 | +<div style="padding-top:3%;"> | ||
42 | + | ||
43 | + <!-- Nav tabs --> | ||
44 | + <ul class="nav nav-tabs" role="tablist"> | ||
45 | + | ||
46 | + | ||
47 | + <c:forEach items="${pd.CLASSES}" var="var" varStatus="vs"> | ||
48 | + <li role="presentation" class="${vs.index==0?'active':''}"><a href="#${var.CLASS_ID}" aria-controls="${var.CLASS_ID}" role="tab" data-toggle="tab">${var.CLASS_NAME}</a></li> | ||
49 | + </c:forEach> | ||
50 | + | ||
51 | + </ul> | ||
52 | + | ||
53 | + | ||
54 | + <div style="padding:20px 20px;"> | ||
55 | + <form action="report/report.do" method="post" name="Form" id="Form" style="margin-bottom:0;"> | ||
56 | + <input type="hidden" name="CLASSID" id="CLASSID" value="${var.ID}" /> | ||
57 | + <input type="hidden" name="ROLE" id="ROLE" value="${pd.ROLE}" /> | ||
58 | + <table style="margin-top:5px;margin-bottom:20px;"> | ||
59 | + <tr> | ||
60 | + <td><div style="width:150px;text-align:center;">课程统计: ${fn:length(pd.DATA.HOMEWORKS)}</div></td> | ||
61 | + <td><div style="width:150px;text-align:center;">班级名册: ${myelfun:findClassName(pd.CLASS_ID)}</div></td> | ||
62 | + | ||
63 | + <td><div style="width:150px;text-align:center;"><span>学生人数: ${fn:length(pd.DATA.STUDENTS)}</span></div></td> | ||
64 | + <td></td> | ||
65 | + | ||
66 | + | ||
67 | + | ||
68 | + <td style="padding-left:2px;"> | ||
69 | + <input | ||
70 | + class="span10 date-picker" name="lastStart" id="lastStart" | ||
71 | + value="${pd.START_DATE}" type="text" data-date-format="yyyy-mm-dd" | ||
72 | + readonly="readonly" style="width:88px;" placeholder="开始日期" | ||
73 | + title="开始日期" /> | ||
74 | + </td> | ||
75 | + <td style="padding-left:2px;"><input | ||
76 | + class="span10 date-picker" name="lastEnd" id="lastEnd" value="${pd.END_DATE}" | ||
77 | + type="text" data-date-format="yyyy-mm-dd" readonly="readonly" | ||
78 | + style="width:88px;" placeholder="结束日期" title="结束日期" /></td> | ||
79 | + <td style="vertical-align:top;padding-left:2px"><a | ||
80 | + class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><img src="static/images/search.png" alt="" class="search_btn" /></a></td> | ||
81 | + <td><li class="btn btn-default btn-sm">上一周</li></td> | ||
82 | + <td><li class="btn btn-primary btn-sm">本周</li></td> | ||
83 | + <td><li class="btn btn-default btn-sm">下一周</li></td> | ||
84 | + </tr> | ||
85 | + </table> | ||
86 | + <hr /> | ||
87 | + <table id="simple-table" | ||
88 | + class="table table-bordered table-hover" | ||
89 | + style="margin-top:0px;margin-bottom:0px;"> | ||
90 | + <thead> | ||
91 | + <tr> | ||
92 | + <th class="center th_name"><div style="width:150px;">姓名</div></th> | ||
93 | + <th class="center "><div style="width:150px;">课程平均得分率</div></th> | ||
94 | + <th class="center"><div style="width:80px;">课程总分</div></th> | ||
95 | + <c:forEach items="${pd.DATA.HOMEWORKS}" var="var_h" varStatus="vs"> | ||
96 | + <th class="center kc"><a | ||
97 | + onclick="paper('${info.CLASS_ID}','${var.TESTPAPER_ID}');"><div style="width:180px; margin: 0 auto;cursor:hand" class="font">${var_h.NAME}</br><span>${var_h.COMPLETE_DATE}</span></div></a></th> | ||
98 | + </c:forEach> | ||
99 | + </tr> | ||
100 | + </thead> | ||
101 | + <tbody> | ||
102 | + <tr> | ||
103 | + <td class="center"><div style="width:150px;">班级课程总分</div></td> | ||
104 | + <td class="center"><div style="width:150px;"></div></td> | ||
105 | + <td class="center"><div style="width:80px;"></div></td> | ||
106 | + <c:forEach items="${pd.DATA.HOMEWORKS}" var="var_h" varStatus="vs"> | ||
107 | + <td class="center"><div style="width:80px;margin:0 auto;">${var_h.ALL_SCORE}</div></td> | ||
108 | + </c:forEach> | ||
109 | + </tr> | ||
110 | + <tr> | ||
111 | + <td class="center"><div style="width:150px;">班级课程平均分</div></td> | ||
112 | + <td class="center"><div style="width:150px;"></div></td> | ||
113 | + <td class="center"><div style="width:80px;"></div></td> | ||
114 | + <c:forEach items="${pd.DATA.HOMEWORKS}" var="var_h" varStatus="vs"> | ||
115 | + <td class="center"><div style="width:80px;margin:0 auto;">${var_h.GET_SCORE}</div></td> | ||
116 | + </c:forEach> | ||
117 | + </tr> | ||
118 | + <tr> | ||
119 | + <td class="center"><div style="width:150px;">班级课程平均得分率</div></td> | ||
120 | + <td class="center"><div style="width:150px;"></div></td> | ||
121 | + <td class="center"><div style="width:80px;"></div></td> | ||
122 | + <c:forEach items="${pd.DATA.HOMEWORKS}" var="var_h" varStatus="vs"> | ||
123 | + <td class="center"><div style="width:80px;margin:0 auto;">${var_h.GET_SCORE_PERSENT }</div></td> | ||
124 | + </c:forEach> | ||
125 | + </tr> | ||
126 | + | ||
127 | + <c:choose> | ||
128 | + <c:when test="${not empty pd.DATA.STUDENTS}"> | ||
129 | + <c:forEach items="${pd.DATA.STUDENTS}" var="var" varStatus="vs"> | ||
130 | + <tr> | ||
131 | + <%-- <td class="center"><a | ||
132 | + href="report/student_report?studentid=${var.ID}&class_id=${info.CLASS_ID}">${var.NAME}</a> | ||
133 | + </td> --%> | ||
134 | + <td class="center"><div style="width:150px;cursor:hand"><a | ||
135 | + onclick="student('${info.CLASS_ID}','${var.STUDENT_ID}')">${var.NAME}</a></div> | ||
136 | + </td> | ||
137 | + <td class="center"><div style="width:150px;"><fmt:formatNumber type="number" | ||
138 | + value="${var.TOTALSCORE == 0 ? 0: (var.GETSCORE / var.TOTALSCORE * 100)}" | ||
139 | + maxFractionDigits="2" />%</div></td> | ||
140 | + <td class="center"><div style="width:80px;margin:0 auto;">${var.GET_SCORE_PERSENT }</div></td> | ||
141 | + <c:forEach items="${pd.DATA.HOMEWORKS}" var="var1" varStatus="vs1"> | ||
142 | + <td class="center"><div style="width:180px;margin:0 auto;"><c:set var="TEST_ID" | ||
143 | + value="${var1.HOMEWORK_ID}" /> ${var[TEST_ID] }</div></td> | ||
144 | + </c:forEach> | ||
145 | + </tr> | ||
146 | + </c:forEach> | ||
147 | + </c:when> | ||
148 | + </c:choose> | ||
149 | + </tbody> | ||
150 | + </table> | ||
151 | + | ||
152 | + <div id="scrollableTable"></div> | ||
153 | + </form> | ||
154 | + </div> | ||
155 | + | ||
156 | + | ||
157 | + | ||
158 | + | ||
159 | +</div> | ||
160 | + | ||
161 | + <hr /> | ||
162 | + <div style="padding:20px 20px;"> | ||
163 | + <form action="report/report.do" method="post" name="Form" id="Form" style="margin-bottom:0;"> | ||
164 | + <input type="hidden" name="CLASSID" id="CLASSID" value="${info.CLASS_ID}" /> | ||
165 | + <input type="hidden" name="ROLE" id="ROLE" value="${pd.ROLE}" /> | ||
166 | + <table style="margin-top:5px;margin-bottom:20px;"> | ||
167 | + <tr> | ||
168 | + <td><div style="width:150px;text-align:center;">课程统计: ${info.testsize}</div></td> | ||
169 | + <td><div style="width:150px;text-align:center;">班级名册: ${info.CLASS_NAME}</div></td> | ||
170 | + | ||
171 | + <td><div style="width:150px;text-align:center;"><span>学生人数: ${info.STUDENT_NUM}</span></div></td> | ||
172 | + <td></td> | ||
173 | + | ||
174 | + | ||
175 | + <c:if test="${not empty subjectInfos}"> | ||
176 | + <td> | ||
177 | + <select class="chosen-select form-control" name="SUBJECT_ID" id="SUBJECT_ID" data-placeholder="这里输入所属学校"> | ||
178 | + <option value="">全部</option> | ||
179 | + <c:forEach var="item" items="${subjectInfos}"> | ||
180 | + <option value="${item.SUBJECT_ID}" <c:if test="${pd.SUBJECT_ID == item.SUBJECT_ID }">selected = ture</c:if>>${item.SCNAME}</option> | ||
181 | + </c:forEach> | ||
182 | + </select> | ||
183 | + </td> | ||
184 | + </c:if> | ||
185 | + <td style="padding-left:2px;"> | ||
186 | + <input | ||
187 | + class="span10 date-picker" name="lastStart" id="lastStart" | ||
188 | + value="${start_date}" type="text" data-date-format="yyyy-mm-dd" | ||
189 | + readonly="readonly" style="width:88px;" placeholder="开始日期" | ||
190 | + title="开始日期" /> | ||
191 | + </td> | ||
192 | + <td style="padding-left:2px;"><input | ||
193 | + class="span10 date-picker" name="lastEnd" id="lastEnd" value="${end_date}" | ||
194 | + type="text" data-date-format="yyyy-mm-dd" readonly="readonly" | ||
195 | + style="width:88px;" placeholder="结束日期" title="结束日期" /></td> | ||
196 | + <td style="vertical-align:top;padding-left:2px"><a | ||
197 | + class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><img src="static/images/search.png" alt="" class="search_btn" /></a></td> | ||
198 | + <td><li class="btn btn-default btn-sm">上一周</li></td> | ||
199 | + <td><li class="btn btn-primary btn-sm">本周</li></td> | ||
200 | + <td><li class="btn btn-default btn-sm">下一周</li></td> | ||
201 | + </tr> | ||
202 | + </table> | ||
203 | + <hr /> | ||
204 | + <table id="simple-table" | ||
205 | + class="table table-bordered table-hover" | ||
206 | + style="margin-top:0px;margin-bottom:0px;"> | ||
207 | + <thead> | ||
208 | + <tr> | ||
209 | + <th class="center th_name"><div style="width:150px;">姓名</div></th> | ||
210 | + <th class="center "><div style="width:150px;">课程平均得分率</div></th> | ||
211 | + <th class="center"><div style="width:80px;">课程总分</div></th> | ||
212 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | ||
213 | + <th class="center kc"><a | ||
214 | + onclick="paper('${info.CLASS_ID}','${var.TESTPAPER_ID}');"><div style="width:180px; margin: 0 auto;cursor:hand" class="font">${var.NAME}</br><span>${var.CREATE_DATE}</span></div></a></th> | ||
215 | + </c:forEach> | ||
216 | + </tr> | ||
217 | + </thead> | ||
218 | + <tbody> | ||
219 | + <tr> | ||
220 | + <td class="center"><div style="width:150px;">班级课程总分</div></td> | ||
221 | + <td class="center"><div style="width:150px;"></div></td> | ||
222 | + <td class="center"><div style="width:80px;"></div></td> | ||
223 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | ||
224 | + <td class="center"><div style="width:80px;margin:0 auto;">${var.TOTAL_SCORE}</div></td> | ||
225 | + </c:forEach> | ||
226 | + </tr> | ||
227 | + <tr> | ||
228 | + <td class="center"><div style="width:150px;">班级课程平均分</div></td> | ||
229 | + <td class="center"><div style="width:150px;"></div></td> | ||
230 | + <td class="center"><div style="width:80px;"></div></td> | ||
231 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | ||
232 | + <td class="center"><div style="width:80px;margin:0 auto;">${var.AVG_SCORE}</div></td> | ||
233 | + </c:forEach> | ||
234 | + </tr> | ||
235 | + <tr> | ||
236 | + <td class="center"><div style="width:150px;">班级课程平均得分率</div></td> | ||
237 | + <td class="center"><div style="width:150px;"></div></td> | ||
238 | + <td class="center"><div style="width:80px;"></div></td> | ||
239 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | ||
240 | + <td class="center"><div style="width:80px;margin:0 auto;"><fmt:formatNumber type="number" | ||
241 | + value="${var.TOTAL_SCORE == 0 ? 0: (var.AVG_SCORE / var.TOTAL_SCORE * 100)}" | ||
242 | + maxFractionDigits="2" />%</div></td> | ||
243 | + </c:forEach> | ||
244 | + </tr> | ||
245 | + | ||
246 | + <c:choose> | ||
247 | + <c:when test="${not empty studentList}"> | ||
248 | + <c:forEach items="${studentList}" var="var" varStatus="vs"> | ||
249 | + <tr> | ||
250 | + <%-- <td class="center"><a | ||
251 | + href="report/student_report?studentid=${var.ID}&class_id=${info.CLASS_ID}">${var.NAME}</a> | ||
252 | + </td> --%> | ||
253 | + <td class="center"><div style="width:150px;cursor:hand"><a | ||
254 | + onclick="student('${info.CLASS_ID}','${var.STUDENT_ID}')">${var.NAME}</a></div> | ||
255 | + </td> | ||
256 | + <td class="center"><div style="width:150px;"><fmt:formatNumber type="number" | ||
257 | + value="${var.TOTALSCORE == 0 ? 0: (var.GETSCORE / var.TOTALSCORE * 100)}" | ||
258 | + maxFractionDigits="2" />%</div></td> | ||
259 | + <td class="center"><div style="width:80px;margin:0 auto;">${var.GETSCORE }</div></td> | ||
260 | + <c:forEach items="${testpaperList}" var="var1" varStatus="vs1"> | ||
261 | + <td class="center"><div style="width:180px;margin:0 auto;"><c:set var="TEST_ID" | ||
262 | + value="${var1.TESTPAPER_ID}" /> ${var[TEST_ID] }</div></td> | ||
263 | + </c:forEach> | ||
264 | + </tr> | ||
265 | + </c:forEach> | ||
266 | + </c:when> | ||
267 | + </c:choose> | ||
268 | + </tbody> | ||
269 | + </table> | ||
270 | + ${pd } | ||
271 | + <div id="scrollableTable"></div> | ||
272 | + </form> | ||
273 | + </div> | ||
274 | + | ||
275 | + <%@ include file="../../system/index/foot.jsp"%> | ||
276 | + <script src="static/ace/js/bootbox.js"></script> | ||
277 | + <!-- ace scripts --> | ||
278 | + <script src="static/ace/js/ace/ace.js"></script> | ||
279 | + <!-- 下拉框 --> | ||
280 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
281 | + <!-- 日期框 --> | ||
282 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
283 | + <!--提示框--> | ||
284 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
285 | + | ||
286 | + <script language="javascript" src="static/js/tablescroller.js"></script> | ||
287 | + <script language="javascript" src="static/js/tablescroller.jquery.js"></script> | ||
288 | + | ||
289 | + | ||
290 | + | ||
291 | + <script type="text/javascript"> | ||
292 | + $(function() { | ||
293 | + | ||
294 | + //日期框 | ||
295 | + $('.date-picker').datepicker({ | ||
296 | + autoclose : true, | ||
297 | + todayHighlight : true | ||
298 | + }); | ||
299 | + | ||
300 | + //下拉框 | ||
301 | + if (!ace.vars['touch']) { | ||
302 | + $('.chosen-select').chosen({ | ||
303 | + allow_single_deselect : true | ||
304 | + }); | ||
305 | + $(window).off('resize.chosen').on('resize.chosen', function() { | ||
306 | + $('.chosen-select').each(function() { | ||
307 | + var $this = $(this); | ||
308 | + $this.next().css({ | ||
309 | + 'width' : $this.parent().width() | ||
310 | + }); | ||
311 | + }); | ||
312 | + }).trigger('resize.chosen'); | ||
313 | + $(document).on('settings.ace.chosen', | ||
314 | + function(e, event_name, event_val) { | ||
315 | + if (event_name != 'sidebar_collapsed') | ||
316 | + return; | ||
317 | + $('.chosen-select').each(function() { | ||
318 | + var $this = $(this); | ||
319 | + $this.next().css({ | ||
320 | + 'width' : $this.parent().width() | ||
321 | + }); | ||
322 | + }); | ||
323 | + }); | ||
324 | + $('#chosen-multiple-style .btn').on( | ||
325 | + 'click', | ||
326 | + function(e) { | ||
327 | + var target = $(this).find('input[type=radio]'); | ||
328 | + var which = parseInt(target.val()); | ||
329 | + if (which == 2) | ||
330 | + $('#form-field-select-4').addClass( | ||
331 | + 'tag-input-style'); | ||
332 | + else | ||
333 | + $('#form-field-select-4').removeClass( | ||
334 | + 'tag-input-style'); | ||
335 | + }); | ||
336 | + } | ||
337 | + | ||
338 | + //复选框全选控制 | ||
339 | + var active_class = 'active'; | ||
340 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on( | ||
341 | + 'click', | ||
342 | + function() { | ||
343 | + var th_checked = this.checked;//checkbox inside "TH" table header | ||
344 | + $(this).closest('table').find('tbody > tr').each( | ||
345 | + function() { | ||
346 | + var row = this; | ||
347 | + if (th_checked) | ||
348 | + $(row).addClass(active_class).find( | ||
349 | + 'input[type=checkbox]').eq(0) | ||
350 | + .prop('checked', true); | ||
351 | + else | ||
352 | + $(row).removeClass(active_class).find( | ||
353 | + 'input[type=checkbox]').eq(0) | ||
354 | + .prop('checked', false); | ||
355 | + }); | ||
356 | + }); | ||
357 | + }); | ||
358 | + | ||
359 | + var role = '${pd.ROLE}'; | ||
360 | + | ||
361 | + function precent(avg,total){ | ||
362 | + if(total == 0){ | ||
363 | + return "0%" | ||
364 | + } | ||
365 | + return Math.round(avg / total * 100)/100 + '%' ; | ||
366 | + } | ||
367 | + | ||
368 | + function tosearch(){ | ||
369 | + var url = "<%=basePath%>report/report.do?classid=${info.CLASS_ID}" ; | ||
370 | + var startDate = $("#lastStart").val(); | ||
371 | + var endDate = $("#lastEnd").val(); | ||
372 | + var subject_id = $("#SUBJECT_ID").val(); | ||
373 | + url = url + "&start_date=" + startDate ; | ||
374 | + if(endDate != null){ | ||
375 | + url = url + "&end_date=" + endDate; | ||
376 | + } | ||
377 | + if(subject_id != null){ | ||
378 | + url = url + "&SUBJECT_ID=" + subject_id; | ||
379 | + } | ||
380 | + if(role == "admin"){ | ||
381 | + url = url + "&ROLE=admin" ; | ||
382 | + } | ||
383 | + window.location.href = url; | ||
384 | + window.top.loading.show(); | ||
385 | + /* $("#Form").sumbit(); */ | ||
386 | + } | ||
387 | + | ||
388 | + function student(classid,studentid){ | ||
389 | + | ||
390 | + var url = "<%=basePath%>report/student_report?studentid=" + studentid + "&class_id=" + classid ; | ||
391 | + var startDate = $("#lastStart").val(); | ||
392 | + var endDate = $("#lastEnd").val(); | ||
393 | + url = url + "&start_date=" + startDate + "&end_date=" + endDate ; | ||
394 | + var SUBJECT_ID = $("#SUBJECT_ID").val(); | ||
395 | + if(SUBJECT_ID != null && SUBJECT_ID != ''){ | ||
396 | + url = url + "&SUBJECT_ID="+ SUBJECT_ID ; | ||
397 | + } | ||
398 | + window.self.location.href = url; | ||
399 | + window.top.loading.show(); | ||
400 | + } | ||
401 | + | ||
402 | + function paper(class_id,testpaper_id){ | ||
403 | + var url = "<%=basePath%>report/test_report?TestID=" + testpaper_id + "&class_id=" + class_id; | ||
404 | + var startDate = $("#lastStart").val(); | ||
405 | + var endDate = $("#lastEnd").val(); | ||
406 | + url = url + "&start_date=" + startDate + "&end_date=" + endDate ; | ||
407 | + window.self.location.href = url; | ||
408 | + window.top.loading.show(); | ||
409 | + } | ||
410 | + | ||
411 | + $(document).ready(function(){ | ||
412 | + window.top.loading.remove(); | ||
413 | + | ||
414 | + var sour = "${testpaperList}"; | ||
415 | + | ||
416 | + if(sour != null && sour.length > 3){ | ||
417 | + var _width = $('#mainFrame', parent.document).width()-40; | ||
418 | + var _heigh = $('#mainFrame', parent.document).height()-100; | ||
419 | + var options = { | ||
420 | + width: _width, | ||
421 | + height: _heigh, | ||
422 | + pinnedRows: 4, | ||
423 | + pinnedCols: 3, | ||
424 | + container: "#scrollableTable", | ||
425 | + removeOriginal: true | ||
426 | + }; | ||
427 | + $("#simple-table").tablescroller(options); | ||
428 | + var name_height = $(".kc").last().parent().height()-18.5; | ||
429 | + console.log(name_height); | ||
430 | + $(".th_name").height(name_height); | ||
431 | + } | ||
432 | + | ||
433 | + }); | ||
434 | + | ||
435 | + </script> | ||
436 | + | ||
437 | +</body> | ||
438 | +</html> |
WebRoot/WEB-INF/jsp/sunvote/homework/homework_student_report.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" | ||
2 | + pageEncoding="UTF-8"%> | ||
3 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
4 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
5 | +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> | ||
6 | +<%@ taglib prefix="myelfun" uri="/WEB-INF/tld/elfun.tld"%> | ||
7 | +<% | ||
8 | + String path = request.getContextPath(); | ||
9 | + String basePath = request.getScheme() + "://" | ||
10 | + + request.getServerName() + ":" + request.getServerPort() | ||
11 | + + path + "/"; | ||
12 | +%> | ||
13 | + | ||
14 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
15 | +<html> | ||
16 | +<head> | ||
17 | +<base href="<%=basePath%>"> | ||
18 | + | ||
19 | +<title>${info.CLASS_NAME}成绩报表</title> | ||
20 | +<base href="<%=basePath%>"> | ||
21 | +<!-- 下拉框 --> | ||
22 | +<link rel="stylesheet" href="static/ace/css/chosen.css" /> | ||
23 | + <link type="text/css" href="static/css/tablescroller.css" rel="stylesheet" /> | ||
24 | + | ||
25 | +<link | ||
26 | + href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" | ||
27 | + rel="stylesheet"> | ||
28 | +<!-- 日期框 --> | ||
29 | +<link rel="stylesheet" href="static/ace/css/datepicker.css" /> | ||
30 | +<style> | ||
31 | + .font span{ font-size: 12px; | ||
32 | + font-weight: initial;color:#000;} | ||
33 | + .search_btn{width:30px;} | ||
34 | + .btn{margin:0 5px;} | ||
35 | + </style> | ||
36 | +</head> | ||
37 | + | ||
38 | +<body style="background:#fff;"> | ||
39 | + | ||
40 | + | ||
41 | +<div style="padding-top:3%;"> | ||
42 | + | ||
43 | + <!-- Nav tabs --> | ||
44 | + <ul class="nav nav-tabs" role="tablist"> | ||
45 | + | ||
46 | + | ||
47 | + <c:forEach items="${pd.CLASSES}" var="var" varStatus="vs"> | ||
48 | + <li role="presentation" class="${vs.index==0?'active':''}"><a href="#${var.CLASS_ID}" aria-controls="${var.CLASS_ID}" role="tab" data-toggle="tab">${var.CLASS_NAME}</a></li> | ||
49 | + </c:forEach> | ||
50 | + | ||
51 | + </ul> | ||
52 | + | ||
53 | + | ||
54 | + <div style="padding:20px 20px;"> | ||
55 | + <form action="report/report.do" method="post" name="Form" id="Form" style="margin-bottom:0;"> | ||
56 | + <input type="hidden" name="CLASSID" id="CLASSID" value="${var.ID}" /> | ||
57 | + <input type="hidden" name="ROLE" id="ROLE" value="${pd.ROLE}" /> | ||
58 | + <table style="margin-top:5px;margin-bottom:20px;"> | ||
59 | + <tr> | ||
60 | + <td><div style="width:150px;text-align:center;">课程统计: ${fn:length(pd.DATA.HOMEWORKS)}</div></td> | ||
61 | + <td><div style="width:150px;text-align:center;">班级名册: ${myelfun:findClassName(pd.CLASS_ID)}</div></td> | ||
62 | + | ||
63 | + <td><div style="width:150px;text-align:center;"><span>学生人数: ${fn:length(pd.DATA.STUDENTS)}</span></div></td> | ||
64 | + <td></td> | ||
65 | + | ||
66 | + | ||
67 | + | ||
68 | + <td style="padding-left:2px;"> | ||
69 | + <input | ||
70 | + class="span10 date-picker" name="lastStart" id="lastStart" | ||
71 | + value="${pd.START_DATE}" type="text" data-date-format="yyyy-mm-dd" | ||
72 | + readonly="readonly" style="width:88px;" placeholder="开始日期" | ||
73 | + title="开始日期" /> | ||
74 | + </td> | ||
75 | + <td style="padding-left:2px;"><input | ||
76 | + class="span10 date-picker" name="lastEnd" id="lastEnd" value="${pd.END_DATE}" | ||
77 | + type="text" data-date-format="yyyy-mm-dd" readonly="readonly" | ||
78 | + style="width:88px;" placeholder="结束日期" title="结束日期" /></td> | ||
79 | + <td style="vertical-align:top;padding-left:2px"><a | ||
80 | + class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><img src="static/images/search.png" alt="" class="search_btn" /></a></td> | ||
81 | + <td><li class="btn btn-default btn-sm">上一周</li></td> | ||
82 | + <td><li class="btn btn-primary btn-sm">本周</li></td> | ||
83 | + <td><li class="btn btn-default btn-sm">下一周</li></td> | ||
84 | + </tr> | ||
85 | + </table> | ||
86 | + <hr /> | ||
87 | + <table id="simple-table" | ||
88 | + class="table table-bordered table-hover" | ||
89 | + style="margin-top:0px;margin-bottom:0px;"> | ||
90 | + <thead> | ||
91 | + <tr> | ||
92 | + <th class="center th_name"><div style="width:150px;">姓名</div></th> | ||
93 | + <th class="center "><div style="width:150px;">课程平均得分率</div></th> | ||
94 | + <th class="center"><div style="width:80px;">课程总分</div></th> | ||
95 | + <c:forEach items="${pd.DATA.HOMEWORKS}" var="var_h" varStatus="vs"> | ||
96 | + <th class="center kc"><a | ||
97 | + onclick="paper('${info.CLASS_ID}','${var.TESTPAPER_ID}');"><div style="width:180px; margin: 0 auto;cursor:hand" class="font">${var_h.NAME}</br><span>${var_h.COMPLETE_DATE}</span></div></a></th> | ||
98 | + </c:forEach> | ||
99 | + </tr> | ||
100 | + </thead> | ||
101 | + <tbody> | ||
102 | + <tr> | ||
103 | + <td class="center"><div style="width:150px;">班级课程总分</div></td> | ||
104 | + <td class="center"><div style="width:150px;"></div></td> | ||
105 | + <td class="center"><div style="width:80px;"></div></td> | ||
106 | + <c:forEach items="${pd.DATA.HOMEWORKS}" var="var_h" varStatus="vs"> | ||
107 | + <td class="center"><div style="width:80px;margin:0 auto;">${var_h.ALL_SCORE}</div></td> | ||
108 | + </c:forEach> | ||
109 | + </tr> | ||
110 | + <tr> | ||
111 | + <td class="center"><div style="width:150px;">班级课程平均分</div></td> | ||
112 | + <td class="center"><div style="width:150px;"></div></td> | ||
113 | + <td class="center"><div style="width:80px;"></div></td> | ||
114 | + <c:forEach items="${pd.DATA.HOMEWORKS}" var="var_h" varStatus="vs"> | ||
115 | + <td class="center"><div style="width:80px;margin:0 auto;">${var_h.GET_SCORE}</div></td> | ||
116 | + </c:forEach> | ||
117 | + </tr> | ||
118 | + <tr> | ||
119 | + <td class="center"><div style="width:150px;">班级课程平均得分率</div></td> | ||
120 | + <td class="center"><div style="width:150px;"></div></td> | ||
121 | + <td class="center"><div style="width:80px;"></div></td> | ||
122 | + <c:forEach items="${pd.DATA.HOMEWORKS}" var="var_h" varStatus="vs"> | ||
123 | + <td class="center"><div style="width:80px;margin:0 auto;">${var_h.GET_SCORE_PERSENT }</div></td> | ||
124 | + </c:forEach> | ||
125 | + </tr> | ||
126 | + | ||
127 | + <c:choose> | ||
128 | + <c:when test="${not empty pd.DATA.STUDENTS}"> | ||
129 | + <c:forEach items="${pd.DATA.STUDENTS}" var="var" varStatus="vs"> | ||
130 | + <tr> | ||
131 | + <%-- <td class="center"><a | ||
132 | + href="report/student_report?studentid=${var.ID}&class_id=${info.CLASS_ID}">${var.NAME}</a> | ||
133 | + </td> --%> | ||
134 | + <td class="center"><div style="width:150px;cursor:hand"><a | ||
135 | + onclick="student('${info.CLASS_ID}','${var.STUDENT_ID}')">${var.NAME}</a></div> | ||
136 | + </td> | ||
137 | + <td class="center"><div style="width:150px;"><fmt:formatNumber type="number" | ||
138 | + value="${var.TOTALSCORE == 0 ? 0: (var.GETSCORE / var.TOTALSCORE * 100)}" | ||
139 | + maxFractionDigits="2" />%</div></td> | ||
140 | + <td class="center"><div style="width:80px;margin:0 auto;">${var.GET_SCORE_PERSENT }</div></td> | ||
141 | + <c:forEach items="${pd.DATA.HOMEWORKS}" var="var1" varStatus="vs1"> | ||
142 | + <td class="center"><div style="width:180px;margin:0 auto;"><c:set var="TEST_ID" | ||
143 | + value="${var1.HOMEWORK_ID}" /> ${var[TEST_ID] }</div></td> | ||
144 | + </c:forEach> | ||
145 | + </tr> | ||
146 | + </c:forEach> | ||
147 | + </c:when> | ||
148 | + </c:choose> | ||
149 | + </tbody> | ||
150 | + </table> | ||
151 | + | ||
152 | + <div id="scrollableTable"></div> | ||
153 | + </form> | ||
154 | + </div> | ||
155 | + | ||
156 | + | ||
157 | + | ||
158 | + | ||
159 | +</div> | ||
160 | + | ||
161 | + <hr /> | ||
162 | + <div style="padding:20px 20px;"> | ||
163 | + <form action="report/report.do" method="post" name="Form" id="Form" style="margin-bottom:0;"> | ||
164 | + <input type="hidden" name="CLASSID" id="CLASSID" value="${info.CLASS_ID}" /> | ||
165 | + <input type="hidden" name="ROLE" id="ROLE" value="${pd.ROLE}" /> | ||
166 | + <table style="margin-top:5px;margin-bottom:20px;"> | ||
167 | + <tr> | ||
168 | + <td><div style="width:150px;text-align:center;">课程统计: ${info.testsize}</div></td> | ||
169 | + <td><div style="width:150px;text-align:center;">班级名册: ${info.CLASS_NAME}</div></td> | ||
170 | + | ||
171 | + <td><div style="width:150px;text-align:center;"><span>学生人数: ${info.STUDENT_NUM}</span></div></td> | ||
172 | + <td></td> | ||
173 | + | ||
174 | + | ||
175 | + <c:if test="${not empty subjectInfos}"> | ||
176 | + <td> | ||
177 | + <select class="chosen-select form-control" name="SUBJECT_ID" id="SUBJECT_ID" data-placeholder="这里输入所属学校"> | ||
178 | + <option value="">全部</option> | ||
179 | + <c:forEach var="item" items="${subjectInfos}"> | ||
180 | + <option value="${item.SUBJECT_ID}" <c:if test="${pd.SUBJECT_ID == item.SUBJECT_ID }">selected = ture</c:if>>${item.SCNAME}</option> | ||
181 | + </c:forEach> | ||
182 | + </select> | ||
183 | + </td> | ||
184 | + </c:if> | ||
185 | + <td style="padding-left:2px;"> | ||
186 | + <input | ||
187 | + class="span10 date-picker" name="lastStart" id="lastStart" | ||
188 | + value="${start_date}" type="text" data-date-format="yyyy-mm-dd" | ||
189 | + readonly="readonly" style="width:88px;" placeholder="开始日期" | ||
190 | + title="开始日期" /> | ||
191 | + </td> | ||
192 | + <td style="padding-left:2px;"><input | ||
193 | + class="span10 date-picker" name="lastEnd" id="lastEnd" value="${end_date}" | ||
194 | + type="text" data-date-format="yyyy-mm-dd" readonly="readonly" | ||
195 | + style="width:88px;" placeholder="结束日期" title="结束日期" /></td> | ||
196 | + <td style="vertical-align:top;padding-left:2px"><a | ||
197 | + class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><img src="static/images/search.png" alt="" class="search_btn" /></a></td> | ||
198 | + <td><li class="btn btn-default btn-sm">上一周</li></td> | ||
199 | + <td><li class="btn btn-primary btn-sm">本周</li></td> | ||
200 | + <td><li class="btn btn-default btn-sm">下一周</li></td> | ||
201 | + </tr> | ||
202 | + </table> | ||
203 | + <hr /> | ||
204 | + <table id="simple-table" | ||
205 | + class="table table-bordered table-hover" | ||
206 | + style="margin-top:0px;margin-bottom:0px;"> | ||
207 | + <thead> | ||
208 | + <tr> | ||
209 | + <th class="center th_name"><div style="width:150px;">姓名</div></th> | ||
210 | + <th class="center "><div style="width:150px;">课程平均得分率</div></th> | ||
211 | + <th class="center"><div style="width:80px;">课程总分</div></th> | ||
212 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | ||
213 | + <th class="center kc"><a | ||
214 | + onclick="paper('${info.CLASS_ID}','${var.TESTPAPER_ID}');"><div style="width:180px; margin: 0 auto;cursor:hand" class="font">${var.NAME}</br><span>${var.CREATE_DATE}</span></div></a></th> | ||
215 | + </c:forEach> | ||
216 | + </tr> | ||
217 | + </thead> | ||
218 | + <tbody> | ||
219 | + <tr> | ||
220 | + <td class="center"><div style="width:150px;">班级课程总分</div></td> | ||
221 | + <td class="center"><div style="width:150px;"></div></td> | ||
222 | + <td class="center"><div style="width:80px;"></div></td> | ||
223 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | ||
224 | + <td class="center"><div style="width:80px;margin:0 auto;">${var.TOTAL_SCORE}</div></td> | ||
225 | + </c:forEach> | ||
226 | + </tr> | ||
227 | + <tr> | ||
228 | + <td class="center"><div style="width:150px;">班级课程平均分</div></td> | ||
229 | + <td class="center"><div style="width:150px;"></div></td> | ||
230 | + <td class="center"><div style="width:80px;"></div></td> | ||
231 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | ||
232 | + <td class="center"><div style="width:80px;margin:0 auto;">${var.AVG_SCORE}</div></td> | ||
233 | + </c:forEach> | ||
234 | + </tr> | ||
235 | + <tr> | ||
236 | + <td class="center"><div style="width:150px;">班级课程平均得分率</div></td> | ||
237 | + <td class="center"><div style="width:150px;"></div></td> | ||
238 | + <td class="center"><div style="width:80px;"></div></td> | ||
239 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | ||
240 | + <td class="center"><div style="width:80px;margin:0 auto;"><fmt:formatNumber type="number" | ||
241 | + value="${var.TOTAL_SCORE == 0 ? 0: (var.AVG_SCORE / var.TOTAL_SCORE * 100)}" | ||
242 | + maxFractionDigits="2" />%</div></td> | ||
243 | + </c:forEach> | ||
244 | + </tr> | ||
245 | + | ||
246 | + <c:choose> | ||
247 | + <c:when test="${not empty studentList}"> | ||
248 | + <c:forEach items="${studentList}" var="var" varStatus="vs"> | ||
249 | + <tr> | ||
250 | + <%-- <td class="center"><a | ||
251 | + href="report/student_report?studentid=${var.ID}&class_id=${info.CLASS_ID}">${var.NAME}</a> | ||
252 | + </td> --%> | ||
253 | + <td class="center"><div style="width:150px;cursor:hand"><a | ||
254 | + onclick="student('${info.CLASS_ID}','${var.STUDENT_ID}')">${var.NAME}</a></div> | ||
255 | + </td> | ||
256 | + <td class="center"><div style="width:150px;"><fmt:formatNumber type="number" | ||
257 | + value="${var.TOTALSCORE == 0 ? 0: (var.GETSCORE / var.TOTALSCORE * 100)}" | ||
258 | + maxFractionDigits="2" />%</div></td> | ||
259 | + <td class="center"><div style="width:80px;margin:0 auto;">${var.GETSCORE }</div></td> | ||
260 | + <c:forEach items="${testpaperList}" var="var1" varStatus="vs1"> | ||
261 | + <td class="center"><div style="width:180px;margin:0 auto;"><c:set var="TEST_ID" | ||
262 | + value="${var1.TESTPAPER_ID}" /> ${var[TEST_ID] }</div></td> | ||
263 | + </c:forEach> | ||
264 | + </tr> | ||
265 | + </c:forEach> | ||
266 | + </c:when> | ||
267 | + </c:choose> | ||
268 | + </tbody> | ||
269 | + </table> | ||
270 | + ${pd } | ||
271 | + <div id="scrollableTable"></div> | ||
272 | + </form> | ||
273 | + </div> | ||
274 | + | ||
275 | + <%@ include file="../../system/index/foot.jsp"%> | ||
276 | + <script src="static/ace/js/bootbox.js"></script> | ||
277 | + <!-- ace scripts --> | ||
278 | + <script src="static/ace/js/ace/ace.js"></script> | ||
279 | + <!-- 下拉框 --> | ||
280 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
281 | + <!-- 日期框 --> | ||
282 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
283 | + <!--提示框--> | ||
284 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
285 | + | ||
286 | + <script language="javascript" src="static/js/tablescroller.js"></script> | ||
287 | + <script language="javascript" src="static/js/tablescroller.jquery.js"></script> | ||
288 | + | ||
289 | + | ||
290 | + | ||
291 | + <script type="text/javascript"> | ||
292 | + $(function() { | ||
293 | + | ||
294 | + //日期框 | ||
295 | + $('.date-picker').datepicker({ | ||
296 | + autoclose : true, | ||
297 | + todayHighlight : true | ||
298 | + }); | ||
299 | + | ||
300 | + //下拉框 | ||
301 | + if (!ace.vars['touch']) { | ||
302 | + $('.chosen-select').chosen({ | ||
303 | + allow_single_deselect : true | ||
304 | + }); | ||
305 | + $(window).off('resize.chosen').on('resize.chosen', function() { | ||
306 | + $('.chosen-select').each(function() { | ||
307 | + var $this = $(this); | ||
308 | + $this.next().css({ | ||
309 | + 'width' : $this.parent().width() | ||
310 | + }); | ||
311 | + }); | ||
312 | + }).trigger('resize.chosen'); | ||
313 | + $(document).on('settings.ace.chosen', | ||
314 | + function(e, event_name, event_val) { | ||
315 | + if (event_name != 'sidebar_collapsed') | ||
316 | + return; | ||
317 | + $('.chosen-select').each(function() { | ||
318 | + var $this = $(this); | ||
319 | + $this.next().css({ | ||
320 | + 'width' : $this.parent().width() | ||
321 | + }); | ||
322 | + }); | ||
323 | + }); | ||
324 | + $('#chosen-multiple-style .btn').on( | ||
325 | + 'click', | ||
326 | + function(e) { | ||
327 | + var target = $(this).find('input[type=radio]'); | ||
328 | + var which = parseInt(target.val()); | ||
329 | + if (which == 2) | ||
330 | + $('#form-field-select-4').addClass( | ||
331 | + 'tag-input-style'); | ||
332 | + else | ||
333 | + $('#form-field-select-4').removeClass( | ||
334 | + 'tag-input-style'); | ||
335 | + }); | ||
336 | + } | ||
337 | + | ||
338 | + //复选框全选控制 | ||
339 | + var active_class = 'active'; | ||
340 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on( | ||
341 | + 'click', | ||
342 | + function() { | ||
343 | + var th_checked = this.checked;//checkbox inside "TH" table header | ||
344 | + $(this).closest('table').find('tbody > tr').each( | ||
345 | + function() { | ||
346 | + var row = this; | ||
347 | + if (th_checked) | ||
348 | + $(row).addClass(active_class).find( | ||
349 | + 'input[type=checkbox]').eq(0) | ||
350 | + .prop('checked', true); | ||
351 | + else | ||
352 | + $(row).removeClass(active_class).find( | ||
353 | + 'input[type=checkbox]').eq(0) | ||
354 | + .prop('checked', false); | ||
355 | + }); | ||
356 | + }); | ||
357 | + }); | ||
358 | + | ||
359 | + var role = '${pd.ROLE}'; | ||
360 | + | ||
361 | + function precent(avg,total){ | ||
362 | + if(total == 0){ | ||
363 | + return "0%" | ||
364 | + } | ||
365 | + return Math.round(avg / total * 100)/100 + '%' ; | ||
366 | + } | ||
367 | + | ||
368 | + function tosearch(){ | ||
369 | + var url = "<%=basePath%>report/report.do?classid=${info.CLASS_ID}" ; | ||
370 | + var startDate = $("#lastStart").val(); | ||
371 | + var endDate = $("#lastEnd").val(); | ||
372 | + var subject_id = $("#SUBJECT_ID").val(); | ||
373 | + url = url + "&start_date=" + startDate ; | ||
374 | + if(endDate != null){ | ||
375 | + url = url + "&end_date=" + endDate; | ||
376 | + } | ||
377 | + if(subject_id != null){ | ||
378 | + url = url + "&SUBJECT_ID=" + subject_id; | ||
379 | + } | ||
380 | + if(role == "admin"){ | ||
381 | + url = url + "&ROLE=admin" ; | ||
382 | + } | ||
383 | + window.location.href = url; | ||
384 | + window.top.loading.show(); | ||
385 | + /* $("#Form").sumbit(); */ | ||
386 | + } | ||
387 | + | ||
388 | + function student(classid,studentid){ | ||
389 | + | ||
390 | + var url = "<%=basePath%>report/student_report?studentid=" + studentid + "&class_id=" + classid ; | ||
391 | + var startDate = $("#lastStart").val(); | ||
392 | + var endDate = $("#lastEnd").val(); | ||
393 | + url = url + "&start_date=" + startDate + "&end_date=" + endDate ; | ||
394 | + var SUBJECT_ID = $("#SUBJECT_ID").val(); | ||
395 | + if(SUBJECT_ID != null && SUBJECT_ID != ''){ | ||
396 | + url = url + "&SUBJECT_ID="+ SUBJECT_ID ; | ||
397 | + } | ||
398 | + window.self.location.href = url; | ||
399 | + window.top.loading.show(); | ||
400 | + } | ||
401 | + | ||
402 | + function paper(class_id,testpaper_id){ | ||
403 | + var url = "<%=basePath%>report/test_report?TestID=" + testpaper_id + "&class_id=" + class_id; | ||
404 | + var startDate = $("#lastStart").val(); | ||
405 | + var endDate = $("#lastEnd").val(); | ||
406 | + url = url + "&start_date=" + startDate + "&end_date=" + endDate ; | ||
407 | + window.self.location.href = url; | ||
408 | + window.top.loading.show(); | ||
409 | + } | ||
410 | + | ||
411 | + $(document).ready(function(){ | ||
412 | + window.top.loading.remove(); | ||
413 | + | ||
414 | + var sour = "${testpaperList}"; | ||
415 | + | ||
416 | + if(sour != null && sour.length > 3){ | ||
417 | + var _width = $('#mainFrame', parent.document).width()-40; | ||
418 | + var _heigh = $('#mainFrame', parent.document).height()-100; | ||
419 | + var options = { | ||
420 | + width: _width, | ||
421 | + height: _heigh, | ||
422 | + pinnedRows: 4, | ||
423 | + pinnedCols: 3, | ||
424 | + container: "#scrollableTable", | ||
425 | + removeOriginal: true | ||
426 | + }; | ||
427 | + $("#simple-table").tablescroller(options); | ||
428 | + var name_height = $(".kc").last().parent().height()-18.5; | ||
429 | + console.log(name_height); | ||
430 | + $(".th_name").height(name_height); | ||
431 | + } | ||
432 | + | ||
433 | + }); | ||
434 | + | ||
435 | + </script> | ||
436 | + | ||
437 | +</body> | ||
438 | +</html> |
resources/mybatis1/sunvote/HomeworkMapper.xml
@@ -287,17 +287,29 @@ | @@ -287,17 +287,29 @@ | ||
287 | 287 | ||
288 | SELECT | 288 | SELECT |
289 | sv_homeworkreport.STUDENT_ID, | 289 | sv_homeworkreport.STUDENT_ID, |
290 | - sv_homework.GET_SCORE as PAPER_SCORE, | 290 | + sv_homeworkreport.STUDENT_NAME, |
291 | + sv_homework.ALL_SCORE as PAPER_SCORE, | ||
292 | + sv_homework.GET_SCORE as AVG_SCORE, | ||
291 | sv_homework.HOMEWORK_ID, | 293 | sv_homework.HOMEWORK_ID, |
294 | + sv_homework.NAME, | ||
295 | + sv_homework.GET_MAX_SCORE, | ||
296 | + sv_homeworkreport.STUDNET_NO, | ||
297 | + sv_homework.COMPLETE_DATE, | ||
292 | sv_homeworkreport.GET_SCORE as STUDENT_SCORE | 298 | sv_homeworkreport.GET_SCORE as STUDENT_SCORE |
293 | FROM | 299 | FROM |
294 | sv_homework | 300 | sv_homework |
295 | LEFT JOIN sv_homeworkreport ON sv_homework.HOMEWORK_ID = sv_homeworkreport.HOMEWORK_ID | 301 | LEFT JOIN sv_homeworkreport ON sv_homework.HOMEWORK_ID = sv_homeworkreport.HOMEWORK_ID |
296 | WHERE | 302 | WHERE |
297 | - sv_homework.CLASS_ID = #{CLASS_ID} and sv_homework.COMPLETE_COUNT > 0 | 303 | + sv_homework.COMPLETE_COUNT > 0 |
304 | + <if test="CLASS_ID != null and CLASS_ID != ''"><!-- 关键词检索 --> | ||
305 | + and sv_homework.CLASS_ID = #{CLASS_ID} | ||
306 | + </if> | ||
298 | <if test="HOMEWORK_ID != null and HOMEWORK_ID != ''"><!-- 关键词检索 --> | 307 | <if test="HOMEWORK_ID != null and HOMEWORK_ID != ''"><!-- 关键词检索 --> |
299 | and sv_homework.HOMEWORK_ID = #{HOMEWORK_ID} | 308 | and sv_homework.HOMEWORK_ID = #{HOMEWORK_ID} |
300 | </if> | 309 | </if> |
310 | + <if test="STUDENT_ID != null and STUDENT_ID != ''"><!-- 关键词检索 --> | ||
311 | + and STUDENT_ID = #{STUDENT_ID} | ||
312 | + </if> | ||
301 | <if test="START_DATE != null and START_DATE != ''"><!-- 关键词检索 --> | 313 | <if test="START_DATE != null and START_DATE != ''"><!-- 关键词检索 --> |
302 | and COMPLETE_DATE < #{START_DATE} | 314 | and COMPLETE_DATE < #{START_DATE} |
303 | </if> | 315 | </if> |
src/com/fh/controller/sunvote/homework/HomeworkController.java
@@ -302,62 +302,140 @@ public class HomeworkController extends BaseController { | @@ -302,62 +302,140 @@ public class HomeworkController extends BaseController { | ||
302 | } | 302 | } |
303 | pd.put("CLASSES", list); | 303 | pd.put("CLASSES", list); |
304 | 304 | ||
305 | - // 对应班级数据 | ||
306 | - PageData data = new PageData(); | ||
307 | - List<PageData> studentList = studentService.findByClassId(pd); | ||
308 | - | ||
309 | - List<PageData> homeworkList = homeworkService.listAll(pd); | ||
310 | - List<PageData> dataList = homeworkService.report(pd); | ||
311 | - for(PageData stuPd:studentList){ | ||
312 | - double all = 0 ; | ||
313 | - double get = 0; | ||
314 | - for(PageData dpd : dataList){ | ||
315 | - if(dpd.get("STUDENT_ID").equals(stuPd.get("ID"))){ | ||
316 | - stuPd.put(dpd.get("HOMEWORK_ID"), dpd.get("STUDENT_SCORE")); | ||
317 | - try{ | ||
318 | - get += Double.parseDouble(dpd.get("STUDENT_SCORE").toString()); | ||
319 | - }catch(Exception ex){ | ||
320 | - | ||
321 | - } | ||
322 | - try{ | ||
323 | - all += Double.parseDouble(dpd.get("PAPER_SCORE").toString()); | ||
324 | - }catch(Exception ex){ | ||
325 | - | 305 | + if (pd.get("CLASS_ID") != null) { |
306 | + // 对应班级数据 | ||
307 | + PageData data = new PageData(); | ||
308 | + List<PageData> studentList = studentService.findByClassId(pd); | ||
309 | + | ||
310 | + List<PageData> homeworkList = homeworkService.listAll(pd); | ||
311 | + List<PageData> dataList = homeworkService.report(pd); | ||
312 | + for (PageData stuPd : studentList) { | ||
313 | + double all = 0; | ||
314 | + double get = 0; | ||
315 | + for (PageData dpd : dataList) { | ||
316 | + if (dpd.get("STUDENT_ID").equals(stuPd.get("ID"))) { | ||
317 | + stuPd.put(dpd.get("HOMEWORK_ID"), | ||
318 | + dpd.get("STUDENT_SCORE")); | ||
319 | + try { | ||
320 | + get += Double.parseDouble(dpd.get("STUDENT_SCORE") | ||
321 | + .toString()); | ||
322 | + } catch (Exception ex) { | ||
323 | + | ||
324 | + } | ||
325 | + try { | ||
326 | + all += Double.parseDouble(dpd.get("PAPER_SCORE") | ||
327 | + .toString()); | ||
328 | + } catch (Exception ex) { | ||
329 | + | ||
330 | + } | ||
326 | } | 331 | } |
327 | } | 332 | } |
333 | + stuPd.put("STUDENT_ALL_SCORE", get); | ||
334 | + stuPd.put("PAPER_ALL_SCORE", all); | ||
335 | + stuPd.remove("SCHOOL_ID"); | ||
336 | + stuPd.remove("SEX"); | ||
337 | + stuPd.remove("CLASS_ID"); | ||
338 | + stuPd.remove("NUMBER"); | ||
339 | + stuPd.remove("ID"); | ||
328 | } | 340 | } |
329 | - stuPd.put("STUDENT_ALL_SCORE", get); | ||
330 | - stuPd.put("PAPER_ALL_SCORE", all); | ||
331 | - stuPd.remove("SCHOOL_ID"); | ||
332 | - stuPd.remove("SEX"); | ||
333 | - stuPd.remove("CLASS_ID"); | ||
334 | - stuPd.remove("NUMBER"); | ||
335 | - stuPd.remove("ID"); | ||
336 | - } | ||
337 | - for(PageData hpd: homeworkList){ | ||
338 | - hpd.remove("QUESTION_COUNT"); | ||
339 | - hpd.remove("COMPLETE_COUNT"); | ||
340 | - hpd.remove("SUBJECT_ID"); | ||
341 | - hpd.remove("SCHOOL_ID"); | ||
342 | - hpd.remove("GRADE_ID"); | ||
343 | - hpd.remove("SUMBIT_DATE"); | ||
344 | - hpd.remove("MODIFY_DATE"); | ||
345 | - hpd.remove("TEACHER_ID"); | ||
346 | - hpd.remove("CREATE_DATE"); | ||
347 | - hpd.remove("CLASS_ID"); | ||
348 | - hpd.remove("CODE"); | ||
349 | - hpd.remove("GET_MAX_SCORE"); | ||
350 | - hpd.remove("HOMEWORK_DESC"); | ||
351 | - hpd.remove("COMPLETE_DESC"); | 341 | + for (PageData hpd : homeworkList) { |
342 | + hpd.remove("QUESTION_COUNT"); | ||
343 | + hpd.remove("COMPLETE_COUNT"); | ||
344 | + hpd.remove("SUBJECT_ID"); | ||
345 | + hpd.remove("SCHOOL_ID"); | ||
346 | + hpd.remove("GRADE_ID"); | ||
347 | + hpd.remove("SUMBIT_DATE"); | ||
348 | + hpd.remove("MODIFY_DATE"); | ||
349 | + hpd.remove("TEACHER_ID"); | ||
350 | + hpd.remove("CREATE_DATE"); | ||
351 | + hpd.remove("CLASS_ID"); | ||
352 | + hpd.remove("CODE"); | ||
353 | + hpd.remove("GET_MAX_SCORE"); | ||
354 | + hpd.remove("HOMEWORK_DESC"); | ||
355 | + hpd.remove("COMPLETE_DESC"); | ||
356 | + } | ||
357 | + data.put("HOMEWORKS", homeworkList);// | ||
358 | + data.put("STUDENTS", studentList); | ||
359 | + pd.put("DATA", data); | ||
360 | + }else{ | ||
361 | + pd.put("CLASS_ID", ""); | ||
352 | } | 362 | } |
353 | - data.put("HOMEWORKS", homeworkList);// | ||
354 | - data.put("STUDENTS", studentList); | ||
355 | pd.remove("JSON"); | 363 | pd.remove("JSON"); |
356 | - pd.put("DATA", data); | ||
357 | mv.setViewName("sunvote/homework/homework_report"); | 364 | mv.setViewName("sunvote/homework/homework_report"); |
358 | mv.addObject("pd", pd); | 365 | mv.addObject("pd", pd); |
359 | return mv; | 366 | return mv; |
360 | } | 367 | } |
368 | + | ||
369 | + | ||
370 | + /** | ||
371 | + * 去修改页面 | ||
372 | + * | ||
373 | + * @param | ||
374 | + * @throws Exception | ||
375 | + */ | ||
376 | + @RequestMapping(value = "/student") | ||
377 | + public ModelAndView student() throws Exception { | ||
378 | + ModelAndView mv = this.getModelAndView(); | ||
379 | + PageData pd = new PageData(); | ||
380 | + pd = this.getPageData(); | ||
381 | + pd.put("TEACHER_ID", getTeacherID()); | ||
382 | + | ||
383 | + | ||
384 | + if(pd.get("CURRENT_WEEK") == null && pd.get("START_DATE") == null && pd.get("END_DATE") == null){ | ||
385 | + pd.put("CURRENT_WEEK", "0"); | ||
386 | + String currentWeek = pd.getString("CURRENT_WEEK"); | ||
387 | + int current = Integer.parseInt(currentWeek); | ||
388 | + pd.put("START_DATE", getWeekStart(current)); | ||
389 | + pd.put("END_DATE", getWeekEnd(current)); | ||
390 | + }else if(pd.get("CURRENT_WEEK") != null){ | ||
391 | + String currentWeek = pd.getString("CURRENT_WEEK"); | ||
392 | + int current = Integer.parseInt(currentWeek); | ||
393 | + pd.put("START_DATE", getWeekStart(current)); | ||
394 | + pd.put("END_DATE", getWeekEnd(current)); | ||
395 | + } | ||
396 | + List<PageData> dataList = homeworkService.report(pd); | ||
397 | + pd.put("DATA", dataList); | ||
398 | + pd.remove("JSON"); | ||
399 | + mv.setViewName("sunvote/homework/homework_student_report"); | ||
400 | + mv.addObject("pd", pd); | ||
401 | + return mv; | ||
402 | + } | ||
403 | + | ||
404 | + | ||
405 | + /** | ||
406 | + * 去修改页面 | ||
407 | + * | ||
408 | + * @param | ||
409 | + * @throws Exception | ||
410 | + */ | ||
411 | + @RequestMapping(value = "/homework_report") | ||
412 | + public ModelAndView homework_report() throws Exception { | ||
413 | + ModelAndView mv = this.getModelAndView(); | ||
414 | + PageData pd = new PageData(); | ||
415 | + pd = this.getPageData(); | ||
416 | + pd.put("TEACHER_ID", getTeacherID()); | ||
417 | + | ||
418 | + | ||
419 | + if(pd.get("CURRENT_WEEK") == null && pd.get("START_DATE") == null && pd.get("END_DATE") == null){ | ||
420 | + pd.put("CURRENT_WEEK", "0"); | ||
421 | + String currentWeek = pd.getString("CURRENT_WEEK"); | ||
422 | + int current = Integer.parseInt(currentWeek); | ||
423 | + pd.put("START_DATE", getWeekStart(current)); | ||
424 | + pd.put("END_DATE", getWeekEnd(current)); | ||
425 | + }else if(pd.get("CURRENT_WEEK") != null){ | ||
426 | + String currentWeek = pd.getString("CURRENT_WEEK"); | ||
427 | + int current = Integer.parseInt(currentWeek); | ||
428 | + pd.put("START_DATE", getWeekStart(current)); | ||
429 | + pd.put("END_DATE", getWeekEnd(current)); | ||
430 | + } | ||
431 | + List<PageData> dataList = homeworkService.report(pd); | ||
432 | + pd.put("DATA", dataList); | ||
433 | + pd.remove("JSON"); | ||
434 | + mv.setViewName("sunvote/homework/homework_item_report"); | ||
435 | + mv.addObject("pd", pd); | ||
436 | + return mv; | ||
437 | + } | ||
438 | + | ||
361 | 439 | ||
362 | 440 | ||
363 | /** | 441 | /** |