From 46092a9b8e94d2eadc26565a01829c85cfa32c2b Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Tue, 19 May 2020 09:09:38 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=A5=BF=E5=AE=89=E4=B8=89=E5=8F=B3?= =?UTF-8?q?=E9=94=AE=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/xian_01/menus/menuStation.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/jmapNew/theme/xian_01/menus/menuStation.vue b/src/jmapNew/theme/xian_01/menus/menuStation.vue index ca9705442..c00fab189 100644 --- a/src/jmapNew/theme/xian_01/menus/menuStation.vue +++ b/src/jmapNew/theme/xian_01/menus/menuStation.vue @@ -81,6 +81,16 @@ export default { cmdType: CMD.Station.active } // { + // label: '所有进路交人工控', + // handler: this.humanControlALL, + // cmdType: '' + // }, + // { + // label: '所有进路交ATS自动控', + // handler: this.atsAutoControlALL, + // cmdType: '' + // } + // { // label: '执行关键操作测试', // handler: this.execKeyOperationTest, // cmdType: CMD.Station.active, From 08991c8694b079e80fbbe3736f4e9cdb061a3fc4 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 19 May 2020 09:45:15 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=89=A7=E6=9C=AC=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Switch/index.js | 4 +- src/views/newMap/displayNew/designIndex.vue | 37 +++++++++++++++++++ src/views/newMap/displayNew/index.vue | 12 ++++-- src/views/newMap/displayNew/menuDemon.vue | 15 ++++---- src/views/newMap/displayNew/menuSchema.vue | 16 ++++++-- .../scriptManage/display/tipScriptRecord.vue | 11 +++++- .../scriptManage/scriptRecord/addAction.vue | 26 ++++++------- 7 files changed, 92 insertions(+), 29 deletions(-) diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index 0b9312fcf..475e9f476 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -161,8 +161,8 @@ export default class Switch extends Group { z: this.z + 6, _subType: 'enabled', // 标识 style: { - x: arrowTextX, - y: arrowTextY + 10, + x: nameTextX, + y: nameTextY + directy * 20, fontSize: 12, text: 'E', textAlign: 'center', diff --git a/src/views/newMap/displayNew/designIndex.vue b/src/views/newMap/displayNew/designIndex.vue index 8ffb148e0..2af6e52c5 100644 --- a/src/views/newMap/displayNew/designIndex.vue +++ b/src/views/newMap/displayNew/designIndex.vue @@ -24,8 +24,12 @@ :offset="offset" :offset-bottom="offsetBottom" :group="group" + :show-station="showStation" + :station-list="stationList" + :show-select-station="showSelectStation" @switchMode="switchMode" @selectQuest="selectQuest" + @switchStationMode="switchStationMode" /> @@ -104,6 +108,9 @@ export default { simulationShow: false, drivingShow: false, questId: 0, // 加载任务的Id + showStation: '', + stationList: [], + showSelectStation: false, // 是否展示现地选择设备集中站select group: '', prdTypeMap: { '01': '01', // 现地 => 现地 @@ -162,6 +169,12 @@ export default { '$store.state.map.mapViewLoadedCount': function (val) { this.mapBoxP = document.getElementById(this.canvasId).children[0]; this.mapBoxP.style.cursor = ''; + this.switchStationMode(this.showStation); + }, + '$store.state.training.centerStationCode': function(code) { + if (code) { + this.showStation = code; + } }, // '$store.state.training.prdType': function(val) { // debugger; @@ -172,6 +185,10 @@ export default { '$store.state.app.windowSizeCount': function() { this.setWindowSize(); }, + '$store.state.map.map': function (val) { + this.showSelectStation = val.skinVO.code === '06' && this.$store.state.training.prdType === '01'; + this.showSelectStation && this.setStationList(val); + }, $route() { this.$nextTick(() => { this.initLoadData(); @@ -436,6 +453,26 @@ export default { this.$store.dispatch('config/resize', { width, height }); this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode }); }); + }, + switchStationMode(val) { + if (val == null && this.stationList.length > 0) { + this.showStation = this.stationList[0].value; + } else { + this.showStation = val; + } + this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation); + this.$store.dispatch('map/setShowCentralizedStationNum'); + }, + setStationList(val) { + this.stationList = []; + (val.stationList || []).forEach(item => { + if (item.centralized) { + this.stationList.push({value: item.code, name: item.name}); + } + }); + if (this.stationList.length) { + this.showStation = this.stationList[0].value; + } } } }; diff --git a/src/views/newMap/displayNew/index.vue b/src/views/newMap/displayNew/index.vue index fcda0d5c2..4c7c007f6 100644 --- a/src/views/newMap/displayNew/index.vue +++ b/src/views/newMap/displayNew/index.vue @@ -627,9 +627,15 @@ export default { } }, switchStationMode(val) { - this.showStation = val; - this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation); - this.$store.dispatch('map/setShowCentralizedStationNum'); + if (this.stationList.length > 0) { + if (val == null) { + this.showStation = this.stationList[0].value; + } else { + this.showStation = val; + } + this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation); + this.$store.dispatch('map/setShowCentralizedStationNum'); + } }, setStationList(val) { this.stationList = []; diff --git a/src/views/newMap/displayNew/menuDemon.vue b/src/views/newMap/displayNew/menuDemon.vue index 5ecee252f..b8f3287e9 100644 --- a/src/views/newMap/displayNew/menuDemon.vue +++ b/src/views/newMap/displayNew/menuDemon.vue @@ -329,11 +329,12 @@ export default { font-size: 18px !important; color: #fff; } - - .display-draft { - position: absolute; - float: right; - right: 20px; - bottom: 15px; - } + + diff --git a/src/views/newMap/displayNew/menuSchema.vue b/src/views/newMap/displayNew/menuSchema.vue index a9b08129e..d858431b0 100644 --- a/src/views/newMap/displayNew/menuSchema.vue +++ b/src/views/newMap/displayNew/menuSchema.vue @@ -1,10 +1,10 @@