大铁项目 调度台行车计划 修改到出入口

This commit is contained in:
joylink_cuiweidong 2022-07-06 18:00:48 +08:00
parent 1984dc807c
commit cbe0203a66
2 changed files with 62 additions and 10 deletions

View File

@ -246,8 +246,8 @@ export default {
} }
}, },
methods: { methods: {
doShow({filterSectionList, mapStationDirectionMap}) { doShow({filterSectionList, mapStationDirectionList}) {
this.mapStationDirectionList = Object.values(mapStationDirectionMap); this.mapStationDirectionList = mapStationDirectionList;
this.filterSectionList = filterSectionList; this.filterSectionList = filterSectionList;
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {

View File

@ -67,7 +67,22 @@
<el-table-column prop="arriveDirectionCode" label="接车口"> <el-table-column prop="arriveDirectionCode" label="接车口">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.arriveDirectionCode" class="accessName" :title="scope.row.arriveDirectionCode"> <div v-if="scope.row.arriveDirectionCode" class="accessName" :title="scope.row.arriveDirectionCode">
{{ mapStationDirectionData[scope.row.arriveDirectionCode].name }} <!-- {{ mapStationDirectionData[scope.row.arriveDirectionCode].name }} -->
<el-select
v-model="tableData[scope.$index].arriveDirectionCode"
placeholder=""
size="mini"
:disabled="scope.row.status==-1"
popper-class="stationSelect"
@change="changeArriveDirectionCode($event,scope.row,scope.$index)"
>
<el-option
v-for="item in mapStationDirectionData.filter(station=>{return station.stationCode == scope.row.stationCode})"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -75,7 +90,22 @@
<el-table-column prop="departDirectionCode" label="发车口"> <el-table-column prop="departDirectionCode" label="发车口">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.departDirectionCode" class="accessName" :title="scope.row.departDirectionCode"> <div v-if="scope.row.departDirectionCode" class="accessName" :title="scope.row.departDirectionCode">
{{ mapStationDirectionData[scope.row.departDirectionCode].name }} <!-- {{ mapStationDirectionData[scope.row.departDirectionCode].name }} -->
<el-select
v-model="tableData[scope.$index].departDirectionCode"
placeholder=""
size="mini"
:disabled="scope.row.status==-1"
popper-class="stationSelect"
@change="changeDepartDirectionCode($event,scope.row,scope.$index)"
>
<el-option
v-for="item in mapStationDirectionData.filter(station=>{return station.stationCode == scope.row.stationCode})"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -177,6 +207,7 @@ export default {
isShow:false, isShow:false,
height: this.$store.state.app.height - 37, height: this.$store.state.app.height - 37,
filterSectionList:[], filterSectionList:[],
mapStationDirectionData:[],
// filterSectionMap:{}, // filterSectionMap:{},
tableData:[], tableData:[],
group:'', group:'',
@ -188,10 +219,7 @@ export default {
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'sectionList' 'sectionList'
]), ])
mapStationDirectionData() {
return this.$store.state.map.mapStationDirectionData;
}
}, },
watch:{ watch:{
// '$store.state.socket.railwaySimulationRpChange': function (val) { // '$store.state.socket.railwaySimulationRpChange': function (val) {
@ -222,6 +250,7 @@ export default {
}, },
doShow() { doShow() {
this.loadFilterSectionMap(); this.loadFilterSectionMap();
this.mapStationDirectionData = Object.values(this.$store.state.map.mapStationDirectionData);
// this.tableData = []; // this.tableData = [];
// this.loadData(); // this.loadData();
this.isShow = true; this.isShow = true;
@ -254,7 +283,7 @@ export default {
changeDepartRunPlan(event, row, index) { changeDepartRunPlan(event, row, index) {
this.modifyDispatcherLogerRpSection(row, row.departSectionCode, 'D'); this.modifyDispatcherLogerRpSection(row, row.departSectionCode, 'D');
}, },
// modifyDispatcherLogerRpDirection //
changeArrivePlanTime(event, row, index) { changeArrivePlanTime(event, row, index) {
this.modifyDispatcherLogerRpPlanTime(row, row.arrivePlanTime, 'R'); this.modifyDispatcherLogerRpPlanTime(row, row.arrivePlanTime, 'R');
@ -262,6 +291,29 @@ export default {
changeDepartPlanTime(event, row, index) { changeDepartPlanTime(event, row, index) {
this.modifyDispatcherLogerRpPlanTime(row, row.departPlanTime, 'D'); this.modifyDispatcherLogerRpPlanTime(row, row.departPlanTime, 'D');
}, },
changeArriveDirectionCode(event, row, index) {
this.modifyDispatcherLogerRpDirection(row, row.arriveDirectionCode, 'R');
},
changeDepartDirectionCode(event, row, index) {
this.modifyDispatcherLogerRpDirection(row, row.departDirectionCode, 'D');
},
//
modifyDispatcherLogerRpDirection(row, directionCode, type) {
const params = {stationCode:row.stationCode, runPlanCode:row.runPlanCode, directionCode:directionCode, model:type};
commitOperate(menuOperate.CTC.modifyDispatcherLogerRpDirection, params, 3).then(({valid, response})=>{
if (valid) {
const reslut = response.data;
this.tableData.map(data=>{
if (data.stationCode == reslut.stationCode && data.runPlanCode == reslut.runPlanCode) {
data.arriveDirectionCode = reslut.arriveDirectionCode;
data.departDirectionCode = reslut.departDirectionCode;
}
});
}
}).catch(() => {
// this.$message.error('');
});
},
// //
modifyDispatcherLogerRpPlanTime(row, planTime, type) { modifyDispatcherLogerRpPlanTime(row, planTime, type) {
const params = {stationCode:row.stationCode, runPlanCode:row.runPlanCode, planTime:planTime, model:type}; const params = {stationCode:row.stationCode, runPlanCode:row.runPlanCode, planTime:planTime, model:type};
@ -336,7 +388,7 @@ export default {
addRunplan() { addRunplan() {
this.$refs.addDispatcherLogerRunplan.doShow({ this.$refs.addDispatcherLogerRunplan.doShow({
filterSectionList:this.filterSectionList, filterSectionList:this.filterSectionList,
mapStationDirectionMap:this.mapStationDirectionData mapStationDirectionList:this.mapStationDirectionData
}); });
}, },
selectedTripNumber(row, column, cell, event) { selectedTripNumber(row, column, cell, event) {