From 744ea986c01ddbde63ee2d83d92807ca1eb3ce97 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 30 Apr 2020 14:50:27 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=98=E5=9B=BE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newMap/newMapdraft/dataRelation/index.vue | 17 ++++++++++------- src/views/newMap/newMapdraft/index.vue | 3 --- .../newMapdraft/mapoperate/ControlDraft.vue | 5 +++-- .../newMapdraft/mapoperate/ImageControl.vue | 5 +++-- .../newMap/newMapdraft/mapoperate/arrow.vue | 5 +++-- .../newMapdraft/mapoperate/controlLamp.vue | 5 +++-- .../newMap/newMapdraft/mapoperate/counter.vue | 5 +++-- .../newMapdraft/mapoperate/delayunlock.vue | 5 +++-- .../newMapdraft/mapoperate/espDraft.vue | 5 +++-- .../newMap/newMapdraft/mapoperate/index.vue | 4 ++-- .../newMapdraft/mapoperate/lcControl.vue | 5 +++-- .../newMap/newMapdraft/mapoperate/line.vue | 5 +++-- .../mapoperate/outFrameControl.vue | 5 +++-- .../newMapdraft/mapoperate/psdDraft.vue | 13 +++++++------ .../newMapdraft/mapoperate/section/index.vue | 19 +++++++++++++------ .../newMapdraft/mapoperate/signal/index.vue | 7 ++++--- .../newMapdraft/mapoperate/splitStation.vue | 5 +++-- .../newMap/newMapdraft/mapoperate/station.vue | 7 ++++--- .../newMapdraft/mapoperate/stationstand.vue | 7 ++++--- .../newMapdraft/mapoperate/switch/index.vue | 7 ++++--- .../newMap/newMapdraft/mapoperate/text.vue | 5 +++-- .../newMapdraft/mapoperate/trainwindow.vue | 5 +++-- .../newMapdraft/mapoperate/zcControl.vue | 5 +++-- 23 files changed, 90 insertions(+), 64 deletions(-) diff --git a/src/views/newMap/newMapdraft/dataRelation/index.vue b/src/views/newMap/newMapdraft/dataRelation/index.vue index 142187a75..0926b567e 100644 --- a/src/views/newMap/newMapdraft/dataRelation/index.vue +++ b/src/views/newMap/newMapdraft/dataRelation/index.vue @@ -123,7 +123,7 @@ export default { return { enabledTab: 'route', oldDevice: null, - lazy: false, + lazy: true, enabledTabMenu: { route: 'routeOperate', routing: 'routingOperate', @@ -137,6 +137,7 @@ export default { }; }, mounted() { + this.initLoad(); }, methods: { showMap() { @@ -163,18 +164,20 @@ export default { this.$emit('setCenter', code); }, drawMap() { - this.$refs.routeOperate.batchSectionListFocus(false); - this.$refs.signalOperate.batchSectionListFocus(false); - this.$refs.runLevelOperate.batchSectionListFocus(false); + this.$refs.routeOperate && this.$refs.routeOperate.batchSectionListFocus(false); + this.$refs.signalOperate && this.$refs.signalOperate.batchSectionListFocus(false); + this.$refs.runLevelOperate && this.$refs.runLevelOperate.batchSectionListFocus(false); this.$emit('selectView', 'draft'); }, tabBeforeLeave(activeName, oldActiveName) { - if (activeName === 'route' || activeName === 'signal' || activeName == 'runLevel') { - this.$refs[this.enabledTabMenu[activeName]].batchSectionListFocus(true); - } if (oldActiveName === 'route' || oldActiveName === 'signal' || oldActiveName == 'runLevel') { this.$refs[this.enabledTabMenu[oldActiveName]].batchSectionListFocus(false); } + if (activeName === 'route' || activeName === 'signal' || activeName == 'runLevel') { + this.$nextTick(() => { + this.$refs[this.enabledTabMenu[activeName]].batchSectionListFocus(true); + }); + } } } }; diff --git a/src/views/newMap/newMapdraft/index.vue b/src/views/newMap/newMapdraft/index.vue index f50eef215..a526139a5 100644 --- a/src/views/newMap/newMapdraft/index.vue +++ b/src/views/newMap/newMapdraft/index.vue @@ -150,9 +150,6 @@ export default { }, selectViewDraft(data) { this.viewDraft = data; - if (data != 'draft') { - this.$refs.dataRelation.initLoad(); - } }, loadInitPage() { this.$store.dispatch('training/changeMode', { mode: TrainingMode.MAP_EDIT }); diff --git a/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue b/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue index df05a0611..5d952816b 100644 --- a/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue +++ b/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue @@ -1,6 +1,6 @@