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 | 144 ++++++++++++++++++++++++----------------------- 1 files changed, 73 insertions(+), 71 deletions(-) diff --git a/src/pages/panoramicView/components/History.vue b/src/pages/panoramicView/components/History.vue index 51f13ad..418701f 100644 --- a/src/pages/panoramicView/components/History.vue +++ b/src/pages/panoramicView/components/History.vue @@ -18,37 +18,49 @@ <div class="persons"> <div class="board"> <b>鍘嗗彶杩借釜浜哄憳</b> - <span>鍏� 10 鏉℃暟鎹�</span> + <span>鍏� {{personList.length}} 鏉℃暟鎹�</span> </div> <div class="target-list"> <div 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="'/httpImage/' + item.picSmUrl" /> + <!-- <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 videoList" :key="v.reid"> + <div class="video-item" v-for="v in videos" :key="v.id"> <video - :src="'/traceFiles/' + v.reid + '.avi'" + :src="v.videoUrl" controls="controls" width="480px" height="270px" + preload="none" + :poster="v.videoPoster" ></video> - <span>{{v.date}}</span> + <span>{{v.modTime}}</span> <div class="image-preview"> <el-image - :src="'/traceFiles/' + v.reid + '.jpg'" - :preview-src-list="['/traceFiles/' + v.reid + '.jpg']" + src="/images/panoramicView/img-btn.png" + :preview-src-list="[v.trackImg]" height="10px" - ></el-image> + class="td-img" + > + <div slot="error" class="image-slot"> + <i class="el-icon-picture-outline"></i> + </div> + </el-image> </div> </div> </div> @@ -60,6 +72,16 @@ export default { name: "histroy", + computed: { + videos() { + if (this.searching) { + return this.videoList + } + + // return this.videoList.filter(v => v.id == this.selectedID); + return this.videoList.filter(v => v.selected); + } + }, data() { return { searchTime: [ @@ -94,60 +116,19 @@ } }] }, - selectedID: "", - personList: [ - { - id: "0", - picSmUrl: "192.168.20.10:6700/52361,cdd84d471eaa7d?collection=2021-05-18-DSVAD010120190622-picture" - }, - { - id: "1", - picSmUrl: "192.168.20.10:6700/52361,cdd84d471eaa7d?collection=2021-05-18-DSVAD010120190622-picture" - }, - { - id: "2", - picSmUrl: "192.168.20.10:6700/52361,cdd84d471eaa7d?collection=2021-05-18-DSVAD010120190622-picture" - }, - { - id: "3", - picSmUrl: "192.168.20.10:6700/52361,cdd84d471eaa7d?collection=2021-05-18-DSVAD010120190622-picture" - }, - { - id: "4", - picSmUrl: "192.168.20.10:6700/52361,cdd84d471eaa7d?collection=2021-05-18-DSVAD010120190622-picture" - }, - { - id: "5", - picSmUrl: "192.168.20.10:6700/52361,cdd84d471eaa7d?collection=2021-05-18-DSVAD010120190622-picture" - }, - { - id: "6", - picSmUrl: "192.168.20.10:6700/52361,cdd84d471eaa7d?collection=2021-05-18-DSVAD010120190622-picture" - }, - ], + search: "", + personList: [], videoList: [ - { - name: "1", - videoUrl: "192.168.20.10:6700/52369,cddbfed6886fc0?collection=2021-05-18-DSVAD010120190622-video", - pathImg: "192.168.20.10:6700/52360,cddbfc05f6d697?collection=2021-05-18-DSVAD010120190622-picture" - }, - { - name: "2", - videoUrl: "192.168.20.10:6700/52369,cddbfed6886fc0?collection=2021-05-18-DSVAD010120190622-video", - pathImg: "192.168.20.10:6700/52360,cddbfc05f6d697?collection=2021-05-18-DSVAD010120190622-picture" - }, - { - name: "3", - videoUrl: "192.168.20.10:6700/52369,cddbfed6886fc0?collection=2021-05-18-DSVAD010120190622-video", - pathImg: "192.168.20.10:6700/52360,cddbfc05f6d697?collection=2021-05-18-DSVAD010120190622-picture" - }, - { - name: "4", - videoUrl: "192.168.20.10:6700/52369,cddbfed6886fc0?collection=2021-05-18-DSVAD010120190622-video", - pathImg: "192.168.20.10:6700/52360,cddbfc05f6d697?collection=2021-05-18-DSVAD010120190622-picture" - }, + // { + // id: "1", + // videoUrl: "192.168.20.10:6700/52369,cddbfed6886fc0?collection=2021-05-18-DSVAD010120190622-video", + // trackImg: "192.168.20.10:6700/52360,cddbfc05f6d697?collection=2021-05-18-DSVAD010120190622-picture" + // } ] } + }, + mounted() { + this.searchData(); }, methods: { checkTime() { @@ -160,15 +141,20 @@ } this.searchData(); - }, checkTarget(item) { - this.selectedID = item.id; + this.searching = false; + this.$set(item, 'selected', item.selected != undefined ? !item.selected : true); }, searchData() { findTraceResult({ searchTime: this.searchTime }).then(rsp => { + this.searching = true; + + this.videoList = this.personList = []; + if (rsp && rsp.success && rsp.data) { this.videoList = rsp.data; + this.personList = [...rsp.data]; } }) } @@ -176,9 +162,9 @@ } </script> -<style lang="scss"> +<style lang="scss" scoped> .p-histroy { - height: 800px; + height: 1080px; background: inherit; background-color: rgba(240, 242, 245, 1); @@ -190,11 +176,12 @@ } .persons { - width: 18%; - height: 670px; + width: 342px; + height: 917px; background-color: #fff; margin: 10px 10px; float: left; + overflow: auto; .board { height: 70px; line-height: 50px; @@ -211,7 +198,7 @@ display: flex; flex-wrap: wrap; // justify-content: space-between; - width: 375px; + width: 335px; overflow: auto; height: auto; .list-item { @@ -227,6 +214,7 @@ height: 100%; display: block; border-radius: 50%; + border: 0px; } &.deact { opacity: 0.5; @@ -237,9 +225,9 @@ } .videos { - width: 80%; - margin: 10px 10px; - height: 88%; + // width: 80%; + margin: 0px 10px; + height: 85%; display: flex; flex-wrap: wrap; overflow: auto; @@ -250,6 +238,12 @@ margin-top: 10px; background-color: #fff; + span { + display: inline-block; + float: left; + margin-left: 10px; + } + video { margin: 10px; } @@ -257,8 +251,16 @@ .image-preview { width: 25px; float: right; - margin: 0px 10px; + margin: -5px 10px; cursor: pointer; + + .el-image-viewer__close { + color: #fff; + } + + .td-img { + color: #fff; + } } } } -- Gitblit v1.8.0