南京二号线 atr 列车信息

This commit is contained in:
fan 2021-09-29 15:35:26 +08:00
parent 869840f0e2
commit fd6e7c9f09
2 changed files with 46 additions and 5 deletions

View File

@ -933,9 +933,7 @@ class Signal extends Group {
this.lamps && this.lamps[1] && this.lamps[1].hide();
}
if (this.style.Signal.lamp.faultType == 'flash') {
// this.lamps && this.lamps[0] && this.lamps[0].faultHide();
} else if (this.style.Signal.lamp.faultType == 'cross') {
if (this.style.Signal.lamp.faultType == 'cross') {
this.lamps && this.lamps[0] && this.lamps[0].setFault2Corss(false);
} else if (this.style.Signal.lamp.faultType == 'watch') {
const device = findDeviceByModelDepType(this.model, deviceType.LampFilament, 'stationCode');

View File

@ -168,11 +168,30 @@
</el-col>
</el-row>
<div>
<el-button style="width: 100px;height: 28px;margin-right: 103px;">显示列车信息</el-button>
<el-button style="width: 100px;height: 28px;margin-right: 103px;" @click="showTrainInfo">显示列车信息</el-button>
<el-button style="width: 100px;height: 28px;" @click="commit">执行</el-button>
<el-button style="width: 100px;height: 28px;" @click="reset">重设</el-button>
<el-button style="width: 100px;height: 28px;" @click="doClose">关闭</el-button>
</div>
<el-dialog
width="500px"
title="列车信息"
:visible.sync="innerVisible"
append-to-body
>
<el-table :data="showTrainList" style="width: 100%" height="500px">
<el-table-column label="列车号">
<template slot-scope="scope">
<span>{{ scope.row.destinationCode + scope.row.serviceNumber + scope.row.tripNumber.substring(2) }}</span>
</template>
</el-table-column>
<el-table-column prop="name" label="所在区段">
<template slot-scope="scope">
<span>{{ getSectionName(scope.row.code) }}</span>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</el-dialog>
</template>
@ -195,11 +214,13 @@ export default {
tableData2: [],
tableData3: [],
tableData4: [],
showTrainList: [],
input: '',
timeTerm: 'stop',
sortStationList: [],
noStopList: [],
dialogShow:false
dialogShow:false,
innerVisible: false
};
},
computed: {
@ -241,6 +262,20 @@ export default {
if (val !== 'REGULATION_OFF') {
this.timeTerm = '';
}
},
'$store.state.map.activeTrainListUpdate': function (val) {
if (val) {
const activeTrainList = this.$store.state.map.activeTrainList;
this.showTrainList = [];
activeTrainList.forEach((trainCode)=>{
const train = this.$store.getters['map/getDeviceByCode'](trainCode);
if (train && train.sectionCode) {
this.showTrainList.push(train);
}
});
} else {
this.showTrainList = [];
}
}
},
mounted() {
@ -290,6 +325,14 @@ export default {
}
}
},
getSectionName(code) {
const train = this.$store.getters['map/getDeviceByCode'](code);
const section = this.$store.getters['map/getDeviceByCode'](train.sectionCode);
return section ? section.name : '';
},
showTrainInfo() {
this.innerVisible = true;
},
doShow() {
this.initData();
this.dialogShow = true;