提交 1fda54c0 authored 作者: 高一's avatar 高一

考试系统页面交互返回Bug修改完成

上级 486cad3e
......@@ -14,7 +14,10 @@ export default {
mounted () {},
methods: {
goIndex () {
this.$router.push({ path: '/' })
// this.$router.push({ path: '/' })
this.$router.replace({
path: '/'
})
},
goPrev () {
this.$router.go(-1)
......
......@@ -16,7 +16,10 @@ export default {
},
methods: {
goIndex () {
this.$router.push({ path: '/' })
// this.$router.push({ path: '/' })
this.$router.replace({
path: '/'
})
},
goPrev () {
this.$router.go(-1)
......
......@@ -14,7 +14,6 @@
<template v-for="(item, index) in questionData.options">
<li
:key="index"
@click="changeOptions(questionData.question_item_type, questionData.question_item_id, questionData.id, item.id)"
:class="questionParams.answerRecord[questionData.question_item_id]
? questionParams.answerRecord[questionData.question_item_id][questionData.id]
? questionParams.answerRecord[questionData.question_item_id][questionData.id].answer.find(id => { return id === item.id })
......@@ -23,8 +22,10 @@
: ''
: ''"
>
<div @click="changeOptions(questionData.question_item_type, questionData.question_item_id, questionData.id, item.id)">
<div class="icon"></div>
<div class="txt">{{item.option}}</div>
</div>
</li>
</template>
</ul>
......@@ -49,7 +50,6 @@
<li
:id="items.id"
:key="'c' + cIndex"
@click="changeOptions(item.type, questionData.question_item_id, questionData.id, items.id)"
:class="questionParams.answerRecord[questionData.question_item_id]
? questionParams.answerRecord[questionData.question_item_id][questionData.id]
? questionParams.answerRecord[questionData.question_item_id][questionData.id].answer.find(id => { return id === items.id })
......@@ -58,8 +58,10 @@
: ''
: ''"
>
<div @click="changeOptions(item.type, questionData.question_item_id, questionData.id, items.id)">
<div class="icon"></div>
<div class="txt">{{items.option}}</div>
</div>
</li>
</template>
</template>
......@@ -279,24 +281,45 @@ export default {
margin: 0;
list-style: none;
li{
cursor: pointer;
// cursor: pointer;
margin-bottom: 20px;
display: flex;
// display: flex;
overflow: hidden;
// align-items: center;
div {
float: left;
cursor: pointer;
.icon{
width: 18px;
height: 18px;
border: 1px solid #999999;
border-radius: 50%;
margin-top: 3px;
float: left;
}
.txt{
width: 95%;
max-width: 95%;
font-size: 18px;
color: #222222;
line-height: 28px;
margin-left: 10px;
}
float: left;
}
}
// .icon{
// width: 18px;
// height: 18px;
// border: 1px solid #999999;
// border-radius: 50%;
// margin-top: 3px;
// }
// .txt{
// width: 95%;
// font-size: 18px;
// color: #222222;
// line-height: 28px;
// margin-left: 10px;
// }
&.active{
.icon{
width: 8px;
......
......@@ -36,8 +36,8 @@
@click="changeIndex('next')"
>下一题</div>
</div>
<div class="rigth-btn" @click="signHandle">
<div class="sign">
<div class="rigth-btn">
<div class="sign" @click="signHandle">
<div class="icon"></div>
<div class="txt">{{ itemSign ? '取消标记' : '标记' }}</div>
</div>
......@@ -116,9 +116,13 @@ export default {
}
action.Exam.endExam(this.$route.params.examId, param).then(res => {
clearInterval(this.clearTime)
this.$router.push({
// this.$router.push({
// path: '/examEnd'
// })
this.$router.replace({
path: '/examEnd'
})
window.sessionStorage.setItem('showflag', 'true')
}).catch(err => {
this.$alert(err.message, {
callback: action => {}
......
......@@ -19,16 +19,27 @@ export default {
data() {
return {
width: '',
ispop: true,
ispop: '',
examInfo: JSON.parse(window.sessionStorage.getItem('examInfo'))
}
},
created() {
this.getsess()
},
methods: {
getsess() {
this.ispop = Boolean(window.sessionStorage.getItem('showflag'))
console.log(111 + this.ispop)
}
},
mounted() {
setTimeout(() => {
this.width = '100%'
// this.ispop = 'true'
}, 1000)
setTimeout(() => {
this.ispop = false
window.sessionStorage.removeItem('showflag')
}, 4000)
}
}
......
......@@ -48,7 +48,11 @@ export default {
num3: '0',
num4: '0'
}
this.$router.push({
// this.$router.push({
// path: `/examAnswer/${JSON.parse(window.sessionStorage.getItem('examInfo')).exam_id}`,
// replace: true
// })
this.$router.replace({
path: `/examAnswer/${JSON.parse(window.sessionStorage.getItem('examInfo')).exam_id}`
})
}
......
......@@ -68,18 +68,30 @@ export default {
// console.log(this.isExamStatus(this.examInfo.start_time > 0))
this.isExamStatus(this.examInfo.start_time) > 0
? (() => {
this.$router.push({
name: 'examTime'
// this.$router.push({
// name: 'examTime',
// replace: true
// })
this.$router.replace({
path: '/examTime'
})
})()
: (() => {
this.$router.push({
// this.$router.push({
// path: `/examAnswer/${this.examInfo.exam_id}`,
// replace: true
// })
this.$router.replace({
path: `/examAnswer/${this.examInfo.exam_id}`
})
})()
},
disagree() {
this.$router.push({
// this.$router.push({
// path: `/login/${this.examInfo.exam_id}`,
// replace: true
// })
this.$router.replace({
path: `/login/${this.examInfo.exam_id}`
})
},
......
......@@ -146,7 +146,11 @@ export default {
window.sessionStorage.setItem('studentInfo', JSON.stringify(res))
const status = parseInt(res.sheet_status)
if (status === 0) {
this.$router.push({
// this.$router.push({
// name: 'confirmInfo',
// replace: true
// })
this.$router.replace({
name: 'confirmInfo'
})
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论