新增地图弹窗 bug修改

This commit is contained in:
duanliang
2025-03-21 18:12:04 +08:00
parent 2208efc12e
commit 08041130e8
13 changed files with 262 additions and 51 deletions

View File

@@ -11,7 +11,7 @@
:key="index"
@click="handleItem(item)"
>
<div class="item-unfollow" @click.stop="handleCollect(item.id, index)">取消关注</div>
<div class="item-unfollow" @click.stop="handleCollect(item.cameraIndexCode, index)">取消关注</div>
<video class="item-video" :id="'video' + index" muted autoplay :controls="false">
<source type="application/x-mpegURL" />
</video>
@@ -75,7 +75,7 @@
}
const handleCollect = async (id, index) => {
await postVideoCollectApi({
id,
cameraIndexCode:id,
isCollect: 0
})
clearHlsRefs()

View File

@@ -11,7 +11,7 @@
@click="handleItem(item)"
>
<HlsPlayer :url="item.hlsUrl" />
<div class="item-unfollow" @click.stop="handleUnfollow(item.id, index)">取消关注</div>
<div class="item-unfollow" @click.stop="handleUnfollow(item.cameraIndexCode, index)">取消关注</div>
<!-- <div>
<p class="item-title--primary">
{{ item.cameraName || item.cameraIndexCode }}
@@ -31,7 +31,7 @@
</li>
</ul>
</div>
<video-dialog v-model="videoShow" :src="src" :cameraIndexCode="cameraIndexCode" />
<video-dialog v-model="videoShow" :src="src" :isCollect="isCollect" :cameraIndexCode="cameraIndexCode" />
<all-list v-model="allShow" />
</template>
@@ -41,7 +41,7 @@
import primary from '@/assets/images/item-primary.png'
import error from '@/assets/images/item-error.png'
import { getVideoListApi, getPreviewUrlApi } from '@/api/home'
import { getVideoListApi, getPreviewUrlApi,getColletListApi } from '@/api/home'
import { postVideoCollectApi, postVideoRemainApi } from '@/api/monitor'
import Hls from 'hls.js'
@@ -61,6 +61,7 @@
}
)
let isCollect = ref(0)
let list = ref([])
let src = ref('')
let cameraIndexCode = ref('')
@@ -72,6 +73,7 @@
const handleItem = (item) => {
src.value = item.hlsUrl
cameraIndexCode.value = item.cameraIndexCode
isCollect.value = item.isCollect
videoShow.value = true
}
@@ -92,12 +94,12 @@
videoShow.value = true
}
const getVideoList = async () => {
let res = await getVideoListApi({
isCollect: 1,
let res = await getColletListApi({
pageNum: 1,
pageSize: 5
})
list.value = res.data
console.log(list.value,'list.valuelist.valuelist.valuelist.value')
postVideoRemain()
// nextTick(() => {
// list.value.forEach(async (item, index) => {
@@ -138,7 +140,7 @@
const handleUnfollow = async (id, index) => {
await postVideoCollectApi({
id,
cameraIndexCode:id,
isCollect: 0
})
clearHlsRefs()

View File

@@ -1,5 +1,8 @@
<template>
<div class="header">
<div v-if="isBack" class="back2" @click="handleHome">
<img class="icon" src="@/assets/images/home.png" alt="" /> 首页
</div>
<ul class="nav-left">
<li
class="nav-left-item"
@@ -142,11 +145,14 @@
minute
)}:${fillZero(second)}`
}
// 返回
// 返回上一
const handleBack = () => {
router.push('/home')
router.back()
}
// 返回首页
const handleHome = ()=>{
router.push('/home')
}
const handleCommand = (item, type) => {
current.value = ''
@@ -172,7 +178,7 @@
// 点击导航
const handleNav = (item) => {
console.log(item,'测试一下 ')
// console.log(item.path,'测试一下 ')
if (isSkip.value) {
router.push(item.path)
} else {
@@ -222,8 +228,8 @@
isSkip.value = true
isBack.value = false
navLeft.value = [
{ name: '景区', path: '/scenic' },
{ name: '监控', path: '/monitor' },
{ name: '景区', path: '/scenic' },
{ name: '交通', path: '/traffic' }
]
navRight.value = [
@@ -238,9 +244,10 @@
isBack.value = true
let res = await getSpotListApi()
navLeft.value = res.data
current.value = 0
console.log(res.data,'22220000')
current.value = res.data[0].id
title.value = navLeft.value[current.value].name
pubSub.publish('scenicChange', navLeft.value[current.value])
pubSub.publish('scenicChange', navLeft.value[0])
otherLeftNav.value = [
// {
// name: '大窝景区'
@@ -399,6 +406,28 @@
height: auto;
}
}
.back2 {
position: absolute;
left: 0;
top: vh(50);
width: vw(130);
height: vh(36);
font-weight: 600;
font-size: vw(20);
color: #ffffff;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
border-radius: vw(60);
border: 1px solid rgba(0, 114, 220, 0.3);
background: linear-gradient(270deg, rgba(8, 41, 86, 0.16) 0%, #0b61b4 100%);
.icon {
margin-right: vw(10);
width: vw(24);
height: auto;
}
}
.title {
width: vw(3170);
height: vh(120);