From 5410cb037c6fa1ef7330129e7cd13d71ada37c15 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 24 Aug 2020 17:52:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A5=BF=E5=AE=89=E4=BA=8C=E5=8F=B7=E7=BA=BF?= =?UTF-8?q?=E6=8A=98=E8=BF=94=E7=AD=96=E7=95=A5=E4=BB=A3=E7=A0=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/xian_02/menus/menuStation.vue | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) 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('实现中......', '提示', {