dev_202412
yujialong 4 months ago
parent 0f6c7fe6b6
commit a96dfec18e
  1. 10
      src/layouts/home/index.vue
  2. 2
      src/pages/station/preview/index.vue
  3. 46
      src/pages/theoryExam/index.vue

@ -70,7 +70,7 @@ export default {
icon: 'optimize'
}
],
showHeader: this.$route.path !== '/theoryExam', //
showHeader: true
};
},
components: {
@ -85,6 +85,14 @@ export default {
'noticed'
])
},
watch: {
"$route": {
handler () {
this.showHeader = this.$route.path !== '/theoryExam' //
},
immediate: true
}
},
mounted () {
this.autoLogout()
this.noticed || this.getMatchStatus() // 0

@ -827,7 +827,7 @@ export default {
},
//
entryProject (projectId = '', paperId = '') {
this.$confirm('是否要继续上次的实验?', '提示', {
this.$confirm(`是否要继续上次的${projectId ? '实验' : '理论试题'}`, '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'success',

@ -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 // 012
//
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;

Loading…
Cancel
Save