|
|
@ -239,17 +239,27 @@ export default { |
|
|
|
let token = this.getQueryVariable('token') |
|
|
|
let token = this.getQueryVariable('token') |
|
|
|
let cid = this.getQueryVariable('cid') |
|
|
|
let cid = this.getQueryVariable('cid') |
|
|
|
let systemId = this.getQueryVariable('systemId') |
|
|
|
let systemId = this.getQueryVariable('systemId') |
|
|
|
|
|
|
|
let projectId = this.getQueryVariable('projectId') |
|
|
|
if (token != null){ |
|
|
|
if (token != null){ |
|
|
|
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) |
|
|
|
} |
|
|
|
} |
|
|
|
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.projectId ? 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) |
|
|
|
this.getData() |
|
|
|
if (projectId !=null){ |
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
|
|
"projectId":projectId, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.selectProjects(params) |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.getData() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
@ -267,7 +277,7 @@ export default { |
|
|
|
//获取项目列表 |
|
|
|
//获取项目列表 |
|
|
|
getData(){ |
|
|
|
getData(){ |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
systemId:'11', |
|
|
|
systemId:sessionStorage.getItem('systemId'), |
|
|
|
"permissions":0, |
|
|
|
"permissions":0, |
|
|
|
} |
|
|
|
} |
|
|
|
getProjectBySystemId(params).then((data)=>{ |
|
|
|
getProjectBySystemId(params).then((data)=>{ |
|
|
@ -288,7 +298,14 @@ export default { |
|
|
|
let startTime = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s; |
|
|
|
let startTime = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s; |
|
|
|
sessionStorage.setItem('startTime', startTime) |
|
|
|
sessionStorage.setItem('startTime', startTime) |
|
|
|
this.topicList = data.data.projects; |
|
|
|
this.topicList = data.data.projects; |
|
|
|
this.projectId = this.topicList[0].projectId; |
|
|
|
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)=>{ |
|
|
|
getQueryCache(params).then((data)=>{ |
|
|
|
if(data.data.status == 200){ |
|
|
|
if(data.data.status == 200){ |
|
|
|
this.$confirm('有项目未做完,是否回到未做完的项目?', '提示', { |
|
|
|
this.$confirm('有项目未做完,是否回到未做完的项目?', '提示', { |
|
|
@ -315,17 +332,28 @@ export default { |
|
|
|
}).catch(() => { |
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
sessionStorage.setItem('projectId', this.topicList[0].projectId) |
|
|
|
let projectId = this.getQueryVariable('projectId') |
|
|
|
this.projectId = this.topicList[0].projectId |
|
|
|
if(projectId){ |
|
|
|
|
|
|
|
this.projectId = projectId |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.projectId = this.topicList[0].projectId; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
sessionStorage.setItem('projectId', this.projectId) |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
"projectId":this.topicList[0].projectId, |
|
|
|
"projectId":this.projectId, |
|
|
|
} |
|
|
|
} |
|
|
|
this.selectProjects(params) |
|
|
|
this.selectProjects(params) |
|
|
|
}); |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
}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 = { |
|
|
|
let params = { |
|
|
|
"projectId":this.topicList[0].projectId, |
|
|
|
"projectId":this.projectId, |
|
|
|
} |
|
|
|
} |
|
|
|
this.selectProjects(params) |
|
|
|
this.selectProjects(params) |
|
|
|
} |
|
|
|
} |
|
|
@ -348,9 +376,35 @@ export default { |
|
|
|
selectProjects(params){ |
|
|
|
selectProjects(params){ |
|
|
|
getProjectDetail(params).then((data)=>{ |
|
|
|
getProjectDetail(params).then((data)=>{ |
|
|
|
if(data.status == 200){ |
|
|
|
if(data.status == 200){ |
|
|
|
this.projectName = data.data.projectManage.projectName |
|
|
|
let projectId = this.getQueryVariable('projectId') |
|
|
|
this.projectManage = data.data.projectManage; |
|
|
|
if(projectId != null){ |
|
|
|
this.requires = data.data.projectJudgmentVos; |
|
|
|
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)=>{ |
|
|
|
}).catch((error)=>{ |
|
|
|
}) |
|
|
|
}) |
|
|
|