diff --git a/src/jmapNew/theme/xian_02/menus/dialog/trainDestination.vue b/src/jmapNew/theme/xian_02/menus/dialog/trainDestination.vue index d74622dca..0d66de4b9 100644 --- a/src/jmapNew/theme/xian_02/menus/dialog/trainDestination.vue +++ b/src/jmapNew/theme/xian_02/menus/dialog/trainDestination.vue @@ -50,7 +50,7 @@ -
{{ item.name }}-- {{ item.active }}
+
{{ item.name }}
@@ -83,10 +83,10 @@ export default { selected: null, optionObject: {}, typeList: [ - { label: '往返运营(环路)', value: 'NORMAL_OPERATION' }, - { label: '末班运营(交路)', value: 'LAST_OPERATION' }, - { label: '非运营(交路)', value: 'NON_OPERATION' }, - { label: '末班非运营(交路)', value: 'LAST_NON_OPERATION' } + { label: '往返运营', value: 'NORMAL_OPERATION' }, + { label: '末班运营', value: 'LAST_OPERATION' }, + { label: '非运营', value: 'NON_OPERATION' }, + { label: '末班非运营', value: 'LAST_NON_OPERATION' } ], addModel: { groupNumber: '', @@ -95,6 +95,7 @@ export default { trainDestinationCode: '', operation: 'NORMAL_OPERATION' }, + trainDestinationCode: '', dialogShow: false, loading: false }; @@ -132,8 +133,9 @@ export default { if (!this.dialogShow) { this.addModel.groupNumber = selected.groupNumber; this.addModel.serviceNumber = selected.serviceNumber; - this.addModel.destinationCode = selected.destinationCode; + this.addModel.destinationCode = parseInt(selected.destinationCode) || selected.destinationCode; this.addModel.trainDestinationCode = ''; + this.trainDestinationCode = ''; } this.dialogShow = true; this.$nextTick(function () { @@ -167,6 +169,7 @@ export default { }); } item.active = true; + this.trainDestinationCode = item.code; }, commit() { const operate = { @@ -174,7 +177,7 @@ export default { operation: OperationEvent.Train.destinationTrainId.menu.operation, cmdType: CMD.TrainWindow.CMD_TRAIN_SET_HEAD, param: { - destinationCode: this.addModel.trainDestinationCode, + destinationCode: this.trainDestinationCode, serviceNumber: this.addModel.serviceNumber } }; @@ -188,7 +191,7 @@ export default { }).catch(() => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(); }); }, cancel() { diff --git a/src/store/modules/exam.js b/src/store/modules/exam.js index b9e4ce47c..989b6197c 100644 --- a/src/store/modules/exam.js +++ b/src/store/modules/exam.js @@ -74,15 +74,15 @@ const exam = { actions: { start({ commit }) { commit('setStarted', true); - commit('setSuspend', false); - commit('setUsedTime', 0); - commit('countUsedTime'); + // commit('setSuspend', false); + // commit('setUsedTime', 0); + // commit('countUsedTime'); }, over({ commit }) { commit('setStarted', false); - commit('setSuspend', true); - commit('setUsedTime', 0); - commit('stopCountTime'); + // commit('setSuspend', true); + // commit('setUsedTime', 0); + // commit('stopCountTime'); }, isOver() { const trainingList = store.getters['trainingList/trainingList']; diff --git a/src/views/newMap/displayNew/exam/index.vue b/src/views/newMap/displayNew/exam/index.vue index 6b29be301..76903fba3 100644 --- a/src/views/newMap/displayNew/exam/index.vue +++ b/src/views/newMap/displayNew/exam/index.vue @@ -98,6 +98,7 @@ export default { this.isDisable = true; startTrainingNew({ id: this.$route.query.trainingId }, this.group).then(response => { this.$store.dispatch('training/examModeStart'); + this.$store.dispatch('exam/start'); this.$store.dispatch('map/clearJlmapTrainView').then(() => { this.$store.dispatch('training/setMapDefaultState').then(() => { this.$store.dispatch('training/emitTipFresh'); @@ -117,7 +118,7 @@ export default { end() { if (this.$route.query.trainingId) { this.isDisable = false; - if (this.$store.state.training.started) { + if (this.$store.state.exam.started) { const model = { id: this.$route.query.examQuestionId, usedTime: this.$store.state.training.usedTime, @@ -125,6 +126,7 @@ export default { }; this.$store.dispatch('training/end', null); + this.$store.dispatch('exam/over'); finishOneExamQuestion(model).then(response => { this.$store.dispatch('training/setStopCountTime'); this.$store.dispatch('training/emitTipFresh');