diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 06559b9b8..f765c9702 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -23,6 +23,9 @@ function handle(state, data) { case 'Simulation_DeviceStatus': // 仿真-设备状态消息 state.equipmentStatus = msg; break; + case 'Simulation_User': // 仿真-聊天界面用户进出仿真消息 + handleSimulationUserinfo(state, msg); // 用户进出仿真消息 + break; case 'Simulation_RunFact': // 仿真-列车实际到发车站消息 // let runFactMsg = msg; // if (runFactMsg.constructor !== Array ) { @@ -215,6 +218,10 @@ function handleUserinfo(state, data) { state.roleList = (data instanceof Array) ? data : [data]; } +function handleSimulationUserinfo(state, data) { + state.simulationRoleList = (data instanceof Array) ? data : [data]; +} + function handlePushMsgQueue(state, msg) { if (msg instanceof Array) { state.msgQueue.concat(msg); @@ -235,6 +242,7 @@ const socket = { jointRoomInfo: {}, // 受邀请房间信息 chatContent: {}, // 聊天室聊天内容 roleList: [], // 设置角色信息 + simulationRoleList:[], // 设置仿真的聊天角色信息 jointRoomPrepare: false, // 演练房间准备状态 equipmentStatus: [], // 仿真-设备状态消息 trainStationList: [], // 仿真-列车实际到发车站消息 diff --git a/src/utils/stomp.js b/src/utils/stomp.js index b9bd37728..2febbf668 100644 --- a/src/utils/stomp.js +++ b/src/utils/stomp.js @@ -5,7 +5,6 @@ import store from '@/store/index_APP_TARGET'; export const displayTopic = '/user/queue/simulation'; // 其他仿真topic export const perpetualTopic = '/user/topic/message'; // 公用topic export const roomTopic = '/user/queue/room'; // 房间topic -export const assistant = '/user/topic/simulation/assistant';// 房间里仿真聊天topic // 建立连接并订阅地址 export function creatSubscribe(topic, header) { diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue index 49e24cb21..531909b16 100644 --- a/src/views/designPlatform/demonList.vue +++ b/src/views/designPlatform/demonList.vue @@ -92,7 +92,8 @@ export default { switch (obj.type) { case 'scriptDesign': { setSessionStorage('designType', 'scriptDesign'); - this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?lineCode=${obj.lineCode}&drawWay=${obj.drawWay}` }); + const query = {lineCode:obj.lineCode, drawWay:obj.drawWay}; + this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?`, query}); break; } case 'lessonDesign': { diff --git a/src/views/newMap/jointTrainingNew/chatBox.vue b/src/views/newMap/jointTrainingNew/chatBox.vue index 8b8fabc16..6e184f086 100644 --- a/src/views/newMap/jointTrainingNew/chatBox.vue +++ b/src/views/newMap/jointTrainingNew/chatBox.vue @@ -2,24 +2,9 @@