会话代码调整
This commit is contained in:
parent
bc10b0cbb2
commit
2c27c5a62c
@ -409,6 +409,7 @@ export default {
|
||||
this.conversitionStateMap = {};
|
||||
},
|
||||
'$store.state.socket.acceptConversionInvite':function(val) {
|
||||
if (this.conversitionId == val.id) {
|
||||
this.treeData.forEach(data => {
|
||||
data.children && data.children.forEach(item => {
|
||||
if (val.memberId == item.id && val.memberId != this.myMemberId) {
|
||||
@ -421,6 +422,7 @@ export default {
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.firstClick = true;
|
||||
|
95
src/views/newMap/chatView/chatTooltip.vue
Normal file
95
src/views/newMap/chatView/chatTooltip.vue
Normal file
@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<div v-show="dialogVisible" class="chatTooltipAll">
|
||||
<div class="chatTooltip">
|
||||
<div class="chatTooltipHeader">
|
||||
{{ inviteUserName }} 邀请您加入会话!
|
||||
</div>
|
||||
<div class="chatTooltipBootom">
|
||||
<div class="create-group-bottom">
|
||||
<el-button :loading="loading" size="small" type="primary" @click="doCreate">接受</el-button>
|
||||
<el-button size="small" @click="doClose">拒绝</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import {acceptConversitionInvite} from '@/api/chat';
|
||||
export default {
|
||||
name:'ChatTooltip',
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
inviteUserName:{
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
conversitionId:{
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible:false,
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
// {"conversationId":"22e10b17-7a6c-4b1b-8724-f87fb2053b76","from":{"id":"17","userId":"75","name":"赵",
|
||||
// "role":"STATION_SUPERVISOR","deviceType":"STATION","deviceCode":"Station32955","deviceName":"世纪大道","online":true,"robot":false}
|
||||
methods:{
|
||||
doShow() {
|
||||
this.loading = false;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doCreate() {
|
||||
this.loading = true;
|
||||
acceptConversitionInvite(this.group, this.conversitionId).then(res=>{
|
||||
this.loading = false;
|
||||
this.dialogVisible = false;
|
||||
this.$emit('acceptUser', res.data.creatorId);
|
||||
}).catch(error=>{
|
||||
this.$messageBox('接受邀请失败: ' + error.message);
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.chatTooltip{
|
||||
position: absolute;
|
||||
width: 290px;
|
||||
left: 23%;
|
||||
top: 42%;
|
||||
z-index: 5;
|
||||
background: #fff;
|
||||
padding: 15px;
|
||||
box-shadow: #969090 0px 0px 10px;
|
||||
border-radius: 4px;
|
||||
line-height: 20px;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
.chatTooltipHeader{
|
||||
margin-top:10px;
|
||||
font-size:14px;
|
||||
}
|
||||
.chatTooltipBootom{
|
||||
margin-top:10px;
|
||||
text-align: center;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.chatTooltipAll{
|
||||
position:absolute;
|
||||
width:100%;
|
||||
height:100%;
|
||||
left:0;
|
||||
top:0;
|
||||
z-index: 10;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user