|
@@ -18,14 +18,20 @@
|
|
|
<body>
|
|
|
<ul class="nav nav-tabs">
|
|
|
<li class="active"><a href="${ctx}/admin/exam/reportSubjectRange">分段统计</a></li>
|
|
|
- <li><a href="${ctx}/admin/exam/reportSubjectCollege?subjectCode=${query.subjectCode}" data-i18n-text="report.college">电厂分析</a></li>
|
|
|
- <li><a href="${ctx}/admin/exam/reportSubjectTeacher?subjectCode=${query.subjectCode}" data-i18n-text="report.teacher">老师分析</a></li>
|
|
|
- <li><a href="${ctx}/admin/exam/reportSubjectClass?subjectCode=${query.subjectCode}" data-i18n-text="report.class">机组分析</a></li>
|
|
|
- <li><a href="${ctx}/admin/exam/reportSubjectQuestion?subjectCode=${query.subjectCode}&objective=true" data-i18n-text="report.question.objective">客观题分析</a>
|
|
|
+ <li><a href="${ctx}/admin/exam/reportSubjectCollege?subjectCode=${query.subjectCode}"
|
|
|
+ data-i18n-text="report.college">电厂分析</a></li>
|
|
|
+ <li><a href="${ctx}/admin/exam/reportSubjectTeacher?subjectCode=${query.subjectCode}"
|
|
|
+ data-i18n-text="report.teacher">老师分析</a></li>
|
|
|
+ <li><a href="${ctx}/admin/exam/reportSubjectClass?subjectCode=${query.subjectCode}" data-i18n-text="report.class">机组分析</a>
|
|
|
</li>
|
|
|
- <li><a href="${ctx}/admin/exam/reportSubjectQuestion?subjectCode=${query.subjectCode}&objective=false" data-i18n-text="report.question.subjective">主观题分析</a>
|
|
|
+ <li><a href="${ctx}/admin/exam/reportSubjectQuestion?subjectCode=${query.subjectCode}&objective=true"
|
|
|
+ data-i18n-text="report.question.objective">客观题分析</a>
|
|
|
+ </li>
|
|
|
+ <li><a href="${ctx}/admin/exam/reportSubjectQuestion?subjectCode=${query.subjectCode}&objective=false"
|
|
|
+ data-i18n-text="report.question.subjective">主观题分析</a>
|
|
|
+ </li>
|
|
|
+ <li><a href="${ctx}/admin/exam/reportSubjectGroup?subjectCode=${query.subjectCode}" data-i18n-text="report.group">分组统计分析</a>
|
|
|
</li>
|
|
|
- <li><a href="${ctx}/admin/exam/reportSubjectGroup?subjectCode=${query.subjectCode}" data-i18n-text="report.group">分组统计分析</a></li>
|
|
|
</ul>
|
|
|
<form id="searchForm" action="${ctx}/admin/exam/reportSubjectRange" method="post" class="breadcrumb form-search">
|
|
|
<input type="hidden" id="pageNumber" name="pageNumber" value="${query.pageNumber }"/>
|
|
@@ -38,39 +44,44 @@
|
|
|
<c:if test="${query.subjectCode eq subject.code }">selected</c:if>>${subject.code}-${subject.name}</option>
|
|
|
</c:forEach>
|
|
|
</select>
|
|
|
-
|
|
|
- <label>分数间隔</label>
|
|
|
- <select class="input-large" name="range">
|
|
|
- <option value="10" <c:if test="${query.range ==10 }">selected</c:if>>十分一段</option>
|
|
|
- <option value="5" <c:if test="${query.range ==5 }">selected</c:if>>五分一段</option>
|
|
|
- </select>
|
|
|
|
|
|
- <input id="btnSubmit" class="btn btn-primary" type="button" value="查询" onclick="goSearch()" data-i18n-value="report.group.search"/>
|
|
|
- <c:if test="${query.subjectCode!=null && oldSubjectCode!=null}">
|
|
|
- <a id="refresh" href="<c:if test="${locked}">#</c:if><c:if test="${!locked}">${ctx}/admin/exam/reportSubjectRange/report?subjectCode=${query.subjectCode}</c:if>" class="btn" <c:if test="${locked}">disabled="disabled"</c:if>>刷新</a>
|
|
|
- </c:if>
|
|
|
-
|
|
|
- <div class="btn-group">
|
|
|
- <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
- 导出<span class="caret"></span>
|
|
|
- </a>
|
|
|
- <ul class="dropdown-menu">
|
|
|
- <li><a href="##" id="export-button">导出</a></li>
|
|
|
- <li><a href="##" id="exportAll-button">批量导出</a></li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
-
|
|
|
- <a href="#" onclick="viewEcharts()" class="btn btn-primary">查看统计图</a>
|
|
|
+ <label>分数间隔</label>
|
|
|
+ <input type="text" number="true" id="range" name="range" value="${query.range}" class="input-mini"/>
|
|
|
+ <%-- <select class="input-large" name="range">--%>
|
|
|
+ <%-- <option value="10" <c:if test="${query.range ==10 }">selected</c:if>>十分一段</option>--%>
|
|
|
+ <%-- <option value="5" <c:if test="${query.range ==5 }">selected</c:if>>五分一段</option>--%>
|
|
|
+ <%-- </select>--%>
|
|
|
+
|
|
|
+ <input id="btnSubmit" class="btn btn-primary" type="button" value="查询" onclick="goSearch()"
|
|
|
+ data-i18n-value="report.group.search"/>
|
|
|
+ <c:if test="${query.subjectCode!=null && oldSubjectCode!=null}">
|
|
|
+ <a id="refresh"
|
|
|
+ href="<c:if test="${locked}">#</c:if><c:if test="${!locked}">${ctx}/admin/exam/reportSubjectRange/report?subjectCode=${query.subjectCode}</c:if>"
|
|
|
+ class="btn" <c:if test="${locked}">disabled="disabled"</c:if>>刷新</a>
|
|
|
+ </c:if>
|
|
|
+
|
|
|
+ <div class="btn-group">
|
|
|
+ <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
+ 导出<span class="caret"></span>
|
|
|
+ </a>
|
|
|
+ <ul class="dropdown-menu">
|
|
|
+ <li><a href="##" id="export-button">导出</a></li>
|
|
|
+ <li><a href="##" id="exportAll-button">批量导出</a></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <a href="#" onclick="viewEcharts()" class="btn btn-primary">查看统计图</a>
|
|
|
</div>
|
|
|
</form>
|
|
|
- <form id="exportForm" action="${ctx}/admin/exam/reportSubjectRange/export" method="post" class="breadcrumb form-search hide">
|
|
|
- <input type="text" name="subjectCode" value="${query.subjectCode}" class="input-small"/>
|
|
|
- <input type="text" name="range" value="${query.range}" class="input-small"/>
|
|
|
- <input type="hidden" id="all" name="all"/>
|
|
|
- </form>
|
|
|
+<form id="exportForm" action="${ctx}/admin/exam/reportSubjectRange/export" method="post"
|
|
|
+ class="breadcrumb form-search hide">
|
|
|
+ <input type="text" name="subjectCode" value="${query.subjectCode}" class="input-small"/>
|
|
|
+ <input type="text" name="range" value="${query.range}" class="input-small"/>
|
|
|
+ <input type="hidden" id="all" name="all"/>
|
|
|
+</form>
|
|
|
<tags:message content="${message}"/>
|
|
|
<table id="contentTable" class="table table-striped table-bordered table-condensed">
|
|
|
-<caption align="top">*分数段80表示:80<=成绩<90</caption>
|
|
|
+ <caption align="top">*分数段80表示:80<=成绩<${80+query.range}</caption>
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th>分数段</th>
|
|
@@ -89,51 +100,51 @@
|
|
|
</tbody>
|
|
|
</table>
|
|
|
<script type="text/javascript">
|
|
|
-$(document).ready(function () {
|
|
|
- var old = "${oldSubjectCode}";
|
|
|
- var locked = "${locked}";
|
|
|
- if(old==""){
|
|
|
- $('#btnSubmit').attr("type","button");
|
|
|
- $('#refresh').hide();
|
|
|
- }else{
|
|
|
- $('#btnSubmit').attr("type","hidden");
|
|
|
- $('#refresh').show();
|
|
|
- if(locked!='false'){
|
|
|
- $('#refresh').text("计算中");
|
|
|
- window.setTimeout(function(){
|
|
|
- goSearch();
|
|
|
- },5*1000);
|
|
|
- }else{
|
|
|
- $('#refresh').text("刷新");
|
|
|
- }
|
|
|
- }
|
|
|
-});
|
|
|
-$('#subjectCode').change(function () {
|
|
|
- var code = $(this).val();
|
|
|
- var old = "${oldSubjectCode}";
|
|
|
- if(code !=old || old==""){
|
|
|
- $('#btnSubmit').attr("type","button");
|
|
|
- $('#refresh').hide();
|
|
|
- }else{
|
|
|
- $('#btnSubmit').attr("type","hidden");
|
|
|
- $('#refresh').show();
|
|
|
- }
|
|
|
-});
|
|
|
+ $(document).ready(function () {
|
|
|
+ var old = "${oldSubjectCode}";
|
|
|
+ var locked = "${locked}";
|
|
|
+ if (old == "") {
|
|
|
+ $('#btnSubmit').attr("type", "button");
|
|
|
+ $('#refresh').hide();
|
|
|
+ } else {
|
|
|
+ $('#btnSubmit').attr("type", "hidden");
|
|
|
+ $('#refresh').show();
|
|
|
+ if (locked != 'false') {
|
|
|
+ $('#refresh').text("计算中");
|
|
|
+ window.setTimeout(function () {
|
|
|
+ goSearch();
|
|
|
+ }, 5 * 1000);
|
|
|
+ } else {
|
|
|
+ $('#refresh').text("刷新");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('#subjectCode').change(function () {
|
|
|
+ var code = $(this).val();
|
|
|
+ var old = "${oldSubjectCode}";
|
|
|
+ if (code != old || old == "") {
|
|
|
+ $('#btnSubmit').attr("type", "button");
|
|
|
+ $('#refresh').hide();
|
|
|
+ } else {
|
|
|
+ $('#btnSubmit').attr("type", "hidden");
|
|
|
+ $('#refresh').show();
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
-$("#export-button").click(function(){
|
|
|
- if ($("#subjectCode").val() == null || $("#subjectCode").val() == '') {
|
|
|
- alert('请选择科目');
|
|
|
- return;
|
|
|
- }
|
|
|
- $("#all").attr("value",false);
|
|
|
- $("#exportForm").attr("action","${ctx}/admin/exam/reportSubjectRange/export");
|
|
|
- $("#exportForm").submit();
|
|
|
-});
|
|
|
-$("#exportAll-button").click(function(){
|
|
|
- $("#all").attr("value",true);
|
|
|
- $("#exportForm").attr("action","${ctx}/admin/exam/reportSubjectRange/export");
|
|
|
- $("#exportForm").submit();
|
|
|
-});
|
|
|
+ $("#export-button").click(function () {
|
|
|
+ if ($("#subjectCode").val() == null || $("#subjectCode").val() == '') {
|
|
|
+ alert('请选择科目');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $("#all").attr("value", false);
|
|
|
+ $("#exportForm").attr("action", "${ctx}/admin/exam/reportSubjectRange/export");
|
|
|
+ $("#exportForm").submit();
|
|
|
+ });
|
|
|
+ $("#exportAll-button").click(function () {
|
|
|
+ $("#all").attr("value", true);
|
|
|
+ $("#exportForm").attr("action", "${ctx}/admin/exam/reportSubjectRange/export");
|
|
|
+ $("#exportForm").submit();
|
|
|
+ });
|
|
|
|
|
|
function page(n, s) {
|
|
|
$("#pageNumber").val(n);
|
|
@@ -143,7 +154,16 @@ $("#exportAll-button").click(function(){
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ function isQuarterMultiple(number) {
|
|
|
+ return number % 0.25 === 0;
|
|
|
+ }
|
|
|
+
|
|
|
function goSearch() {
|
|
|
+ var range = $("#range").val();
|
|
|
+ if (!isQuarterMultiple(range) || range == null || range == '') {
|
|
|
+ alert("分数间隔必须是0.25的倍数");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
$("#pageNumber").val(1);
|
|
|
$("#pageSize").val('${query.pageSize}');
|
|
|
$("#searchForm").attr('action', '${ctx}/admin/exam/reportSubjectRange');
|
|
@@ -153,29 +173,29 @@ $("#exportAll-button").click(function(){
|
|
|
|
|
|
function viewEcharts() {
|
|
|
|
|
|
- var scores = new Array();
|
|
|
+ var scores = new Array();
|
|
|
var rangeCounts = new Array();
|
|
|
var rangeRanges = new Array();
|
|
|
|
|
|
$('tbody tr').each(function (i) {
|
|
|
$(this).children('td').each(function (j) {
|
|
|
- if(j == 0){
|
|
|
- scores.push($(this).text());
|
|
|
- } else if(j == 1){
|
|
|
- rangeCounts.push($(this).text());
|
|
|
- } else if(j == 2){
|
|
|
- rangeRanges.push($(this).text());
|
|
|
+ if (j == 0) {
|
|
|
+ scores.push($(this).text());
|
|
|
+ } else if (j == 1) {
|
|
|
+ rangeCounts.push($(this).text());
|
|
|
+ } else if (j == 2) {
|
|
|
+ rangeRanges.push($(this).text());
|
|
|
}
|
|
|
});
|
|
|
var width = 800;
|
|
|
- if(i>40){
|
|
|
- width = 18*i;
|
|
|
+ if (i > 40) {
|
|
|
+ width = 18 * i;
|
|
|
}
|
|
|
- if(i = $('tbody tr').length-1){
|
|
|
- $("#echart-content").width(width+"px") ;
|
|
|
+ if (i = $('tbody tr').length - 1) {
|
|
|
+ $("#echart-content").width(width + "px");
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
var imageModal = new jBox('Modal');
|
|
|
imageModal.setWidth($(window).width() * 0.9);
|
|
|
imageModal.setHeight($(window).height() * 0.85);
|
|
@@ -186,52 +206,52 @@ $("#exportAll-button").click(function(){
|
|
|
var myChart = echarts.init(document.getElementById('echart-content'));
|
|
|
|
|
|
var option = {
|
|
|
- title: {
|
|
|
- text: '课程成绩分段图'
|
|
|
- // textAlign:'center'
|
|
|
- },
|
|
|
- tooltip: {},
|
|
|
- legend: {
|
|
|
- data: ["分数段",
|
|
|
- "人数",
|
|
|
- "频率"]
|
|
|
- },
|
|
|
- toolbox: {
|
|
|
- feature : {
|
|
|
- saveAsImage : {show: true}
|
|
|
- }
|
|
|
- },
|
|
|
- /* dataZoom: [{
|
|
|
- type: 'slider',
|
|
|
- show: true,
|
|
|
- xAxisIndex: [0],
|
|
|
- left: '9%',
|
|
|
- bottom: -5,
|
|
|
- start: 10,
|
|
|
- end: 90 //初始化滚动条
|
|
|
- }], */
|
|
|
- xAxis: {
|
|
|
- axisLabel: {
|
|
|
- interval:0,
|
|
|
- rotate:45
|
|
|
- },
|
|
|
- data: scores
|
|
|
+ title: {
|
|
|
+ text: '课程成绩分段图'
|
|
|
+ // textAlign:'center'
|
|
|
+ },
|
|
|
+ tooltip: {},
|
|
|
+ legend: {
|
|
|
+ data: ["分数段",
|
|
|
+ "人数",
|
|
|
+ "频率"]
|
|
|
+ },
|
|
|
+ toolbox: {
|
|
|
+ feature: {
|
|
|
+ saveAsImage: {show: true}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /* dataZoom: [{
|
|
|
+ type: 'slider',
|
|
|
+ show: true,
|
|
|
+ xAxisIndex: [0],
|
|
|
+ left: '9%',
|
|
|
+ bottom: -5,
|
|
|
+ start: 10,
|
|
|
+ end: 90 //初始化滚动条
|
|
|
+ }], */
|
|
|
+ xAxis: {
|
|
|
+ axisLabel: {
|
|
|
+ interval: 0,
|
|
|
+ rotate: 45
|
|
|
},
|
|
|
- yAxis: [
|
|
|
- {
|
|
|
- type: 'value'
|
|
|
- }
|
|
|
- ],
|
|
|
- series: [{
|
|
|
- name: "人数",
|
|
|
- type: 'bar',
|
|
|
- data: rangeCounts
|
|
|
- },{
|
|
|
- name: "频率",
|
|
|
- type: 'line',
|
|
|
- data: rangeRanges
|
|
|
- }]
|
|
|
- };
|
|
|
+ data: scores
|
|
|
+ },
|
|
|
+ yAxis: [
|
|
|
+ {
|
|
|
+ type: 'value'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ series: [{
|
|
|
+ name: "人数",
|
|
|
+ type: 'bar',
|
|
|
+ data: rangeCounts
|
|
|
+ }, {
|
|
|
+ name: "频率",
|
|
|
+ type: 'line',
|
|
|
+ data: rangeRanges
|
|
|
+ }]
|
|
|
+ };
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
|
myChart.setOption(option);
|
|
|
|