BUG:实训未结束时点击了理论题,然后再点击实训题无法打开实训组件

This commit is contained in:
fan 2023-02-09 09:40:18 +08:00
parent eb17b90d82
commit ac05654672
2 changed files with 4 additions and 5 deletions

View File

@ -1022,7 +1022,6 @@ export default class Station extends Group {
handleGuideLock(model) {
const sGuideLock = store.getters['map/getDeviceByCode'](model.sGuideLockCode);
const xGuideLock = store.getters['map/getDeviceByCode'](model.xGuideLockCode);
console.log(model, model.sGuideMasterLock, model.xGuideMasterLock);
sGuideLock && sGuideLock.instance && sGuideLock.instance.handleGuideLock(model.sguideMasterLock);
xGuideLock && xGuideLock.instance && xGuideLock.instance.handleGuideLock(model.xguideMasterLock);
}

View File

@ -115,16 +115,16 @@ export default {
this.$store.dispatch('trainingNew/setExamSwitch', true);
},
async questionSelect(index, type) {
if (this.$store.state.trainingNew.trainingSwitch) {
this.$message.error('请先结束当前实训后再加载新的实训!');
return;
}
this.currentQuestionIndex = index;
this.currentQuestionType = type;
if (type === 1) {
this.$refs.theoryQuestion.doShow();
this.$store.dispatch('trainingNew/setTrainingDetail', null);
} else if (type === 2) {
if (this.$store.state.trainingNew.trainingSwitch) {
this.$message.error('请先结束当前实训后再加载新的实训!');
return;
}
try {
const training = this.questionList[1][this.currentQuestionIndex];
const detailResp = await getPublishTrainingDetail(training.questionId);