代码调整

This commit is contained in:
joylink_cuiweidong 2022-06-29 16:23:58 +08:00
parent 2ec521603c
commit 1e2f294185
2 changed files with 13 additions and 9 deletions

View File

@ -54,8 +54,8 @@
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else-if="scope.row.status==1">{{ sectionMap[scope.row.arriveSectionCode].name }}</div>
<div v-else-if="scope.row.arriveSectionCode">{{ sectionMap[scope.row.arriveSectionCode].name+'['+sectionMap[scope.row.oldArriveSectionCode].name+']' }}</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
@ -75,8 +75,9 @@
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else-if="scope.row.status==1">{{ sectionMap[scope.row.departSectionCode].name }}</div>
<div v-else-if="scope.row.departSectionCode">{{ sectionMap[scope.row.departSectionCode].name+'['+sectionMap[scope.row.oldDepartSectionCode].name+']' }}</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
@ -101,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 {
@ -115,6 +117,9 @@ export default {
};
},
computed: {
...mapGetters('map', [
'sectionList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -129,19 +134,18 @@ export default {
}
},
methods:{
doShow(currentRailwaySimulationRunplan, filterSectionList) {
doShow(currentRailwaySimulationRunplan) {
this.stationCode = currentRailwaySimulationRunplan.stationCode;
this.tableData = currentRailwaySimulationRunplan.dataList;
this.updateTime = currentRailwaySimulationRunplan.updateTime;
this.sectionMap = {};
filterSectionList.forEach(section=>{
this.sectionMap[section.code] = section.name;
this.sectionList.forEach(section=>{
if (section.standTrack) { this.sectionMap[section.code] = section.name; }
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
// filterSectionList
},
doClose() {
this.loading = false;

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) {