瀏覽代碼

课程目标报告详情调试

zhangjie 1 年之前
父節點
當前提交
4a46566c61

+ 4 - 0
src/modules/base/components/course-simple/CourseWeightManage.vue

@@ -367,6 +367,10 @@ export default {
       }
 
       // 目标整体权重
+      if (Object.values(this.targetTotalWeight).some((item) => !item)) {
+        this.$message.error("请设置所有目标的目标整体权重");
+        return;
+      }
       const totalWeight = calcSum(
         Object.values(this.targetTotalWeight).map((item) => item || 0)
       );

+ 33 - 111
src/modules/course/components/TargetReportDetail.vue

@@ -247,14 +247,17 @@
               {{ item.targetName }}
             </td>
             <td v-if="!eindex" :rowspan="item.evaluationList.length">
-              <p v-for="edesc in item.evaluationDesc.split('\n')" :key="edesc">
+              <p
+                v-for="edesc in item.graduationRequirementPoint.split('\n')"
+                :key="edesc"
+              >
                 {{ edesc }}
               </p>
             </td>
-            <td style="width: 140px">{{ evaluation.name }}</td>
-            <td style="width: 80px">{{ evaluation.weight }}</td>
-            <td style="width: 100px">{{ evaluation.score }}</td>
-            <td style="width: 100px">{{ evaluation.avg }}</td>
+            <td style="width: 140px">{{ evaluation.evaluation }}</td>
+            <td style="width: 80px">{{ evaluation.targetWeight }}</td>
+            <td style="width: 100px">{{ evaluation.targetScore }}</td>
+            <td style="width: 100px">{{ evaluation.targetAvgScore }}</td>
             <td
               v-if="!eindex"
               :rowspan="item.evaluationList.length"
@@ -297,12 +300,12 @@
         <el-table-column
           v-for="(target, tindex) in courseTargets"
           :key="tindex"
-          :label="target.name"
+          :label="target.targetName"
           align="center"
         >
           <el-table-column min-width="120" align="center">
             <template slot="header">
-              期末考试<br />({{ target.finalWeight | percentFilter }})
+              期末考试({{ target.finalWeight | percentFilter }})
             </template>
             <el-table-column
               v-for="dimension in target.finalDimensions"
@@ -316,7 +319,7 @@
           </el-table-column>
           <el-table-column min-width="120" align="center">
             <template slot="header">
-              平时考试<br />({{ target.usualWeight | percentFilter }})
+              平时考试({{ target.usualWeight | percentFilter }})
             </template>
             <el-table-column
               v-for="work in target.usualWorks"
@@ -397,7 +400,8 @@ export default {
       this.commonInfo = data.commonInfo;
       this.courseBasicInfo = data.courseBasicInfo;
 
-      this.courseTargetValue = data.courseEvaluationResultInfo.targetValue;
+      this.courseTargetValue =
+        data.courseEvaluationResultInfo.targetEvaluationSumValue;
       this.courseTargetList = data.courseEvaluationResultInfo.targetList;
 
       const {
@@ -408,9 +412,10 @@ export default {
       this.questionInfoChartOption = this.getQuestionInfoChartOption(scoreList);
       this.courseTargetListChartOption = this.getCourseTargetListChartOption();
 
-      const {
-        courseEvaluationResultDetailInfo: { examStudentList },
-      } = data;
+      let examStudentList =
+        data.courseEvaluationResultDetailInfo.examStudentList;
+      examStudentList.pop();
+      examStudentList.splice(examStudentList.length - 2, 1);
 
       this.parseCourseTargets(examStudentList);
       this.parseStudentScoreTable(examStudentList);
@@ -648,7 +653,9 @@ export default {
             name: "期望值",
             type: "line",
             symbol: "none",
-            data: this.courseTargetList.map((item) => this.courseTargetValue),
+            data: this.courseTargetList.map(
+              (item) => this.courseBasicInfo.courseDegree
+            ),
           },
         ],
       };
@@ -668,15 +675,15 @@ export default {
         const ntarget = {
           targetId: target.targetId,
           targetName: target.targetName,
-          finalWeight: target.finalScore.weight,
-          usualWeight: target.usualScore.weight,
+          finalWeight: target.finalScore.targetWeight,
+          usualWeight: target.usualScore.targetWeight,
           evaluationValue: targetVals[target.targetId],
         };
         ntarget.finalDimensions = target.finalScore.dimensionList.map(
           (item) => item.dimensionCode
         );
         ntarget.usualWorks = target.usualScore.scoreList.map(
-          (item) => item.name
+          (item) => item.evaluation
         );
         tColumnCounts.push(
           ntarget.finalDimensions.length + ntarget.usualWorks.length
@@ -691,20 +698,26 @@ export default {
       });
     },
     parseStudentScoreTable(examStudentList) {
-      const studentScoreTable = examStudentList.map((student) => {
+      const lastIndex = examStudentList.length - 1;
+      const studentScoreTable = examStudentList.map((student, sindex) => {
         const nitem = {
           name: student.name,
           studentCode: student.studentCode,
           score: student.score,
         };
 
-        student.targetList.forEach((target) => {
+        const dimensionScoreKey =
+          lastIndex === sindex ? "dimensionMatrixAvgScore" : "dimensionScore";
+        const workScoreKey = lastIndex === sindex ? "matrixAvgScore" : "score";
+
+        student.targetList.forEach((target, index) => {
           target.finalScore.dimensionList.forEach((dimension) => {
             nitem[`${target.targetId}-final-${dimension.dimensionCode}`] =
-              dimension.dimensionScore;
+              dimension[dimensionScoreKey];
           });
           target.usualScore.scoreList.forEach((work) => {
-            nitem[`${target.targetId}-usual-${work.name}`] = work.score;
+            nitem[`${target.targetId}-usual-${work.evaluation}`] =
+              work[workScoreKey];
           });
         });
         return nitem;
@@ -768,97 +781,6 @@ export default {
         }
       }
     },
-    parseStudentScoreChartOption(examStudentTargets) {
-      let options = {
-        color: ["#556dff", "#f59a23"],
-        title: {
-          text: "课程目标达成评价值",
-          left: "center",
-        },
-        grid: {
-          left: 40,
-          top: 40,
-          right: 80,
-          bottom: 30,
-          containLabel: true,
-        },
-        legend: {
-          top: 0,
-          data: ["平时成绩", "期末成绩"],
-          itemWidth: 12,
-          itemHeight: 4,
-          itemGap: 22,
-          right: 40,
-        },
-        xAxis: {
-          type: "category",
-          name: "课程目标",
-          nameTextStyle: {
-            color: "#363D59",
-          },
-          data: examStudentTargets.map((item) => item.targetName),
-          axisLabel: {
-            color: "#6F7482",
-            interval: 0,
-            fontSize: 12,
-            margin: 12,
-          },
-          axisLine: {
-            show: true,
-            lineStyle: {
-              color: "#EFF0F5",
-            },
-          },
-          splitLine: {
-            show: false,
-          },
-          axisTick: {
-            show: false,
-          },
-          axisPointer: {
-            type: "shadow",
-          },
-        },
-        yAxis: {
-          type: "value",
-          name: "期望值",
-          min: 0,
-          max: 1,
-          interval: 0.1,
-          nameTextStyle: {
-            color: "#363D59",
-          },
-          axisLabel: {
-            color: "#6F7482",
-          },
-          axisLine: {
-            lineStyle: {
-              color: "#EFF0F5",
-            },
-          },
-          splitLine: {
-            lineStyle: {
-              color: "#EFF0F5",
-            },
-          },
-        },
-        series: [
-          {
-            name: "平时成绩",
-            type: "bar",
-            barWidth: 40,
-            data: examStudentTargets.map((item) => item.usualScore),
-          },
-          {
-            name: "期末成绩",
-            type: "bar",
-            barWidth: 40,
-            data: examStudentTargets.map((item) => item.finalScore),
-          },
-        ],
-      };
-      return options;
-    },
     async toSave() {
       if (this.downloading) return;
       this.downloading = true;

File diff suppressed because it is too large
+ 521 - 272
src/modules/course/components/data.json


Some files were not shown because too many files changed in this diff