From fe5f6cecc95d2140fc76dd7821cd8dea43029076 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Sat, 9 May 2020 20:13:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=95=8C=E9=9D=A2=E5=8A=A0=E8=BD=BD=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index_Common.js | 7 +++++ src/views/demonstration/detail/index.vue | 5 ++++ src/views/designPlatform/bigScreen.vue | 35 +++++++++++++++++------- 3 files changed, 37 insertions(+), 10 deletions(-) diff --git a/src/router/index_Common.js b/src/router/index_Common.js index 2b3e24bd4..4ba8af0c0 100644 --- a/src/router/index_Common.js +++ b/src/router/index_Common.js @@ -430,6 +430,13 @@ export const asyncRouter = [ } ] }, + { + path: '/displayBigScreen/:mapId', + component: BigScreen, + meta: { + }, + hidden: true + }, { // 综合演练室 path: '/trainroom', component: TrainRoom, diff --git a/src/views/demonstration/detail/index.vue b/src/views/demonstration/detail/index.vue index 64a52e793..b6ac5ecbd 100644 --- a/src/views/demonstration/detail/index.vue +++ b/src/views/demonstration/detail/index.vue @@ -234,6 +234,9 @@ export default { console.log(error); } }, + async enterScreen() { + this.$router.push({ path: `/displayBigScreen/${this.courseModel.mapId}` }); + }, async start() { if (this.courseModel.prdType == '05') { this.jumpScheduling(); @@ -241,6 +244,8 @@ export default { this.createRoom(); } else if (this.courseModel.prdType == '06') { this.enterISCS(); + } else if (this.courseModel.prdType == '07') { + this.enterScreen(); } else { if (this.courseModel.pmsList && this.courseModel.pmsList.length) { this.jump(); diff --git a/src/views/designPlatform/bigScreen.vue b/src/views/designPlatform/bigScreen.vue index bbf1aa2a5..45024fbd0 100644 --- a/src/views/designPlatform/bigScreen.vue +++ b/src/views/designPlatform/bigScreen.vue @@ -17,7 +17,7 @@ export default { props: { widthLeft: { type: Number, - required: true + default: 0 } }, data() { @@ -99,18 +99,33 @@ export default { }, setWindowSize() { this.$nextTick(() => { - const width = this.$store.state.app.width - (this.widthLeft || 450) - 2; - const height = this.height; - this.$store.dispatch('config/resize', { width, height }); + if (this.widthLeft) { + const width = this.$store.state.app.width - (this.widthLeft || 450) - 2; + const height = this.height; + this.$store.dispatch('config/resize', { width, height }); + } else { + const width = this.$store.state.app.width - 2; + const height = this.$store.state.app.height; + this.$store.dispatch('config/resize', { width, height }); + } }); }, handleUpdateScreen() { - const size = { - width: this.$store.state.app.width - (this.widthLeft || 450) - 2, - height: this.height, - num: this.$theme.loadPropConvert(this.$store.state.map.map.skinVO.code).screenLine - }; - this.$jlmap.setUpdateScreen(size); + if (this.widthLeft) { + const size = { + width: this.$store.state.app.width - (this.widthLeft || 450) - 2, + height: this.height, + num: this.$theme.loadPropConvert(this.$store.state.map.map.skinVO.code).screenLine + }; + this.$jlmap.setUpdateScreen(size); + } else { + const size = { + width: this.$store.state.app.width - 2, + height: this.$store.state.app.height, + num: this.$theme.loadPropConvert(this.$store.state.map.map.skinVO.code).screenLine + }; + this.$jlmap.setUpdateScreen(size); + } } } }; From b5a3a195f7286d26be9b071ba5aec825359d4aee Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Sat, 9 May 2020 20:21:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataRelation/routingoperate/index.vue | 10 +++--- .../dataRelation/routingoperate/route.vue | 34 ++++++++++--------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/views/newMap/newMapdraft/dataRelation/routingoperate/index.vue b/src/views/newMap/newMapdraft/dataRelation/routingoperate/index.vue index 4448c0dc6..79801c6c0 100644 --- a/src/views/newMap/newMapdraft/dataRelation/routingoperate/index.vue +++ b/src/views/newMap/newMapdraft/dataRelation/routingoperate/index.vue @@ -4,8 +4,8 @@ ref="routeEdit" :selected="selected" :map-info="mapInfo" - :route-data="routeData" /> + @@ -35,8 +35,8 @@ export default { }, data() { return { - enabledTab: 'Route', - routeData: null + enabledTab: 'Route' + // routeData: null }; }, methods: { @@ -58,9 +58,9 @@ export default { } }, routingSelected: function (data) { - this.routeData = data; + // this.routeData = data; if (this.$refs && this.$refs.routeEdit) { - this.$refs.routeEdit.editData(); + this.$refs.routeEdit.editData(data); } }, previewRouteEvent: function () { diff --git a/src/views/newMap/newMapdraft/dataRelation/routingoperate/route.vue b/src/views/newMap/newMapdraft/dataRelation/routingoperate/route.vue index 7259e2478..e509d316b 100644 --- a/src/views/newMap/newMapdraft/dataRelation/routingoperate/route.vue +++ b/src/views/newMap/newMapdraft/dataRelation/routingoperate/route.vue @@ -191,13 +191,13 @@ export default { default() { return null; } - }, - routeData: { - type: Object, - default() { - return null; - } } + // routeData: { + // type: Object, + // default() { + // return null; + // } + // } }, data() { return { @@ -299,11 +299,12 @@ export default { this.addModel.mapId = val.id; } }, - routeData(val, old) { - if (val) { - this.addModel = val; - } - }, + // routeData(val, old) { + // debugger; + // if (val) { + // this.addModel = val; + // } + // }, 'addModel.parkSectionCodeList':function(val, old) { this.changeSectionSelected(val, true); }, @@ -318,7 +319,6 @@ export default { this.rowDrop(); }, beforeDestroy() { - // debugger; }, methods: { // 行拖拽 @@ -363,11 +363,12 @@ export default { } }); }, - editData() { + editData(data) { this.isSave = false; this.allowSelect = true; this.isStartSelected = true; this.editShow = true; + this.addModel = data; }, changeStartStation() { this.judgeAllowSelected(); @@ -553,6 +554,7 @@ export default { return model; }, save() { + this.addModel; this.$refs.form.validate((valid) => { if (valid) { this.loading = true; @@ -602,7 +604,7 @@ export default { const list = section.logicSectionCodeList; // if() // relSwitchCode - if (list.length > 0) { + if (list && list.length > 0) { list.forEach(logicSectionCode=>{ const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode); this.oldsection.push(logicSection); @@ -617,7 +619,7 @@ export default { selectedList.forEach(each=>{ const section = this.$store.getters['map/getDeviceByCode'](each.sectionCode); const list = section.logicSectionCodeList; - if (list.length > 0) { + if (list && list.length > 0) { list.forEach(logicSectionCode=>{ const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode); logicSection.instance.drawBatchSelected(section, ''); @@ -642,9 +644,9 @@ export default { this.isSave = true; this.allowSelect = false; this.isStartSelected = false; + this.addModel.withLoop = false; this.editShow = false; this.field = ''; - this.addModel.withLoop = false; } } }