|
|
|
@ -186,21 +186,19 @@ export default { |
|
|
|
|
timestamp:'', |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
async created() { |
|
|
|
|
// const test = await checkTest('/occupationlab/assessment/getDetailById', { |
|
|
|
|
// id: 91 |
|
|
|
|
// }) |
|
|
|
|
// console.log(test) |
|
|
|
|
// // const test = await checkTest() |
|
|
|
|
// console.log('test') |
|
|
|
|
created() { |
|
|
|
|
const { query: { token, assessmentId } } = this.$route |
|
|
|
|
sessionStorage.setItem('assessmentId', assessmentId) |
|
|
|
|
sessionStorage.setItem('token', token) |
|
|
|
|
this.intervalJudge = setInterval(() => { |
|
|
|
|
checkTest2({ assessmentId: parseInt(sessionStorage.getItem('assessmentId')) }).then(t => { |
|
|
|
|
const { data: { list } } = t |
|
|
|
|
console.log(list) |
|
|
|
|
const aimItem = list.find(item => item.assessmentId == parseInt(sessionStorage.getItem('assessmentId'))) |
|
|
|
|
if(aimItem.status !== 1) { |
|
|
|
|
const data = { |
|
|
|
|
id: parseInt(sessionStorage.getItem('assessmentId')), |
|
|
|
|
token: parseInt(sessionStorage.getItem('token')) |
|
|
|
|
} |
|
|
|
|
checkTest(data).then(data => { |
|
|
|
|
console.log(data) |
|
|
|
|
const { data: { data: { status } } } = data |
|
|
|
|
if(status !== 1) { |
|
|
|
|
this.popContainer = true |
|
|
|
|
clearInterval(this.intervalJudge) |
|
|
|
|
this.$message({ |
|
|
|
|