Browse Source

fix issue

tags/v1.22.9.2^2
zhoupzh 3 years ago
parent
commit
aedab3d28a
1 changed files with 14 additions and 6 deletions
  1. +14
    -6
      web_src/js/components/Model.vue

+ 14
- 6
web_src/js/components/Model.vue View File

@@ -164,6 +164,7 @@ export default {
defaultAvatarName:'Ghost',
data:'',
timer:null,
timerFlag:false,
};
},
methods: {
@@ -390,6 +391,13 @@ export default {
return "Other"
}
},
intervalModelist(){
if(!this.timerFlag){
this.timer = setInterval(()=>{
this.getModelList()
}, 10000);
}
},
getModelList(){
let countStatus = 0
try {
@@ -430,10 +438,12 @@ export default {
this.totalNum = res.data.count
if(countStatus===this.tableData.length){
clearInterval(this.timer);
this.timer=null
this.timerFlag = false
}else{
this.intervalModelist()
this.timerFlag = true
}
// if(res.data.count===1 && res.data.data[0].VersionCount===1){
// location.reload()
// }
}).catch((err)=>{console.log(err)})
}catch (e) {
console.log(e)
@@ -478,9 +488,7 @@ export default {
},
mounted() {
this.submitId = document.getElementById("submitId")
this.timer = setInterval(()=>{
this.getModelList()
}, 10000);
this.intervalModelist()
this.url = location.href.split('show_model')[0]
this.submitId.addEventListener("click", this.submit)
this.url_create_newVersion = this.url + 'create_model'


Loading…
Cancel
Save