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
29
|
<style>
.font span{ font-size: 12px;
font-weight: initial;color:#000;}
</style>
|
9338b563
孙向锦
添加报表
|
30
31
|
</head>
|
a0ec879e
孙向锦
修改部分bug
|
32
|
<body style="background:#fff;">
|
d3d7b2ca
孙向锦
修改表格固定
|
33
|
<div style="padding:20px 20px;">
|
a0ec879e
孙向锦
修改部分bug
|
34
|
<form action="report/report.do" method="post" name="Form" id="Form" style="margin-bottom:0;">
|
9338b563
孙向锦
添加报表
|
35
|
<input type="hidden" name="CLASSID" id="CLASSID" value="${info.CLASS_ID}" />
|
eca4feb5
孙向锦
管理员功能完善
|
36
|
<input type="hidden" name="ROLE" id="ROLE" value="${pd.ROLE}" />
|
d3d7b2ca
孙向锦
修改表格固定
|
37
|
<table style="margin-top:5px;margin-bottom:20px;">
|
9338b563
孙向锦
添加报表
|
38
|
<tr>
|
6429ab88
孙向锦
remove
|
39
40
41
42
|
<td><div style="width:150px;text-align:center;">课程统计: ${info.testsize}</div></td>
<td><div style="width:150px;text-align:center;">班级名册: ${info.CLASS_NAME}</div></td>
<td><div style="width:150px;text-align:center;"><span>学生人数: ${info.STUDENT_NUM}</span></div></td>
|
9338b563
孙向锦
添加报表
|
43
|
<td></td>
|
eca4feb5
孙向锦
管理员功能完善
|
44
45
46
47
48
49
50
51
52
53
|
<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
孙向锦
修改报表时间传递
|
54
55
|
<td style="padding-left:2px;">
<input
|
9338b563
孙向锦
添加报表
|
56
|
class="span10 date-picker" name="lastStart" id="lastStart"
|
ffe4d02a
孙向锦
修改报表时间传递
|
57
|
value="${start_date}" type="text" data-date-format="yyyy-mm-dd"
|
9338b563
孙向锦
添加报表
|
58
|
readonly="readonly" style="width:88px;" placeholder="开始日期"
|
ffe4d02a
孙向锦
修改报表时间传递
|
59
60
|
title="开始日期" />
</td>
|
9338b563
孙向锦
添加报表
|
61
|
<td style="padding-left:2px;"><input
|
ffe4d02a
孙向锦
修改报表时间传递
|
62
|
class="span10 date-picker" name="lastEnd" id="lastEnd" value="${end_date}"
|
9338b563
孙向锦
添加报表
|
63
64
65
66
67
68
69
70
71
72
|
type="text" data-date-format="yyyy-mm-dd" readonly="readonly"
style="width:88px;" placeholder="结束日期" title="结束日期" /></td>
<td style="vertical-align:top;padding-left:2px"><a
class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i
id="nav-search-icon"
class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td>
</tr>
</table>
<table id="simple-table"
class="table table-striped table-bordered table-hover"
|
d3d7b2ca
孙向锦
修改表格固定
|
73
|
style="margin-top:0px;margin-bottom:0px;">
|
9338b563
孙向锦
添加报表
|
74
75
|
<thead>
<tr>
|
d3d7b2ca
孙向锦
修改表格固定
|
76
77
|
<th class="center th_name"><div style="width:150px;">姓名</div></th>
<th class="center "><div style="width:150px;">课程平均得分率</div></th>
|
6429ab88
孙向锦
remove
|
78
|
<th class="center"><div style="width:80px;">课程总分</div></th>
|
9338b563
孙向锦
添加报表
|
79
|
<c:forEach items="${testpaperList}" var="var" varStatus="vs">
|
d3d7b2ca
孙向锦
修改表格固定
|
80
|
<th class="center kc"><a
|
ff7ab13e
孙向锦
修复一些小bug
|
81
|
onclick="paper('${info.CLASS_ID}','${var.TESTPAPER_ID}');"><div style="width:180px; margin: 0 auto;" class="font">${var.NAME}</br><span>${var.CREATE_DATE}</span></div></a></th>
|
9338b563
孙向锦
添加报表
|
82
83
84
85
86
|
</c:forEach>
</tr>
</thead>
<tbody>
<tr>
|
ce70231e
孙向锦
增加接口
|
87
88
|
<td class="center"><div style="width:150px;">班级课程总分</div></td>
<td class="center"><div style="width:150px;"></div></td>
|
d3d7b2ca
孙向锦
修改表格固定
|
89
|
<td class="center"><div style="width:80px;"></div></td>
|
9338b563
孙向锦
添加报表
|
90
|
<c:forEach items="${testpaperList}" var="var" varStatus="vs">
|
d3d7b2ca
孙向锦
修改表格固定
|
91
|
<td class="center"><div style="width:80px;margin:0 auto;">${var.TOTAL_SCORE}</div></td>
|
9338b563
孙向锦
添加报表
|
92
93
94
|
</c:forEach>
</tr>
<tr>
|
ce70231e
孙向锦
增加接口
|
95
96
97
|
<td class="center"><div style="width:150px;">班级课程平均分</div></td>
<td class="center"><div style="width:150px;"></div></td>
<td class="center"><div style="width:80px;"></div></td>
|
9338b563
孙向锦
添加报表
|
98
|
<c:forEach items="${testpaperList}" var="var" varStatus="vs">
|
ce70231e
孙向锦
增加接口
|
99
|
<td class="center"><div style="width:80px;margin:0 auto;">${var.AVG_SCORE}</div></td>
|
9338b563
孙向锦
添加报表
|
100
101
102
|
</c:forEach>
</tr>
<tr>
|
ce70231e
孙向锦
增加接口
|
103
104
105
|
<td class="center"><div style="width:150px;">班级课程平均得分率</div></td>
<td class="center"><div style="width:150px;"></div></td>
<td class="center"><div style="width:80px;"></div></td>
|
9338b563
孙向锦
添加报表
|
106
|
<c:forEach items="${testpaperList}" var="var" varStatus="vs">
|
ce70231e
孙向锦
增加接口
|
107
|
<td class="center"><div style="width:80px;margin:0 auto;"><fmt:formatNumber type="number"
|
9338b563
孙向锦
添加报表
|
108
|
value="${var.TOTAL_SCORE == 0 ? 0: (var.AVG_SCORE / var.TOTAL_SCORE * 100)}"
|
ce70231e
孙向锦
增加接口
|
109
|
maxFractionDigits="2" />%</div></td>
|
9338b563
孙向锦
添加报表
|
110
111
112
113
114
115
116
|
</c:forEach>
</tr>
<c:choose>
<c:when test="${not empty studentList}">
<c:forEach items="${studentList}" var="var" varStatus="vs">
<tr>
|
03a14c0e
孙向锦
更新报表
|
117
|
<%-- <td class="center"><a
|
9338b563
孙向锦
添加报表
|
118
|
href="report/student_report?studentid=${var.ID}&class_id=${info.CLASS_ID}">${var.NAME}</a>
|
03a14c0e
孙向锦
更新报表
|
119
|
</td> --%>
|
ce70231e
孙向锦
增加接口
|
120
121
|
<td class="center"><div style="width:150px;"><a
onclick="student('${info.CLASS_ID}','${var.ID}')">${var.NAME}</a></div>
|
9338b563
孙向锦
添加报表
|
122
|
</td>
|
ce70231e
孙向锦
增加接口
|
123
|
<td class="center"><div style="width:150px;"><fmt:formatNumber type="number"
|
9338b563
孙向锦
添加报表
|
124
|
value="${var.TOTALSCORE == 0 ? 0: (var.GETSCORE / var.TOTALSCORE * 100)}"
|
02f157fa
孙向锦
修复2个bug
|
125
|
maxFractionDigits="2" />%</div></td>
|
ce70231e
孙向锦
增加接口
|
126
|
<td class="center"><div style="width:80px;margin:0 auto;">${var.GETSCORE }</div></td>
|
9338b563
孙向锦
添加报表
|
127
|
<c:forEach items="${testpaperList}" var="var1" varStatus="vs1">
|
ce70231e
孙向锦
增加接口
|
128
|
<td class="center"><div style="width:180px;margin:0 auto;"><c:set var="TEST_ID"
|
d3d7b2ca
孙向锦
修改表格固定
|
129
|
value="${var1.TESTPAPER_ID}" /> ${var[TEST_ID] }</div></td>
|
9338b563
孙向锦
添加报表
|
130
131
132
133
134
135
136
|
</c:forEach>
</tr>
</c:forEach>
</c:when>
</c:choose>
</tbody>
</table>
|
d3d7b2ca
孙向锦
修改表格固定
|
137
|
<div id="scrollableTable"></div>
|
9338b563
孙向锦
添加报表
|
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
</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
孙向锦
修改表格固定
|
152
153
154
155
156
|
<script language="javascript" src="static/js/tablescroller.js"></script>
<script language="javascript" src="static/js/tablescroller.jquery.js"></script>
|
9338b563
孙向锦
添加报表
|
157
158
|
<script type="text/javascript">
$(function() {
|
3371dbc6
孙向锦
0720 版本
|
159
|
|
9338b563
孙向锦
添加报表
|
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
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
|
//日期框
$('.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
孙向锦
管理员功能完善
|
225
|
var role = '${pd.ROLE}';
|
9338b563
孙向锦
添加报表
|
226
227
228
229
230
231
232
233
234
235
236
237
|
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();
|
eca4feb5
孙向锦
管理员功能完善
|
238
239
240
241
242
|
var subject_id = $("#SUBJECT_ID").val();
url = url + "&start_date=" + startDate + "&end_date=" + endDate + "&SUBJECT_ID=" + subject_id;
if(role == "admin"){
url = url + "&ROLE=admin" ;
}
|
9338b563
孙向锦
添加报表
|
243
244
245
|
window.location.href = url;
/* $("#Form").sumbit(); */
}
|
3371dbc6
孙向锦
0720 版本
|
246
|
|
ffe4d02a
孙向锦
修改报表时间传递
|
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
function student(classid,studentid){
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 ;
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();
}
|
3371dbc6
孙向锦
0720 版本
|
265
266
|
$(document).ready(function(){
window.top.loading.remove();
|
d3d7b2ca
孙向锦
修改表格固定
|
267
|
|
ff7ab13e
孙向锦
修复一些小bug
|
268
|
var sour = "${testpaperList}";
|
d3d7b2ca
孙向锦
修改表格固定
|
269
|
|
ceb370cf
孙向锦
修改部分不正确问题
|
270
|
if(sour != null && sour.length > 3){
|
ff7ab13e
孙向锦
修复一些小bug
|
271
272
273
274
275
276
277
278
279
280
281
282
283
284
|
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);
|
ceb370cf
孙向锦
修改部分不正确问题
|
285
|
}
|
ddbc622f
孙向锦
0829版本
|
286
|
|
3371dbc6
孙向锦
0720 版本
|
287
|
});
|
d3d7b2ca
孙向锦
修改表格固定
|
288
|
|
9338b563
孙向锦
添加报表
|
289
290
291
292
|
</script>
</body>
</html>
|