Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
878b62e494
@ -50,7 +50,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="option_box">
|
||||
<div v-for="(item, index) in optionObject[addModel.operation]" :key="index" class="content_list" :class="{'active': item.active}" @click="handleOption(item)">{{ item.name }}-- {{ item.active }}</div>
|
||||
<div v-for="(item, index) in optionObject[addModel.operation]" :key="index" class="content_list" :class="{'active': item.active}" @click="handleOption(item)">{{ item.name }}</div>
|
||||
</el-row>
|
||||
<el-row class="option_result_box" />
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -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() {
|
||||
|
@ -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'];
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user