添加实操考试 结束生成分值流程

This commit is contained in:
zyy 2020-05-21 15:18:00 +08:00
parent 9827e8aae8
commit 81973b6967
4 changed files with 31 additions and 30 deletions

View File

@ -128,12 +128,12 @@ const CompetitionDetail = () => import('@/views/jsxt/competition/examDetail');
const CompetitionManage = () => import('@/views/jsxt/competition/index');
const CompetitionHome = () => import('@/views/jsxt/competition/home');
const Refereedetail = () => import('@/views/jsxt/competition/theory/quiz/index');
const JsxtExamResult = () => import('@/views/jsxt/competition/result');
const JsxtApply = () => import('@/views/jsxt/apply/index');
// const theoryManage = () => import('@/views/jsxt/competition/theory/index');
const RefereeList = () => import('@/views/jsxt/refereeList/index');
const homeJsxt = () => import('@/views/jsxt/home/index');
const RecaList = () => import('@/views/jsxt/reca/list');
const JsxtExamResult = () => import('@/views/jsxt/competition/result');
import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
import { getSessionStorage } from '@/utils/auth';
@ -1005,7 +1005,7 @@ export const JSXT = [
}
},
{ // 考试结果
path: 'result/:userExamId',
path: 'result',
component: JsxtExamResult,
hidden: true
}

View File

@ -5,7 +5,7 @@
</div>
<div class="card_content">
<el-scrollbar wrap-class="scrollbar-wrapper">
<p class="list-item">
<!-- <p class="list-item">
<span class="list-label">{{ $t('exam.examStartTime') +':' }}</span>
<span v-if="examDetails.startTime" class="list-elem">
{{ examDetails.startTime }} - {{ examDetails.endTime }}</span>
@ -39,7 +39,7 @@
<el-table-column prop="chapterIdLong" :label="this.$t('exam.totalScore')" />
</el-table>
</p>
</div>
</div> -->
<div class="btn-start">
<el-button :disabled="disabled" type="primary" @click="exmaStart">{{ $t('exam.startTheExam') }}</el-button>
</div>

View File

@ -32,8 +32,8 @@
</div>
</template>
<script>
import { submitExam } from '@/api/management/userexam';
import { UrlConfig } from '@/scripts/ConstDic';
// import { submitExam } from '@/api/management/userexam';
// import { UrlConfig } from '@/scripts/ConstDic';
export default {
name: 'ExamResult',
@ -87,29 +87,30 @@ export default {
return sums;
},
submitExamData() {
this.loading = true;
let count = 3;
const userExamId = this.$route.params.userExamId;
let interval = setInterval(() => {
submitExam(userExamId).then(response => {
// this.loading = true;
// let count = 3;
// const userExamId = this.$route.params.userExamId;
// let interval = setInterval(() => {
// submitExam(userExamId).then(response => {
this.loading = false;
this.resultModel = response.data;
clearInterval(interval);
interval = null;
}).catch(() => {
if (count-- < 0) {
this.loading = false;
clearInterval(interval);
interval = null;
this.$messageBox(this.$t('error.submitExamFailed'));
}
});
}, 1000);
// this.resultModel = response.data;
// clearInterval(interval);
// interval = null;
// }).catch(() => {
// if (count-- < 0) {
// this.loading = false;
// clearInterval(interval);
// interval = null;
// this.$messageBox(this.$t('error.submitExamFailed'));
// }
// });
// }, 1000);
},
back() {
const examId = this.resultModel.examId;
this.$router.push({path: `${UrlConfig.trainingPlatform.examDetail}/${examId}`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId }});
const query = {type: 'operation', mapId: this.$route.query.mapId};
this.$router.push({path: `/jsxt/examDetail`, query: query});
// const examId = this.resultModel.examId;
// this.$router.push({path: `${UrlConfig.trainingPlatform.examDetail}/${examId}`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId }});
}
}
};

View File

@ -313,8 +313,8 @@ export default {
type: 'warning'
}).then(() => {
participantCompleteCompetition(1, this.group).then(resp => {
this.$router.go(-1);
// this.submit();
// this.$router.go(-1);
this.submit();
}).catch(()=> {
this.$message.success('提交试卷失败!');
});
@ -323,7 +323,7 @@ export default {
submit() {
// this.$store.dispatch('exam/over').then(() => {
// this.$store.dispatch('trainingList/clearTrainingList');
this.$router.replace({ path: `/jsxt/result/${this.$route.query.userExamId}`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId } });
this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId } });
// });
}
}