From 4a800a8fc83c6bd1f86a8e847b079a51a7532c09 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期三, 20 七月 2022 15:05:58 +0800 Subject: [PATCH] 修复国标配置的bug --- src/pages/panoramicView/components/History.vue | 43 +++++++++++++++++++++++++++---------------- 1 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/pages/panoramicView/components/History.vue b/src/pages/panoramicView/components/History.vue index c225649..418701f 100644 --- a/src/pages/panoramicView/components/History.vue +++ b/src/pages/panoramicView/components/History.vue @@ -25,19 +25,29 @@ class="list-item" v-for="item in personList" :key="item.id" - :style="selectedID == item.id ? 'border-color:#3D68E1': ''" + :style="searching ? '' : item.selected ? 'border-color:#3D68E1': 'opacity: 0.3;'" @click="checkTarget(item)" > <!-- <img src alt :style="{backgroundColor:item.color}"/> --> - <img - src="//192.168.20.10:6700/52361,cdd84d471eaa7d?collection=2021-05-18-DSVAD010120190622-picture" - /> + <!-- <img :src="item.humanImg" fit="cover" /> --> + <el-image + style="width: 70px; height: 70px;border-radius: 50%;" + :src="item.humanImg" + fit="contain" + ></el-image> </div> </div> </div> <div class="videos"> <div class="video-item" v-for="v in videos" :key="v.id"> - <video :src="v.videoUrl" controls="controls" width="480px" height="270px" preload="meta"></video> + <video + :src="v.videoUrl" + controls="controls" + width="480px" + height="270px" + preload="none" + :poster="v.videoPoster" + ></video> <span>{{v.modTime}}</span> <div class="image-preview"> @@ -64,11 +74,12 @@ name: "histroy", computed: { videos() { - if (this.selectedID == "") { + if (this.searching) { return this.videoList } - return this.videoList.filter(v => v.id == this.selectedID); + // return this.videoList.filter(v => v.id == this.selectedID); + return this.videoList.filter(v => v.selected); } }, data() { @@ -105,7 +116,7 @@ } }] }, - selectedID: "", + search: "", personList: [], videoList: [ // { @@ -115,6 +126,9 @@ // } ] } + }, + mounted() { + this.searchData(); }, methods: { checkTime() { @@ -127,15 +141,15 @@ } this.searchData(); - }, checkTarget(item) { - this.selectedID = item.id; + this.searching = false; + this.$set(item, 'selected', item.selected != undefined ? !item.selected : true); }, searchData() { - this.selectedID = ""; - findTraceResult({ searchTime: this.searchTime }).then(rsp => { + this.searching = true; + this.videoList = this.personList = []; if (rsp && rsp.success && rsp.data) { @@ -200,6 +214,7 @@ height: 100%; display: block; border-radius: 50%; + border: 0px; } &.deact { opacity: 0.5; @@ -248,10 +263,6 @@ } } } - } - - .el-image .el-image-viewer__mask { - opacity: 0.7; } } </style> \ No newline at end of file -- Gitblit v1.8.0