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