From 86221ad1d49bcb042eee9141b0c497b9c6a9adf5 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期二, 22 六月 2021 17:54:25 +0800 Subject: [PATCH] 视频位置下拉框bug --- src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue | 34 ++++++++++++++++++---------------- 1 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue b/src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue index 331b1f6..a4729d7 100644 --- a/src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue +++ b/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) => { - // 濉厖鍗曠獥鍙g殑涓嬫媺鑿滃崟 - 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); -- Gitblit v1.8.0