hanbaoshan
2021-01-25 333158160c33ecaf16a74534bd87ab3ec0c88ecf
朔黄视频播放栅格添加点击事件,修复aliplayer组件标注点污染的问题
3个文件已修改
22 ■■■■ 已修改文件
src/pages/shuohuangMonitorAnalyze/components/aliPlayer/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/shuohuangMonitorAnalyze/components/aliPlayer/index.vue
@@ -207,6 +207,7 @@
  },
  mounted() {
    this.$nextTick(() => {
      console.log('player marks',this.markers);
      this.init();
    });
  },
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 () {
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("添加成功")
          // 标注