20240205
luoJunYong.123 3 years ago
parent 84526b50d2
commit e2b1687be8
  1. 2
      src/api/http.js
  2. 22
      src/components/case/index.vue

@ -29,7 +29,7 @@ export const deleteCache= () => {
} }
// 学生查看考核状态 // 学生查看考核状态
export const checkTest= (params) => { export const checkTest= (params) => {
return get( '/occupationlab/assessment/getDetailById') return get( '/occupationlab/assessment/getDetailById', {...params})
} }
export const checkTest2= (params) => { export const checkTest2= (params) => {
return post( '/occupationlab/assessment/pageStuAssessment',{ return post( '/occupationlab/assessment/pageStuAssessment',{

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

Loading…
Cancel
Save