diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 738a66aa2..2c9bc2753 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -371,6 +371,9 @@ class Jlmap { this.$painter.update(oDevice); } } else { + if (elem.deviceType === 'TRAIN') { + store.dispatch('map/updateTrainState', elem); + } const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig); if (elem.dispose) { this.$painter.delete(oDevice); diff --git a/src/jmapNew/theme/foshan_01/menus/utils/menuOperate.js b/src/jmapNew/theme/foshan_01/menus/utils/menuOperate.js index 1572e9b73..030a78876 100644 --- a/src/jmapNew/theme/foshan_01/menus/utils/menuOperate.js +++ b/src/jmapNew/theme/foshan_01/menus/utils/menuOperate.js @@ -238,8 +238,8 @@ export function commitOperate(operate, paramList, over) { store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { store.dispatch('menuOperation/handleBreakFlag', { break: true }); - resolve({operate:step}); } + resolve({ valid: valid, operate: step }); }).catch(error=>{ reject(error); }); diff --git a/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js b/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js index 4a1dc427b..10e10f8f1 100644 --- a/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js +++ b/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js @@ -283,8 +283,8 @@ export function commitOperate(operate, paramList, over) { store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { store.dispatch('menuOperation/handleBreakFlag', { break: true }); - resolve({operate:step}); } + resolve({ valid: valid, operate: step }); }).catch(error=>{ reject(error); }); diff --git a/src/store/modules/map.js b/src/store/modules/map.js index c5f353941..09458f14f 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -701,6 +701,9 @@ const map = { updateAutoReentryState: (state, status) => { state.autoReentryData[status.code] = deepAssign(state.autoReentryData[status.code], status); }, + updateTrainState:(state, status) =>{ + state.map.trainList[parseInt(status.code) - 1] = deepAssign(state.map.trainList[parseInt(status.code) - 1], status); + }, setMapVersion:(state, version) => { state.version = version; } @@ -744,6 +747,9 @@ const map = { updateAutoReentryState: ({ commit }, status) => { commit('updateAutoReentryState', status); }, + updateTrainState:({ commit }, status) => { + commit('updateTrainState', status); + }, getRouteDataListByCode: ({ state, commit }, code) => { // 获取进路数据 return new Promise((resolve) => { const list = []; diff --git a/src/views/demonstration/deomonList/index_HYD.vue b/src/views/demonstration/deomonList/index_HYD.vue index 3683df2d8..3eb3760da 100644 --- a/src/views/demonstration/deomonList/index_HYD.vue +++ b/src/views/demonstration/deomonList/index_HYD.vue @@ -20,7 +20,6 @@ :props="defaultProps" :filter-node-method="filterNode" :style="{height: height+'px'}" - @node-click="clickEvent" >
{{ '['+data.mapName+']'+($t('global.trainingNotStart').replace('{name}', data.creator.nickName)) }} @@ -37,14 +36,13 @@ slot="footer" class="dialog-footer" > - {{ $t('global.joinNewRoom') }} + {{ $t('global.joinNewRoom') }} {{ $t('global.cancel') }} +