diff --git a/src/jmapNew/theme/xian_02/menus/menuStation.vue b/src/jmapNew/theme/xian_02/menus/menuStation.vue index cdabc0a41..faf9ce574 100644 --- a/src/jmapNew/theme/xian_02/menus/menuStation.vue +++ b/src/jmapNew/theme/xian_02/menus/menuStation.vue @@ -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('实现中......', '提示', {