Blame view

WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp 12.6 KB
9338b563   孙向锦   添加报表
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  <%@ page language="java" contentType="text/html; charset=UTF-8"
  	pageEncoding="UTF-8"%>
  <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  <%
  	String path = request.getContextPath();
  	String basePath = request.getScheme() + "://"
  			+ request.getServerName() + ":" + request.getServerPort()
  			+ path + "/";
  %>
  
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <html>
  <head>
  <base href="<%=basePath%>">
  
  <title>${info.CLASS_NAME}成绩报表</title>
  <base href="<%=basePath%>">
  <!-- 下拉框 -->
  <link rel="stylesheet" href="static/ace/css/chosen.css" />
d3d7b2ca   孙向锦   修改表格固定
21
    <link type="text/css" href="static/css/tablescroller.css" rel="stylesheet" />
9338b563   孙向锦   添加报表
22
23
24
25
  <!-- jsp文件头和头部 -->
  <%@ include file="../../system/index/top.jsp"%>
  <!-- 日期框 -->
  <link rel="stylesheet" href="static/ace/css/datepicker.css" />
3371dbc6   孙向锦   0720 版本
26
27
28
  <style>
  	.font span{    font-size: 12px;
      font-weight: initial;color:#000;}
7bbf5236   jack   2.限制出题数为64
29
30
31
32
33
34
35
36
37
38
      .date-picker{
      		height:30px;
      		line-height:30px;
      	}
     	.search_btn{
     		width:30px;
     		display:inline-block;
     		vertical-align:bottom;
     	}
  </style>
9338b563   孙向锦   添加报表
39
40
  </head>
  
a0ec879e   孙向锦   修改部分bug
41
  <body style="background:#fff;">
d3d7b2ca   孙向锦   修改表格固定
42
  	<div style="padding:20px 20px;">
a0ec879e   孙向锦   修改部分bug
43
  		<form action="report/report.do" method="post" name="Form" id="Form" style="margin-bottom:0;">
9338b563   孙向锦   添加报表
44
  			<input type="hidden" name="CLASSID" id="CLASSID" value="${info.CLASS_ID}" />
eca4feb5   孙向锦   管理员功能完善
45
  			<input type="hidden" name="ROLE" id="ROLE" value="${pd.ROLE}" />
d3d7b2ca   孙向锦   修改表格固定
46
  			<table style="margin-top:5px;margin-bottom:20px;">
9338b563   孙向锦   添加报表
47
  				<tr>
a8551bb1   孙向锦   根据赵旭岚的要求修改部分界面
48
  					<td><div style="width:150px;text-align:center;">考试次数: ${info.testsize}</div></td>
c33910d6   jack   1.bug修复
49
  					<td><div style="width:250px;text-align:center;">班级名册: ${info.CLASS_NAME}</div></td>
6429ab88   孙向锦   remove
50
51
  				
  					<td><div style="width:150px;text-align:center;"><span>学生人数: ${info.STUDENT_NUM}</span></div></td>
9338b563   孙向锦   添加报表
52
  					<td></td>
eca4feb5   孙向锦   管理员功能完善
53
54
55
56
57
58
59
60
61
62
  					<c:if test="${not empty subjectInfos}">
  						<td>
  							<select class="chosen-select form-control" name="SUBJECT_ID" id="SUBJECT_ID" data-placeholder="这里输入所属学校">
  										<option value="">全部</option>
  										<c:forEach var="item" items="${subjectInfos}">
  											<option value="${item.SUBJECT_ID}" <c:if test="${pd.SUBJECT_ID == item.SUBJECT_ID }">selected = ture</c:if>>${item.SCNAME}</option>
  										</c:forEach>
  							</select>
  						</td>
  					</c:if>
ffe4d02a   孙向锦   修改报表时间传递
63
64
  					<td style="padding-left:2px;">
  					<input
9338b563   孙向锦   添加报表
65
  						class="span10 date-picker" name="lastStart" id="lastStart"
ffe4d02a   孙向锦   修改报表时间传递
66
  						value="${start_date}" type="text" data-date-format="yyyy-mm-dd"
9338b563   孙向锦   添加报表
67
  						readonly="readonly" style="width:88px;" placeholder="开始日期"
ffe4d02a   孙向锦   修改报表时间传递
68
69
  						title="开始日期" />
  						</td>
9338b563   孙向锦   添加报表
70
  					<td style="padding-left:2px;"><input
ffe4d02a   孙向锦   修改报表时间传递
71
  						class="span10 date-picker" name="lastEnd" id="lastEnd" value="${end_date}"
9338b563   孙向锦   添加报表
72
73
  						type="text" data-date-format="yyyy-mm-dd" readonly="readonly"
  						style="width:88px;" placeholder="结束日期" title="结束日期" /></td>
7bbf5236   jack   2.限制出题数为64
74
75
76
77
  					<td style="padding-left:10px">
  					<a href="#" class="search_btn" onclick="tosearch();"><img
  					width="30px" src="static/images/search.png" /></a>
  					<!-- <a style="height:30px;"
9338b563   孙向锦   添加报表
78
  						class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i
3e7c9ece   jack   1.隐藏即时测,课后练
79
  							id="nav-search-icon" style="line-height:20px"
7bbf5236   jack   2.限制出题数为64
80
81
82
83
84
  							class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a> --></td>
  					<td style="padding-left:10px">
  						<a style="height:30px;width:3em;padding:0;border:0;line-height:30px;border-radius:3px;"
  						class="btn btn-primary btn-xs" onclick="export2();" title="导出">导出</a>
  						
739794be   jack   1.bug修复
85
  					</td>
9338b563   孙向锦   添加报表
86
87
88
89
  				</tr>
  			</table>
  			<table id="simple-table"
  				class="table table-striped table-bordered table-hover"
d3d7b2ca   孙向锦   修改表格固定
90
  				style="margin-top:0px;margin-bottom:0px;">
9338b563   孙向锦   添加报表
91
92
  				<thead>
  					<tr>
d3d7b2ca   孙向锦   修改表格固定
93
  						<th class="center th_name"><div style="width:150px;">姓名</div></th>
c33910d6   jack   1.bug修复
94
  						<th class="center "><div style="width:150px;" title="个人平均得分率=个人总分/参考试卷总分">个人平均得分率<img src="static/images/tip.png" style="width:16px"></div></th>
28b5883d   jack   1.修复bug
95
  						<th class="center"><div style="width:80px;" title="得分汇总=学生历史考试得分之和">得分汇总<img src="static/images/tip.png" style="width:16px"></div></th>
9338b563   孙向锦   添加报表
96
  						<c:forEach items="${testpaperList}" var="var" varStatus="vs">
d3d7b2ca   孙向锦   修改表格固定
97
  							<th class="center kc"><a
f4a73594   jack   1.增加班级统计报表和导出
98
  								 onclick="paper('${info.CLASS_ID}','${var.TESTPAPER_ID}');"><div style="width:180px;     margin: 0 auto;cursor:hand" class="font"><div style="width:100%;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;">${var.NAME}</div><span>${var.CREATE_DATE}</span></div></a></th>
9338b563   孙向锦   添加报表
99
100
101
102
103
  						</c:forEach>
  					</tr>
  				</thead>
  				<tbody>
  					<tr>
a8551bb1   孙向锦   根据赵旭岚的要求修改部分界面
104
  						<td class="center"><div style="width:150px;">试卷总分</div></td>
ce70231e   孙向锦   增加接口
105
  						<td class="center"><div style="width:150px;"></div></td>
d3d7b2ca   孙向锦   修改表格固定
106
  						<td class="center"><div style="width:80px;"></div></td>
9338b563   孙向锦   添加报表
107
  						<c:forEach items="${testpaperList}" var="var" varStatus="vs">
d3d7b2ca   孙向锦   修改表格固定
108
  							<td class="center"><div style="width:80px;margin:0 auto;">${var.TOTAL_SCORE}</div></td>
9338b563   孙向锦   添加报表
109
110
111
  						</c:forEach>
  					</tr>
  					<tr>
a8551bb1   孙向锦   根据赵旭岚的要求修改部分界面
112
  						<td class="center"><div style="width:150px;">平均得分</div></td>
ce70231e   孙向锦   增加接口
113
114
  						<td class="center"><div style="width:150px;"></div></td>
  						<td class="center"><div style="width:80px;"></div></td>
9338b563   孙向锦   添加报表
115
  						<c:forEach items="${testpaperList}" var="var" varStatus="vs">
1f0490aa   jack   1.考试情况报表样式
116
  							<td class="center"><div style="width:80px;margin:0 auto;">${var.AVG_SCORE==""?"--":var.AVG_SCORE}</div></td>
9338b563   孙向锦   添加报表
117
118
119
  						</c:forEach>
  					</tr>
  					<tr>
c33910d6   jack   1.bug修复
120
  						<td class="center"><div style="width:150px;">平均得分率</div></td>
ce70231e   孙向锦   增加接口
121
122
  						<td class="center"><div style="width:150px;"></div></td>
  						<td class="center"><div style="width:80px;"></div></td>
9338b563   孙向锦   添加报表
123
  						<c:forEach items="${testpaperList}" var="var" varStatus="vs">
ce70231e   孙向锦   增加接口
124
  							<td class="center"><div style="width:80px;margin:0 auto;"><fmt:formatNumber type="number"
9338b563   孙向锦   添加报表
125
  									value="${var.TOTAL_SCORE == 0 ? 0: (var.AVG_SCORE / var.TOTAL_SCORE * 100)}"
ce70231e   孙向锦   增加接口
126
  									maxFractionDigits="2" />%</div></td>
9338b563   孙向锦   添加报表
127
128
129
130
131
132
133
  						</c:forEach>
  					</tr>
  
  					<c:choose>
  						<c:when test="${not empty studentList}">
  							<c:forEach items="${studentList}" var="var" varStatus="vs">
  								<tr>
03a14c0e   孙向锦   更新报表
134
  									<%-- <td class="center"><a
9338b563   孙向锦   添加报表
135
  										href="report/student_report?studentid=${var.ID}&class_id=${info.CLASS_ID}">${var.NAME}</a>
03a14c0e   孙向锦   更新报表
136
  									</td> --%>
c33910d6   jack   1.bug修复
137
138
139
140
  									<td class="center"><div style="width:150px;">
  									<%-- <a onclick="student('${info.CLASS_ID}','${var.STUDENT_ID}')">${var.NAME}</a> --%>
  										 ${var.NAME}
  										 </div>
9338b563   孙向锦   添加报表
141
  									</td>
78353cf9   jack   1.增加老师端可以看到年级卷
142
143
144
  									<td class="center"><div style="width:150px;">
  									<c:if test="${not empty var.GETSCORE}">
  									<fmt:formatNumber type="number"
9338b563   孙向锦   添加报表
145
  											value="${var.TOTALSCORE == 0 ? 0: (var.GETSCORE / var.TOTALSCORE * 100)}"
78353cf9   jack   1.增加老师端可以看到年级卷
146
147
148
149
150
151
  											maxFractionDigits="2" />%
  									</c:if>
  									<c:if test="${empty var.GETSCORE }">--</c:if>
  											</div></td>
  									<td class="center"><div style="width:80px;margin:0 auto;">
  									<c:if test="${not empty var.GETSCORE}">
1f0490aa   jack   1.考试情况报表样式
152
  									${var.GETSCORE}
78353cf9   jack   1.增加老师端可以看到年级卷
153
154
155
156
157
  									</c:if>
  									<c:if test="${empty var.GETSCORE}">
  									--
  									</c:if>
  									</div></td>
9338b563   孙向锦   添加报表
158
  									<c:forEach items="${testpaperList}" var="var1" varStatus="vs1">
ce70231e   孙向锦   增加接口
159
  										<td class="center"><div style="width:180px;margin:0 auto;"><c:set var="TEST_ID"
78353cf9   jack   1.增加老师端可以看到年级卷
160
161
162
163
164
  												value="${var1.TESTPAPER_ID}" /> 
  												
  									${empty var[TEST_ID]?"--":var[TEST_ID]}
  									
  												</div></td>
9338b563   孙向锦   添加报表
165
166
167
168
169
170
171
  									</c:forEach>
  								</tr>
  							</c:forEach>
  						</c:when>
  					</c:choose>
  				</tbody>
  			</table>
d3d7b2ca   孙向锦   修改表格固定
172
  			<div id="scrollableTable"></div>
9338b563   孙向锦   添加报表
173
174
175
176
177
178
179
180
181
182
183
184
185
186
  		</form>
  	</div>
  
  	<%@ include file="../../system/index/foot.jsp"%>
  	<script src="static/ace/js/bootbox.js"></script>
  	<!-- ace scripts -->
  	<script src="static/ace/js/ace/ace.js"></script>
  	<!-- 下拉框 -->
  	<script src="static/ace/js/chosen.jquery.js"></script>
  	<!-- 日期框 -->
  	<script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
  	<!--提示框-->
  	<script type="text/javascript" src="static/js/jquery.tips.js"></script>
  
d3d7b2ca   孙向锦   修改表格固定
187
188
189
190
191
   	<script language="javascript" src="static/js/tablescroller.js"></script>
      <script language="javascript" src="static/js/tablescroller.jquery.js"></script>
      
    
      
9338b563   孙向锦   添加报表
192
193
  	<script type="text/javascript">
  		$(function() {
3371dbc6   孙向锦   0720 版本
194
  			
9338b563   孙向锦   添加报表
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
  			//日期框
  			$('.date-picker').datepicker({
  				autoclose : true,
  				todayHighlight : true
  			});
  
  			//下拉框
  			if (!ace.vars['touch']) {
  				$('.chosen-select').chosen({
  					allow_single_deselect : true
  				});
  				$(window).off('resize.chosen').on('resize.chosen', function() {
  					$('.chosen-select').each(function() {
  						var $this = $(this);
  						$this.next().css({
  							'width' : $this.parent().width()
  						});
  					});
  				}).trigger('resize.chosen');
  				$(document).on('settings.ace.chosen',
  						function(e, event_name, event_val) {
  							if (event_name != 'sidebar_collapsed')
  								return;
  							$('.chosen-select').each(function() {
  								var $this = $(this);
  								$this.next().css({
  									'width' : $this.parent().width()
  								});
  							});
  						});
  				$('#chosen-multiple-style .btn').on(
  						'click',
  						function(e) {
  							var target = $(this).find('input[type=radio]');
  							var which = parseInt(target.val());
  							if (which == 2)
  								$('#form-field-select-4').addClass(
  										'tag-input-style');
  							else
  								$('#form-field-select-4').removeClass(
  										'tag-input-style');
  						});
  			}
  
  			//复选框全选控制
  			var active_class = 'active';
  			$('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on(
  					'click',
  					function() {
  						var th_checked = this.checked;//checkbox inside "TH" table header
  						$(this).closest('table').find('tbody > tr').each(
  								function() {
  									var row = this;
  									if (th_checked)
  										$(row).addClass(active_class).find(
  												'input[type=checkbox]').eq(0)
  												.prop('checked', true);
  									else
  										$(row).removeClass(active_class).find(
  												'input[type=checkbox]').eq(0)
  												.prop('checked', false);
  								});
  					});
  		});
  		
eca4feb5   孙向锦   管理员功能完善
260
  		var role = '${pd.ROLE}';
9338b563   孙向锦   添加报表
261
262
263
264
265
266
267
268
269
270
271
272
  		
  		function precent(avg,total){
  			if(total == 0){
  				return "0%"
  			}
  			return Math.round(avg / total * 100)/100 + '%' ;
  		}
  		
  		function tosearch(){
  			var url = "<%=basePath%>report/report.do?classid=${info.CLASS_ID}" ;
  			var startDate = $("#lastStart").val();
  			var endDate =  $("#lastEnd").val();
f4a73594   jack   1.增加班级统计报表和导出
273
274
275
276
277
278
279
280
281
282
  			var temp="";
  			var sd =  parseInt(startDate.replace(/-/g,""));
  			var ed =  parseInt(endDate.replace(/-/g,""));
  			if(sd>ed){
  				temp = startDate;
  				startDate = endDate;
  				endDate = temp;
  			}
  			$("#lastStart").val(startDate);
  			$("#lastEnd").val(endDate);
eca4feb5   孙向锦   管理员功能完善
283
  			var subject_id =  $("#SUBJECT_ID").val();
f0ac1ff4   孙向锦   修改搜素功能的问题
284
285
  			url = url + "&start_date=" + startDate ;
  			if(endDate != null){
3a163205   孙向锦   报表优化
286
  				url = url + "&end_date=" + endDate;
f0ac1ff4   孙向锦   修改搜素功能的问题
287
288
289
290
  			}
  			if(subject_id != null){
  				url = url + "&SUBJECT_ID=" + subject_id;
  			}
eca4feb5   孙向锦   管理员功能完善
291
292
293
  			if(role == "admin"){
  				url = url + "&ROLE=admin" ;
  			}
9338b563   孙向锦   添加报表
294
  			window.location.href = url;
eef2f078   孙向锦   修改域名问题
295
  			window.top.loading.show();
9338b563   孙向锦   添加报表
296
297
  			/* $("#Form").sumbit(); */
  		}
3371dbc6   孙向锦   0720 版本
298
  		
ffe4d02a   孙向锦   修改报表时间传递
299
  		function student(classid,studentid){
b9dc59e6   孙向锦   管理员过滤条件
300
  		
ffe4d02a   孙向锦   修改报表时间传递
301
302
303
304
  			var url = "<%=basePath%>report/student_report?studentid=" + studentid + "&class_id=" + classid ;
  			var startDate = $("#lastStart").val();
  			var endDate =  $("#lastEnd").val();
  			url = url + "&start_date=" + startDate + "&end_date=" + endDate ;
b9dc59e6   孙向锦   管理员过滤条件
305
306
307
308
  			var SUBJECT_ID = $("#SUBJECT_ID").val();
  			if(SUBJECT_ID != null && SUBJECT_ID != ''){
  				url = url + "&SUBJECT_ID="+ SUBJECT_ID ;
  			}
ffe4d02a   孙向锦   修改报表时间传递
309
310
311
312
313
314
315
316
317
318
319
320
  			window.self.location.href = url;
  			window.top.loading.show();
  		}
  		
  		function paper(class_id,testpaper_id){
  			var url = "<%=basePath%>report/test_report?TestID=" + testpaper_id + "&class_id=" + class_id;
  			var startDate = $("#lastStart").val();
  			var endDate =  $("#lastEnd").val();
  			url = url + "&start_date=" + startDate + "&end_date=" + endDate ;
  			window.self.location.href = url;
  			window.top.loading.show();
  		}
739794be   jack   1.bug修复
321
322
323
  		function export2(){
  			window.open("<%=basePath%>report/export2?CLASSID=${info.CLASS_ID}&ROLE=${pd.ROLE}","_blank");
  		}
ffe4d02a   孙向锦   修改报表时间传递
324
  		
3371dbc6   孙向锦   0720 版本
325
326
  		$(document).ready(function(){
  			window.top.loading.remove();
d3d7b2ca   孙向锦   修改表格固定
327
  			
fd0087a8   孙向锦   添加英语语言
328
  			 var sour = "${testpaperList}";
d3d7b2ca   孙向锦   修改表格固定
329
  			
ceb370cf   孙向锦   修改部分不正确问题
330
  			 if(sour != null && sour.length > 3){
ff7ab13e   孙向锦   修复一些小bug
331
332
333
334
335
336
337
338
339
340
341
342
343
344
  				var _width = $('#mainFrame', parent.document).width()-40;
  				var _heigh = $('#mainFrame', parent.document).height()-100;
  				var options = {
  	            width: _width,
  	            height: _heigh,
  	            pinnedRows: 4,
  	            pinnedCols: 3,
  	            container: "#scrollableTable",
  	            removeOriginal: true
  	        	};
  				$("#simple-table").tablescroller(options);
  		        var name_height = $(".kc").last().parent().height()-18.5;
  		        console.log(name_height);
  		        $(".th_name").height(name_height);
d35847df   jack   1.修复统计报表显示错位bug
345
  		        $(".corner-frame").width($(".scrollable-rows-frame").width()-1);
ceb370cf   孙向锦   修改部分不正确问题
346
  			} 
fd0087a8   孙向锦   添加英语语言
347
  				
3371dbc6   孙向锦   0720 版本
348
  		});
d3d7b2ca   孙向锦   修改表格固定
349
  		
9338b563   孙向锦   添加报表
350
351
352
353
  	</script>
  
  </body>
  </html>