diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 995ddd18f..efe28612b 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -491,9 +491,20 @@ const socket = { trainingOverCount: 0, // 新实训结束计数器 trainingReloadCount: 0, whTrainInfo: null, - trainingStepFinishCount: 0 + trainingStepFinishCount: 0, // railwaySimulationRpMsg:{}, // 大铁项目 调度台 调度台 - // railwaySimulationRpChange:0 // 大铁项目 调度台 运行图信息变化 + // railwaySimulationRpChange:0, // 大铁项目 调度台 运行图信息变化 + standPisState: { + stationName: '', + firstTrainRemain: '', + firstEndStationName: '', + secondTrainRemain: '', + secondEndStationName: '', + }, + onboardPisState: { + nextStationName: '', + endStationName: '', + }, }, getters: { }, @@ -580,6 +591,12 @@ const socket = { setIscsStatePisMessages: (state, speed) => { state.iscsStatePisMessages = speed; }, + setStandPisMessages: (state, payload) => { + state.standPisState = payload + }, + setOnboardPisMessages: (state, payload) => { + state.onboardPisState = payload + }, deleteRailwaySimulationRunplan: (state, stationCode) => { delete state.railwaySimulationRunplanSendMap[stationCode]; state.railwaySimulationRunplanSendChange++; @@ -700,6 +717,12 @@ const socket = { handleIscsPisState:({ commit }, state) => { commit('setIscsStatePisMessages', state); }, + handleStandPisState: ({ commit }, payload) => { + commit('setStandPisMessages', payload); + }, + handleOnboardPisState: ({ commit }, payload) => { + commit('setOnboardPisMessages', payload); + }, deleteRailwaySimulationRunplan:({ commit }, stationCode) => { commit('deleteRailwaySimulationRunplan', stationCode); }, diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 274a77064..18cd6450a 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -25,7 +25,7 @@ export function handlerUrl(data) { // const data = null; // BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud'; - BASE_API = 'http://192.168.3.233/rtss-server'; + // BASE_API = 'http://192.168.3.233/rtss-server'; // BASE_API = 'http://114.116.51.125/jlcloud'; // BASE_API = 'http://192.168.3.90:9100'; // 周寅 // BASE_API = 'http://192.168.3.94:9000'; // 旭强 diff --git a/src/utils/stomp.js b/src/utils/stomp.js index a97a55091..1ded04c6b 100644 --- a/src/utils/stomp.js +++ b/src/utils/stomp.js @@ -10,7 +10,7 @@ export const jl3dTopic = '/user/queue/simulation/jl3d'; // 三维topic export const LPFTopic = '/user/queue/simulation/passenger'; // 客流topic // export const iscsTopic = '/topic/simulation/iscs'; // iscs topic -export function getTopic(type, group, stationCode) { +export function getTopic(type, group, param) { let topic = ''; switch (type) { case 'SYSTIME': @@ -23,7 +23,7 @@ export function getTopic(type, group, stationCode) { topic = `/queue/simulation/${group}/state`; break; case 'ISCSPSD': - topic = `/queue/simulation/${group}/iscs/psd/${stationCode}`; + topic = `/queue/simulation/${group}/iscs/psd/${param.stationCode}`; break; case 'ISCSPA': topic = `/queue/simulation/${group}/iscs/pa`; @@ -31,6 +31,12 @@ export function getTopic(type, group, stationCode) { case 'ISCSPIS': topic = `/queue/simulation/${group}/iscs/pis`; break; + case 'PIS_STAND': + topic = `/queue/simulation/${group}/standPis/${param.standCode}`; + break; + case 'PIS_TRAIN': + topic = `/queue/simulation/${group}/onboardPis/${param.groupNumber}`; + break; case 'CTC': topic = `/user/queue/simulation/${group}/ctc`; break; @@ -75,6 +81,10 @@ function callback(Response) { store.dispatch('socket/handleIscsPaState', JSON.parse(Response.body)); } else if (Response.headers.destination.includes('iscs/pis')) { store.dispatch('socket/handleIscsPisState', JSON.parse(Response.body)); + } else if (Response.headers.destination.includes('standPis')) { + store.dispatch('socket/handleStandPisState', JSON.parse(Response.body)) + } else if (Response.headers.destination.includes('onboardPis')) { + store.dispatch('socket/handleOnboardPisState', JSON.parse(Response.body)) } else { const data = JSON.parse(Response.body); store.dispatch('socket/setStomp', data); diff --git a/src/views/iscs/iscsSystem/stationConfig/psdSystem/index.vue b/src/views/iscs/iscsSystem/stationConfig/psdSystem/index.vue index f05ce8962..154c7ee0f 100644 --- a/src/views/iscs/iscsSystem/stationConfig/psdSystem/index.vue +++ b/src/views/iscs/iscsSystem/stationConfig/psdSystem/index.vue @@ -75,11 +75,11 @@ export default { subscribe(stationCode) { this.clearSubscribe(); const header = { group: this.$route.query.group || '', 'X-Token': getToken() }; - creatSubscribe(getTopic('ISCSPSD', this.$route.query.group, stationCode ), header); + creatSubscribe(getTopic('ISCSPSD', this.$route.query.group, {stationCode} ), header); this.$store.dispatch('app/animationsClose'); }, clearSubscribe(stationCode) { - clearSubscribe(getTopic('ISCSPSD', this.$route.query.group, stationCode)); + clearSubscribe(getTopic('ISCSPSD', this.$route.query.group, {stationCode})); } } }; diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 1037efb6e..a7f96821a 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -476,7 +476,6 @@ export default { type: this.$route.query.type }; setSessionStorage('projectDevice', JSON.stringify(res.data.deviceVO)); - if (this.$route.query.type == 'LSW') { const config = JSON.parse(res.data.deviceVO.config); if (config.quadrant == '99') { @@ -552,8 +551,9 @@ export default { this.$router.push({ path: `/jlmap3d/sandbox`, query: sandboxQuery }); } else if (this.$route.query.type === 'ILW') { this.$router.push({ path: `/jointTrainingNew`, query: query }); - } else if (this.$route.query.type === 'PIS_STAND' || this.$route.query.type === 'PIS_TRAIN'){ - this.$router.push({ path: `/pis`, query}) + } else if (this.$route.query.type === 'PIS_STAND' || this.$route.query.type === 'PIS_TRAIN') { + const config = JSON.parse(res.data.deviceVO.config) + this.$router.push({ path: `/pis`, query: {...query, ...config}}) } else { this.$router.push({ path: `/jointTrainingNew`, query: query }); } diff --git a/src/views/pis/index.vue b/src/views/pis/index.vue index 4f2579676..c3ab91129 100644 --- a/src/views/pis/index.vue +++ b/src/views/pis/index.vue @@ -1,7 +1,6 @@