From de30f91aeddfcb5e3767935c39a717a66963bcd9 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Fri, 13 Dec 2019 18:50:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/map.js | 2 ++ src/views/newMap/newMapdraft/mapoperate/checkboxDraft.vue | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 2bdca4314..2dc60dd28 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -144,7 +144,9 @@ class Jlmap { setCenter(deviceCode) { const device = this.mapDevice[deviceCode]; if (device && device.instance) { + console.log(device); var rect = createBoundingRect(device.instance); + console.log(rect); var dcenter = calculateDCenter(rect, { width: this.$zr.getWidth(), height: this.$zr.getHeight() }); this.setOptions(dcenter); } diff --git a/src/views/newMap/newMapdraft/mapoperate/checkboxDraft.vue b/src/views/newMap/newMapdraft/mapoperate/checkboxDraft.vue index 4f996ebd9..283f1d1f8 100644 --- a/src/views/newMap/newMapdraft/mapoperate/checkboxDraft.vue +++ b/src/views/newMap/newMapdraft/mapoperate/checkboxDraft.vue @@ -86,6 +86,7 @@ export default { deviceSelect(selected) { if (selected && selected._type.toUpperCase() == 'CheckBox'.toUpperCase()) { this.clearModelList(); + let count = 0; this.seclectDeviceList.forEach(item => { if (item._type == 'Section') { this.modelList[0].list.push(item); @@ -94,7 +95,13 @@ export default { } else if (item._type == 'Signal') { this.modelList[2].list.push(item); } + if (item.stationCode == this.seclectDeviceList[0].stationCode) { + count++; + } }); + if (count == this.seclectDeviceList.length) { + this.stationCode = this.seclectDeviceList[0].stationCode; + } } }, clearModelList() {