From a9b47a5a4a9270584f63ad9cc9eb5c71c63a3c99 Mon Sep 17 00:00:00 2001 From: fan Date: Tue, 1 Nov 2022 18:07:26 +0800 Subject: [PATCH] =?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 --- src/store/modules/training.js | 12 +- src/views/newMap/display/index.vue | 12 +- .../newMap/display/simulationControl.vue | 142 +++++++++++++++++- src/views/newMap/display/simulationMenu.vue | 34 +++-- .../publish/publishMap/editSubsystem.vue | 35 ++--- 5 files changed, 200 insertions(+), 35 deletions(-) diff --git a/src/store/modules/training.js b/src/store/modules/training.js index 39fc3ba23..1463909b9 100644 --- a/src/store/modules/training.js +++ b/src/store/modules/training.js @@ -50,7 +50,8 @@ const training = { triggerFaultDevice: '', // 触发故障目标设备 trainingStart: false, // 实训开始状态 notifySelected: null, // 场景弹窗内容 - runPathList:[] // 运行线 (宁波三号线) + runPathList:[], // 运行线 (宁波三号线) + domConfig: {} }, getters: { @@ -93,6 +94,9 @@ const training = { }); } return trainList; + }, + domConfig: (state) => { + return state.domConfig; } }, @@ -310,6 +314,9 @@ const training = { }, setUserRole: (state, userRole) => { state.userRole = userRole; + }, + setDomConfig: (state, domConfig) => { + state.domConfig = domConfig; } }, @@ -688,6 +695,9 @@ const training = { }, setOperateErrMsg: ({ commit }) => { commit('setOperateErrMsg', { errMsg: '操作错误!', color: 'red' }); + }, + setDomConfig: ({ commit }, config) => { + commit('setDomConfig', config); } } }; diff --git a/src/views/newMap/display/index.vue b/src/views/newMap/display/index.vue index 44e0890ba..c32693566 100644 --- a/src/views/newMap/display/index.vue +++ b/src/views/newMap/display/index.vue @@ -3,7 +3,7 @@ - + @@ -38,7 +38,8 @@ export default { // textStatusHeight: 0, // planRunning:false, dataError: false, - group:'' + group:'', + terminalsShow: true // showMap: false }; }, @@ -66,6 +67,10 @@ export default { watch:{ '$store.state.app.windowSizeCount': function() { // 窗口缩放 this.setWindowSize(); + }, + '$store.state.training.domConfig': function(val) { + this.$refs.simulationMenu.handleMenuShow(val); + this.terminalsShow = !val.singleClient; } }, async mounted() { @@ -114,6 +119,9 @@ export default { this.$messageBox('此地图数据正在维护中,无法运行!'); } this.dataError = resp.data.dataError; + if (resp.data.paramVO && resp.data.paramVO.domConfig) { + this.$store.dispatch('training/setDomConfig', resp.data.paramVO.domConfig); + } } }, // 加载地图数据 diff --git a/src/views/newMap/display/simulationControl.vue b/src/views/newMap/display/simulationControl.vue index 21e9d6065..a57f0cab8 100644 --- a/src/views/newMap/display/simulationControl.vue +++ b/src/views/newMap/display/simulationControl.vue @@ -1,27 +1,101 @@