20240205
luoJunYong.123 3 years ago
parent defb6f9082
commit da2f00496a
  1. 79
      src/components/case/index.vue

@ -191,14 +191,76 @@ export default {
sessionStorage.setItem('assessmentId', assessmentId) sessionStorage.setItem('assessmentId', assessmentId)
sessionStorage.setItem('token', token) sessionStorage.setItem('token', token)
if(process.env.NODE_ENV === "development") { if(process.env.NODE_ENV === "development") {
this.intervalJudge = setInterval(() => {
const data = {
id: parseInt(sessionStorage.getItem('assessmentId')),
token: parseInt(sessionStorage.getItem('token'))
}
//
let params = {
"systemId":sessionStorage.getItem('systemId'),
"cId":sessionStorage.getItem('cid'),
"permissions":0,
}
getProjectBySystemId(params).then((data)=>{
if(data.status == 200){
//
if(data.data.projects.length !== this.topicList.length) {
this.topicList = data.data.projects
this.selectProjects({
projectId: this.topicList[0].projectId
})
if(this.topicList.length > 0){
this.gotuQueryVariable()
}
this.getQueryCaches()
}
}
}).catch((error)=>{
})
checkTest(data).then(data => {
const { data: { data: { status } } } = data
if(status !== 1) {
this.popContainer = true
clearInterval(this.intervalJudge)
this.$message({
showClose: true,
message: '考核已结束',
type: 'success'
});
}else {
}
})
}, 4000)
}else { }else {
this.intervalJudge = setInterval(() => { this.intervalJudge = setInterval(() => {
const data = { const data = {
id: parseInt(sessionStorage.getItem('assessmentId')), id: parseInt(sessionStorage.getItem('assessmentId')),
token: parseInt(sessionStorage.getItem('token')) token: parseInt(sessionStorage.getItem('token'))
} }
this.getData() //
let params = {
"systemId":sessionStorage.getItem('systemId'),
"cId":sessionStorage.getItem('cid'),
"permissions":0,
}
getProjectBySystemId(params).then((data)=>{
if(data.status == 200){
//
this.getBeginTime()
if(data.data.projects.length !== this.topicList.length) {
this.topicList = data.data.projects
this.gotuQueryVariable()
}
}
}).catch((error)=>{
})
checkTest(data).then(data => { checkTest(data).then(data => {
const { data: { data: { status } } } = data const { data: { data: { status } } } = data
if(status !== 1) { if(status !== 1) {
@ -324,20 +386,23 @@ export default {
"permissions":0, "permissions":0,
} }
getProjectBySystemId(params).then((data)=>{ getProjectBySystemId(params).then((data)=>{
console.log('---topicList')
console.log(data)
if(data.status == 200){ if(data.status == 200){
console.log(data.data.projects)
// //
this.getBeginTime() this.getBeginTime()
this.topicList = [] this.topicList = []
for (var i=0;i<data.data.projects.length;i++){ for (var i=0;i<data.data.projects.length;i++){
if (data.data.projects[i].projectId){ if (data.data.projects[i].projectId){
this.topicList.push(data.data.projects[i]) this.topicList.push(data.data.projects[i])
} }
} }
if(this.topicList.length > 0){ if(this.topicList.length > 0){
this.selectProjects({
projectId: this.topicList[0].projectId
})
this.gotuQueryVariable() this.gotuQueryVariable()
//
} }
this.getQueryCaches() this.getQueryCaches()
} }
@ -423,7 +488,7 @@ export default {
if(projectId != null){ if(projectId != null){
// //
this.getBeginTime() this.getBeginTime()
this.topicList = [data.data.projectManage]; // this.topicList = [data.data.projectManage];
this.projectId = +params.projectId this.projectId = +params.projectId
this.projectName = data.data.projectManage.projectName this.projectName = data.data.projectManage.projectName
this.projectManage = data.data.projectManage; this.projectManage = data.data.projectManage;
@ -460,9 +525,9 @@ export default {
//线 //线
// location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId // location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
// //
location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId // location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
// //
// location.href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId location.href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId
} }
}).catch((error)=>{ }).catch((error)=>{
}) })

Loading…
Cancel
Save