类型:开发

描述:
This commit is contained in:
2025-04-02 12:27:59 +08:00
parent 5a0fa16d03
commit b67da6ce24
13 changed files with 84 additions and 44 deletions

View File

@@ -14,7 +14,7 @@
{{ item.dictLabel }}
</span>
</div>
<div
<div
:class="{ active: current == 3 }"
@click="handleNav(3)" class="li">
<span>自定义</span>
@@ -129,7 +129,7 @@
</div>
<div class="video-right">
<div class="flex justify-between">
<Title2 title="异常告警" />
<!-- <Title2 title="异常告警" />-->
<div class="back-box" @click="handleBack">
<img class="icon" src="@/assets/images/back.png" />
<span>返回</span>
@@ -162,7 +162,7 @@
</div>
</div>
</div>
<VideoDialog v-model="show" :isCollect="isCollect" :src="videoSrc" />
<VideoDialog v-model="show" :cameraIndexCode="cameraIndexCode" :isCollect="isCollect" :src="videoSrc" />
</template>
<script setup>
@@ -277,6 +277,7 @@
maxMaxBufferLength: 15, // 缓冲区长度的上限
maxBufferSize: 20 * 1000 * 1000 // 最大缓冲大小(字节)
})
console.log(item.hlsUrl);
hls.loadSource(item.hlsUrl)
hls.attachMedia(video)
hls.on(Hls.Events.MANIFEST_PARSED, () => {
@@ -294,11 +295,12 @@
videoList.value = []
total.value = 0
current.value = e
if(e==3){
getColletList(3)
return false
}
getVideoList()
if(e==3){
getColletList()
}else{
getVideoList()
}
}
const handleBack = () => {
videoLog.value = 1
@@ -345,13 +347,14 @@
const handleRegions = (e) => {
regionList.value[e].show = !regionList.value[e].show
}
const handleCamera = async (cameraIndexCode,resource) => {
const handleCamera = async (itemCode,resource) => {
show.value = true
let res = await getPreviewUrlApi({
type: 'hls',
cameraIndexCode
cameraIndexCode:itemCode
})
isCollect.value = resource.isCollect
cameraIndexCode.value = itemCode;
isCollect.value = resource.isCollect
videoSrc.value = res.data.url
}
const handleCollect = async (id, status, index) => {
@@ -367,18 +370,17 @@
pubSub.publish('videoCollect', id)
}
const getVideoList = async (val) => {
try {
if (loading.value) return
loading.value = true
if(val==3){
params.businessVideoDisplayPosition = ''
}else{
params.businessVideoDisplayPosition = navList.value[current.value].dictValue
params.businessVideoDisplayPosition = navList.value[current.value].dictValue
}
let res = await getVideoListApi(params)
console.log(res,'list 55555')
total.value = res.total
if (res.data.length > 0) {
// postVideoRemain()
@@ -428,7 +430,7 @@
console.log(regionList.value, ' regionList.value')
}
const onMonitorChange = () => {
monitorChange = pubSub.subscribe('monitorChange', (res, data) => {
current.value = 0
params.businessScenicArea = data.scenicSpotId