From eb4cd6ab4acf0d0adbbcfd4e66a3e2029ee93f4a Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Thu, 27 Apr 2023 15:40:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E4=BC=9A=E8=AF=9D?= =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/cmdPlugin/newHandler.js | 6 ++++ .../newMap/display/newChat/chatContent.vue | 17 +++++++++-- .../newMap/display/newChat/chatDialog.vue | 30 +++++++++++++++---- 3 files changed, 44 insertions(+), 9 deletions(-) diff --git a/src/scripts/cmdPlugin/newHandler.js b/src/scripts/cmdPlugin/newHandler.js index b0cd0779e..b565e00eb 100644 --- a/src/scripts/cmdPlugin/newHandler.js +++ b/src/scripts/cmdPlugin/newHandler.js @@ -174,6 +174,12 @@ class Handler { fileBase64Str: 'no' } }; + if (operation.operationType == CMD.Conversation.CMD_Conversation_Group_Text_Chat.value) { // 兼容新会话接口 + step2.description = `选中:${operation.params.groupName},点击录制语音`; + operation2.params.id = operation.params.id; + operation3.operationType = CMD.Conversation.CMD_Conversation_Group_Audio_Base64.value; + operation3.params.id = operation.params.id; + } const step3 = { description: `请说出“${operation.params.content}”后,再次点击发送语音!`, memberId: stepInfo.memberId, diff --git a/src/views/newMap/display/newChat/chatContent.vue b/src/views/newMap/display/newChat/chatContent.vue index 5af1a18ac..15281e671 100644 --- a/src/views/newMap/display/newChat/chatContent.vue +++ b/src/views/newMap/display/newChat/chatContent.vue @@ -54,6 +54,10 @@ export default { id:{ type:Number, required:true + }, + groupName: { + type: String, + required:true } }, data() { @@ -110,6 +114,9 @@ export default { if (newVal !== oldVal && this.isBottom) { this.scrollTop(); } + }, + id() { + this.cancelRecording(); } }, mounted() { @@ -182,7 +189,7 @@ export default { return name; }, sendText() { - if (!this.id) { return; } + if (!this.id || !this.textContent) { return; } const operate = { over: true, cmdType: CMD.Conversation.CMD_Conversation_Group_Text_Chat, @@ -190,7 +197,8 @@ export default { userOperationType: UserOperationType.LEFTCLICK, param: { id: this.id, - content:this.textContent + groupName: this.groupName, + content: this.textContent } }; this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => { @@ -309,7 +317,10 @@ export default { if (!this.recordSending) { const operate = { operation: OperationEvent.Conversation.Chat.record.operation, - userOperationType: UserOperationType.LEFTCLICK + userOperationType: UserOperationType.LEFTCLICK, + param: { + id: this.id + } }; this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => { if (valid) { diff --git a/src/views/newMap/display/newChat/chatDialog.vue b/src/views/newMap/display/newChat/chatDialog.vue index 28c50ad1d..585858012 100644 --- a/src/views/newMap/display/newChat/chatDialog.vue +++ b/src/views/newMap/display/newChat/chatDialog.vue @@ -56,7 +56,7 @@
- +
文档
@@ -128,11 +128,22 @@ export default { list = find.messageList; } return list; + }, + groupName() { + let name = ''; + const find = this.groupList.find(item => { + return item.id == this.id; + }); + if (find) { + name = this.getGroupName(find); + } + return name; } }, watch: { '$store.state.socket.simulationReset': function (val) { // 仿真重置 if (val) { + this.id = 0; this.$store.dispatch('socket/resetConversationGroup'); } }, @@ -304,10 +315,18 @@ export default { @@ -326,7 +345,6 @@ export default { display: flex; justify-content: flex-end; align-items: center; - background: #0076F6; .icon { color: #fff; }