综合演练 上下行列表显示问题修复
This commit is contained in:
parent
79f3df8de6
commit
6a674f7db9
@ -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);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user