4.3
This commit is contained in:
@@ -2,8 +2,10 @@
|
|||||||
<div class="video-box">
|
<div class="video-box">
|
||||||
<div v-if="videoLog == 1" class="video-wrapper">
|
<div v-if="videoLog == 1" class="video-wrapper">
|
||||||
<div class="video-list">
|
<div class="video-list">
|
||||||
|
<div class="empty-box" v-if="videoList.length==0&&cond">
|
||||||
|
未接入
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="videoList?.length"
|
|
||||||
class="video-item"
|
class="video-item"
|
||||||
v-for="(item, index) in videoList"
|
v-for="(item, index) in videoList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -37,10 +39,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="empty-box" v-else>
|
|
||||||
未接入
|
|
||||||
<!-- <el-empty :image="emptyIco" description="暂无数据" /> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@@ -146,6 +145,7 @@
|
|||||||
const LEFT = 'LEFT' // 左转
|
const LEFT = 'LEFT' // 左转
|
||||||
const RIGHT = 'RIGHT' // 右转
|
const RIGHT = 'RIGHT' // 右转
|
||||||
const STOP = 'STOP' // 停止操作
|
const STOP = 'STOP' // 停止操作
|
||||||
|
let cond = ref(false)
|
||||||
let ACTION = '0'
|
let ACTION = '0'
|
||||||
let hlsRefs = []
|
let hlsRefs = []
|
||||||
let hlsRef = null
|
let hlsRef = null
|
||||||
@@ -170,6 +170,7 @@
|
|||||||
params.pageNum = 1
|
params.pageNum = 1
|
||||||
videoList.value = []
|
videoList.value = []
|
||||||
total.value = 0
|
total.value = 0
|
||||||
|
cond.value = false
|
||||||
getRegionsList()
|
getRegionsList()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -230,15 +231,18 @@
|
|||||||
}
|
}
|
||||||
//获取酒店视频列表
|
//获取酒店视频列表
|
||||||
const getRegionsList = async()=>{
|
const getRegionsList = async()=>{
|
||||||
|
clearHlsRefs()
|
||||||
videoLog.value = 1
|
videoLog.value = 1
|
||||||
try {
|
try {
|
||||||
if (loading.value) return
|
if (loading.value) return
|
||||||
let res = await getRegionsListApi({...params})
|
let res = await getRegionsListApi({...params})
|
||||||
if (res.data.length > 0) {
|
if (res.data.length > 0) {
|
||||||
videoList.value = res.data
|
videoList.value = res.data
|
||||||
|
cond.value = true
|
||||||
total.value = res.total
|
total.value = res.total
|
||||||
console.log(videoList.value,'酒店视频列表')
|
console.log(videoList.value,'酒店视频列表')
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
if(!videoList.value.length) return false
|
||||||
videoList.value.forEach(async (x, index) => {
|
videoList.value.forEach(async (x, index) => {
|
||||||
const video = document.getElementById(`monitorVideo${index}`)
|
const video = document.getElementById(`monitorVideo${index}`)
|
||||||
const hls = new Hls({
|
const hls = new Hls({
|
||||||
@@ -255,6 +259,8 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
videoList.value = []
|
||||||
|
cond.value = true
|
||||||
if (timer) clearInterval(timer)
|
if (timer) clearInterval(timer)
|
||||||
}
|
}
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|||||||
Reference in New Issue
Block a user