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

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

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