|
|
|
@ -239,18 +239,28 @@ export default { |
|
|
|
|
let token = this.getQueryVariable('token') |
|
|
|
|
let cid = this.getQueryVariable('cid') |
|
|
|
|
let systemId = this.getQueryVariable('systemId') |
|
|
|
|
let projectId = this.getQueryVariable('projectId') |
|
|
|
|
if (token != null){ |
|
|
|
|
sessionStorage.setItem('token', token) |
|
|
|
|
sessionStorage.setItem('cid', cid) |
|
|
|
|
sessionStorage.setItem('systemId', systemId) |
|
|
|
|
sessionStorage.setItem('projectId', projectId) |
|
|
|
|
} |
|
|
|
|
let tokens = sessionStorage.getItem('token') |
|
|
|
|
if(tokens || token){ |
|
|
|
|
this.projectPermissions = this.projectId ? 1 : 0 |
|
|
|
|
this.assessmentId && this.projectId && this.checkVer() |
|
|
|
|
this.codeId && this.codeIds.push(this.codeId) |
|
|
|
|
if (projectId !=null){ |
|
|
|
|
let params = { |
|
|
|
|
"projectId":projectId, |
|
|
|
|
} |
|
|
|
|
this.selectProjects(params) |
|
|
|
|
}else{ |
|
|
|
|
this.getData() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getQueryVariable(name) { |
|
|
|
@ -267,7 +277,7 @@ export default { |
|
|
|
|
//获取项目列表 |
|
|
|
|
getData(){ |
|
|
|
|
let params = { |
|
|
|
|
systemId:'11', |
|
|
|
|
systemId:sessionStorage.getItem('systemId'), |
|
|
|
|
"permissions":0, |
|
|
|
|
} |
|
|
|
|
getProjectBySystemId(params).then((data)=>{ |
|
|
|
@ -288,7 +298,14 @@ export default { |
|
|
|
|
let startTime = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s; |
|
|
|
|
sessionStorage.setItem('startTime', startTime) |
|
|
|
|
this.topicList = data.data.projects; |
|
|
|
|
if(this.topicList.length > 0){ |
|
|
|
|
let projectId = this.getQueryVariable('projectId') |
|
|
|
|
if(projectId){ |
|
|
|
|
this.projectId = projectId |
|
|
|
|
}else{ |
|
|
|
|
this.projectId = this.topicList[0].projectId; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
getQueryCache(params).then((data)=>{ |
|
|
|
|
if(data.data.status == 200){ |
|
|
|
|
this.$confirm('有项目未做完,是否回到未做完的项目?', '提示', { |
|
|
|
@ -315,17 +332,28 @@ export default { |
|
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
sessionStorage.setItem('projectId', this.topicList[0].projectId) |
|
|
|
|
this.projectId = this.topicList[0].projectId |
|
|
|
|
let projectId = this.getQueryVariable('projectId') |
|
|
|
|
if(projectId){ |
|
|
|
|
this.projectId = projectId |
|
|
|
|
}else{ |
|
|
|
|
this.projectId = this.topicList[0].projectId; |
|
|
|
|
} |
|
|
|
|
sessionStorage.setItem('projectId', this.projectId) |
|
|
|
|
let params = { |
|
|
|
|
"projectId":this.topicList[0].projectId, |
|
|
|
|
"projectId":this.projectId, |
|
|
|
|
} |
|
|
|
|
this.selectProjects(params) |
|
|
|
|
}); |
|
|
|
|
}else{ |
|
|
|
|
sessionStorage.setItem('projectId', this.topicList[0].projectId) |
|
|
|
|
let projectId = this.getQueryVariable('projectId') |
|
|
|
|
if(projectId){ |
|
|
|
|
this.projectId = projectId |
|
|
|
|
}else{ |
|
|
|
|
this.projectId = this.topicList[0].projectId; |
|
|
|
|
} |
|
|
|
|
sessionStorage.setItem('projectId', this.projectId) |
|
|
|
|
let params = { |
|
|
|
|
"projectId":this.topicList[0].projectId, |
|
|
|
|
"projectId":this.projectId, |
|
|
|
|
} |
|
|
|
|
this.selectProjects(params) |
|
|
|
|
} |
|
|
|
@ -348,9 +376,35 @@ export default { |
|
|
|
|
selectProjects(params){ |
|
|
|
|
getProjectDetail(params).then((data)=>{ |
|
|
|
|
if(data.status == 200){ |
|
|
|
|
let projectId = this.getQueryVariable('projectId') |
|
|
|
|
if(projectId != null){ |
|
|
|
|
let dates = new Date().getTime(); |
|
|
|
|
let date = new Date(dates) |
|
|
|
|
let y = date.getFullYear(); |
|
|
|
|
let MM = date.getMonth() + 1; |
|
|
|
|
MM = MM < 10 ? ('0' + MM) : MM; |
|
|
|
|
let d = date.getDate(); |
|
|
|
|
d = d < 10 ? ('0' + d) : d; |
|
|
|
|
let h = date.getHours(); |
|
|
|
|
h = h < 10 ? ('0' + h) : h; |
|
|
|
|
let m = date.getMinutes(); |
|
|
|
|
m = m < 10 ? ('0' + m) : m; |
|
|
|
|
let s = date.getSeconds(); |
|
|
|
|
s = s < 10 ? ('0' + s) : s; |
|
|
|
|
let startTime = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s; |
|
|
|
|
sessionStorage.setItem('startTime', startTime) |
|
|
|
|
this.topicList = [data.data.projectManage]; |
|
|
|
|
this.projectId = +params.projectId |
|
|
|
|
console.log(this.projectId) |
|
|
|
|
console.log(this.topicList) |
|
|
|
|
this.projectName = data.data.projectManage.projectName |
|
|
|
|
this.projectManage = data.data.projectManage; |
|
|
|
|
this.requires = data.data.projectJudgmentVos; |
|
|
|
|
}else{ |
|
|
|
|
this.projectName = data.data.projectManage.projectName |
|
|
|
|
this.projectManage = data.data.projectManage; |
|
|
|
|
this.requires = data.data.projectJudgmentVos; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
}) |
|
|
|
|