进路序列、股道视图调整

This commit is contained in:
fan 2022-07-08 17:16:04 +08:00
parent 19f2b8c290
commit 1bdfe33623
2 changed files with 26 additions and 1 deletions

View File

@ -157,6 +157,10 @@ export default {
const offset = val ? 162 : 0;
EventBus.$emit('setMenuButtonPosition', offset);
},
'$store.state.socket.simulationReset': function (val) {
this.sequenceMap = {};
this.sequenceList = [];
},
'$store.state.socket.railCtcStatusMsg': function (val) {
if (val && val.length) {
val.forEach(item => {
@ -169,6 +173,11 @@ export default {
}
});
}
if (item && item.routeSequence && item.routeSequence.deletedLineIds && item.routeSequence.deletedLineIds.length) {
item.routeSequence.deletedLineIds.forEach(elem => {
delete this.sequenceMap[elem];
});
}
});
this.sequenceList = [];
for (const key in this.sequenceMap) {

View File

@ -331,7 +331,6 @@ export default {
{label: '发车报点', value: 'DEPARTURE'},
{label: '流程终止', value: 'FINISH'}
],
stationDataMap: {},
sequenceMap: {},
sequenceList: [],
readOnlyMap: {},
@ -346,6 +345,13 @@ export default {
])
},
watch: {
'$store.state.socket.simulationReset': function (val) {
this.sequenceMap = {};
this.sequenceList = [];
this.readOnlyMap = {};
this.standTrackSectionMap = {};
this.trackList = [];
},
'$store.state.socket.railCtcStatusMsg': function (val) {
if (val && val.length) {
val.forEach(item => {
@ -375,6 +381,16 @@ export default {
}
}
}
if (item && item.trackView && item.trackView.deletedMap) {
for (const key in item.trackView.deletedMap) {
if (this.standTrackSectionMap[key] && item.trackView.deletedMap[key] && item.trackView.deletedMap[key].length) {
const sectionMap = this.standTrackSectionMap[key];
item.trackView.deletedMap[key].forEach(trainCode => {
delete sectionMap[trainCode];
});
}
}
}
if (item && item.trackView && item.trackView.sectionOccupiedMap) {
for (const key in item.trackView.sectionOccupiedMap) {
if (this.standTrackSectionMap[key]) {