diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 2852bc422..80820198d 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -40,6 +40,7 @@ class Jlmap { // 显示集中站 this.stationCode = ''; + this.isUpdateShowTrainList = false; } // 初始化属性有鼠标事件 缩放等 @@ -421,8 +422,9 @@ class Jlmap { } } else { if (elem.deviceType === 'TRAIN') { - store.dispatch('map/updateTrainState', elem); - store.dispatch('map/setActiveTrainList', elem); + this.isUpdateShowTrainList = true; + store.dispatch('map/updateTrainList', elem); + // store.dispatch('map/updateTrainState', elem); } else if (elem.deviceType === 'STAND') { store.dispatch('map/updateStationStand', elem); } @@ -436,6 +438,10 @@ class Jlmap { } } }); + if (this.isUpdateShowTrainList) { + store.dispatch('map/setActiveTrainList'); + this.isUpdateShowTrainList = false; + } this.handleRouteSignalStatus(signalDeviceList); // 状态后处理 this.postHandle(list || []); diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue deleted file mode 100644 index 0c321af96..000000000 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue +++ /dev/null @@ -1,344 +0,0 @@ - - - - 集中站 - 站台 - - - - - - - - - - - 站台状态 - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确定 - - - 取 消 - - - - - - - diff --git a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue index da4655da8..fff7e6d53 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue @@ -1,11 +1,11 @@ - - + + - - + + @@ -17,8 +17,8 @@ import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl'; import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl'; import StandBackStrategy from './dialog/standBackStrategy'; import StandDetail from './dialog/standDetail'; -import StandRunLevel from './dialog/standRunLevel'; -import StandStopTime from './dialog/standStopTime'; +import StandRunLevel from '@/jmapNew/theme/components/menus/dialog/standRunLevel'; +import StandStopTime from '@/jmapNew/theme/components/menus/dialog/standStopTime'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import { mapGetters } from 'vuex'; import { OperateMode } from '@/scripts/ConstDic'; @@ -51,6 +51,7 @@ export default { data() { return { menu: [], + systemName:'beijing-01__systerm', menuNormal: { Local: [ ], diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/standRunLevel.vue b/src/jmapNew/theme/components/menus/dialog/standRunLevel.vue similarity index 96% rename from src/jmapNew/theme/ningbo_01/menus/dialog/standRunLevel.vue rename to src/jmapNew/theme/components/menus/dialog/standRunLevel.vue index d1b23246d..026f382d4 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/standRunLevel.vue +++ b/src/jmapNew/theme/components/menus/dialog/standRunLevel.vue @@ -1,5 +1,5 @@ - + 集中站 站台 @@ -68,15 +68,21 @@ diff --git a/src/jmapNew/theme/foshan_01/menus/dialog/standStopTime.vue b/src/jmapNew/theme/foshan_01/menus/dialog/standStopTime.vue deleted file mode 100644 index ee41c0aac..000000000 --- a/src/jmapNew/theme/foshan_01/menus/dialog/standStopTime.vue +++ /dev/null @@ -1,241 +0,0 @@ - - - - 集中站 - 站台名称 - - - - - - - - - - - 模式 - - - - 自动 - - 全人工 - - - 秒 - - - - 有效次数 - - - 一次有效 - 一直有效 - - - - - - 确定 - - - 取 消 - - - - - - - - diff --git a/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue b/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue index 5000b9487..d0998ab1e 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue @@ -1,11 +1,11 @@ - - + + - - + + @@ -18,12 +18,12 @@ import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl'; import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl'; import StandBackStrategy from './dialog/standBackStrategy'; import StandDetail from './dialog/standDetail'; -import StandRunLevel from './dialog/standRunLevel'; -import StandStopTime from './dialog/standStopTime'; +import StandRunLevel from '@/jmapNew/theme/components/menus/dialog/standRunLevel'; +import StandStopTime from '@/jmapNew/theme/components/menus/dialog/standStopTime'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import StandDetainTrainAll from './dialog/standDetainTrainAll'; import { mapGetters } from 'vuex'; -import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; +// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; @@ -53,6 +53,7 @@ export default { data() { return { menu: [], + systemName:'foshan-01__systerm', menuNormal: { Local: [ { diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/standStopTime.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/standStopTime.vue deleted file mode 100644 index b89236e3e..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/standStopTime.vue +++ /dev/null @@ -1,228 +0,0 @@ - - - - 集中站 - 站台名称 - - - - - - - - - - - 模式 - - - - 自动 - - 全人工 - - - 秒 - - - - 有效次数 - - - 一次有效 - 一直有效 - - - - - - 确定 - - - 取 消 - - - - - - - - diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue b/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue index 15aa25132..2b67a24cd 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuStationStand.vue @@ -1,11 +1,11 @@ - - + + - - + + @@ -16,8 +16,8 @@ import PopMenu from '@/components/PopMenu'; import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl'; import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl'; import StandDetail from './dialog/standDetail'; -import StandRunLevel from './dialog/standRunLevel'; -import StandStopTime from './dialog/standStopTime'; +import StandRunLevel from '@/jmapNew/theme/components/menus/dialog/standRunLevel'; +import StandStopTime from '@/jmapNew/theme/components/menus/dialog/standStopTime'; import StandBulkBuckleTrain from './dialog/standBulkBuckleTrain'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import {menuOperate, commitOperate} from './utils/menuOperate'; @@ -49,6 +49,7 @@ export default { data() { return { menu: [], + systemName:'ningbo-01__systerm', menuNormal: { Local: [ { diff --git a/src/store/modules/map.js b/src/store/modules/map.js index 8da36fb44..a3cbc6e43 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -205,7 +205,6 @@ const map = { updateCount: 0, // 绘图快捷修改标识 mousemove: 0, // 实训战场图移动标识 version: '', // 地图版本, - activeTrainList:{}, // 当前按计划行车的列车列表, activeTrainListUpdate:0, // 当前按计划行车的列车列表更新标识 runPlanStatus:false, // 是否正处于按计划行车 showCentralizedStationCode: '', // 现地分集中站显示(集中站code) @@ -727,12 +726,10 @@ const map = { } }); }, - setActiveTrainList:(state, data) => { - state.activeTrainList[data.code] = data; + setActiveTrainList:(state) => { state.activeTrainListUpdate++; }, - resetActiveTrainList:(state, data) => { - state.activeTrainList = {}; + resetActiveTrainList:(state) => { state.activeTrainListUpdate = 0; }, setDeleteCount: (state) => { @@ -790,11 +787,11 @@ const map = { updateAutoReentryState: (state, status) => { state.autoReentryData[status.code] = deepAssign(state.autoReentryData[status.code], status); }, - updateTrainState:(state, status) =>{ - if (state.map.trainList) { - state.map.trainList[parseInt(status.code) - 1] = deepAssign(state.map.trainList[parseInt(status.code) - 1] || {}, status); - } - }, + // updateTrainState:(state, status) =>{ + // if (state.map.trainList) { + // state.map.trainList[parseInt(status.code) - 1] = deepAssign(state.map.trainList[parseInt(status.code) - 1] || {}, status); + // } + // }, updateStationStand: (state, status) => { const holdIndex = state.holdStandList.indexOf(status.code); const jumpIndex = state.jumpStandList.indexOf(status.code); @@ -832,6 +829,14 @@ const map = { state.flankProtectList.splice(index, 1); } }); + }, + updateTrainList: (state, data)=>{ + const trainList = state.map.trainList; + trainList.forEach(elem => { + if (elem.code == data.code) { + elem = deepAssign(elem || {}, data); + } + }); } }, @@ -876,9 +881,9 @@ const map = { updateAutoReentryState: ({ commit }, status) => { commit('updateAutoReentryState', status); }, - updateTrainState:({ commit }, status) => { - commit('updateTrainState', status); - }, + // updateTrainState:({ commit }, status) => { + // commit('updateTrainState', status); + // }, updateStationStand: ({ commit }, status) => { commit('updateStationStand', status); }, @@ -906,6 +911,11 @@ const map = { } }, + // 更新列车信息 + updateTrainList:({ commit }, train) => { + commit('updateTrainList', train); + }, + setMapDataIdList: ({ state }, data) => { state.mapIdList[`mapDate_${data.mapId}`] = data.mapData; }, @@ -993,8 +1003,8 @@ const map = { setDeleteCount: ({ commit }) => { commit('setDeleteCount'); }, - setActiveTrainList: ({ commit }, data) => { - commit('setActiveTrainList', data); + setActiveTrainList: ({ commit }) => { + commit('setActiveTrainList'); }, resetActiveTrainList: ({ commit }) => { commit('resetActiveTrainList'); diff --git a/src/views/newMap/displayNew/demon/addQuest.vue b/src/views/newMap/displayNew/demon/addQuest.vue index 6a263c95d..ef016ab6e 100644 --- a/src/views/newMap/displayNew/demon/addQuest.vue +++ b/src/views/newMap/displayNew/demon/addQuest.vue @@ -182,8 +182,8 @@ export default { if (res.code == 200) { if (res.data.memberList && res.data.memberList.length > 0) { const lastData = JSON.stringify(res.data.memberList); - newMemberList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew); - // newMemberList = playerList.filter(item => item.hasPlay === true); + const playerList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew); + newMemberList = playerList.filter(item => item.hasPlay === true); } if (res.data.mapLocation) { this.mapLocation = res.data.mapLocation; diff --git a/src/views/newMap/displayNew/menuTrainList.vue b/src/views/newMap/displayNew/menuTrainList.vue index b25249e2d..15caa34ab 100644 --- a/src/views/newMap/displayNew/menuTrainList.vue +++ b/src/views/newMap/displayNew/menuTrainList.vue @@ -70,20 +70,25 @@ export default { }, watch:{ '$store.state.map.activeTrainListUpdate': function (val) { - const trainList = Object.values(this.$store.state.map.activeTrainList); - if (this.lineCode == '10' || this.lineCode == '11') { - this.topTrainList = trainList.filter((train)=>{ - return train.serviceNumber != '' && train.serviceNumber != undefined && !train.right && train.sectionCode; - }); - this.bottomTrainList = trainList.filter((train)=>{ - return train.serviceNumber != '' && train.serviceNumber != undefined && train.right && train.sectionCode; - }); + if (val) { + const trainList = this.$store.state.map.map.trainList; + if (this.lineCode == '10' || this.lineCode == '11') { + this.topTrainList = trainList.filter((train)=>{ + return train.serviceNumber != '' && train.serviceNumber != undefined && !train.right && train.sectionCode; + }); + this.bottomTrainList = trainList.filter((train)=>{ + return train.serviceNumber != '' && train.serviceNumber != undefined && train.right && train.sectionCode; + }); + } else { + this.trainList = trainList.filter((train)=>{ + return train.serviceNumber != '' && train.serviceNumber != undefined && train.sectionCode; + }); + } } else { - this.trainList = trainList.filter((train)=>{ - return train.serviceNumber != '' && train.serviceNumber != undefined && train.sectionCode; - }); + this.topTrainList = []; + this.bottomTrainList = []; + this.trainList = []; } - }, '$store.state.map.runPlanStatus': function (val) { if (!val) { diff --git a/src/views/newMap/jointTrainingNew/menuTrainList.vue b/src/views/newMap/jointTrainingNew/menuTrainList.vue index 47ea8ab03..e0ec40550 100644 --- a/src/views/newMap/jointTrainingNew/menuTrainList.vue +++ b/src/views/newMap/jointTrainingNew/menuTrainList.vue @@ -70,20 +70,25 @@ export default { }, watch:{ '$store.state.map.activeTrainListUpdate': function (val) { - const trainList = Object.values(this.$store.state.map.activeTrainList); - if (this.lineCode == '10' || this.lineCode == '11') { - this.topTrainList = trainList.filter((train)=>{ - return train.serviceNumber != '' && train.serviceNumber != undefined && !train.right && train.sectionCode; - }); - this.bottomTrainList = trainList.filter((train)=>{ - return train.serviceNumber != '' && train.serviceNumber != undefined && train.right && train.sectionCode; - }); + if (val) { + const trainList = this.$store.state.map.map.trainList; + if (this.lineCode == '10' || this.lineCode == '11') { + this.topTrainList = trainList.filter((train)=>{ + return train.serviceNumber != '' && train.serviceNumber != undefined && !train.right && train.sectionCode; + }); + this.bottomTrainList = trainList.filter((train)=>{ + return train.serviceNumber != '' && train.serviceNumber != undefined && train.right && train.sectionCode; + }); + } else { + this.trainList = trainList.filter((train)=>{ + return train.serviceNumber != '' && train.serviceNumber != undefined && train.sectionCode; + }); + } } else { - this.trainList = trainList.filter((train)=>{ - return train.serviceNumber != '' && train.serviceNumber != undefined && train.sectionCode; - }); + this.topTrainList = []; + this.bottomTrainList = []; + this.trainList = []; } - }, '$store.state.map.runPlanStatus': function (val) { if (!val) {