修改监控
parent
4d18ab9ca0
commit
9444fafad6
|
|
@ -39,29 +39,40 @@
|
||||||
v-for="(item, index) in listBig"
|
v-for="(item, index) in listBig"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<VideoFlv class="cursor-pointer" :url="item.url" :name="item.base_name" />
|
<VideoFlv
|
||||||
|
@onScreen="onScreenClick"
|
||||||
|
class="cursor-pointer"
|
||||||
|
:url="item.url"
|
||||||
|
:name="item.base_name"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid grid-cols-3 gap-x-6px pt-10px">
|
<div class="grid grid-cols-3 gap-x-6px pt-10px">
|
||||||
<div class="h-66px" v-for="item in listSmall" :key="item.id">
|
<div class="h-66px" v-for="item in listSmall" :key="item.id">
|
||||||
<VideoFlv
|
<VideoFlv
|
||||||
|
@onScreen="onScreenClick"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
:url="item.url"
|
:url="item.url"
|
||||||
:name="item.base_name"
|
:name="item.base_name"
|
||||||
:screen="true"
|
:screen="true"
|
||||||
/>
|
/>
|
||||||
<!-- @onClick="onChangeVideo(item)" -->
|
|
||||||
<!-- <img
|
|
||||||
:src="item.img"
|
|
||||||
class="object-cover w-full h-full"
|
|
||||||
alt=""
|
|
||||||
srcset=""
|
|
||||||
@click.prevent.stop="onChangeVideo(item)"
|
|
||||||
/> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<LinkModal
|
||||||
|
v-model:visible="visibleModal"
|
||||||
|
:footer="null"
|
||||||
|
:title1="currentModelVideo && currentModelVideo.name"
|
||||||
|
:width="1100"
|
||||||
|
>
|
||||||
|
<template #content>
|
||||||
|
<div class="w-full">
|
||||||
|
<VideoFlv :url="currentModelVideo.url" :screen="false" :name="currentModelVideo.name" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</LinkModal>
|
||||||
</Box>
|
</Box>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -83,6 +94,7 @@
|
||||||
import v01 from '../../../assets/images/v01.png'
|
import v01 from '../../../assets/images/v01.png'
|
||||||
import v02 from '../../../assets/images/v02.png'
|
import v02 from '../../../assets/images/v02.png'
|
||||||
import v03 from '../../../assets/images/v03.png'
|
import v03 from '../../../assets/images/v03.png'
|
||||||
|
import LinkModal from '../LinkModal.vue'
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
Box,
|
Box,
|
||||||
|
|
@ -91,6 +103,7 @@
|
||||||
Menu,
|
Menu,
|
||||||
MenuItem: Menu.Item,
|
MenuItem: Menu.Item,
|
||||||
VideoFlv,
|
VideoFlv,
|
||||||
|
LinkModal,
|
||||||
},
|
},
|
||||||
props: ['baseId'],
|
props: ['baseId'],
|
||||||
setup(props) {
|
setup(props) {
|
||||||
|
|
@ -102,10 +115,14 @@
|
||||||
list: ref<any[]>([]),
|
list: ref<any[]>([]),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const visibleModal = ref(false)
|
||||||
|
|
||||||
const chartRef = ref<HTMLDivElement | null>(null)
|
const chartRef = ref<HTMLDivElement | null>(null)
|
||||||
|
|
||||||
const currentVido = ref<any>(null)
|
const currentVido = ref<any>(null)
|
||||||
|
|
||||||
|
const currentModelVideo = ref<any>(null)
|
||||||
|
|
||||||
const listSmall = computed(() => Data.list.slice(1, 4))
|
const listSmall = computed(() => Data.list.slice(1, 4))
|
||||||
const listBig = computed(() => Data.list.slice(0, 1))
|
const listBig = computed(() => Data.list.slice(0, 1))
|
||||||
|
|
||||||
|
|
@ -173,6 +190,12 @@
|
||||||
if (currentVido.value.url == e.url) return
|
if (currentVido.value.url == e.url) return
|
||||||
currentVido.value = e
|
currentVido.value = e
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onScreenClick(e) {
|
||||||
|
currentModelVideo.value = e
|
||||||
|
visibleModal.value = true
|
||||||
|
}
|
||||||
|
|
||||||
const isBase = computed(() => !!props.baseId)
|
const isBase = computed(() => !!props.baseId)
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
|
|
@ -193,10 +216,13 @@
|
||||||
listSmall,
|
listSmall,
|
||||||
onChangeVideo,
|
onChangeVideo,
|
||||||
currentVido,
|
currentVido,
|
||||||
|
currentModelVideo,
|
||||||
...toRefs(Data),
|
...toRefs(Data),
|
||||||
chartRef,
|
chartRef,
|
||||||
currentTabValue,
|
currentTabValue,
|
||||||
onMenuClick,
|
onMenuClick,
|
||||||
|
visibleModal,
|
||||||
|
onScreenClick,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="w-full h-full relative">
|
<div class="w-full h-full relative">
|
||||||
<!-- <SvgIcon
|
<video
|
||||||
v-if="isScreen && false"
|
class="w-full h-full bg-gray-700 bg-opacity-30"
|
||||||
name="full-screen"
|
autoplay
|
||||||
class="text-white absolute left-15px top-15px z-20 cursor-pointer"
|
controls
|
||||||
size="20"
|
ref="videoRef"
|
||||||
@click="visibleModal = true"
|
muted
|
||||||
/> -->
|
></video>
|
||||||
|
|
||||||
<video class="w-full h-full" autoplay controls ref="videoRef" muted></video>
|
|
||||||
<div class="absolute left-0 w-full top-0 h-full" @click.prevent.stop="onScreen"></div>
|
<div class="absolute left-0 w-full top-0 h-full" @click.prevent.stop="onScreen"></div>
|
||||||
|
|
||||||
<LinkModal v-model:visible="visibleModal" :footer="null" :title1="pName" :width="1100">
|
|
||||||
<template #content>
|
|
||||||
<div class="w-full">
|
|
||||||
<VideoFlv :url="pUrl" :screen="false" :name="pName" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</LinkModal>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import flvjs from 'flv.js'
|
import flvjs from 'flv.js'
|
||||||
import { defineComponent, ref, unref, onMounted, watch, onBeforeUnmount, computed } from 'vue'
|
import { defineComponent, ref, unref, onMounted, watch, onBeforeUnmount, computed } from 'vue'
|
||||||
// import { SvgIcon } from '/@/components/Icon'
|
|
||||||
import LinkModal from '../LinkModal.vue'
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'VideoFlv',
|
name: 'VideoFlv',
|
||||||
components: {
|
|
||||||
// SvgIcon,
|
|
||||||
LinkModal,
|
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
url: {
|
url: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
@ -51,8 +35,6 @@
|
||||||
let player: any | null = null
|
let player: any | null = null
|
||||||
const pUrl = ref(props.url)
|
const pUrl = ref(props.url)
|
||||||
|
|
||||||
const visibleModal = ref(false)
|
|
||||||
|
|
||||||
const pName = computed(() => props.name)
|
const pName = computed(() => props.name)
|
||||||
|
|
||||||
const isScreen = computed(() => props.screen)
|
const isScreen = computed(() => props.screen)
|
||||||
|
|
@ -79,7 +61,7 @@
|
||||||
|
|
||||||
function onScreen() {
|
function onScreen() {
|
||||||
if (isScreen.value) {
|
if (isScreen.value) {
|
||||||
visibleModal.value = true
|
emit('onScreen', { url: props.url, name: props.name })
|
||||||
} else {
|
} else {
|
||||||
emit('onClick')
|
emit('onClick')
|
||||||
}
|
}
|
||||||
|
|
@ -113,7 +95,6 @@
|
||||||
onScreen,
|
onScreen,
|
||||||
isScreen,
|
isScreen,
|
||||||
pUrl,
|
pUrl,
|
||||||
visibleModal,
|
|
||||||
videoRef,
|
videoRef,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -148,4 +129,12 @@
|
||||||
video::-webkit-media-controls-play-button {
|
video::-webkit-media-controls-play-button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
video::-webkit-media-controls {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
video::-webkit-media-controls-enclosure {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue