BUG:实训未结束时点击了理论题,然后再点击实训题无法打开实训组件
This commit is contained in:
parent
eb17b90d82
commit
ac05654672
@ -1022,7 +1022,6 @@ export default class Station extends Group {
|
|||||||
handleGuideLock(model) {
|
handleGuideLock(model) {
|
||||||
const sGuideLock = store.getters['map/getDeviceByCode'](model.sGuideLockCode);
|
const sGuideLock = store.getters['map/getDeviceByCode'](model.sGuideLockCode);
|
||||||
const xGuideLock = store.getters['map/getDeviceByCode'](model.xGuideLockCode);
|
const xGuideLock = store.getters['map/getDeviceByCode'](model.xGuideLockCode);
|
||||||
console.log(model, model.sGuideMasterLock, model.xGuideMasterLock);
|
|
||||||
sGuideLock && sGuideLock.instance && sGuideLock.instance.handleGuideLock(model.sguideMasterLock);
|
sGuideLock && sGuideLock.instance && sGuideLock.instance.handleGuideLock(model.sguideMasterLock);
|
||||||
xGuideLock && xGuideLock.instance && xGuideLock.instance.handleGuideLock(model.xguideMasterLock);
|
xGuideLock && xGuideLock.instance && xGuideLock.instance.handleGuideLock(model.xguideMasterLock);
|
||||||
}
|
}
|
||||||
|
@ -115,16 +115,16 @@ export default {
|
|||||||
this.$store.dispatch('trainingNew/setExamSwitch', true);
|
this.$store.dispatch('trainingNew/setExamSwitch', true);
|
||||||
},
|
},
|
||||||
async questionSelect(index, type) {
|
async questionSelect(index, type) {
|
||||||
|
if (this.$store.state.trainingNew.trainingSwitch) {
|
||||||
|
this.$message.error('请先结束当前实训后再加载新的实训!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.currentQuestionIndex = index;
|
this.currentQuestionIndex = index;
|
||||||
this.currentQuestionType = type;
|
this.currentQuestionType = type;
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
this.$refs.theoryQuestion.doShow();
|
this.$refs.theoryQuestion.doShow();
|
||||||
this.$store.dispatch('trainingNew/setTrainingDetail', null);
|
this.$store.dispatch('trainingNew/setTrainingDetail', null);
|
||||||
} else if (type === 2) {
|
} else if (type === 2) {
|
||||||
if (this.$store.state.trainingNew.trainingSwitch) {
|
|
||||||
this.$message.error('请先结束当前实训后再加载新的实训!');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
const training = this.questionList[1][this.currentQuestionIndex];
|
const training = this.questionList[1][this.currentQuestionIndex];
|
||||||
const detailResp = await getPublishTrainingDetail(training.questionId);
|
const detailResp = await getPublishTrainingDetail(training.questionId);
|
||||||
|
Loading…
Reference in New Issue
Block a user