Merge branch'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
04e94035be
@ -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