diff --git a/src/apps/AppIntelligentSecurity/SlwVideo.vue b/src/apps/AppIntelligentSecurity/SlwVideo.vue index 7aa63945..1014c7c4 100644 --- a/src/apps/AppIntelligentSecurity/SlwVideo.vue +++ b/src/apps/AppIntelligentSecurity/SlwVideo.vue @@ -1,7 +1,7 @@ @@ -54,13 +58,19 @@ liveingUrl: '', replayUrl: '', times: [], + params: { + year: true, + month: true, + day: true, + hour: false, + minute: false, + second: false + }, + isShowDate: false, isPause: false, isShowVolume: false, isShowBar: true, date: '', - form: { - date: '' - }, isLiveing: true } }, @@ -92,7 +102,6 @@ }, mounted () { - this.form.date = this.$dayjs(new Date()).format('YYYY-MM-DD') this.date = this.$dayjs(new Date()).format('YYYY-MM-DD') this.getSlwPlaybackTime() this.width = document.querySelector(`.slw`).offsetWidth + 'px' @@ -104,7 +113,20 @@ methods: { backLiveing () { + this.date = this.$dayjs(new Date()).format('YYYY-MM-DD') this.getLiveingUrl() + this.getSlwPlaybackTime() + }, + + onClick () { + alert(2) + }, + + onDateChange (e) { + this.date = `${e.detail.value}` + // this.date = `${e.year}-${e.month}-${e.day}` + + this.getSlwPlaybackTime() }, onReplay (e) { @@ -112,8 +134,8 @@ this.$http.post(`/app/appzyvideoequipment/getSlwPlaybackUrl`, null, { params: { ids: this.id, - startTime: `${this.form.date} ${e}`, - endTime: this.form.date + ` ${Number(e.substr(0, 2)) + 6 > 9 ? Number(e.substr(0, 2)) + 6 : '0' + (Number(e.substr(0, 2)) + 6)}:00:00`, + startTime: `${this.date} ${e}`, + endTime: this.date + ` ${Number(e.substr(0, 2)) + 6 > 9 ? Number(e.substr(0, 2)) + 6 : '0' + (Number(e.substr(0, 2)) + 6)}:00:00`, nvrCodes: '' } }).then(res => { @@ -144,7 +166,7 @@ }, getSlwPlaybackTime () { - this.isLoading = true + this.$loading() this.$http.post(`/app/appzyvideoequipment/getSlwPlaybackTime`, null, { params: { ids: this.id, @@ -169,10 +191,10 @@ }) } - this.isLoading = false + this.$hideLoading() } }).catch(() => { - this.isLoading = false + this.$hideLoading() }) }, @@ -220,6 +242,10 @@ width: 100%; transition: all ease-in-out 0.5s; + &.active { + transform: translateY(100%); + } + .action-bar { display: flex; align-items: center; diff --git a/src/apps/AppIntelligentSecurity/components/Timeline.vue b/src/apps/AppIntelligentSecurity/components/Timeline.vue index 64360fd4..f4f0bd84 100644 --- a/src/apps/AppIntelligentSecurity/components/Timeline.vue +++ b/src/apps/AppIntelligentSecurity/components/Timeline.vue @@ -1,13 +1,14 @@