运行图 增加任务 添加了 起始终到车站的筛选
This commit is contained in:
parent
4eb69d03a6
commit
3d1c5dacd4
@ -79,7 +79,13 @@
|
||||
:height="230"
|
||||
@row-click="handleClick"
|
||||
>
|
||||
<el-table-column prop="startStationCode" :label="this.$t('planMonitor.startingStation')">
|
||||
<el-table-column
|
||||
prop="startStationCode"
|
||||
:label="this.$t('planMonitor.startingStation')"
|
||||
:filters="startStationFilters"
|
||||
:filter-method="filterStartStation"
|
||||
column-key="startStationCode"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.startStationCode) }}
|
||||
</template>
|
||||
@ -89,7 +95,13 @@
|
||||
{{ formatName(scope.row.startSectionCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endStationCode" :label="this.$t('planMonitor.terminal')">
|
||||
<el-table-column
|
||||
prop="endStationCode"
|
||||
:label="this.$t('planMonitor.terminal')"
|
||||
:filters="endStationFilters"
|
||||
:filter-method="filterEndStation"
|
||||
column-key="endStationCode"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.endStationCode) }}
|
||||
</template>
|
||||
@ -163,7 +175,8 @@ export default {
|
||||
stopStationMap: {},
|
||||
params: {},
|
||||
routingList: [],
|
||||
parkSectionCodeList:[],
|
||||
startStationFilters:[],
|
||||
endStationFilters:[],
|
||||
defaultStopTime: '30',
|
||||
defaultSpeedLevel: 'l3',
|
||||
addModel: {
|
||||
@ -224,6 +237,19 @@ export default {
|
||||
if (planId) {
|
||||
getRoutingList(planId).then(resp => {
|
||||
this.routingList = resp.data;
|
||||
const startStationFilterMap = {};
|
||||
const endStationFilterMap = {};
|
||||
debugger;
|
||||
this.routingList.forEach(routing=>{
|
||||
if (!startStationFilterMap[routing.startStationCode]) {
|
||||
startStationFilterMap[routing.startStationCode] = {text:formatName(routing.startStationCode), value:routing.startStationCode};
|
||||
}
|
||||
if (!endStationFilterMap[routing.endStationCode]) {
|
||||
endStationFilterMap[routing.endStationCode] = {text:formatName(routing.endStationCode), value:routing.endStationCode};
|
||||
}
|
||||
});
|
||||
this.startStationFilters = Object.values(startStationFilterMap);
|
||||
this.endStationFilters = Object.values(endStationFilterMap);
|
||||
});
|
||||
}
|
||||
|
||||
@ -273,6 +299,12 @@ export default {
|
||||
this.loadInitData(params);
|
||||
this.dialogShow = true;
|
||||
},
|
||||
filterStartStation(value, row) {
|
||||
return row.startStationCode == value;
|
||||
},
|
||||
filterEndStation(value, row) {
|
||||
return row.endStationCode == value;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
|
Loading…
Reference in New Issue
Block a user