From 115a3f1f10f21ea19b46e31e7a5f3b178f46aea2 Mon Sep 17 00:00:00 2001 From: wangyifeng <812766448@qq.com> Date: Mon, 19 May 2025 18:09:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=95=E8=81=8A=E7=BE=A4?= =?UTF-8?q?=E8=81=8A=E7=9A=84=E8=81=8A=E5=A4=A9=E8=AE=BE=E7=BD=AE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=EF=BC=8C=E5=B9=B6=E5=AE=8C=E6=88=90=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E7=BE=A4=E6=88=90=E5=91=98=E9=83=A8=E5=88=86=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=EF=BC=9B=E9=87=8D=E6=9E=84=E4=BB=8E=E8=81=8A?= =?UTF-8?q?=E5=A4=A9APP=E6=8E=A5=E5=85=A5=E7=9A=84=E6=8C=89=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E6=90=9C=E7=B4=A2=E5=8E=86=E5=8F=B2=E8=81=8A=E5=A4=A9?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E7=BB=84=E4=BB=B6=EF=BC=8C=E5=A4=84=E7=90=86?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=B1=BB=E5=9E=8B=E3=80=81=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=B1=BB=E5=9E=8B=E6=98=BE=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E6=8E=A5=E5=85=A5naive=E2=80=94UI=E7=9A=84=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 5 + env/.env.test | 6 +- src/assets/image/icon/search-grey.png | Bin 0 -> 436 bytes src/components/group/GroupPanel.vue | 318 ++++++++-- src/components/search/searchByCondition.vue | 623 +++++++++++--------- src/views/message/inner/IndexContent.vue | 42 +- 6 files changed, 676 insertions(+), 318 deletions(-) create mode 100644 src/assets/image/icon/search-grey.png diff --git a/components.d.ts b/components.d.ts index f68af7f..4c5a35a 100644 --- a/components.d.ts +++ b/components.d.ts @@ -33,6 +33,7 @@ declare module 'vue' { GroupNotice: typeof import('./src/components/group/GroupNotice.vue')['default'] GroupNoticeMessage: typeof import('./src/components/talk/message/GroupNoticeMessage.vue')['default'] GroupPanel: typeof import('./src/components/group/GroupPanel.vue')['default'] + HighLightText: typeof import('./src/components/search/highLightText.vue')['default'] HistoryRecord: typeof import('./src/components/talk/HistoryRecord.vue')['default'] ImageMessage: typeof import('./src/components/talk/message/ImageMessage.vue')['default'] LinkMessage: typeof import('./src/components/talk/message/LinkMessage.vue')['default'] @@ -59,12 +60,16 @@ declare module 'vue' { NoticeEditor: typeof import('./src/components/group/manage/NoticeEditor.vue')['default'] NoticeTab: typeof import('./src/components/group/manage/NoticeTab.vue')['default'] NotificationApi: typeof import('./src/components/common/NotificationApi.vue')['default'] + NPopover: typeof import('naive-ui')['NPopover'] NRadio: typeof import('naive-ui')['NRadio'] NSpin: typeof import('naive-ui')['NSpin'] NVirtualList: typeof import('naive-ui')['NVirtualList'] RevokeMessage: typeof import('./src/components/talk/message/RevokeMessage.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] + SearchByCondition: typeof import('./src/components/search/searchByCondition.vue')['default'] + SearchItem: typeof import('./src/components/search/searchItem.vue')['default'] + SearchList: typeof import('./src/components/search/searchList.vue')['default'] SysGroupAdminMessage: typeof import('./src/components/talk/message/system/SysGroupAdminMessage.vue')['default'] SysGroupCancelMutedMessage: typeof import('./src/components/talk/message/system/SysGroupCancelMutedMessage.vue')['default'] SysGroupCreateMessage: typeof import('./src/components/talk/message/system/SysGroupCreateMessage.vue')['default'] diff --git a/env/.env.test b/env/.env.test index 1238c3b..7157087 100644 --- a/env/.env.test +++ b/env/.env.test @@ -2,7 +2,9 @@ ENV = 'development' VITE_BASE=/ VUE_APP_PREVIEW=false -VITE_BASE_API=http://114.218.158.24:8503 +VITE_BASE_API=http://172.16.100.93:8503 +# VITE_BASE_API=http://192.168.88.21:9503 VITE_EPR_BASEURL=http://114.218.158.24:9020 -VITE_SOCKET_API=ws://114.218.158.24:8504 +VITE_SOCKET_API=ws://172.16.100.93:8504 +# VITE_SOCKET_API=ws://192.168.88.21:9504 VUE_APP_WEBSITE_NAME="Lumen IM" \ No newline at end of file diff --git a/src/assets/image/icon/search-grey.png b/src/assets/image/icon/search-grey.png new file mode 100644 index 0000000000000000000000000000000000000000..28c795625f0763dc86afa0e307212ee1cc1abac6 GIT binary patch literal 436 zcmeAS@N?(olHy`uVBq!ia0vp^3P7yL!3-q(e?%q&DaPU;cPEB*=VV?2Ie`H_A+A7r z{`~pVr%#_XYZj24F=NI|FaWY43kAU>g> zzM+4@`~~Yb>_2e+!u<#DKODFl>H}2u+SA1`#NzbXNvE3*De$;9r&`I*-6nSG^`HOk z=bW-nCtq0_$!Phc&D-VO#lKSgX}`iQaqZpYYID6~7DK@`rU$!?_A_nUui4A_DB$Vj zd)v7e^dDf+o4nV-M)p^8$QIMXd*1s52DqpkSnR^St?C-X<8A*M_kB}+xP57BTcL4I z+8SQgiKp*L_&U5lq|f->>(PBRfB*R}IoTKcOnu)Ucf0NCzl5zB9Y@oBH$358D_N-b zFWmBj)qMN;cLVr#)ZJ~jW=i$ldWWyKlVM@Gs-l(6F}q%`5MK}TTP%5UQ#v}hOani> klueq{ufSI6$McE(?+USHJN import { reactive, computed, watch, ref } from 'vue' -import { NEmpty, NPopover, NPopconfirm, NSwitch } from 'naive-ui' +import { NEmpty, NPopover, NPopconfirm, NSwitch, NIcon, NInput } from 'naive-ui' import { useUserStore } from '@/store' import GroupLaunch from './GroupLaunch.vue' import GroupManage from './manage/index.vue' -import { Comment, Search, Close, Plus } from '@icon-park/vue-next' +import { Comment, Search, Close, Plus, Down, Up } from '@icon-park/vue-next' import { ServeGroupDetail, ServeGetGroupMembers, @@ -13,6 +13,8 @@ import { } from '@/api/group' import { useInject } from '@/hooks' import customModal from '@/components/common/customModal.vue' +import avatarModule from '@/components/avatar-module/index.vue' +import UserCardModal from '@/components/user/UserCardModal.vue' const userStore = useUserStore() const { showUserInfoModal } = useInject() @@ -45,7 +47,8 @@ const state = reactive({ name: '', profile: '', visit_card: '', - notice: '' + notice: '', + group_type: 0 }, remark: '', isShowModal: false, //是否显示提示模态框 @@ -58,12 +61,16 @@ const state = reactive({ actionBtns: { confirmBtn: true, cancelBtn: true - } // 操作按钮 + }, // 操作按钮 + showAllMember: false, // 是否显示全部成员 + openGroupMemberSearch: false, //是否开启群成员搜索 + isShowUserCardModal: false, //是否显示成员信息模态框 + userInfo: {} //当前打开的成员信息卡信息 }) const members = ref([]) -const search = computed(() => { +const groupMemberList = computed(() => { if (state.keywords) { return members.value.filter((item: any) => { return ( @@ -110,6 +117,7 @@ function loadDetail() { state.detail.name = result.group_name state.detail.profile = result.profile state.detail.visit_card = result.visit_card + state.detail.group_type = result.group_type state.remark = result.visit_card if (result.notice) { @@ -127,7 +135,7 @@ function loadMembers() { group_id: props.gid }).then((res) => { if (res.code == 200) { - members.value = res.data.items || [] + members.value = res.data.sortItems || [] } }) } @@ -190,7 +198,7 @@ const showChatSettingOperateModal = (type: string) => { break case 'quit': state.chatSettingOperateHint = '确定退出群聊' - const findAdmin = search.value.find((item) => item.leader === 2 || item.leader === 1) + const findAdmin = groupMemberList.value.find((item) => item.leader === 2 || item.leader === 1) const isLastAdmin = findAdmin && findAdmin.user_id === userStore.uid if (isLastAdmin) { state.chatSettingOperateSubHint = '退出后,本群将被解散' @@ -204,6 +212,37 @@ const showChatSettingOperateModal = (type: string) => { const showSearchRecordByConditionModal = () => { emit('handleSearchRecordByConditionModalShow', true) } + +//根据群类型返回群类型文本 +const groupTypeText = computed(() => { + let groupTypeText_ = '' + switch (state.detail.group_type) { + case 1: + groupTypeText_ = '普通群' + break + case 2: + groupTypeText_ = '部门群' + break + case 3: + groupTypeText_ = '项目群' + break + case 4: + groupTypeText_ = '公司群' + } + return groupTypeText_ +}) + +//取消搜索群成员 +const cancelSearch = () => { + state.openGroupMemberSearch = false + state.keywords = '' +} + +//点击显示成员信息 +const showMemberInfo = (memberItem: any) => { + state.userInfo = memberItem + state.isShowUserCardModal = true +} + +