From a9d00b042efc074a2ffb82e309ca1ae4db34f599 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 12 Aug 2019 10:57:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9A=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/beijing_01/menus/menuCancel.vue | 52 ++++++++--------- .../theme/chengdu_03/menus/menuCancel.vue | 56 +++++++++---------- 2 files changed, 55 insertions(+), 53 deletions(-) diff --git a/src/jmap/theme/beijing_01/menus/menuCancel.vue b/src/jmap/theme/beijing_01/menus/menuCancel.vue index 97809c807..016299b36 100644 --- a/src/jmap/theme/beijing_01/menus/menuCancel.vue +++ b/src/jmap/theme/beijing_01/menus/menuCancel.vue @@ -75,34 +75,36 @@ export default { }, initMenu() { this.menuNormal = []; - this.stationList.forEach(station => { - if (station.code === station.concentrateStationCode) { - let node = { - label: station.name, - children: [] - } + let resultCode = this.$route.path.indexOf("/display"); + if(resultCode === -1){ + this.stationList.forEach(station => { + if (station.code === station.concentrateStationCode) { + let node = { + label: station.name, + children: [] + } - this.stationList.forEach(elem => { - if (elem.visible) { - let next = elem; - while (next.code != next.concentrateStationCode || !next.concentrateStationCode) { - next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode); - } + this.stationList.forEach(elem => { + if (elem.visible) { + let next = elem; + while (next.code != next.concentrateStationCode || !next.concentrateStationCode) { + next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode); + } - if (station.code == next.code) { - node.children.push({ - code: elem.code, - label: elem.name, - handler: this.mapLocation, - }); - } - } - }) - - this.menuNormal.push(node); - } - }); + if (station.code == next.code) { + node.children.push({ + code: elem.code, + label: elem.name, + handler: this.mapLocation, + }); + } + } + }) + this.menuNormal.push(node); + } + }); + } if (this.isScreen) { this.menu = [...this.menuScreen]; } diff --git a/src/jmap/theme/chengdu_03/menus/menuCancel.vue b/src/jmap/theme/chengdu_03/menus/menuCancel.vue index f92ddd305..87d33f98e 100644 --- a/src/jmap/theme/chengdu_03/menus/menuCancel.vue +++ b/src/jmap/theme/chengdu_03/menus/menuCancel.vue @@ -76,41 +76,41 @@ export default { }; }, initMenu() { - // this.menuNormal = []; - // this.stationList.forEach(station => { - // if (station.code === station.concentrateStationCode) { - // let node = { - // label: station.name, - // children: [] - // } + this.menuNormal = []; + this.stationList.forEach(station => { + if (station.code === station.concentrateStationCode) { + let node = { + label: station.name, + children: [] + } - // this.stationList.forEach(elem => { - // if (elem.visible) { - // let next = elem; - // while (next.code != next.concentrateStationCode || !next.concentrateStationCode) { - // next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode); - // } + this.stationList.forEach(elem => { + if (elem.visible) { + let next = elem; + while (next.code != next.concentrateStationCode || !next.concentrateStationCode) { + next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode); + } - // if (station.code == next.code) { - // node.children.push({ - // code: elem.code, - // label: elem.name, - // handler: this.mapLocation, - // }); - // } - // } - // }) + if (station.code == next.code) { + node.children.push({ + code: elem.code, + label: elem.name, + handler: this.mapLocation, + }); + } + } + }) - // this.menuNormal.push(node); - // } - // }); + this.menuNormal.push(node); + } + }); if (this.isScreen) { this.menu = [...this.menuScreen]; } - // else { - // this.menu = [...this.menuNormal]; - // } + else { + this.menu = [...this.menuNormal]; + } }, doShow(point) { this.clickEvent();