西安二号线折返策略代码调整
This commit is contained in:
parent
5e9a3220c3
commit
5410cb037c
@ -95,15 +95,15 @@ export default {
|
||||
children: [
|
||||
{
|
||||
label: '优先折返',
|
||||
handler: this.undeveloped
|
||||
handler: this.setPriorityStrategy
|
||||
},
|
||||
{
|
||||
label: '直线折返',
|
||||
handler: this.undeveloped
|
||||
handler: this.setLineStrategy
|
||||
},
|
||||
{
|
||||
label: '侧线折返',
|
||||
handler: this.undeveloped
|
||||
handler: this.setLateralStrategy
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -162,6 +162,9 @@ export default {
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'tbStrategyList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
@ -267,6 +270,31 @@ export default {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
setPriorityStrategy() {
|
||||
this.getStrategyByStation('优先折返');
|
||||
},
|
||||
setLineStrategy() {
|
||||
this.getStrategyByStation('直线折返');
|
||||
},
|
||||
setLateralStrategy() {
|
||||
this.getStrategyByStation('侧线折返');
|
||||
},
|
||||
getStrategyByStation(type) {
|
||||
const tbStrategy = this.tbStrategyList.find(strategy=>{
|
||||
return strategy.stationCode == this.selected.code;
|
||||
});
|
||||
if (tbStrategy) {
|
||||
const strategy = tbStrategy.optionList.find(each=>{
|
||||
return each.label == type;
|
||||
});
|
||||
if (strategy) {
|
||||
commitOperate(menuOperate.StationControl.setBackStrategy, {stationCode: this.selected.stationCode, id:strategy.id}, 3).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
|
Loading…
Reference in New Issue
Block a user