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('token', token)
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 {
this.intervalJudge = setInterval(() => {
const data = {
id: parseInt(sessionStorage.getItem('assessmentId')),
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 => {
const { data: { data: { status } } } = data
if(status !== 1) {
@ -324,20 +386,23 @@ export default {
"permissions":0,
}
getProjectBySystemId(params).then((data)=>{
console.log('---topicList')
console.log(data)
if(data.status == 200){
console.log(data.data.projects)
//
this.getBeginTime()
this.topicList = []
for (var i=0;i<data.data.projects.length;i++){
if (data.data.projects[i].projectId){
this.topicList.push(data.data.projects[i])
}
}
if(this.topicList.length > 0){
this.selectProjects({
projectId: this.topicList[0].projectId
})
this.gotuQueryVariable()
//
}
this.getQueryCaches()
}
@ -423,7 +488,7 @@ export default {
if(projectId != null){
//
this.getBeginTime()
this.topicList = [data.data.projectManage];
// this.topicList = [data.data.projectManage];
this.projectId = +params.projectId
this.projectName = data.data.projectManage.projectName
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://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)=>{
})

Loading…
Cancel
Save