|
@@ -328,9 +328,13 @@
|
|
|
:label="target.targetName"
|
|
|
align="center"
|
|
|
>
|
|
|
- <el-table-column width="140" align="center">
|
|
|
+ <el-table-column
|
|
|
+ v-if="target.finalDimensions.length"
|
|
|
+ width="140"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
<template slot="header">
|
|
|
- 期末考试({{ target.finalWeight | percentFilter }})
|
|
|
+ 期末考试 <br />({{ target.finalWeight | percentFilter }})
|
|
|
</template>
|
|
|
<el-table-column
|
|
|
label="期末成绩"
|
|
@@ -340,9 +344,13 @@
|
|
|
>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
- <el-table-column min-width="120" align="center">
|
|
|
+ <el-table-column
|
|
|
+ v-if="target.usualWorks.length"
|
|
|
+ min-width="120"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
<template slot="header">
|
|
|
- 平时考试({{ target.usualWeight | percentFilter }})
|
|
|
+ 平时考试<br />({{ target.usualWeight | percentFilter }})
|
|
|
</template>
|
|
|
<el-table-column
|
|
|
v-for="work in target.usualWorks"
|
|
@@ -748,7 +756,7 @@ export default {
|
|
|
usualWeight: target.usualScore?.targetWeight,
|
|
|
evaluationValue: targetVals[target.targetId],
|
|
|
};
|
|
|
- ntarget.finalDimensions = ["期末成绩"];
|
|
|
+ ntarget.finalDimensions = target.finalScore ? ["期末成绩"] : [];
|
|
|
ntarget.usualWorks = (target.usualScore?.scoreList || []).map(
|
|
|
(item) => item.evaluation
|
|
|
);
|
|
@@ -757,6 +765,10 @@ export default {
|
|
|
);
|
|
|
return ntarget;
|
|
|
});
|
|
|
+ // 只展示有期末成绩或平时成绩的目标
|
|
|
+ this.courseTargets = this.courseTargets.filter(
|
|
|
+ (item) => item.finalDimensions.length || item.usualWorks.length
|
|
|
+ );
|
|
|
|
|
|
let tCount = 0;
|
|
|
this.targetColumnCounts = tColumnCounts.map((item) => {
|
|
@@ -764,7 +776,15 @@ export default {
|
|
|
return tCount;
|
|
|
});
|
|
|
},
|
|
|
+ getTargetFirseKey(target) {
|
|
|
+ if (target.finalDimensions.length) {
|
|
|
+ return `${target.targetId}-final`;
|
|
|
+ } else {
|
|
|
+ return `${target.targetId}-usual-${target.usualWorks[0]}`;
|
|
|
+ }
|
|
|
+ },
|
|
|
parseStudentScoreTable(examStudentList) {
|
|
|
+ if (!this.courseTargets.length) return;
|
|
|
const lastIndex = examStudentList.length - 1;
|
|
|
const studentScoreTable = examStudentList.map((student, sindex) => {
|
|
|
const nitem = {
|
|
@@ -794,14 +814,15 @@ export default {
|
|
|
score: "",
|
|
|
};
|
|
|
this.courseTargets.forEach((target) => {
|
|
|
- targetData[`${target.targetId}-final`] = target.evaluationValue;
|
|
|
+ targetData[this.getTargetFirseKey(target)] = target.evaluationValue;
|
|
|
});
|
|
|
studentScoreTable.push(targetData);
|
|
|
|
|
|
const fTarget = this.courseTargets[0];
|
|
|
+ const fKey = this.getTargetFirseKey(fTarget);
|
|
|
studentScoreTable.push({
|
|
|
name: "课程达成度",
|
|
|
- [`${fTarget.targetId}-final`]: this.courseTargetValue,
|
|
|
+ [fKey]: this.courseTargetValue,
|
|
|
});
|
|
|
this.studentScoreTable = studentScoreTable;
|
|
|
},
|