一键生成实训代码调整

This commit is contained in:
joylink_cuiweidong 2020-04-09 09:42:35 +08:00
parent 78995be06f
commit bcca3c5858

View File

@ -47,6 +47,7 @@ export default {
ControlConvertMenu: [],
TrainWindow: []
},
isLeaving:false,
trainingTypeMap: {},
pagerConfig: {
pageSize: 'pageSize',
@ -173,6 +174,9 @@ export default {
mounted() {
this.interCheckGenerateStatus();
},
beforeDestroy() {
this.isLeaving = true;
},
methods: {
async loadInitData(queryData) {
this.mapIdList = [];
@ -223,11 +227,15 @@ export default {
this.queryList.actions.push({ text: this.$t('lesson.generateTraining'), btnCode: 'employee_auto', handler: this.autoMaticTrainging, disabled:false });
}
setTimeout(() => {
if (!this.isLeaving) {
this.interCheckGenerateStatus(this.$route.query.mapId, false);
}
}, 30000);
}).catch(()=>{
setTimeout(() => {
if (!this.isLeaving) {
this.interCheckGenerateStatus(this.$route.query.mapId, false);
}
}, 30000);
});
},