From 933db5fb50271630ecd1b89cce3c07006f953cc9 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 29 May 2020 16:56:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=BC=E5=90=88=E6=BC=94=E7=BB=83=20?= =?UTF-8?q?=E4=BB=BF=E7=9C=9F=E8=81=8A=E5=A4=A9=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/chat.js | 16 ++++ src/store/modules/socket.js | 8 +- .../displayNew/chatView/chatContent.vue | 49 +++++++---- .../displayNew/chatView/chatCreateGroup.vue | 2 +- src/views/newMap/displayNew/designIndex.vue | 12 +++ .../jointTrainingNew/chatView/chatBox.vue | 20 +++-- .../jointTrainingNew/chatView/chatContent.vue | 49 +++++++---- .../chatView/chatCoversitionList.vue | 87 ++----------------- .../chatView/chatMemberList.vue | 3 + .../jointTrainingNew/chatView/chatTooltip.vue | 20 ++++- 10 files changed, 137 insertions(+), 129 deletions(-) diff --git a/src/api/chat.js b/src/api/chat.js index 8d7915d4f..70eda4983 100644 --- a/src/api/chat.js +++ b/src/api/chat.js @@ -345,3 +345,19 @@ export function getSimulationChatMemberNew(group, conversationId) { }); } +// 接受其他人的会话邀请 (新版地图) +export function acceptCoversitionInvite(group, conversationId) { + return request({ + url: `/simulation/${group}/${conversationId}/accept`, + method: 'put' + }); +} + +// 退出该群聊 (新版地图) +export function quitCoversition(group, conversationId) { + return request({ + url: `/simulation/${group}/${conversationId}/exist`, + method: 'delete' + }); +} + diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 12c9f15c4..4f5ab7c90 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -32,6 +32,9 @@ function handle(state, data) { case 'Simulation_Start_Conversation': // 综合演练仿真-聊天界面用户邀请其他人加入群聊 state.inviteOtherIntoChat = msg; break; + case 'Simulation_Accept_Conversation': // 综合演练仿真-聊天界面用户接受被邀请 + state.acceptInviteChat = msg; + break; case 'Competition_Practical': // 竞赛裁判系统裁判员开始考试推送消息 state.competitionStart++; // 竞赛裁判系统裁判员开始考试推送消息 break; @@ -163,9 +166,7 @@ function handleSimulationInfo(state, data) { member:data.member, memberOnline:data.member.online, chatTime: data.chatTime, - targetOnline:data.targetMember ? data.targetMember.online : null, - targetName:data.targetMember ? data.targetMember : 'All', - targetRole:data.targetMember ? data.targetMember.role : null, + targetUser:data.targetMember ? data.targetMember : 'All', all: data.all, date: +new Date(`${myDate1} ${chatTime}`) }; @@ -218,6 +219,7 @@ const socket = { simulationReset: '', // 仿真-异常消息 simulationText: {}, // 仿真-用户交互消息(聊天/命令), inviteOtherIntoChat:{}, // 综合演练仿真-聊天界面用户邀请其他人加入群聊推送信息 + acceptInviteChat:{}, // 综合演练仿真-聊天界面用户接受聊天邀请 // coversitionList:{}, // 历史仿真-用户消息列表 message: {}, // 仿真聊天 diff --git a/src/views/newMap/displayNew/chatView/chatContent.vue b/src/views/newMap/displayNew/chatView/chatContent.vue index ff89831a5..67ed5ad7e 100644 --- a/src/views/newMap/displayNew/chatView/chatContent.vue +++ b/src/views/newMap/displayNew/chatView/chatContent.vue @@ -10,7 +10,7 @@
- @{{ covertName(chatContent.targetName) }} + @{{ covertName(chatContent.targetUser) }} {{ chatContent.message }}