实训平台 综合演练 聊天代码调整

This commit is contained in:
joylink_cuiweidong 2020-05-13 13:14:58 +08:00
parent 3e2a6b511b
commit 1cae47b8d7
3 changed files with 15 additions and 6 deletions

View File

@ -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);
}

View File

@ -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'); //

View File

@ -259,6 +259,7 @@ export default {
});
},
back() {
debugger;
this.$store.dispatch('training/over').then(() => {
this.backLoading = true;
putJointTrainingSimulationUserNew(this.group).then(() => {