剧本编制 会话消息代码调整
This commit is contained in:
parent
bf7ae6684e
commit
9627e85bf0
@ -55,7 +55,7 @@ import ChatCreateGroup from './chatCreateGroup';
|
|||||||
import ChatMemberList from './chatMemberList';
|
import ChatMemberList from './chatMemberList';
|
||||||
import ChatTooltip from './chatTooltip';
|
import ChatTooltip from './chatTooltip';
|
||||||
import RecordRTC from 'recordrtc';
|
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 ConstConfig from '@/scripts/ConstConfig';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
export default {
|
export default {
|
||||||
@ -135,7 +135,6 @@ export default {
|
|||||||
const objectBottom = parseInt(object.style.bottom) || 0;
|
const objectBottom = parseInt(object.style.bottom) || 0;
|
||||||
this.bottom = this.bottom + object.offsetHeight + objectBottom;
|
this.bottom = this.bottom + object.offsetHeight + objectBottom;
|
||||||
}
|
}
|
||||||
this.getSimulationMembers();
|
|
||||||
},
|
},
|
||||||
'userRole':function(val) {
|
'userRole':function(val) {
|
||||||
this.isHasCoversition = false;
|
this.isHasCoversition = false;
|
||||||
@ -196,77 +195,78 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取所有的成员列表
|
// 获取所有的成员列表
|
||||||
getSimulationMembers() {
|
getSimulationMembers() {
|
||||||
getSimulationMembersNew(this.$route.query.group).then(resp => {
|
const memberList = this.$store.state.training.memberData;
|
||||||
let lastData = JSON.stringify(resp.data);
|
let lastData = JSON.stringify(memberList);
|
||||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||||
roleTypeList.forEach(function(element) {
|
roleTypeList.forEach(function(element) {
|
||||||
const rolename = element.value;
|
const rolename = element.value;
|
||||||
if (Cookies.get('user_lang') == 'en') {
|
if (Cookies.get('user_lang') == 'en') {
|
||||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
|
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
|
||||||
} else {
|
} else {
|
||||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
|
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
lastData = JSON.parse(lastData);
|
lastData = JSON.parse(lastData);
|
||||||
const activeList = this.$store.state.map.activeTrainList;
|
const activeList = this.$store.state.map.activeTrainList;
|
||||||
const memberList = [];
|
lastData = Object.values(lastData);
|
||||||
// lastData = lastData.filter(memberIn=>{ return memberIn.role != '观众'; });
|
const lastMemberList = [];
|
||||||
lastData.forEach((member, index)=>{
|
lastData.forEach((member, index)=>{
|
||||||
if (member.type != '观众') {
|
if (member.type != '观众') {
|
||||||
const name = member.name == undefined ? '' : '-' + member.name;
|
const name = member.name == undefined ? '' : '-' + member.name;
|
||||||
if (member.deviceCode) {
|
if (member.deviceCode) {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
|
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
|
||||||
if (device) {
|
if (device) {
|
||||||
if (device._type == 'Train') {
|
if (device._type == 'Train') {
|
||||||
member.memberName = member.type + device.groupNumber + name;
|
member.memberName = member.type + device.groupNumber + name;
|
||||||
if (activeList.length > 0 && activeList.includes(device.groupNumber)) {
|
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);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
member.memberName = member.type + member.deviceCode + name;
|
member.memberName = member.type + device.name + name;
|
||||||
memberList.push(member);
|
lastMemberList.push(member);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
member.memberName = member.type + name;
|
member.memberName = member.type + member.deviceCode + name;
|
||||||
memberList.push(member);
|
lastMemberList.push(member);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
this.memberList = memberList;
|
|
||||||
|
|
||||||
if (this.recordSending) {
|
|
||||||
this.cancleRecording();
|
|
||||||
}
|
|
||||||
// 获取会话列表
|
|
||||||
getAllConversition(this.$route.query.group).then(resp=>{
|
|
||||||
if (resp.data && resp.data.length && resp.data.length > 0) {
|
|
||||||
this.isCreate = false;
|
|
||||||
const coversitionList = resp.data;
|
|
||||||
let memberListCoversition = {};
|
|
||||||
coversitionList.forEach(coversition=>{
|
|
||||||
if (!coversition.over) {
|
|
||||||
const memberList = coversition.memberList;
|
|
||||||
memberList.forEach(member=>{
|
|
||||||
if (member.memberId == this.$store.state.scriptRecord.updateRoleId) {
|
|
||||||
memberListCoversition = {id:coversition.id, all:null};
|
|
||||||
if (member.memberId == coversition.creatorId) {
|
|
||||||
this.isCreate = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.memberListCoversition = memberListCoversition;
|
|
||||||
} else {
|
} else {
|
||||||
this.isCreate = false;
|
member.memberName = member.type + name;
|
||||||
this.memberListCoversition = {};
|
lastMemberList.push(member);
|
||||||
}
|
}
|
||||||
this.getSimulationConverMembers();
|
}
|
||||||
});
|
});
|
||||||
|
this.memberList = lastMemberList;
|
||||||
|
this.getAllConversition();
|
||||||
|
},
|
||||||
|
getAllConversition() {
|
||||||
|
if (this.recordSending) {
|
||||||
|
this.cancleRecording();
|
||||||
|
}
|
||||||
|
// 获取会话列表
|
||||||
|
getAllConversition(this.$route.query.group).then(resp=>{
|
||||||
|
if (resp.data && resp.data.length && resp.data.length > 0) {
|
||||||
|
this.isCreate = false;
|
||||||
|
const coversitionList = resp.data;
|
||||||
|
let memberListCoversition = {};
|
||||||
|
coversitionList.forEach(coversition=>{
|
||||||
|
if (!coversition.over) {
|
||||||
|
const memberList = coversition.memberList;
|
||||||
|
memberList.forEach(member=>{
|
||||||
|
if (member.memberId == this.$store.state.scriptRecord.updateRoleId) {
|
||||||
|
memberListCoversition = {id:coversition.id, all:null};
|
||||||
|
if (member.memberId == coversition.creatorId) {
|
||||||
|
this.isCreate = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.memberListCoversition = memberListCoversition;
|
||||||
|
} else {
|
||||||
|
this.isCreate = false;
|
||||||
|
this.memberListCoversition = {};
|
||||||
|
}
|
||||||
|
this.getSimulationConverMembers();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取当前对话的信息
|
// 获取当前对话的信息
|
||||||
|
Loading…
Reference in New Issue
Block a user