This commit is contained in:
sunzhenyu 2021-07-16 14:57:23 +08:00
commit 91a0d2a574
4 changed files with 11 additions and 8 deletions

View File

@ -59,7 +59,7 @@ class EMouse extends Group {
}
const physicalSection = store.getters['map/getDeviceByCode'](this.device.model.model.physicalCode);
let closeDoorTip = '';
if (physicalSection.standTrack) {
if (physicalSection && physicalSection.standTrack) {
const stationStand = store.state.map.map.stationStandList.find(item => item.standTrackCode === physicalSection.code);
if ((stationStand.right && this.device.model.right) || (!stationStand.right && !this.device.model.right)) {
if (stationStand.inside) {

View File

@ -455,7 +455,7 @@ export default class Train extends Group {
}
setShowMode() { }
initShowStation(model) {
if (model.trainWindowModel && model.trainWindowModel.instance && !store.getters['map/checkDeviceShow'](model.trainWindowModel.instance.stationCode, model.sectionModel.code)) {
if (model.trainWindowModel && model.trainWindowModel.instance && model.trainWindowModel.instance.stationCode && !store.getters['map/checkDeviceShow'](model.trainWindowModel.instance.stationCode, model.sectionModel.code)) {
this.eachChild(item => {
item.hide();
});

View File

@ -814,7 +814,7 @@ export default {
over: true
};
if (this.trainOperateType === 'update') {
params.groupNumber = this.trainModel.groupNumber;
params.groupNumber = this.trainModel.groupNumber || this.trainModel.code;
params.serviceNumber = '0' + this.formModelNewTrip.slice(3, 6);
params.tripNumber = this.formModelNewTrip.slice(6, 8);
step.cmdType = CMD.TrainWindow.CMD_TRAIN_SET_PLAN;
@ -831,12 +831,12 @@ export default {
step.operation = OperationEvent.Train.addTrainId.menu.operation;
step.param = params;
} else if (this.trainOperateType === 'delete') {
params.groupNumber = this.trainModel.groupNumber;
params.groupNumber = this.trainModel.groupNumber || this.trainModel.code;
step.cmdType = CMD.TrainWindow.CMD_TRAIN_REMOVE_TRAIN_TRACE;
step.operation = OperationEvent.Train.delTrainId.menu.operation;
step.param = params;
} else if (this.trainOperateType === 'move') {
params.groupNumber = this.trainModel.groupNumber;
params.groupNumber = this.trainModel.groupNumber || this.trainModel.code;
params.sectionCode = this.formModelNewSection;
step.cmdType = CMD.TrainWindow.CMD_TRAIN_MOVE_TRAIN_TRACE;
step.operation = OperationEvent.Train.moveTrainId.menu.operation;

View File

@ -43,6 +43,7 @@
</div>
</template>
<script>
import { mapGetters } from 'vuex';
export default {
name: 'MenuTrainList',
data() {
@ -57,7 +58,8 @@ export default {
computed: {
lineCode() {
return this.$route.query.lineCode;
}
},
...mapGetters('map', ['mapConfig'])
},
watch:{
'$store.state.map.activeTrainListUpdate': function (val) {
@ -69,9 +71,10 @@ export default {
activeTrainList.forEach((trainCode)=>{
// train.serviceNumber != '' && train.serviceNumber != undefined &&
const train = this.$store.getters['map/getDeviceByCode'](trainCode);
if (train && !train.right && train.sectionCode) {
const isUpDirection = this.mapConfig.upRight ? train.right : !train.right
if (train && isUpDirection && train.sectionCode) {
this.topTrainList.push(train);
} else if (train && train.right && train.sectionCode) {
} else if (train && !isUpDirection && train.sectionCode) {
this.bottomTrainList.push(train);
}
});