Bläddra i källkod

Merge remote-tracking branch 'origin/dev_190618' into dev_190815

ting.yin 5 år sedan
förälder
incheckning
2c42ca74da

+ 33 - 122
stmms-web/src/main/webapp/static/report-pdf/js/chart-render.js

@@ -84,7 +84,6 @@
         barGap: "50%",
         name: "单题平均分",
         xAxisIndex: 0,
-        yAxisIndex: 0,
         itemStyle: {
           color: "rgba(61, 160, 255, 0.8)"
         }
@@ -96,31 +95,28 @@
         barGap: "50%",
         name: "单题标准差",
         xAxisIndex: 0,
-        yAxisIndex: 0,
         itemStyle: {
           color: "#4bcb74"
         }
       },
       {
-        type: "scatter",
+        type: "line",
         data: scoreRateDatas,
-        symbol: symbolCircle,
-        symbolSize: 10,
+        symbol: "circle",
+        symbolSize: 8,
         name: "得分率",
         xAxisIndex: 1,
-        yAxisIndex: 1,
         itemStyle: {
           color: "rgba(67, 80, 136, 0.8)"
         }
       },
       {
-        type: "scatter",
+        type: "line",
         data: fullRateDatas,
-        symbol: symbolCircle,
-        symbolSize: 10,
+        symbol: "circle",
+        symbolSize: 8,
         name: "满分率",
         xAxisIndex: 1,
-        yAxisIndex: 1,
         itemStyle: {
           color: "rgba(250, 212, 68, 0.8)"
         }
@@ -134,7 +130,7 @@
         data: legendData,
         itemGap: 30,
         itemWidth: 14,
-        bottom: 40,
+        bottom: 20,
         textStyle: {
           fontSize: 19
         }
@@ -143,15 +139,7 @@
         {
           left: "20%",
           top: 120,
-          width: "36%",
-          bottom: 100,
-          show: true,
-          borderColor: "rgba(230,230,230,1)"
-        },
-        {
-          left: "56%",
-          top: 120,
-          width: "30%",
+          width: "66%",
           bottom: 100,
           show: true,
           borderColor: "rgba(230,230,230,1)"
@@ -160,9 +148,12 @@
       xAxis: [
         {
           type: "value",
-          gridIndex: 0,
           position: "top",
-          inverse: true,
+          min: 0,
+          max: function(value) {
+            return Math.ceil(value.max);
+          },
+          splitNumber: 10,
           axisTick: {
             show: false
           },
@@ -187,11 +178,10 @@
         },
         {
           type: "value",
-          gridIndex: 1,
           min: 0,
           max: 1,
-          interval: 0.2,
-          position: "top",
+          interval: 0.1,
+          position: "bottom",
           axisTick: {
             show: false
           },
@@ -209,7 +199,7 @@
           axisLabel: {
             fontSize: 18,
             formatter: function(value, index) {
-              if (!index) return "";
+              if (!index) return "0";
               return parseInt(value * 100) + "%";
             }
           }
@@ -245,37 +235,6 @@
               return [str[0], str[1]].join(" ");
             }
           }
-        },
-        {
-          show: true,
-          type: "category",
-          inverse: true,
-          gridIndex: 1,
-          data: yAxisLabels,
-          axisLabel: {
-            show: false,
-            fontSize: 19
-          },
-          axisTick: {
-            show: false
-          },
-          axisLine: {
-            lineStyle: {
-              color: "rgba(170,170,170,1)"
-            }
-          },
-          splitArea: {
-            show: true,
-            areaStyle: {
-              color: ["rgba(250,250,250,1)", "rgba(255,255,255,1)"]
-            }
-          },
-          splitLine: {
-            show: true,
-            lineStyle: {
-              color: "rgba(233,233,233,1)"
-            }
-          }
         }
       ],
       series: series
@@ -310,7 +269,7 @@
         data: ["平均分", "最高分", "最低分", "及格率", "优秀率"],
         itemGap: 30,
         itemWidth: 14,
-        bottom: 40,
+        bottom: 20,
         textStyle: {
           fontSize: 19
         }
@@ -319,15 +278,7 @@
         {
           left: "20%",
           top: 120,
-          width: "36%",
-          bottom: 100,
-          show: true,
-          borderColor: "rgba(230,230,230,1)"
-        },
-        {
-          left: "56%",
-          top: 120,
-          width: "30%",
+          width: "66%",
           bottom: 100,
           show: true,
           borderColor: "rgba(230,230,230,1)"
@@ -336,9 +287,12 @@
       xAxis: [
         {
           type: "value",
-          gridIndex: 0,
           position: "top",
-          inverse: true,
+          min: 0,
+          max: function(value) {
+            return Math.ceil(value.max / 10) * 10;
+          },
+          splitNumber: 10,
           axisTick: {
             show: false
           },
@@ -364,11 +318,10 @@
         },
         {
           type: "value",
-          gridIndex: 1,
           min: 0,
           max: 100,
-          interval: 20,
-          position: "top",
+          interval: 10,
+          position: "bottom",
           axisTick: {
             show: false
           },
@@ -387,8 +340,8 @@
             fontSize: 18,
             color: "#555",
             formatter: function(value, index) {
-              if (!index) return "";
-              return (value / 100).toFixed(1);
+              if (!index) return "0";
+              return value + "%";
             }
           }
         }
@@ -424,43 +377,6 @@
               return value;
             }
           }
-        },
-        {
-          show: true,
-          type: "category",
-          inverse: true,
-          gridIndex: 1,
-          data: yAxisLabels,
-          axisLabel: {
-            show: false,
-            fontSize: 19,
-            formatter: function(value) {
-              if (value.length > 8) {
-                return [value.substring(0, 8), value.substring(8)].join("\n");
-              }
-              return value;
-            }
-          },
-          axisTick: {
-            show: false
-          },
-          axisLine: {
-            lineStyle: {
-              color: "rgba(170,170,170,1)"
-            }
-          },
-          splitArea: {
-            show: true,
-            areaStyle: {
-              color: ["rgba(250,250,250,1)", "rgba(255,255,255,1)"]
-            }
-          },
-          splitLine: {
-            show: true,
-            lineStyle: {
-              color: "rgba(233,233,233,1)"
-            }
-          }
         }
       ],
       series: [
@@ -471,7 +387,6 @@
           barGap: "50%",
           name: "平均分",
           xAxisIndex: 0,
-          yAxisIndex: 0,
           itemStyle: {
             color: "rgba(61, 160, 255, 0.8)"
           }
@@ -483,7 +398,6 @@
           barGap: "50%",
           name: "最高分",
           xAxisIndex: 0,
-          yAxisIndex: 0,
           itemStyle: {
             color: "rgba(151, 94, 229, 0.8)"
           }
@@ -495,31 +409,28 @@
           barGap: "50%",
           name: "最低分",
           xAxisIndex: 0,
-          yAxisIndex: 0,
           itemStyle: {
             color: "rgba(217, 217, 217, 0.8)"
           }
         },
         {
-          type: "scatter",
+          type: "line",
           data: passRateDatas,
-          symbol: symbolCircle,
-          symbolSize: 10,
+          symbol: "circle",
+          symbolSize: 8,
           name: "及格率",
           xAxisIndex: 1,
-          yAxisIndex: 1,
           itemStyle: {
             color: "rgba(67, 80, 136, 0.8)"
           }
         },
         {
-          type: "scatter",
+          type: "line",
           data: excellentRateDatas,
-          symbol: symbolCircle,
-          symbolSize: 10,
+          symbol: "circle",
+          symbolSize: 8,
           name: "优秀率",
           xAxisIndex: 1,
-          yAxisIndex: 1,
           itemStyle: {
             color: "rgba(250, 212, 68, 0.8)"
           }

+ 18 - 17
stmms-web/src/main/webapp/static/report-pdf/js/teaching.js

@@ -336,14 +336,15 @@ function createRange10TotalScore(datas) {
       dataList: datas.total
     });
   }
-  pageList = pageList.concat(
-    datas.classes.map(function(item) {
-      return {
-        title: item.name + " 总分频率分布",
-        dataList: item.ranges
-      };
-    })
-  );
+  // 班级成绩频率分布
+  // pageList = pageList.concat(
+  //   datas.classes.map(function(item) {
+  //     return {
+  //       title: item.name + " 总分频率分布",
+  //       dataList: item.ranges
+  //     };
+  //   })
+  // );
   var hTmpl = $("#range-totalScore").html();
   pageList.forEach(function(item, index) {
     var chartId = getEchartId();
@@ -379,15 +380,15 @@ function createRangeTotalScore(datas) {
       dataList: datas.total
     });
   }
-
-  pageList = pageList.concat(
-    datas.classes.map(function(item) {
-      return {
-        title: item.name + " 总分一分一段表",
-        dataList: item.ranges
-      };
-    })
-  );
+  // 班级成绩统计
+  // pageList = pageList.concat(
+  //   datas.classes.map(function(item) {
+  //     return {
+  //       title: item.name + " 总分一分一段表",
+  //       dataList: item.ranges
+  //     };
+  //   })
+  // );
   var hTmpl = $("#range-totalScore").html();
   pageList.forEach(function(item, index) {
     sectionArr(item.dataList, 32).forEach(function(elem) {