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 @@