| | |
| | | <template> |
| | | <div class="video-container"> |
| | | <div id="player"></div> |
| | | <div class="video-content"> |
| | | <video :src="props.videoUrl" class="video-player" controls ref="player"></video> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref} from 'vue'; |
| | | import Player from 'xgplayer'; |
| | | import {ref, onMounted, onBeforeUnmount} from 'vue'; |
| | | |
| | | const props = defineProps({ |
| | | videoUrl: { |
| | | type: String, |
| | | required: true |
| | | }, |
| | | poster: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }); |
| | | |
| | | const player = ref(null); |
| | | |
| | | |
| | | onMounted(() => { |
| | | }); |
| | | |
| | | onBeforeUnmount(() => { |
| | | player.value.pause(); |
| | | }); |
| | | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .video-container { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | background: rgba($color: #000000, $alpha: 0.5); |
| | | .video-content { |
| | | width: 70%; |
| | | height: 800px; |
| | | } |
| | | } |
| | | |
| | | .video-player { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | |
| | | <div class="card-footer flex justify-center mb-7 shrink-0"> |
| | | <el-pagination background layout="prev, pager, next" :total="1000" /> |
| | | <el-pagination background layout="prev, pager, next" :total="dataList.length" |
| | | :default-page-size="20" |
| | | :currentPage="currentIndex" |
| | | :hide-on-single-page="true" |
| | | @current-change="handleCurrentChange"/> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | |
| | | |
| | | const handleClick = (tab, event) => { |
| | | }; |
| | | |
| | | const handleCurrentChange = (val) => { |
| | | getData(); |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | </div> |
| | | |
| | | <!-- 视频查看 --> |
| | | <div class="video-container"> |
| | | |
| | | <div class="video-container" v-show="videoViewer"> |
| | | <VideoViewer :videoUrl="videoUrl"></VideoViewer> |
| | | <div class="close-btn"> |
| | | <el-button type="danger" size="large" circle @click="closeViewer"> |
| | | <template #icon> |
| | | <el-icon :size="20"> |
| | | <Close /> |
| | | </el-icon> |
| | | </template> |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | import { getFileList } from '@/api/modules/file.js'; |
| | | |
| | | import PDFViewer from '@/components/PDFViewer/index.vue'; |
| | | import VideoViewer from '@/components/VideoViewer/index.vue'; |
| | | |
| | | import { useUserStore } from '@/store/index.js'; |
| | | import useWebScoket from '@/hooks/useWebScoket.js'; |
| | | |
| | |
| | | iconPath: '/static/icons/file_type_video.png', |
| | | handle: (item) => { |
| | | console.log(item); |
| | | videoViewer.value = true; |
| | | videoUrl.value = [item.contentUrl.url]; |
| | | resendMessage(); |
| | | } |
| | | }, |
| | |
| | | |
| | | const imageList = ref([]); |
| | | const pdfFile = ref(''); |
| | | const videoUrl = ref(''); |
| | | |
| | | const fileList = ref([]); |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .video-container { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | z-index: 99999; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | |
| | | .close-btn { |
| | | position: absolute; |
| | | top: 60px; |
| | | right: 100px; |
| | | z-index: 9999999; |
| | | |
| | | :deep(.el-button) { |
| | | width: fit-content; |
| | | height: fit-content; |
| | | padding: 10px !important; |
| | | } |
| | | } |
| | | } |
| | | </style> |