剧本编制 会话消息代码调整

This commit is contained in:
joylink_cuiweidong 2020-07-10 18:06:55 +08:00
parent bf7ae6684e
commit 9627e85bf0

View File

@ -55,7 +55,7 @@ import ChatCreateGroup from './chatCreateGroup';
import ChatMemberList from './chatMemberList';
import ChatTooltip from './chatTooltip';
import RecordRTC from 'recordrtc';
import {sendSimulationConversition, overSimulationConversition, getSimulationMembersNew, getAllConversition, getSimulationConversition} from '@/api/chat';
import {sendSimulationConversition, overSimulationConversition, getAllConversition, getSimulationConversition} from '@/api/chat';
import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie';
export default {
@ -135,7 +135,6 @@ export default {
const objectBottom = parseInt(object.style.bottom) || 0;
this.bottom = this.bottom + object.offsetHeight + objectBottom;
}
this.getSimulationMembers();
},
'userRole':function(val) {
this.isHasCoversition = false;
@ -196,8 +195,8 @@ export default {
},
//
getSimulationMembers() {
getSimulationMembersNew(this.$route.query.group).then(resp => {
let lastData = JSON.stringify(resp.data);
const memberList = this.$store.state.training.memberData;
let lastData = JSON.stringify(memberList);
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
roleTypeList.forEach(function(element) {
const rolename = element.value;
@ -209,8 +208,8 @@ export default {
});
lastData = JSON.parse(lastData);
const activeList = this.$store.state.map.activeTrainList;
const memberList = [];
// lastData = lastData.filter(memberIn=>{ return memberIn.role != ''; });
lastData = Object.values(lastData);
const lastMemberList = [];
lastData.forEach((member, index)=>{
if (member.type != '观众') {
const name = member.name == undefined ? '' : '-' + member.name;
@ -220,24 +219,26 @@ export default {
if (device._type == 'Train') {
member.memberName = member.type + device.groupNumber + name;
if (activeList.length > 0 && activeList.includes(device.groupNumber)) {
memberList.push(member);
lastMemberList.push(member);
}
} else {
member.memberName = member.type + device.name + name;
memberList.push(member);
lastMemberList.push(member);
}
} else {
member.memberName = member.type + member.deviceCode + name;
memberList.push(member);
lastMemberList.push(member);
}
} else {
member.memberName = member.type + name;
memberList.push(member);
lastMemberList.push(member);
}
}
});
this.memberList = memberList;
this.memberList = lastMemberList;
this.getAllConversition();
},
getAllConversition() {
if (this.recordSending) {
this.cancleRecording();
}
@ -267,7 +268,6 @@ export default {
}
this.getSimulationConverMembers();
});
});
},
//
getSimulationConverMembers() {