This commit is contained in:
fan 2022-06-30 09:04:59 +08:00
commit 19b9803342
3 changed files with 25 additions and 5 deletions

View File

@ -54,7 +54,8 @@
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else-if="scope.row.arriveSectionCode">{{ scope.row.arriveSectionCode+'['+scope.row.oldArriveSectionCode+']' }}</div>
<div v-else-if="scope.row.status==1">{{ sectionMap[scope.row.arriveSectionCode] }}</div>
<div v-else-if="scope.row.arriveSectionCode">{{ sectionMap[scope.row.arriveSectionCode]+'['+sectionMap[scope.row.oldArriveSectionCode]+']' }}</div>
</template>
</el-table-column>
<el-table-column
@ -74,7 +75,9 @@
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else-if="scope.row.departSectionCode">{{ scope.row.departSectionCode+'['+scope.row.oldDepartSectionCode+']' }}</div>
<!-- {{ sectionMap }} -->
<div v-else-if="scope.row.status==1">{{ sectionMap[scope.row.departSectionCode] }}</div>
<div v-else-if="scope.row.departSectionCode">{{ sectionMap[scope.row.departSectionCode]+'['+sectionMap[scope.row.oldDepartSectionCode]+']' }}</div>
</template>
</el-table-column>
<el-table-column
@ -99,6 +102,7 @@
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
@ -108,10 +112,14 @@ export default {
dialogShow:false,
loading: false,
tableData:[],
sectionMap:{},
updateTime:''
};
},
computed: {
...mapGetters('map', [
'sectionList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -126,10 +134,14 @@ export default {
}
},
methods:{
doShow(currentRailwaySimulationRunplan, filterSectionList) {
doShow(currentRailwaySimulationRunplan) {
this.stationCode = currentRailwaySimulationRunplan.stationCode;
this.tableData = currentRailwaySimulationRunplan.dataList;
this.updateTime = currentRailwaySimulationRunplan.updateTime;
this.sectionMap = {};
this.sectionList.forEach(section=>{
if (section.standTrack) { this.sectionMap[section.code] = section.name; }
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');

View File

@ -657,7 +657,7 @@ export default {
stageRunplan() {
if (document.getElementById('stageRunplan').className.includes('active')) {
const stationCode = this.$store.state.training.roleDeviceCode;
this.$refs.stageRunplan.doShow(this.currentRailwaySimulationRunplan[stationCode], this.filterSectionList);
this.$refs.stageRunplan.doShow(this.currentRailwaySimulationRunplan[stationCode]);
}
},
focusDepartRunPlan(event, row) {
@ -713,6 +713,8 @@ export default {
closeStageFlash() {
const sendRunplan = document.getElementById('stageRunplan').className;
document.getElementById('stageRunplan').className = sendRunplan.replace('active', '');
const stationCode = this.$store.state.training.roleDeviceCode;
this.$store.dispatch('socket/deleteRailwaySimulationRunplan', stationCode);
},
selectedTripNumber(row, column, cell, event) {
if (column.property == 'tripNumber') {

View File

@ -229,7 +229,7 @@ function handle(state, data) {
parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr;
}
const code = element.stationCode + '' + element.code;
state.railCtcRunplanInitMsg[code] = copyAssign(state.railCtcRunplanInitMsg[code], element);
state.railCtcRunplanInitMsg[code] = copyAssign(state.railCtcRunplanInitMsg[code] || {}, element);
});
state.railCtcRunplanChange++;
break;
@ -533,6 +533,9 @@ const socket = {
},
setIscsStatePisMessages: (state, speed) => {
state.iscsStatePisMessages = speed;
},
deleteRailwaySimulationRunplan: (state, stationCode) => {
delete state.railwaySimulationRunplanSendMap[stationCode];
}
},
@ -627,6 +630,9 @@ const socket = {
},
handleIscsPisState:({ commit }, state) => {
commit('setIscsStatePisMessages', state);
},
deleteRailwaySimulationRunplan:({ commit }, stationCode) => {
commit('deleteRailwaySimulationRunplan', stationCode);
}
}
};