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) => {
return get( '/occupationlab/assessment/getDetailById')
return get( '/occupationlab/assessment/getDetailById', {...params})
}
export const checkTest2= (params) => {
return post( '/occupationlab/assessment/pageStuAssessment',{

@ -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({

Loading…
Cancel
Save