Commit ec3fd70c0d25b871f573da6df531a298831cdfeb
1 parent
42d54a48
1、修改练习报表(5)
Showing
2 changed files
with
38 additions
and
133 deletions
WebRoot/WEB-INF/jsp/sunvote/homework/homework_report.jsp
| ... | ... | @@ -37,23 +37,21 @@ |
| 37 | 37 | |
| 38 | 38 | <body style="background:#fff;"> |
| 39 | 39 | |
| 40 | - | |
| 41 | 40 | <div style="padding-top:3%;"> |
| 42 | 41 | |
| 43 | 42 | <!-- Nav tabs --> |
| 44 | - <ul class="nav nav-tabs" role="tablist"> | |
| 45 | - | |
| 43 | + <ul class="nav nav-tabs" role="tablist" style="padding-bottom:3%"> | |
| 46 | 44 | |
| 47 | 45 | <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> | |
| 46 | + <li class="btn ${pd.CLASS_ID==var.CLASS_ID?'btn-primary':'btn-default'} }btn-default btn-lg" onclick="homeReport('${var.CLASS_ID}')">${var.CLASS_NAME}</li> | |
| 49 | 47 | </c:forEach> |
| 50 | 48 | |
| 51 | 49 | </ul> |
| 52 | 50 | |
| 53 | 51 | |
| 54 | 52 | <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}" /> | |
| 53 | + <form action="homework/report.do" method="post" name="Form" id="Form" style="margin-bottom:0;"> | |
| 54 | + <input type="hidden" name="CLASSID" id="CLASSID" value="${pd.CLASS_ID}" /> | |
| 57 | 55 | <input type="hidden" name="ROLE" id="ROLE" value="${pd.ROLE}" /> |
| 58 | 56 | <table style="margin-top:5px;margin-bottom:20px;"> |
| 59 | 57 | <tr> |
| ... | ... | @@ -78,9 +76,9 @@ |
| 78 | 76 | style="width:88px;" placeholder="结束日期" title="结束日期" /></td> |
| 79 | 77 | <td style="vertical-align:top;padding-left:2px"><a |
| 80 | 78 | 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> | |
| 79 | + <td><li class="btn btn-default btn-sm" onclick="tosearch_week(-1)">上一周</li></td> | |
| 80 | + <td><li class="btn btn-primary btn-sm" onclick="tosearch_week(0)">本周</li></td> | |
| 81 | + <td><li class="btn btn-default btn-sm" onclick="tosearch_week(1)">下一周</li></td> | |
| 84 | 82 | </tr> |
| 85 | 83 | </table> |
| 86 | 84 | <hr /> |
| ... | ... | @@ -135,11 +133,11 @@ |
| 135 | 133 | onclick="student('${info.CLASS_ID}','${var.STUDENT_ID}')">${var.NAME}</a></div> |
| 136 | 134 | </td> |
| 137 | 135 | <td class="center"><div style="width:150px;"><fmt:formatNumber type="number" |
| 138 | - value="${var.TOTALSCORE == 0 ? 0: (var.GETSCORE / var.TOTALSCORE * 100)}" | |
| 136 | + value="${var.PAPER_ALL_SCORE == 0 ? 0: (var.STUDENT_ALL_SCORE / var.PAPER_ALL_SCORE * 100)}" | |
| 139 | 137 | maxFractionDigits="2" />%</div></td> |
| 140 | - <td class="center"><div style="width:80px;margin:0 auto;">${var.GET_SCORE_PERSENT }</div></td> | |
| 138 | + <td class="center"><div style="width:80px;margin:0 auto;">${var.PAPER_ALL_SCORE}</div></td> | |
| 141 | 139 | <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" | |
| 140 | + <td class="center"><div style="width:80px;margin:0 auto;"><c:set var="TEST_ID" | |
| 143 | 141 | value="${var1.HOMEWORK_ID}" /> ${var[TEST_ID] }</div></td> |
| 144 | 142 | </c:forEach> |
| 145 | 143 | </tr> |
| ... | ... | @@ -158,116 +156,7 @@ |
| 158 | 156 | |
| 159 | 157 | </div> |
| 160 | 158 | |
| 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 } | |
| 159 | + | |
| 271 | 160 | <div id="scrollableTable"></div> |
| 272 | 161 | </form> |
| 273 | 162 | </div> |
| ... | ... | @@ -365,21 +254,37 @@ |
| 365 | 254 | return Math.round(avg / total * 100)/100 + '%' ; |
| 366 | 255 | } |
| 367 | 256 | |
| 257 | + function homeReport(classId){ | |
| 258 | + var path = '<%=basePath%>homework/report.do?CLASS_ID='+classId; | |
| 259 | + console.log(path); | |
| 260 | + parent.$("#mainFrame").attr('src',path); | |
| 261 | + window.top.loading.show(); | |
| 262 | + } | |
| 263 | + | |
| 368 | 264 | function tosearch(){ |
| 369 | - var url = "<%=basePath%>report/report.do?classid=${info.CLASS_ID}" ; | |
| 265 | + console.log('${pd.CLASS_ID}'); | |
| 266 | + var url = "<%=basePath%>homework/report.do?CLASS_ID=${pd.CLASS_ID}" ; | |
| 370 | 267 | var startDate = $("#lastStart").val(); |
| 371 | 268 | var endDate = $("#lastEnd").val(); |
| 372 | - var subject_id = $("#SUBJECT_ID").val(); | |
| 373 | - url = url + "&start_date=" + startDate ; | |
| 269 | + //var subject_id = $("#SUBJECT_ID").val(); | |
| 270 | + url = url + "&START_DATE=" + startDate ; | |
| 374 | 271 | 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" ; | |
| 272 | + url = url + "&END_DATE=" + endDate; | |
| 382 | 273 | } |
| 274 | + console.log(url); | |
| 275 | + window.location.href = url; | |
| 276 | + window.top.loading.show(); | |
| 277 | + /* $("#Form").sumbit(); */ | |
| 278 | + } | |
| 279 | + function tosearch_week(type){ | |
| 280 | + console.log('${pd.CLASS_ID}'); | |
| 281 | + var url = "<%=basePath%>homework/report.do?CLASS_ID=${pd.CLASS_ID}" ; | |
| 282 | + //var startDate = $("#lastStart").val(); | |
| 283 | + //var endDate = $("#lastEnd").val(); | |
| 284 | + //var subject_id = $("#SUBJECT_ID").val(); | |
| 285 | + url = url + "&CURRENT_WEEK=" + type ; | |
| 286 | + | |
| 287 | + console.log(url); | |
| 383 | 288 | window.location.href = url; |
| 384 | 289 | window.top.loading.show(); |
| 385 | 290 | /* $("#Form").sumbit(); */ | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_main.jsp