|
@@ -1,55 +1,51 @@
|
|
<template>
|
|
<template>
|
|
- <div v-if="afterExamRemark !== null" id="exam-end" class="container">
|
|
|
|
|
|
+ <div v-if="!!!loading" id="exam-end" class="container">
|
|
<div class="instructions">
|
|
<div class="instructions">
|
|
<h1 class="">考试已结束</h1>
|
|
<h1 class="">考试已结束</h1>
|
|
<div><img class="user-avatar" :src="user.photoPath" alt="无底照" /></div>
|
|
<div><img class="user-avatar" :src="user.photoPath" alt="无底照" /></div>
|
|
- <div
|
|
|
|
- v-if="!examResult && getResultTimes <= 10"
|
|
|
|
- class="qm-big-text score-text"
|
|
|
|
- >
|
|
|
|
- 考试结果计算中...
|
|
|
|
- </div>
|
|
|
|
- <div
|
|
|
|
- v-if="!examResult && getResultTimes > 10"
|
|
|
|
- class="qm-big-text score-text"
|
|
|
|
- style="font-size: 20px;"
|
|
|
|
- >
|
|
|
|
- 请稍后在待考列表中查看客观题得分。
|
|
|
|
- </div>
|
|
|
|
- <div
|
|
|
|
- v-if="showObjectScore && (examResult && !examResult.isWarn)"
|
|
|
|
- class="qm-big-text score-text"
|
|
|
|
- >
|
|
|
|
- 客观题得分:
|
|
|
|
- <span style="color: red">{{ examResult.objectiveScore }}</span>
|
|
|
|
- </div>
|
|
|
|
- <div
|
|
|
|
- v-if="
|
|
|
|
- exam &&
|
|
|
|
- exam.examType !== 'ONLINE' &&
|
|
|
|
- showObjectScore &&
|
|
|
|
- (examResult && !examResult.isWarn)
|
|
|
|
- "
|
|
|
|
- class="qm-big-text score-text"
|
|
|
|
- >
|
|
|
|
- 客观题正确率:
|
|
|
|
- <span style="color: red">{{ examResult.objectiveAccuracy }}%</span>
|
|
|
|
- </div>
|
|
|
|
- <div
|
|
|
|
- v-if="examResult && examResult.isWarn"
|
|
|
|
- class="qm-big-text score-text"
|
|
|
|
- >
|
|
|
|
- 客观题得分: 成绩待审核
|
|
|
|
- </div>
|
|
|
|
- <h1 v-if="examResult && examResult.isWarn" style="text-align: left;">
|
|
|
|
- 违纪提示:
|
|
|
|
- </h1>
|
|
|
|
- <div
|
|
|
|
- v-if="examResult && examResult.isWarn"
|
|
|
|
- class=""
|
|
|
|
- style="text-align: left; padding-bottom: 20px"
|
|
|
|
- >
|
|
|
|
- <p v-html="cheatingRemark"></p>
|
|
|
|
|
|
+ <div v-if="showObjectScore">
|
|
|
|
+ <div
|
|
|
|
+ v-if="!examResult && getResultTimes <= 10"
|
|
|
|
+ class="qm-big-text score-text"
|
|
|
|
+ >
|
|
|
|
+ 考试结果计算中...
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ v-if="!examResult && getResultTimes > 10"
|
|
|
|
+ class="qm-big-text score-text"
|
|
|
|
+ style="font-size: 20px;"
|
|
|
|
+ >
|
|
|
|
+ 请稍后在待考列表中查看客观题得分。
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="examResult">
|
|
|
|
+ <div v-if="!examResult.isWarn" class="qm-big-text score-text">
|
|
|
|
+ 客观题得分:
|
|
|
|
+ <span style="color: red">{{ examResult.objectiveScore }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ v-if="exam.examType !== 'ONLINE' && !examResult.isWarn"
|
|
|
|
+ class="qm-big-text score-text"
|
|
|
|
+ >
|
|
|
|
+ 客观题正确率:
|
|
|
|
+ <span style="color: red">{{ examResult.objectiveAccuracy }}%</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="examResult.isWarn" class="qm-big-text score-text">
|
|
|
|
+ 客观题得分: 成绩待审核
|
|
|
|
+ </div>
|
|
|
|
+ <h1
|
|
|
|
+ v-if="showCheatingRemark && examResult.isWarn"
|
|
|
|
+ style="text-align: left;"
|
|
|
|
+ >
|
|
|
|
+ 违纪提示:
|
|
|
|
+ </h1>
|
|
|
|
+ <div
|
|
|
|
+ v-if="showCheatingRemark && examResult.isWarn"
|
|
|
|
+ class=""
|
|
|
|
+ style="text-align: left; padding-bottom: 20px"
|
|
|
|
+ >
|
|
|
|
+ <p v-html="cheatingRemark"></p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<h1 style="text-align: left;">考后说明:</h1>
|
|
<h1 style="text-align: left;">考后说明:</h1>
|
|
<div style="text-align: left; padding-bottom: 20px">
|
|
<div style="text-align: left; padding-bottom: 20px">
|
|
@@ -79,10 +75,12 @@ export default {
|
|
name: "ExamingEnd",
|
|
name: "ExamingEnd",
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ loading: true,
|
|
exam: null,
|
|
exam: null,
|
|
afterExamRemark: null,
|
|
afterExamRemark: null,
|
|
- showObjectScore: null,
|
|
|
|
cheatingRemark: null,
|
|
cheatingRemark: null,
|
|
|
|
+ showObjectScore: null,
|
|
|
|
+ showCheatingRemark: null,
|
|
examResult: null,
|
|
examResult: null,
|
|
getResultTimes: 0,
|
|
getResultTimes: 0,
|
|
};
|
|
};
|
|
@@ -108,57 +106,12 @@ export default {
|
|
window._hmt.push(["_trackEvent", "考试结束页面", "进入页面"]);
|
|
window._hmt.push(["_trackEvent", "考试结束页面", "进入页面"]);
|
|
const examRecordDataId = this.$route.params.examRecordDataId;
|
|
const examRecordDataId = this.$route.params.examRecordDataId;
|
|
const examId = this.$route.params.examId;
|
|
const examId = this.$route.params.examId;
|
|
- this.waitingNumber = 0;
|
|
|
|
- const f = async () => {
|
|
|
|
- if (this.$route.name !== "ExamingEnd" || this.waitingNumber > 30) {
|
|
|
|
- // 非成绩页,不在查询成绩
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- try {
|
|
|
|
- this.getResultTimes = this.getResultTimes + 1;
|
|
|
|
- const examResult = (await this.$http.get(
|
|
|
|
- "/api/ecs_oe_student/examControl/getEndExamInfo?examRecordDataId=" +
|
|
|
|
- examRecordDataId
|
|
|
|
- )).data;
|
|
|
|
-
|
|
|
|
- if (
|
|
|
|
- examResult === undefined ||
|
|
|
|
- examResult === null ||
|
|
|
|
- examResult === ""
|
|
|
|
- ) {
|
|
|
|
- this.waitingNumber++;
|
|
|
|
- this.timeout = setTimeout(() => f(), 3000);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- window._hmt.push([
|
|
|
|
- "_trackEvent",
|
|
|
|
- "考试结束页面",
|
|
|
|
- "等待分数",
|
|
|
|
- "等待次数=" + this.waitingNumber,
|
|
|
|
- ]);
|
|
|
|
- this.examResult = examResult;
|
|
|
|
-
|
|
|
|
- if (this.examResult.isWarn) {
|
|
|
|
- const cheatingRemark = await this.$http.get(
|
|
|
|
- "/api/ecs_exam_work/exam/getExamPropertyFromCacheByStudentSession/" +
|
|
|
|
- examId +
|
|
|
|
- `/CHEATING_REMARK`
|
|
|
|
- );
|
|
|
|
- this.cheatingRemark = cheatingRemark.data.CHEATING_REMARK || "";
|
|
|
|
- }
|
|
|
|
- } catch (error) {
|
|
|
|
- this.waitingNumber++;
|
|
|
|
- this.timeout = setTimeout(() => f(), 3000);
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
- await f();
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
- // if (!this.exam) {
|
|
|
|
|
|
+ this.loading = true;
|
|
this.exam = (await this.$http.get(
|
|
this.exam = (await this.$http.get(
|
|
"/api/ecs_exam_work/exam/" + examId
|
|
"/api/ecs_exam_work/exam/" + examId
|
|
)).data;
|
|
)).data;
|
|
- // }
|
|
|
|
|
|
|
|
if (this.exam.examType === "PRACTICE") {
|
|
if (this.exam.examType === "PRACTICE") {
|
|
this.$router.replace(
|
|
this.$router.replace(
|
|
@@ -166,21 +119,17 @@ export default {
|
|
);
|
|
);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- const afterExamRemark = await this.$http.get(
|
|
|
|
|
|
+ const resp = await this.$http.get(
|
|
"/api/ecs_exam_work/exam/getExamPropertyFromCacheByStudentSession/" +
|
|
"/api/ecs_exam_work/exam/getExamPropertyFromCacheByStudentSession/" +
|
|
examId +
|
|
examId +
|
|
- `/AFTER_EXAM_REMARK`
|
|
|
|
|
|
+ `/AFTER_EXAM_REMARK,IS_OBJ_SCORE_VIEW,SHOW_CHEATING_REMARK,CHEATING_REMARK`
|
|
);
|
|
);
|
|
- this.afterExamRemark = afterExamRemark.data.AFTER_EXAM_REMARK || "";
|
|
|
|
- const showObjectScore = await this.$http.get(
|
|
|
|
- "/api/ecs_exam_work/exam/getExamPropertyFromCacheByStudentSession/" +
|
|
|
|
- examId +
|
|
|
|
- `/IS_OBJ_SCORE_VIEW`
|
|
|
|
- );
|
|
|
|
- this.showObjectScore =
|
|
|
|
- (showObjectScore.data.IS_OBJ_SCORE_VIEW &&
|
|
|
|
- JSON.parse(showObjectScore.data.IS_OBJ_SCORE_VIEW)) ||
|
|
|
|
- false;
|
|
|
|
|
|
+ this.afterExamRemark = resp.data.AFTER_EXAM_REMARK || "";
|
|
|
|
+ this.cheatingRemark = resp.data.CHEATING_REMARK || "";
|
|
|
|
+ this.showObjectScore = resp.data.IS_OBJ_SCORE_VIEW === "true";
|
|
|
|
+ this.showCheatingRemark = resp.data.SHOW_CHEATING_REMARK === "true";
|
|
|
|
+
|
|
|
|
+ this.loading = false;
|
|
} catch (error) {
|
|
} catch (error) {
|
|
window._hmt.push([
|
|
window._hmt.push([
|
|
"_trackEvent",
|
|
"_trackEvent",
|
|
@@ -196,6 +145,8 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
document.body.style = "";
|
|
document.body.style = "";
|
|
|
|
+
|
|
|
|
+ await this.getExamResult();
|
|
},
|
|
},
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
clearTimeout(this.timeout);
|
|
clearTimeout(this.timeout);
|
|
@@ -223,6 +174,44 @@ export default {
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
...mapMutations(["updateExamState"]),
|
|
...mapMutations(["updateExamState"]),
|
|
|
|
+ async getExamResult() {
|
|
|
|
+ const examRecordDataId = this.$route.params.examRecordDataId;
|
|
|
|
+ this.waitingNumber = 0;
|
|
|
|
+ const f = async () => {
|
|
|
|
+ if (this.$route.name !== "ExamingEnd" || this.waitingNumber > 30) {
|
|
|
|
+ // 非成绩页,不在查询成绩
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ this.getResultTimes = this.getResultTimes + 1;
|
|
|
|
+ const examResult = (await this.$http.get(
|
|
|
|
+ "/api/ecs_oe_student/examControl/getEndExamInfo?examRecordDataId=" +
|
|
|
|
+ examRecordDataId
|
|
|
|
+ )).data;
|
|
|
|
+
|
|
|
|
+ if (
|
|
|
|
+ examResult === undefined ||
|
|
|
|
+ examResult === null ||
|
|
|
|
+ examResult === ""
|
|
|
|
+ ) {
|
|
|
|
+ this.waitingNumber++;
|
|
|
|
+ this.timeout = setTimeout(() => f(), 3000);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ window._hmt.push([
|
|
|
|
+ "_trackEvent",
|
|
|
|
+ "考试结束页面",
|
|
|
|
+ "等待分数",
|
|
|
|
+ "等待次数=" + this.waitingNumber,
|
|
|
|
+ ]);
|
|
|
|
+ this.examResult = examResult;
|
|
|
|
+ } catch (error) {
|
|
|
|
+ this.waitingNumber++;
|
|
|
|
+ this.timeout = setTimeout(() => f(), 3000);
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ await f();
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -235,10 +224,6 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
.instructions {
|
|
.instructions {
|
|
- /* display: grid; */
|
|
|
|
- /* grid-template-rows: 40px 300px min(100px) 30px minmax(200px, auto) min(100px) min(
|
|
|
|
- 100px
|
|
|
|
- ) min(100px); */
|
|
|
|
padding: 40px 20px;
|
|
padding: 40px 20px;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -257,13 +242,6 @@ export default {
|
|
.score-text {
|
|
.score-text {
|
|
font-size: 40px;
|
|
font-size: 40px;
|
|
}
|
|
}
|
|
-
|
|
|
|
-/* .exam-detail {
|
|
|
|
- padding: 40px 20px;
|
|
|
|
- background-color: #f5f5f5;
|
|
|
|
-
|
|
|
|
- text-align: left;
|
|
|
|
-} */
|
|
|
|
</style>
|
|
</style>
|
|
|
|
|
|
<style>
|
|
<style>
|