mirror of
https://gitee.com/lijingbo-2021/open-anylink-web.git
synced 2026-05-14 11:17:50 +00:00
groupcard和通讯录可以调整到群组的聊天窗口
This commit is contained in:
@@ -27,6 +27,7 @@ import {
|
||||
groupUpdateMuteService
|
||||
} from '@/api/group'
|
||||
import { MsgType } from '@/proto/msg'
|
||||
import router from '@/router'
|
||||
|
||||
const groupData = groupStore()
|
||||
const userData = userStore()
|
||||
@@ -70,6 +71,17 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
const goToSessionTab = () => {
|
||||
router.push({
|
||||
path: '/message',
|
||||
query: {
|
||||
sessionId: sessionInfo.value.sessionId
|
||||
}
|
||||
})
|
||||
groupCardData.setIsShow(false)
|
||||
groupCardData.setGroupId('')
|
||||
}
|
||||
|
||||
const groupInfo = computed(() => {
|
||||
return groupData.groupInfoList[groupCardData.groupId] || {}
|
||||
})
|
||||
@@ -910,7 +922,13 @@ const onConfirmSingleSelect = (selected) => {
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div class="group-card-send-msg">
|
||||
<el-button type="primary" size="large" round style="width: 200px; font-size: 16px">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="large"
|
||||
round
|
||||
style="width: 200px; font-size: 16px"
|
||||
@click="goToSessionTab"
|
||||
>
|
||||
发送消息
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
<script setup>
|
||||
// import { ref } from 'vue'
|
||||
import { ChatRound, Phone, VideoCamera } from '@element-plus/icons-vue'
|
||||
import GroupItem from '@/components/item/GroupItem.vue'
|
||||
// import { sessionShowTime } from '@/js/utils/common'
|
||||
// import router from '@/router'
|
||||
// import { messageStore } from '@/stores'
|
||||
import router from '@/router'
|
||||
|
||||
const props = defineProps(['groupInfo', 'keyWords'])
|
||||
const emit = defineEmits(['showGroupCard'])
|
||||
@@ -14,13 +11,12 @@ const onShowGroupCard = () => {
|
||||
}
|
||||
|
||||
const goToSessionTab = () => {
|
||||
console.log('goToSessionTab')
|
||||
// router.push({
|
||||
// path: '/message',
|
||||
// query: {
|
||||
// sessionId: props.session.sessionId
|
||||
// }
|
||||
// })
|
||||
router.push({
|
||||
path: '/message',
|
||||
query: {
|
||||
sessionId: props.groupInfo.groupId
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -356,6 +356,12 @@ const pullMsg = async (mode = 0, ref = -1) => {
|
||||
const handleSelectedSession = async (sessionId) => {
|
||||
if (selectedSessionId.value !== sessionId) {
|
||||
selectedSessionId.value = sessionId
|
||||
router.push({
|
||||
path: '/message',
|
||||
query: {
|
||||
sessionId: sessionId
|
||||
}
|
||||
})
|
||||
initSession(sessionId)
|
||||
locateSession(sessionId)
|
||||
|
||||
@@ -600,6 +606,15 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
watch(
|
||||
() => router.currentRoute.value.query.sessionId,
|
||||
(newValue) => {
|
||||
if (newValue) {
|
||||
handleSelectedSession(newValue)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const sessionItemRefCollection = ref({})
|
||||
const setSessionItemRef = (sessionId, el) => {
|
||||
sessionItemRefCollection.value[sessionId] = el
|
||||
|
||||
Reference in New Issue
Block a user