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 @@
-
-
成员列表
-
-
{{ handleMember(member) }}
-
-
+
-
-
-
-
{{ handleMemberName(coversition) }}
-
-
+
{{ headerTitle }}
@@ -60,19 +45,19 @@
+ diff --git a/src/views/newMap/jointTrainingNew/chatMemberList.vue b/src/views/newMap/jointTrainingNew/chatMemberList.vue new file mode 100644 index 000000000..14ffe79e0 --- /dev/null +++ b/src/views/newMap/jointTrainingNew/chatMemberList.vue @@ -0,0 +1,154 @@ + + + diff --git a/src/views/newMap/jointTrainingNew/menuDemon.vue b/src/views/newMap/jointTrainingNew/menuDemon.vue index 58ae55056..2c98ebe5c 100644 --- a/src/views/newMap/jointTrainingNew/menuDemon.vue +++ b/src/views/newMap/jointTrainingNew/menuDemon.vue @@ -102,7 +102,6 @@ export default { } }, '$store.state.socket.roleList': function (val) { - debugger; if (val && val.length) { this.$nextTick(() => { this.addrolesList(val); @@ -259,7 +258,6 @@ export default { }); }, back() { - debugger; this.$store.dispatch('training/over').then(() => { this.backLoading = true; putJointTrainingSimulationUserNew(this.group).then(() => { diff --git a/src/views/scriptManage/home.vue b/src/views/scriptManage/home.vue index 03034434d..51ddcaf12 100644 --- a/src/views/scriptManage/home.vue +++ b/src/views/scriptManage/home.vue @@ -126,7 +126,7 @@ export default { }, drawUp(index, row) { const drawWay = this.$route.query.drawWay; - if (drawWay == 'true') { + if (drawWay && JSON.parse(drawWay)) { scriptRecordNotifyNew(row.id).then(resp => { const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode, drawWay:drawWay}; this.$router.push({ path: `${UrlConfig.scriptDisplayNew}/script`, query }); @@ -264,7 +264,8 @@ export default { }).catch(() => { }); }, previewScript(index, row) { - if (this.$route.query.drawWay == 'true') { + const drawWay = this.$route.query.drawWay; + if (drawWay && JSON.parse(drawWay)) { scriptDraftRecordNotifyNew(row.id).then(resp => { const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode, drawWay:true}; this.$router.push({ path: `${UrlConfig.design.displayNew}/demon`, query });