|
|
@ -149,6 +149,7 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
|
|
|
|
import Cookie from 'js-cookie' |
|
|
|
import util from '@/libs/util' |
|
|
|
import util from '@/libs/util' |
|
|
|
import Setting from '@/setting' |
|
|
|
import Setting from '@/setting' |
|
|
|
// 引入封装好的接口 |
|
|
|
// 引入封装好的接口 |
|
|
@ -337,10 +338,10 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
let tokens = sessionStorage.getItem('token') |
|
|
|
let tokens = sessionStorage.getItem('token') |
|
|
|
if(tokens || token){ |
|
|
|
if(tokens || token){ |
|
|
|
this.projectPermissions = this.projectId ? 1 : 0 |
|
|
|
this.projectPermissions = this.assessmentId ? 1 : 0 |
|
|
|
this.assessmentId && this.projectId && this.checkVer() |
|
|
|
this.assessmentId && this.projectId && this.checkVer() |
|
|
|
this.codeId && this.codeIds.push(this.codeId) |
|
|
|
this.codeId && this.codeIds.push(this.codeId) |
|
|
|
if (projectId !=null && projectId != '' && projectId !='null'){ |
|
|
|
if (assessmentId !=null && assessmentId != '' && assessmentId !='null'){ |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
"projectId":projectId, |
|
|
|
"projectId":projectId, |
|
|
|
} |
|
|
|
} |
|
|
@ -447,20 +448,6 @@ export default { |
|
|
|
console.log('---this.topicList') |
|
|
|
console.log('---this.topicList') |
|
|
|
console.log(this.topicList) |
|
|
|
console.log(this.topicList) |
|
|
|
if(this.topicList.length > 0){ |
|
|
|
if(this.topicList.length > 0){ |
|
|
|
// const projectIndex = JSON.parse(sessionStorage.getItem('projectIndex')) |
|
|
|
|
|
|
|
// const projectId = sessionStorage.getItem('projectId') |
|
|
|
|
|
|
|
// console.log('---projectId') |
|
|
|
|
|
|
|
// console.log(projectId) |
|
|
|
|
|
|
|
// if(!projectId) { |
|
|
|
|
|
|
|
// this.selectProjects({ |
|
|
|
|
|
|
|
// projectId: this.topicList[0].projectId |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// // localStorage.setItem('projectId') |
|
|
|
|
|
|
|
// }else { |
|
|
|
|
|
|
|
// this.selectProjects({ |
|
|
|
|
|
|
|
// projectId: projectId |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
const storeProjectId = sessionStorage.getItem('storeProjectId') |
|
|
|
const storeProjectId = sessionStorage.getItem('storeProjectId') |
|
|
|
if(storeProjectId) { |
|
|
|
if(storeProjectId) { |
|
|
|
this.selectProjects({ |
|
|
|
this.selectProjects({ |
|
|
@ -471,9 +458,6 @@ export default { |
|
|
|
projectId: this.topicList[0].projectId |
|
|
|
projectId: this.topicList[0].projectId |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.gotuQueryVariable() |
|
|
|
this.gotuQueryVariable() |
|
|
|
// 加的 |
|
|
|
// 加的 |
|
|
|
} |
|
|
|
} |
|
|
@ -557,8 +541,6 @@ export default { |
|
|
|
selectProjects(params){ |
|
|
|
selectProjects(params){ |
|
|
|
getProjectDetail(params).then((data)=>{ |
|
|
|
getProjectDetail(params).then((data)=>{ |
|
|
|
if(data.status == 200){ |
|
|
|
if(data.status == 200){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.globalTimer = ""; |
|
|
|
this.globalTimer = ""; |
|
|
|
let stopTime = sessionStorage.getItem('timestamp') |
|
|
|
let stopTime = sessionStorage.getItem('timestamp') |
|
|
|
let timestamp = +stopTime; |
|
|
|
let timestamp = +stopTime; |
|
|
@ -566,8 +548,8 @@ export default { |
|
|
|
this.sss = 1; |
|
|
|
this.sss = 1; |
|
|
|
this.hintOpen = data.data.projectManage.hintOpen; |
|
|
|
this.hintOpen = data.data.projectManage.hintOpen; |
|
|
|
this.countDown(timestamp); |
|
|
|
this.countDown(timestamp); |
|
|
|
let projectId = this.getQueryVariable('projectId') |
|
|
|
let assessmentId = this.getQueryVariable('assessmentId') |
|
|
|
if(projectId != null && projectId != '' && projectId != 'null'){ |
|
|
|
if(assessmentId != null && assessmentId != '' && assessmentId != 'null'){ |
|
|
|
//获取当前时间 |
|
|
|
//获取当前时间 |
|
|
|
this.getBeginTime() |
|
|
|
this.getBeginTime() |
|
|
|
this.topicList = [data.data.projectManage]; |
|
|
|
this.topicList = [data.data.projectManage]; |
|
|
@ -590,31 +572,10 @@ export default { |
|
|
|
selectProject(){ |
|
|
|
selectProject(){ |
|
|
|
this.lockIt = false |
|
|
|
this.lockIt = false |
|
|
|
this.$router.push('/index/list') |
|
|
|
this.$router.push('/index/list') |
|
|
|
// 和重新开始区别开,不再问是否再试一次 |
|
|
|
|
|
|
|
// this.lockIt = false |
|
|
|
|
|
|
|
// let token = sessionStorage.getItem('token') |
|
|
|
|
|
|
|
// let cid = sessionStorage.getItem('cid') |
|
|
|
|
|
|
|
// let systemId = sessionStorage.getItem('systemId') |
|
|
|
|
|
|
|
// let projectId = sessionStorage.getItem('projectId') |
|
|
|
|
|
|
|
// sessionStorage.clear() |
|
|
|
|
|
|
|
// sessionStorage.setItem('token', token) |
|
|
|
|
|
|
|
// sessionStorage.setItem('cid', cid) |
|
|
|
|
|
|
|
// sessionStorage.setItem('systemId', systemId) |
|
|
|
|
|
|
|
// sessionStorage.setItem('projectId', projectId) |
|
|
|
|
|
|
|
// this.topicList[localProjectIndex].projectId |
|
|
|
|
|
|
|
// localStorage.setItem('localProjectIndex', JSON.stringify(this.projectId)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.clearStore() |
|
|
|
this.clearStore() |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// deleteCache().then((data)=>{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }).catch(() => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
"projectId":this.projectId, |
|
|
|
"projectId":this.projectId, |
|
|
@ -627,16 +588,33 @@ export default { |
|
|
|
sessionStorage.setItem('projectId', this.projectId) |
|
|
|
sessionStorage.setItem('projectId', this.projectId) |
|
|
|
getProjectDetail(params).then((data)=>{ |
|
|
|
getProjectDetail(params).then((data)=>{ |
|
|
|
if(data.status == 200){ |
|
|
|
if(data.status == 200){ |
|
|
|
|
|
|
|
const { systemId, projectId } = data.data.projectManage |
|
|
|
|
|
|
|
// systemId=11 为银行项目,为其他值则是python项目,直接跳python |
|
|
|
|
|
|
|
if (systemId === 11) { |
|
|
|
this.popContainer = false; |
|
|
|
this.popContainer = false; |
|
|
|
this.hintOpen = data.data.projectManage.hintOpen; |
|
|
|
this.hintOpen = data.data.projectManage.hintOpen; |
|
|
|
let token = sessionStorage.getItem('token') |
|
|
|
|
|
|
|
let cid = sessionStorage.getItem('cid') |
|
|
|
|
|
|
|
let systemId = sessionStorage.getItem('systemId') |
|
|
|
|
|
|
|
this.projectName = data.data.projectManage.projectName; |
|
|
|
this.projectName = data.data.projectManage.projectName; |
|
|
|
this.projectId = data.data.projectManage.projectId; |
|
|
|
this.projectId = data.data.projectManage.projectId; |
|
|
|
this.projectManage = data.data.projectManage; |
|
|
|
this.projectManage = data.data.projectManage; |
|
|
|
this.requires = data.data.projectJudgmentVos; |
|
|
|
this.requires = data.data.projectJudgmentVos; |
|
|
|
this.$router.push('/index/list') |
|
|
|
this.$router.push('/index/list') |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
const { cid, curriculumName, token, systemId } = this.$route.query |
|
|
|
|
|
|
|
Cookie.set('admin-assessmentId', '', -1) |
|
|
|
|
|
|
|
Cookie.set('admin-startTime', '', -1) |
|
|
|
|
|
|
|
Cookie.set('admin-stopTime', '', -1) |
|
|
|
|
|
|
|
Cookie.set('admin-projectId', projectId) |
|
|
|
|
|
|
|
Cookie.set('admin-token', token) |
|
|
|
|
|
|
|
Cookie.set('admin-courseId', cid) |
|
|
|
|
|
|
|
Cookie.set('admin-curriculumName', escape(curriculumName)) |
|
|
|
|
|
|
|
Cookie.set('admin-systemId', systemId) |
|
|
|
|
|
|
|
// 8个python子系统都跳这个地址,子系统会通过cookie里的systemId识别展示哪套系统 |
|
|
|
|
|
|
|
location.href = process.env.NODE_ENV === 'development' ? |
|
|
|
|
|
|
|
`http://${location.hostname}:8080/#/` : |
|
|
|
|
|
|
|
location.href.includes('occupationlab.com') ? |
|
|
|
|
|
|
|
'https://www.occupationlab.com/pyTrials' : |
|
|
|
|
|
|
|
`${location.origin}/pyTrials` |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
}).catch((error)=>{ |
|
|
|
}) |
|
|
|
}) |
|
|
|