提交 c3291ba0 authored 作者: 王鹏飞's avatar 王鹏飞

chore: 适配id_number查看考试

上级 e87d71dd
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
import { getPaperDetails } from '../api.js' import { getPaperDetails } from '../api.js'
import PaperQuestion from '../components/PaperQuestion.vue' import PaperQuestion from '../components/PaperQuestion.vue'
export default { export default {
props: { exam_id: { type: String }, student_id: { type: String } }, props: { exam_id: { type: String }, student_id: { type: String }, id_number: { type: String } },
components: { PaperQuestion }, components: { PaperQuestion },
data() { data() {
return { return {
...@@ -22,10 +22,13 @@ export default { ...@@ -22,10 +22,13 @@ export default {
}, },
computed: { computed: {
eid() { eid() {
return this.exam_id || this.$route.query.eid return this.exam_id || this.$route.query.eid || this.$route.query.exam_id
}, },
sid() { sid() {
return this.student_id || this.$route.query.sid return this.student_id || this.$route.query.sid || this.$route.query.student_id
},
idNumber() {
return this.id_number || this.$route.query.id_number
} }
}, },
beforeMount() { beforeMount() {
...@@ -35,7 +38,7 @@ export default { ...@@ -35,7 +38,7 @@ export default {
methods: { methods: {
// 获取试卷详情 // 获取试卷详情
getDetail() { getDetail() {
getPaperDetails({ exam_id: this.eid, student_id: this.sid }).then(res => { getPaperDetails({ exam_id: this.eid, student_id: this.sid, id_number: this.idNumber }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.questionData = res.data.sheet this.questionData = res.data.sheet
this.assembleData() this.assembleData()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论