|
|
|
@ -39,7 +39,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="wrap"> |
|
|
|
|
<div :class="['wrap', { submited }]"> |
|
|
|
|
<div class="left"> |
|
|
|
|
<h6 class="title">答题卡</h6> |
|
|
|
|
<div class="progress"> |
|
|
|
@ -216,7 +216,7 @@ export default { |
|
|
|
|
questionCount: 0, |
|
|
|
|
}, |
|
|
|
|
submiting: false, |
|
|
|
|
submited: false, |
|
|
|
|
submited: false, // 是否有提交过 |
|
|
|
|
warned: 0, |
|
|
|
|
quesWrapWidth: 0, |
|
|
|
|
previewImgVisible: false, |
|
|
|
@ -238,9 +238,20 @@ export default { |
|
|
|
|
this.getCompetition() |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
this.per = this.competitionId ? 2 : this.assessmentId ? 1 : 0 |
|
|
|
|
this.paperId ? this.getPracticePaper() : this.getCompetition(1) |
|
|
|
|
this.initOss() |
|
|
|
|
this.per = this.competitionId ? 2 : this.assessmentId ? 1 : 0 // 0练习,1考核,2竞赛 |
|
|
|
|
|
|
|
|
|
// 恢复提交数据(页面刷新后要恢复) |
|
|
|
|
let record = sessionStorage.getItem('theorySubmit') |
|
|
|
|
if (record) { |
|
|
|
|
record = JSON.parse(record) |
|
|
|
|
this.submited = true |
|
|
|
|
this.reportId = record.reportId |
|
|
|
|
this.score = record.score |
|
|
|
|
this.form = record.form |
|
|
|
|
} else { |
|
|
|
|
this.paperId ? this.getPracticePaper() : this.getCompetition(1) |
|
|
|
|
this.initOss() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 获取竞赛信息 |
|
|
|
@ -676,6 +687,7 @@ export default { |
|
|
|
|
async reload () { |
|
|
|
|
// 已提交状态则直接重新开始,未提交则询问弹框 |
|
|
|
|
if (this.submited) { |
|
|
|
|
sessionStorage.removeItem('theorySubmit') |
|
|
|
|
location.reload() |
|
|
|
|
} else { |
|
|
|
|
try { |
|
|
|
@ -686,6 +698,7 @@ export default { |
|
|
|
|
closeOnClickModal: false, |
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
}) |
|
|
|
|
sessionStorage.removeItem('theorySubmit') |
|
|
|
|
await this.clearPracticeCache() |
|
|
|
|
location.reload() |
|
|
|
|
} catch (e) { } |
|
|
|
@ -784,6 +797,11 @@ export default { |
|
|
|
|
if (res.reportId) { |
|
|
|
|
this.reportId = res.reportId |
|
|
|
|
this.score = res.score |
|
|
|
|
sessionStorage.setItem('theorySubmit', JSON.stringify({ |
|
|
|
|
reportId: res.reportId, |
|
|
|
|
score: res.score, |
|
|
|
|
form: this.form |
|
|
|
|
})) |
|
|
|
|
} |
|
|
|
|
this.submited = true |
|
|
|
|
|
|
|
|
@ -865,7 +883,7 @@ export default { |
|
|
|
|
padding: 0 8px; |
|
|
|
|
margin-left: 7px; |
|
|
|
|
color: #f00; |
|
|
|
|
line-height: 2.4; |
|
|
|
|
line-height: 2.2; |
|
|
|
|
background-color: #fff; |
|
|
|
|
border-radius: 20px; |
|
|
|
|
} |
|
|
|
@ -887,9 +905,25 @@ export default { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/.wrap { |
|
|
|
|
position: relative; |
|
|
|
|
display: flex; |
|
|
|
|
padding: 15px; |
|
|
|
|
|
|
|
|
|
&.submited { |
|
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
|
|
&::after { |
|
|
|
|
content: ''; |
|
|
|
|
z-index: 2001; |
|
|
|
|
position: absolute; |
|
|
|
|
top: 0; |
|
|
|
|
left: 0; |
|
|
|
|
bottom: 0; |
|
|
|
|
right: 0; |
|
|
|
|
background-color: rgba(0, 0, 0, .3); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.left { |
|
|
|
|
width: 293px; |
|
|
|
|
margin-right: 15px; |
|
|
|
|