Commit 8f55b9c9 authored by 李苏's avatar 李苏 💬

中断考试

parent 043e9bdc
...@@ -90,9 +90,9 @@ ...@@ -90,9 +90,9 @@
return return
} }
/* 显示考试人员信息*/ /* 显示考试人员信息*/
const {username,userid} = JSON.parse(sessionStorage.getItem('allUserInfo')) // const {username,userid} = JSON.parse(sessionStorage.getItem('allUserInfo'))
this.username=username this.username=localStorage.getItem('username')
this.userid=userid this.userid=localStorage.getItem('userid')
this.title = this.singleItem.name || '未知试卷' this.title = this.singleItem.name || '未知试卷'
/* 判断进入类型*/ /* 判断进入类型*/
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
this.startTime = this.singleItem.kssj this.startTime = this.singleItem.kssj
this.endTime = this.singleItem.jssj this.endTime = this.singleItem.jssj
this.kssc = this.singleItem.kssc * 60 * 1000
/* 配置考试类型*/ /* 配置考试类型*/
this.paperType = 'K' this.paperType = 'K'
this.paperState = 'B' this.paperState = 'B'
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
}, },
mounted() { mounted() {
if(this.paperState == 'B'){ if(this.paperState == 'B'){
this.getRemain()
} }
/* 获取*/ /* 获取*/
...@@ -224,7 +224,11 @@ ...@@ -224,7 +224,11 @@
}).then(res => { }).then(res => {
if(res.success){ if(res.success){
this.subjectList = [] this.subjectList = []
let oList = res.data.records || [] let lastTime=res.data.records.ksjl.kskssj
let useTime=new Date().getTime()-lastTime
this.kssc = this.singleItem.kssc * 60 * 1000 - useTime
this.getRemain()
let oList = res.data.records.datas || []
/* 构建subjectList*/ /* 构建subjectList*/
console.log(this.singleItem,'singleItem') console.log(this.singleItem,'singleItem')
this.subjectList = oList.map(item => { this.subjectList = oList.map(item => {
...@@ -254,6 +258,8 @@ ...@@ -254,6 +258,8 @@
} }
}).catch(e=>{
this.gobac()
}) })
}, },
fullScreen(element) { fullScreen(element) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment