studentStatistics.jsp 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <%@ page language="java" pageEncoding="UTF-8" %>
  2. <html>
  3. <head>
  4. <%@ include file="../header.jspf" %>
  5. <title>学生统计详情</title>
  6. </head>
  7. <body>
  8. <div class="container-fluid">
  9. <div class="row">
  10. <%@ include file="../head.jsp" %>
  11. </div>
  12. <div class="row ">
  13. <div class="col-sm-2">
  14. <%@ include file="../left.jsp" %>
  15. </div>
  16. <div class="col-sm-10 ">
  17. <input type="hidden" name="sid" id="sid" value="${student.sid}">
  18. <div class="bs-callout bs-callout-danger">
  19. <ol class="breadcrumb">
  20. <li><a href="${pageContext.request.contextPath}/admin/student">学生列表</a></li>
  21. <li><a href="${pageContext.request.contextPath}/admin/student/show?sid=${student.sid}">学生详情</a></li>
  22. <li class="active">学生统计信息</li>
  23. </ol>
  24. <jsp:include page="student-info-table.jsp"/>
  25. </div>
  26. <div class="bs-callout bs-callout-info">
  27. <row>
  28. <div id="stu-score-trend-chart" style="height: 400px">
  29. </div>
  30. </row>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. <%@ include file="../buttom.jsp" %>
  36. <script type="text/javascript" src="${pageContext.request.contextPath}/js/tqe/course/eval-process-bar.js"></script>
  37. <script type="text/javascript">
  38. function fillStuScoreTrendChart(teaVO) {
  39. var batchScoreList = teaVO.batchScoreList;
  40. if (batchScoreList) {
  41. var stuScoreTrendChart = echarts.init(document.getElementById('stu-score-trend-chart'), echartTheme);
  42. var batchNames = [];
  43. var teaStuScores = [];
  44. var teaStuAvg = []; //全局教师平均得分
  45. var bs;
  46. $.each(batchScoreList, function (i) {
  47. batchNames.push(this.batchName);
  48. teaStuScores.push(this.teaStuAvgScore);
  49. teaStuAvg.push(this.teaStuAvg);
  50. });
  51. /*debug
  52. batchNames=['2015','2016','2017','2018'];
  53. stuScores = [65,50,90,86];
  54. teaScores = [78,95,83,78];
  55. */
  56. var option = {
  57. title: {
  58. text: '学生评分趋势图',
  59. left: 'center'
  60. },
  61. tooltip: {
  62. trigger: 'axis'
  63. },
  64. legend: {
  65. data: ['学生评分', '学生平均'],
  66. left: 'right'
  67. },
  68. grid: {
  69. left: '3%',
  70. right: '4%',
  71. bottom: '3%',
  72. containLabel: true
  73. },
  74. xAxis: [
  75. {
  76. type: 'category',
  77. boundaryGap: false,
  78. data: batchNames
  79. }
  80. ],
  81. yAxis: [
  82. {
  83. type: 'value',
  84. min: 'dataMin',
  85. max: 100
  86. }
  87. ],
  88. series: [
  89. {
  90. name: '学生评分',
  91. type: 'line',
  92. label: {
  93. normal: {
  94. show: true,
  95. position: 'top'
  96. }
  97. },
  98. lineStyle: {
  99. normal: {
  100. color: "red",
  101. width: 3,
  102. }
  103. },
  104. data: teaStuScores
  105. },
  106. {
  107. name: '学生平均',
  108. type: 'line',
  109. lineStyle: {
  110. normal: {
  111. color: "red",
  112. width: 1,
  113. type: "dashed"
  114. }
  115. },
  116. data: teaStuAvg
  117. }
  118. ]
  119. };
  120. stuScoreTrendChart.setOption(option);
  121. } else {
  122. showGlobalNotification("没有信息需要展示");
  123. }
  124. }
  125. $(function () {
  126. var sid = $("#sid").val();
  127. $.get("../student/vo-info", {sid: sid}, function (data) {
  128. if (data.success) {
  129. var stuVO = data.item;
  130. fillStuScoreTrendChart(stuVO);
  131. } else {
  132. showGlobalNotification(data.msg);
  133. }
  134. });
  135. $('[data-toggle="tooltip"]').tooltip();
  136. });
  137. </script>
  138. <script src="${pageContext.request.contextPath}/js/echarts/echarts.common.min.js"></script>
  139. <script src="${pageContext.request.contextPath}/js/echarts/macarons.js"></script>
  140. </body>
  141. </html>