From 50e5e92a058db08fdf9b94fe1e266191db5d595b Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Sun, 23 Apr 2023 15:43:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E7=BE=A4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newMap/display/newChat/chatDialog.vue | 19 +- .../newMap/display/newChat/editGroup.vue | 571 ++++++++++++++++++ 2 files changed, 586 insertions(+), 4 deletions(-) create mode 100644 src/views/newMap/display/newChat/editGroup.vue diff --git a/src/views/newMap/display/newChat/chatDialog.vue b/src/views/newMap/display/newChat/chatDialog.vue index 0bdf5f338..5b8a7e6a1 100644 --- a/src/views/newMap/display/newChat/chatDialog.vue +++ b/src/views/newMap/display/newChat/chatDialog.vue @@ -34,13 +34,13 @@
- +
-
+
{{ item.name }}
{{ getLastMsg(item.messageList) }}
@@ -66,6 +66,7 @@
工作台
通讯录
+ @@ -74,10 +75,12 @@ import {mapGetters} from 'vuex'; import { getGroupList, sendText } from '@/api/newChat'; import { timestampFormat } from '@/utils/date'; import ChatContent from './chatContent'; +import EditGroup from './editGroup'; export default { name: '', components: { - ChatContent + ChatContent, + EditGroup }, props: { @@ -173,6 +176,9 @@ export default { this.handleClose(); }, methods: { + createGroup() { + this.$refs.editGroup.doShow(); + }, sendMsg() { sendText(this.groupId, {id: this.id, content:this.inputMsg}).then(res => { console.log(res, '--res--'); @@ -184,7 +190,12 @@ export default { getLastMsg(list) { let msg = ''; if (list.length) { - msg = list[list.length - 1].content; + const last = list[list.length - 1]; + if (last.type == 'Text') { + msg = last.content; + } else if (last.type == 'Voice') { + msg = '[语音]'; + } } return msg; }, diff --git a/src/views/newMap/display/newChat/editGroup.vue b/src/views/newMap/display/newChat/editGroup.vue new file mode 100644 index 000000000..b097a3220 --- /dev/null +++ b/src/views/newMap/display/newChat/editGroup.vue @@ -0,0 +1,571 @@ + + + + + + +