代码调整
This commit is contained in:
parent
376662d96e
commit
13a3ccf066
@ -148,7 +148,7 @@ function handleSimulationInfo(state, data) {
|
||||
memberOnline:data.member.online,
|
||||
chatTime: data.chatTime,
|
||||
targetOnline:data.targetMember ? data.targetMember.online : null,
|
||||
targetName:data.targetMember ? data.targetMember.name : null,
|
||||
targetName:data.targetMember ? data.targetMember.name : 'All',
|
||||
targetRole:data.targetMember ? data.targetMember.role : null,
|
||||
group: data.group,
|
||||
date: +new Date(`${myDate1} ${chatTime}`)
|
||||
|
@ -5,7 +5,7 @@
|
||||
<div :class="showMembers?'memberAnimate chat-box-members':'chat-box-members'">
|
||||
<div class="chat-member-title">成员列表</div>
|
||||
<div class="chat-member-list">
|
||||
<div v-for="member in memberList" :key="member.id" :class="member.online?'each-chat-member':'each-chat-member each-chat-member-outline'" @click="createConversition(member)">{{ member.role+'-'+member.name }}</div>
|
||||
<div v-for="member in memberList" :key="member.id" :class="member.online?'each-chat-member':'each-chat-member each-chat-member-outline'" @click="createConversition(member)">{{ handleMember(member) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chat-box-main">
|
||||
@ -17,7 +17,7 @@
|
||||
:key="coversition.id"
|
||||
:class="coversition.id==currentCoversition.id?'coversition-active each-coversition':'each-coversition'"
|
||||
@click="changeCoversition(coversition)"
|
||||
>{{ coversition.name }}</div>
|
||||
>{{ handleMemberName(coversition) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chat-window">
|
||||
@ -129,6 +129,33 @@ export default {
|
||||
setSetting(data) {
|
||||
this.form = data;
|
||||
},
|
||||
handleMemberName(conversition) {
|
||||
if (conversition.group) {
|
||||
return conversition.name;
|
||||
} else {
|
||||
let coversitionName = '';
|
||||
conversition.memberList.forEach(member=>{
|
||||
if (member.userId != this.$store.state.user.id) {
|
||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||
let data = member.role;
|
||||
roleTypeList.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
if (Cookies.get('user_lang') == 'en') {
|
||||
data = data.replace(rolename, element.enLabel);
|
||||
} else {
|
||||
data = data.replace(rolename, element.label);
|
||||
}
|
||||
});
|
||||
coversitionName = member.name ? data + '-' + member.name : data;
|
||||
}
|
||||
});
|
||||
return coversitionName;
|
||||
// conversition.name ? coversitionName + '-' + conversition.name : coversitionName;
|
||||
}
|
||||
},
|
||||
handleMember(member) {
|
||||
return member.name ? member.role + '-' + member.name : member.role;
|
||||
},
|
||||
// 语音录制开始
|
||||
startRecording() {
|
||||
const that = this;
|
||||
|
@ -8,6 +8,7 @@
|
||||
</div>
|
||||
<div class="userBubble" @click="playAudio('audio'+index)">
|
||||
<div class="userMessage">
|
||||
<span v-if="chatContent.group&&!chatContent.member.robot">@{{ chatContent.targetName }}</span>
|
||||
<span class="el-icon-video-play playicon" />
|
||||
<span class="messageText">{{ chatContent.message }}</span>
|
||||
<audio :id="'audio'+index" :src="baseUrl+chatContent.src" style="display:none" />
|
||||
@ -68,6 +69,7 @@ export default {
|
||||
}
|
||||
coversition.src = coversition.isAudio ? `/jlcloud/audio/${coversition.audioPath}` : '';
|
||||
coversition.memberName = coversition.member.name;
|
||||
coversition.targetName = coversition.targetMember ? coversition.targetMember.name : 'All';
|
||||
coversition.memberRole = coversition.member.role;
|
||||
return coversition;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user