新增地图弹窗 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 @@
@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()