| | |
| | | class="list-item" |
| | | v-for="item in personList" |
| | | :key="item.id" |
| | | :style="selectedID == item.id ? 'border-color:#3D68E1': ''" |
| | | :style="item.selected ? 'border-color:#3D68E1': ''" |
| | | @click="checkTarget(item)" |
| | | > |
| | | <!-- <img src alt :style="{backgroundColor:item.color}"/> --> |
| | |
| | | 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() { |
| | |
| | | } |
| | | }] |
| | | }, |
| | | selectedID: "", |
| | | search: "", |
| | | personList: [], |
| | | videoList: [ |
| | | // { |
| | |
| | | } |
| | | |
| | | 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) { |