Commit cc020cbc by qlintonger xeno

Merge remote-tracking branch 'origin/master'

parents 558dd55e 82bcd230
...@@ -4,6 +4,7 @@ import { userStates } from 'AnyR/states/wsStates' ...@@ -4,6 +4,7 @@ import { userStates } from 'AnyR/states/wsStates'
const useContactsStore = defineStore('contacts', { const useContactsStore = defineStore('contacts', {
state: (): ContactsState => { state: (): ContactsState => {
return { return {
fullScreen: false, //是否全屏
showContactsWait: false, //是否等待接通 showContactsWait: false, //是否等待接通
chooseContactsItem: undefined, //当前选中的联系人 chooseContactsItem: undefined, //当前选中的联系人
allContactsList: [] //所有联系人 allContactsList: [] //所有联系人
...@@ -51,6 +52,15 @@ const useContactsStore = defineStore('contacts', { ...@@ -51,6 +52,15 @@ const useContactsStore = defineStore('contacts', {
//获取全部联系人 //获取全部联系人
setUserList(info: ContactsItemDto[]) { setUserList(info: ContactsItemDto[]) {
this.allContactsList = info this.allContactsList = info
},
//视频全屏
handleFullScreen() {
if (!this.fullScreen) {
document.documentElement.requestFullscreen()
} else {
document.exitFullscreen()
}
this.fullScreen = !this.fullScreen
} }
}, },
......
...@@ -7,6 +7,7 @@ export interface ContactsItemDto { ...@@ -7,6 +7,7 @@ export interface ContactsItemDto {
[propName: string]: any [propName: string]: any
} }
export interface ContactsState { export interface ContactsState {
fullScreen?: boolean
showContactsWait: boolean showContactsWait: boolean
chooseContactsItem?: ContactsItemDto chooseContactsItem?: ContactsItemDto
allContactsList: ContactsItemDto[] allContactsList: ContactsItemDto[]
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="h-full"> <div class="h-full">
<a-layout class="h-full"> <a-layout class="h-full">
<!-- 头部区域 --> <!-- 头部区域 -->
<g-header></g-header> <g-header v-if="!fullScreen"></g-header>
<!-- 内容区域 --> <!-- 内容区域 -->
<a-layout class="h-[calc(100%-60px)]"> <a-layout class="h-[calc(100%-60px)]">
<!-- 视频等待遮罩 --> <!-- 视频等待遮罩 -->
...@@ -29,7 +29,7 @@ import { activedTheme } from '../../../project.ui.config' ...@@ -29,7 +29,7 @@ import { activedTheme } from '../../../project.ui.config'
//显示通话等待 //显示通话等待
const contactsStore = useContactsStore() const contactsStore = useContactsStore()
const { showContactsWait } = storeToRefs(contactsStore) const { showContactsWait, fullScreen } = storeToRefs(contactsStore)
//是否展示菜单 //是否展示菜单
const route = useRoute() const route = useRoute()
const getShowMenu = computed(() => { const getShowMenu = computed(() => {
......
<template> <template>
<a-row class="h-full flex-nowrap" :gap="16"> <a-row class="h-full flex-nowrap" :gap="16">
<a-col :flex="3" class="h-full"> <a-col :flex="3" class="h-full" v-if="!fullScreen">
<contacts-info :showGroup="false"></contacts-info> <contacts-info :showGroup="false"></contacts-info>
</a-col> </a-col>
<a-col :flex="10" class="h-full"> <a-col :flex="10" class="h-full ml-4">
<video-info></video-info> <video-info></video-info>
</a-col> </a-col>
<a-col :flex="3" class="h-full"> <a-col :flex="3" class="h-full" v-if="!fullScreen">
<video-chat></video-chat> <video-chat></video-chat>
</a-col> </a-col>
</a-row> </a-row>
...@@ -16,5 +16,11 @@ ...@@ -16,5 +16,11 @@
import ContactsInfo from '../contacts/contactsInfo.vue' import ContactsInfo from '../contacts/contactsInfo.vue'
import VideoInfo from './videoInfo.vue' import VideoInfo from './videoInfo.vue'
import VideoChat from './videoChat.vue' import VideoChat from './videoChat.vue'
import useContactsStore from '@/store/contacts/'
import { storeToRefs } from 'pinia'
//视频全屏
const contactsStore = useContactsStore()
const { fullScreen } = storeToRefs(contactsStore)
</script> </script>
<style lang="less" scoped></style> <style lang="less" scoped></style>
<template> <template>
<div class="g-block ml-4"> <div class="g-block">
<div class="flex justify-end items-center mb-4 px-4"> <div class="flex justify-end items-center mb-4 px-4">
<a-space size="medium"> <a-space size="medium">
<div class="tool py-[9px] bg-fill-bg1"> <!-- <div class="tool py-[9px] bg-fill-bg1">
<global-icon icon="view-gallery" :size="12"></global-icon> <global-icon icon="view-gallery" :size="12"></global-icon>
<span class="ml-1 color-text-2">视图</span> <span class="ml-1 color-text-2">视图</span>
</div> </div> -->
<div class="tool py-[9px] bg-fill-bg1"> <div class="tool py-[9px] bg-fill-bg1" @click="handleFullScreen">
<global-icon icon="fullscreen" :size="16"></global-icon> <template v-if="fullScreen">
<span class="ml-1 color-text-2">全屏</span> <global-icon icon="fullscreen-exit" :size="16"></global-icon>
<span class="ml-1 color-text-2">取消全屏</span>
</template>
<template v-else>
<global-icon icon="fullscreen" :size="16"></global-icon>
<span class="ml-1 color-text-2">全屏</span>
</template>
</div> </div>
</a-space> </a-space>
</div> </div>
...@@ -23,7 +29,9 @@ ...@@ -23,7 +29,9 @@
import VideoSlider from './videoSlider.vue' import VideoSlider from './videoSlider.vue'
import VideoTools from './videoTools.vue' import VideoTools from './videoTools.vue'
import { allOtherChattersIdSet } from 'AnyR/states/chatChannelStates' import { allOtherChattersIdSet } from 'AnyR/states/chatChannelStates'
import { computed, ref, onMounted } from 'vue' import useContactsStore from '@/store/contacts/'
import { storeToRefs } from 'pinia'
import { useFullscreen } from '@vueuse/core'
const inCenterUserVideoId = ref('') const inCenterUserVideoId = ref('')
...@@ -36,12 +44,23 @@ function idChangedHere(id: any) { ...@@ -36,12 +44,23 @@ function idChangedHere(id: any) {
} }
const userVideoContainerSet = computed(function () { const userVideoContainerSet = computed(function () {
const onTopUserSet = allOtherChattersIdSet.value.filter((a: any) => a !== inCenterUserVideoId.value); const onTopUserSet = allOtherChattersIdSet.value.filter((a: any) => a !== inCenterUserVideoId.value)
return { return {
onTopUserSet, onTopUserSet,
inCenter: inCenterUserVideoId.value inCenter: inCenterUserVideoId.value
} }
}) })
//全屏
const contactsStore = useContactsStore()
const { isFullscreen } = useFullscreen()
watch(isFullscreen, (value) => {
contactsStore.$patch({ fullScreen: value })
})
const { fullScreen } = storeToRefs(contactsStore)
const handleFullScreen = () => {
contactsStore.handleFullScreen()
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.tool { .tool {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment