From 333158160c33ecaf16a74534bd87ab3ec0c88ecf Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期一, 25 一月 2021 18:36:09 +0800
Subject: [PATCH] 朔黄视频播放栅格添加点击事件,修复aliplayer组件标注点污染的问题
---
src/pages/shuohuangMonitorAnalyze/components/aliPlayer/index.vue | 1 +
src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue | 2 +-
src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue | 19 ++++++++++++++++---
3 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/pages/shuohuangMonitorAnalyze/components/aliPlayer/index.vue b/src/pages/shuohuangMonitorAnalyze/components/aliPlayer/index.vue
index d9705db..961297a 100644
--- a/src/pages/shuohuangMonitorAnalyze/components/aliPlayer/index.vue
+++ b/src/pages/shuohuangMonitorAnalyze/components/aliPlayer/index.vue
@@ -207,6 +207,7 @@
},
mounted() {
this.$nextTick(() => {
+ console.log('player marks',this.markers);
this.init();
});
},
diff --git a/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue b/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue
index f1556b5..f352024 100644
--- a/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue
+++ b/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue
@@ -236,7 +236,6 @@
<span>鎾斁瑙嗛</span>
</div>
</div>
-
<video-analyze :videoDetails="selectedVideo" />
</el-dialog>
</div>
@@ -463,6 +462,7 @@
let _this = this;
_this.selectedVideo = data;
_this.videoDialogVisible = true;
+
},
checkFollow () {
diff --git a/src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue b/src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue
index 33cca4f..f4955fe 100644
--- a/src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue
+++ b/src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue
@@ -58,6 +58,7 @@
:ref="`gridVideoItem_${index}`"
v-for="(item,index) in videoWrapArr"
:key="index"
+ @click="checkCurVideo(index)"
>
<template v-if="index<=videoArrs.length-1">
<div :class="{'currentPlayer':curVideo.ID==videoArrs[index].ID}">
@@ -221,11 +222,17 @@
},
},
mounted () {
+ console.log('analyze mount')
this.renderLabelOpts();
this.setGuid(1);
this.getVideos(this.videoDetails);
},
methods: {
+ checkCurVideo(index){
+ if(this.relativeVideos[index]){
+ this.curVideo = this.relativeVideos[index]
+ }
+ },
getVideos (video) {
let _this = this;
getRelatedVideoInfo({ UniqeID: video.UniqeID }).then(res => {
@@ -238,8 +245,10 @@
_this.curVideo = res.data[0];
_this.videoArrs = res.data;
_this.relativeVideos = res.data;
- debugger
-
+ this.$nextTick(()=>{
+ _this.$refs[`player_${_this.curVideo.ID}`][0].init();
+ })
+
})
},
renderLabelOpts () {
@@ -250,6 +259,10 @@
},
checkVideo (video, index) {
this.curVideo = video;
+ this.$nextTick(()=>{
+ this.$refs[`player_${this.curVideo.ID}`][0].init();
+ })
+
if (index > 0 && this.guid == 1) {
//this.videoWrapArr =
}
@@ -311,7 +324,7 @@
let someVideo = _this.videoArrs.find(video=>video.ID === label.ParentID);
someVideo.LableLst.push(label);
})
- _this.curVideo.LableLst = rsp.data;
+ //_this.curVideo.LableLst = rsp.data;
this.$message.success("娣诲姞鎴愬姛")
// 鏍囨敞
--
Gitblit v1.8.0