diff --git a/src/views/newMap/jointTrainingNew/chatBox.vue b/src/views/newMap/jointTrainingNew/chatBox.vue index fc4b4fde0..8b8fabc16 100644 --- a/src/views/newMap/jointTrainingNew/chatBox.vue +++ b/src/views/newMap/jointTrainingNew/chatBox.vue @@ -107,7 +107,7 @@ export default { }, methods:{ async initPage() { - await this.subscribe(); + this.subscribe(); this.getSimulationMembers(); getSimulationConversationListNew(this.$route.query.group).then(resp=>{ if (resp.data) { @@ -146,11 +146,12 @@ export default { data = data.replace(rolename, element.label); } }); - coversitionName = member.name ? data + '-' + member.name : data; + const deviceName = member.deviceName ? '-' + member.deviceName : ''; + const memberName = member.name ? '-' + member.name : ''; + coversitionName = data + deviceName + memberName; } }); return coversitionName; - // conversition.name ? coversitionName + '-' + conversition.name : coversitionName; } }, handleMember(member) { @@ -307,15 +308,17 @@ export default { if (index < 0) { this.coversitionList.push(data); } + const headtTitle = this.handleMemberName(data); this.currentCoversition = {id:data.id, group:data.group}; - this.headerTitle = data.name; + this.headerTitle = headtTitle; this.showMembers = false; } }); } }, changeCoversition(coversition) { - this.headerTitle = coversition.name; + const headtTitle = this.handleMemberName(coversition); + this.headerTitle = headtTitle; this.currentCoversition = {id:coversition.id, group:coversition.group}; // this.$refs.chatContent.reloadData(this.currentCoversition); } diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue index aa61fb577..9f4c980ff 100644 --- a/src/views/newMap/jointTrainingNew/index.vue +++ b/src/views/newMap/jointTrainingNew/index.vue @@ -180,6 +180,7 @@ export default { this.group = this.$route.query.group; this.mapId = this.$route.query.mapId; this.lineCode = this.$route.query.lineCode; + this.drawWay = this.$route.query.drawWay; Message.closeAll(); }, async mounted() { @@ -199,10 +200,14 @@ export default { this.mouseNum = 1; }, handleRoomInfo(data) { + // debugger; if (data.state == '03') { // 退出房间 this.$router.go(-1); } else if (data.state == '01') { // 进入准备中 - const query = { group: this.group }; + const query = { group: this.group, lineCode:this.lineCode }; + if (this.drawWay) { + query.drawWay = this.drawWay; + } this.$router.replace({ path: `/trainroom`, query: query }); } this.$store.dispatch('socket/setJointRoomInfo'); // 清空房间信息 diff --git a/src/views/newMap/jointTrainingNew/menuDemon.vue b/src/views/newMap/jointTrainingNew/menuDemon.vue index 71c3d4f8c..58ae55056 100644 --- a/src/views/newMap/jointTrainingNew/menuDemon.vue +++ b/src/views/newMap/jointTrainingNew/menuDemon.vue @@ -259,6 +259,7 @@ export default { }); }, back() { + debugger; this.$store.dispatch('training/over').then(() => { this.backLoading = true; putJointTrainingSimulationUserNew(this.group).then(() => {