|
|
@ -355,16 +355,34 @@ export default { |
|
|
|
initState: 'system/initState' |
|
|
|
initState: 'system/initState' |
|
|
|
}), |
|
|
|
}), |
|
|
|
clearStore() { |
|
|
|
clearStore() { |
|
|
|
// 清空缓存 |
|
|
|
// // 清空缓存 |
|
|
|
let token = sessionStorage.getItem('token') |
|
|
|
let token = sessionStorage.getItem('token') |
|
|
|
let cid = sessionStorage.getItem('cid') |
|
|
|
let cid = sessionStorage.getItem('cid') |
|
|
|
let systemId = sessionStorage.getItem('systemId') |
|
|
|
let systemId = sessionStorage.getItem('systemId') |
|
|
|
let projectId = sessionStorage.getItem('projectId') |
|
|
|
let projectId = sessionStorage.getItem('projectId') |
|
|
|
|
|
|
|
let assessmentId = sessionStorage.getItem('assessmentId') |
|
|
|
|
|
|
|
let classId = sessionStorage.getItem('classId') |
|
|
|
|
|
|
|
let timestamp = sessionStorage.getItem('timestamp') |
|
|
|
|
|
|
|
let startTime = sessionStorage.getItem('startTime') |
|
|
|
sessionStorage.clear() |
|
|
|
sessionStorage.clear() |
|
|
|
sessionStorage.setItem('token', token) |
|
|
|
sessionStorage.setItem('token', token) |
|
|
|
sessionStorage.setItem('cid', cid) |
|
|
|
sessionStorage.setItem('cid', cid) |
|
|
|
sessionStorage.setItem('systemId', systemId) |
|
|
|
sessionStorage.setItem('systemId', systemId) |
|
|
|
sessionStorage.setItem('projectId', projectId) |
|
|
|
sessionStorage.setItem('projectId', projectId) |
|
|
|
|
|
|
|
if(assessmentId) { |
|
|
|
|
|
|
|
sessionStorage.setItem('assessmentId', assessmentId) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(classId) { |
|
|
|
|
|
|
|
sessionStorage.setItem('classId', classId) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(timestamp) { |
|
|
|
|
|
|
|
sessionStorage.setItem('timestamp', timestamp) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(startTime) { |
|
|
|
|
|
|
|
sessionStorage.setItem('startTime', startTime) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 初始化vuex中的state |
|
|
|
// 初始化vuex中的state |
|
|
|
this.initState(); |
|
|
|
this.initState(); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -406,30 +424,30 @@ export default { |
|
|
|
this.topicList.push(data.data.projects[i]) |
|
|
|
this.topicList.push(data.data.projects[i]) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// if(this.topicList.length > 0){ |
|
|
|
if(this.topicList.length > 0){ |
|
|
|
// // const projectIndex = JSON.parse(sessionStorage.getItem('projectIndex')) |
|
|
|
// const projectIndex = JSON.parse(sessionStorage.getItem('projectIndex')) |
|
|
|
// // const projectId = sessionStorage.getItem('projectId') |
|
|
|
// const projectId = sessionStorage.getItem('projectId') |
|
|
|
// // console.log('---projectId') |
|
|
|
// console.log('---projectId') |
|
|
|
// // console.log(projectId) |
|
|
|
// console.log(projectId) |
|
|
|
// // if(!projectId) { |
|
|
|
// if(!projectId) { |
|
|
|
// // this.selectProjects({ |
|
|
|
// this.selectProjects({ |
|
|
|
// // projectId: this.topicList[0].projectId |
|
|
|
// projectId: this.topicList[0].projectId |
|
|
|
// // }) |
|
|
|
// }) |
|
|
|
// // // localStorage.setItem('projectId') |
|
|
|
// // localStorage.setItem('projectId') |
|
|
|
// // }else { |
|
|
|
// }else { |
|
|
|
// // this.selectProjects({ |
|
|
|
// this.selectProjects({ |
|
|
|
// // projectId: projectId |
|
|
|
// projectId: projectId |
|
|
|
// // }) |
|
|
|
// }) |
|
|
|
// // } |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// this.selectProjects({ |
|
|
|
this.selectProjects({ |
|
|
|
// projectId: this.topicList[0].projectId |
|
|
|
projectId: this.topicList[0].projectId |
|
|
|
// }) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.gotuQueryVariable() |
|
|
|
this.gotuQueryVariable() |
|
|
|
// // 加的 |
|
|
|
// 加的 |
|
|
|
// } |
|
|
|
} |
|
|
|
this.getQueryCaches() |
|
|
|
this.getQueryCaches() |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
}).catch((error)=>{ |
|
|
@ -535,6 +553,8 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
//选择好题目 |
|
|
|
//选择好题目 |
|
|
|
selectProject(){ |
|
|
|
selectProject(){ |
|
|
|
|
|
|
|
this.lockIt = false |
|
|
|
|
|
|
|
this.$router.push('/index/list') |
|
|
|
// 和重新开始区别开,不再问是否再试一次 |
|
|
|
// 和重新开始区别开,不再问是否再试一次 |
|
|
|
// this.lockIt = false |
|
|
|
// this.lockIt = false |
|
|
|
// let token = sessionStorage.getItem('token') |
|
|
|
// let token = sessionStorage.getItem('token') |
|
|
@ -548,12 +568,16 @@ export default { |
|
|
|
// sessionStorage.setItem('projectId', projectId) |
|
|
|
// sessionStorage.setItem('projectId', projectId) |
|
|
|
// this.topicList[localProjectIndex].projectId |
|
|
|
// this.topicList[localProjectIndex].projectId |
|
|
|
// localStorage.setItem('localProjectIndex', JSON.stringify(this.projectId)) |
|
|
|
// localStorage.setItem('localProjectIndex', JSON.stringify(this.projectId)) |
|
|
|
this.clearStore() |
|
|
|
this.$nextTick(() => { |
|
|
|
deleteCache().then((data)=>{ |
|
|
|
this.clearStore() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// deleteCache().then((data)=>{ |
|
|
|
|
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
// }).catch(() => { |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
"projectId":this.projectId, |
|
|
|
"projectId":this.projectId, |
|
|
|