Ver Fonte

修复页面图表题目增加题号显示

ting.yin há 6 anos atrás
pai
commit
f986cb3fae

+ 1 - 1
stmms-web/src/main/webapp/WEB-INF/views/modules/report/reportSubjectGroup.jsp

@@ -126,7 +126,7 @@ $('#subject-select').trigger('change');
         $('tbody tr').each(function (i) {
             $(this).children('td').each(function (j) {
                 if (j == 0) {
-                    groupNames.push($(this).text());
+                    groupNames.push($(this).text()+"_"+$(this).next().text());
                 } else if (j == 2) {
                     fullScores.push($(this).text());
                 } else if (j == 3) {

+ 12 - 11
stmms-web/src/main/webapp/WEB-INF/views/modules/report/reportSubjectQuestion.jsp

@@ -53,9 +53,6 @@
     <thead>
     <tr>
         <th>题目名称</th>
-        <c:if test="${query.objective}">
-        <th>试卷类型</th>
-        </c:if>
         <th>大题号</th>
         <th>小题号</th>
         <th>单题分数</th>
@@ -63,15 +60,15 @@
         <th>单题标准差</th>
         <th>得分率</th>
         <th>满分率</th>
+		<c:if test="${query.objective}">
+        <th>试卷类型</th>
+        </c:if>
     </tr>
     </thead>
     <tbody>
     <c:forEach items="${list}" var="question">
         <tr>
             <td>${question.questionName}</td>
-            <c:if test="${query.objective}">
-            <td>${question.paperType}</td>
-            </c:if>
             <td>${question.mainNumber}</td>
             <td>${question.subNumber}</td>
             <td>${question.totalScore}</td>
@@ -79,11 +76,16 @@
             <td>${question.stdev}</td>
             <td>${question.scoreRate}</td>
             <td>${question.fullScoreRate}</td>
+			<c:if test="${query.objective}">
+            <td>${question.paperType}</td>
+            </c:if>
         </tr>
     </c:forEach>
     </tbody>
 </table>
 <script type="text/javascript">
+var objective = '${query.objective}';
+
 $("#export-button").click(function(){
     if ($("#subjectCode").val() == null || $("#subjectCode").val() == '') {
         alert('请选择科目');
@@ -94,7 +96,6 @@ $("#export-button").click(function(){
 });
 
     $(document).ready(function () {
-        var objective = '${query.objective}';
         if (objective == 'true') {
             $('#objectiveLi').addClass('active');
         } else {
@@ -112,12 +113,12 @@ $("#export-button").click(function(){
         $('tbody tr').each(function (i) {
             $(this).children('td').each(function (j) {
                 if(j == 0){
-                    questions.push($(this).text());
-                } else if(j == 5){
+                    questions.push($(this).text()+"_"+$(this).next().text()+"_"+$(this).next().next().text());
+                } else if(j == 4){
                     avgScores.push($(this).text());
-                } else if(j == 7){
+                } else if(j == 6){
                     scoreRates.push($(this).text()*100);
-                } else if(j == 8){
+                } else if(j == 7){
                     fullScoreRates.push($(this).text()*100);
                 }
             });