heyujie
2021-06-22 86221ad1d49bcb042eee9141b0c497b9c6a9adf5
src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue
@@ -52,10 +52,10 @@
          <div class="v-name-block">
            <div
              class="video-name"
              :class="{ current: curVideo.ID == video.ID }"
              :class="{ current: curVideo.id == video.id }"
              @click="checkVideo(video, index)"
              v-for="(video, index) in curRoomVideos"
              :key="video.ID"
              :key="video.id"
            >
              <i class="el-icon-film"></i>
              <span>{{ video.VideoDate }}</span>
@@ -396,7 +396,7 @@
    this.renderLabelOpts();
    this.setGuid(1);
    this.getCurVideos(this.videoDetails);
    // this.getRelatedVideos(this.videoDetails);
    this.getRelatedVideos(this.videoDetails);
  },
  destroyed() {
    this.videoArrs.length = 0;
@@ -569,14 +569,7 @@
        CarNumber: v.CarNumber,
        Driver1: v.Driver1,
      }).then((res) => {
        // 填充单窗口的下拉菜单
        res.data.forEach((item) => {
          _this.popDownArr.push(item);
        });
        // if (_this.popDownArr.length) {
        //   _this.curCamera = _this.popDownArr[0].CameraPosition;
        // }
        res.data.forEach((item) => {
          item.marks = _this.mergeMarks(item);
        });
@@ -616,15 +609,15 @@
    getRelatedVideos(video) {
      let _this = this;
      getRelatedVideoInfo({ GroupID: video.GroupID }).then((res) => {
        let arr = [];
        let map = {};
        res.data.forEach((item) => {
          _this.popDownArr.push(item);
        });
        // _this.popDownArr = res.data
        if (_this.popDownArr.length) {
          _this.curCamera = _this.popDownArr[0].CameraPosition;
        }
      });
      _this.popDownArr
    },
    renderLabelOpts() {
      let _this = this;
@@ -633,13 +626,22 @@
      });
    },
    refreshCurVideoLabel(video) {
      let _this = this;
      _this.popDownArr = []
      getRelatedVideoInfo({ GroupID: video.GroupID }).then((res) => {
        res.data.forEach((d) => {
          if (d.ID === video.ID) {
            video.LableLst = d.LableLst;
        res.data.forEach((item) => {
          _this.popDownArr.push(item);
          if (item.ID === video.ID) {
            video.LableLst = item.LableLst;
          }
        });
        // res.data.forEach((d) => {
        //   if (item.ID === video.ID) {
        //     video.LableLst = item.LableLst;
        //   }
        // });
      });
      _this.popDownArr
    },
    checkVideo(video, index) {
      this.refreshCurVideoLabel(video);