成工院大铁标准线实训测验模式结束后弹出的结果优化
This commit is contained in:
parent
eff99d3609
commit
5470a32bb7
@ -15,6 +15,7 @@
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column prop="desc" label="步骤" />
|
||||
<el-table-column prop="role" label="操作人员" />
|
||||
<el-table-column prop="success" label="操作结果" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.success?'正确':'错误' }}</span>
|
||||
@ -22,7 +23,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="score" label="得分" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.score || 0 }}</span>
|
||||
<span>{{ scope.row.score }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -54,7 +55,11 @@ export default {
|
||||
if (scoreList && scoreList.length) {
|
||||
scoreList.forEach(score => {
|
||||
const step = this.stepList.find(step => step.id == score.stepId);
|
||||
this.tableData.push({ ...score, desc: step.description });
|
||||
const role = this.$store.state.training.memberData[parseInt(step.memberId)];
|
||||
if (!score.hasOwnProperty('score')) {
|
||||
score.score = '/';
|
||||
}
|
||||
this.tableData.push({ ...score, role: role.labelName, desc: step.description });
|
||||
});
|
||||
}
|
||||
this.dialogVisible = true;
|
||||
@ -66,7 +71,7 @@ export default {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
return;
|
||||
} else if (index === 1) {
|
||||
} else if (index === 2) {
|
||||
const MyMemberId = this.$store.state.training.myMemberId;
|
||||
const scoringRuleList = this.$store.state.trainingNew.scoringRules.find(rule => rule.memberId == MyMemberId );
|
||||
let total = 0;
|
||||
@ -76,7 +81,7 @@ export default {
|
||||
});
|
||||
}
|
||||
sums[index] = total;
|
||||
} else if (index === 2) {
|
||||
} else if (index === 3) {
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
|
Loading…
Reference in New Issue
Block a user