实操竞赛结果调整
This commit is contained in:
parent
44bb0f0f29
commit
f4d402322a
@ -177,3 +177,10 @@ export function startPracticalCompetition(group, competitionId) {
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
/** 查询实操考试结果 */
|
||||
export function getPracticalCompetitionResult(competitionId) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/${competitionId}/result`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
<span style="font-weight:bold ">{{ $t('exam.examResultsDetails') }}</span>
|
||||
</div>
|
||||
<div class="context">
|
||||
<div>{{ `得分:${operateScore}分` }}</div>
|
||||
<!-- <el-form ref="form" :model="resultModel" size="mini">
|
||||
<el-form-item :label="this.$t('exam.testScores')+':'" prop="score">
|
||||
<span>{{ resultModel.score + ' '+ $t('exam.points') }}</span>
|
||||
@ -12,25 +13,25 @@
|
||||
<span>{{ Math.ceil((resultModel.usedTime || 0)/60) + ' '+ $t('global.minutes') }}</span>
|
||||
</el-form-item>
|
||||
</el-form> -->
|
||||
<el-table :data="tableData" border style="width: 100%; min-height: 200px;" :summary-method="getSummaries" show-summary :span-method="objectSpanMethod">
|
||||
<el-table-column prop="title" label="题目">
|
||||
<template slot-scope="scope">
|
||||
<div v-html="scope.row.title" />
|
||||
</template>
|
||||
</el-table-column>>
|
||||
<el-table-column prop="score" label="分值" />
|
||||
<el-table-column prop="goal" label="得分" />
|
||||
<el-table-column v-if="this.$route.query.type ==='theory'" prop="correctAnswer" label="答题结果" />
|
||||
<el-table-column v-if="this.$route.query.type ==='theory'" prop="explain" label="说明" />
|
||||
<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointIndex" label="得分点">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ '得分点'+scope.row.scoringPointIndex }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointScore" label="得分点分值" />
|
||||
<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointGoal" label="得分点得分" />
|
||||
<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointExplain" label="得分点说明" />
|
||||
</el-table>
|
||||
<!--<el-table :data="tableData" border style="width: 100%; min-height: 200px;" :summary-method="getSummaries" show-summary :span-method="objectSpanMethod">-->
|
||||
<!--<el-table-column prop="title" label="题目">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<div v-html="scope.row.title" />-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>>-->
|
||||
<!--<el-table-column prop="score" label="分值" />-->
|
||||
<!--<el-table-column prop="goal" label="得分" />-->
|
||||
<!--<el-table-column v-if="this.$route.query.type ==='theory'" prop="correctAnswer" label="答题结果" />-->
|
||||
<!--<el-table-column v-if="this.$route.query.type ==='theory'" prop="explain" label="说明" />-->
|
||||
<!--<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointIndex" label="得分点">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<span>{{ '得分点'+scope.row.scoringPointIndex }}</span>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointScore" label="得分点分值" />-->
|
||||
<!--<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointGoal" label="得分点得分" />-->
|
||||
<!--<el-table-column v-if="this.$route.query.type ==='operate'" prop="scoringPointExplain" label="得分点说明" />-->
|
||||
<!--</el-table>-->
|
||||
</div>
|
||||
<div class="draf_box">
|
||||
<el-button type="primary " @click="back">返回首页</el-button>
|
||||
@ -40,7 +41,7 @@
|
||||
<script>
|
||||
// import { submitExam } from '@/api/management/userexam';
|
||||
// import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { getCompetitionDetail } from '@/api/competition';
|
||||
import { getCompetitionDetail, getPracticalCompetitionResult } from '@/api/competition';
|
||||
|
||||
export default {
|
||||
name: 'ExamResult',
|
||||
@ -69,7 +70,8 @@ export default {
|
||||
{ title: '4', score: '25', goal: '0', scoringPoints: [{score: '10', goal: '0', explain: '这是说明原因1'}, {score: '10', goal: '0', explain: '这是说明原因2'}, {score: '5', goal: '0', explain: '这是说明原因3'}] }
|
||||
],
|
||||
loading: true,
|
||||
tableData: []
|
||||
tableData: [],
|
||||
operateScore: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -112,7 +114,6 @@ export default {
|
||||
this.loading = false;
|
||||
if (this.$route.query.type == 'theory') {
|
||||
getCompetitionDetail(this.$route.query.raceId).then(res => {
|
||||
console.log(res);
|
||||
this.tableData = [];
|
||||
res.data.forEach(item => {
|
||||
this.tableData.push({
|
||||
@ -126,15 +127,19 @@ export default {
|
||||
});
|
||||
} else if (this.$route.query.type == 'operate') {
|
||||
this.tableData = [];
|
||||
this.operateData.forEach(item => {
|
||||
if (item.scoringPoints && item.scoringPoints.length) {
|
||||
item.scoringPoints.forEach((elem, index) => {
|
||||
this.tableData.push({
|
||||
title: item.title, score: index ? 0 : item.score, goal: index ? 0 : item.goal, scoringPointLength: item.scoringPoints.length, scoringPointIndex: index + 1, scoringPointScore: elem.score, scoringPointGoal: elem.goal, scoringPointExplain: elem.explain
|
||||
});
|
||||
});
|
||||
}
|
||||
getPracticalCompetitionResult(this.$route.query.raceId).then(res => {
|
||||
console.log(res, res.data);
|
||||
this.operateScore = res.data;
|
||||
});
|
||||
// this.operateData.forEach(item => {
|
||||
// if (item.scoringPoints && item.scoringPoints.length) {
|
||||
// item.scoringPoints.forEach((elem, index) => {
|
||||
// this.tableData.push({
|
||||
// title: item.title, score: index ? 0 : item.score, goal: index ? 0 : item.goal, scoringPointLength: item.scoringPoints.length, scoringPointIndex: index + 1, scoringPointScore: elem.score, scoringPointGoal: elem.goal, scoringPointExplain: elem.explain
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
},
|
||||
back() {
|
||||
|
Loading…
Reference in New Issue
Block a user