@@ -86,7 +86,7 @@
import Timeline from './Timeline'
export default {
- props: ['name', 'isShowBar', 'instance', 'id', 'deviceId'],
+ props: ['name', 'isShowBar', 'instance', 'id', 'playbackUrls'],
name: 'slwVideo',
@@ -105,7 +105,6 @@
form: {
date: ''
},
- src: '',
isLoading: false,
times: [],
date: '',
@@ -115,7 +114,22 @@
videoId: `slwvideo-${new Date().getTime()}`,
iframeId: `video-${new Date().getTime()}`,
isFullscreen: false,
- replayUrl: ''
+ replayUrl: '',
+ liveingUrl: ''
+ }
+ },
+
+ computed: {
+ src () {
+ if (this.playbackUrls.length) {
+ return this.playbackUrls.filter(v => v.id === this.id)[0].playbackUrl
+ }
+
+ if (this.isLiveing) {
+ return this.liveingUrl
+ }
+
+ return this.replayUrl
}
},
@@ -129,9 +143,7 @@
this.isShow = true
})
}
- },
- immediate: true,
- deep: true
+ }
}
},
@@ -155,7 +167,7 @@
document.removeEventListener('fullscreenchange', this.fullScreenChange)
},
- backLiving () {
+ backLiveing () {
this.getLiveingUrl()
},
@@ -163,7 +175,7 @@
this.isLoading = true
this.instance.post(`/app/appzyvideoequipment/getWebSdkUrl?deviceId=${this.id}`).then(res => {
if (res.data) {
- this.src = res.data
+ this.liveingUrl = res.data
this.isLiveing = true
}
@@ -179,7 +191,7 @@
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)}:59:59`,
+ 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`,
nvrCodes: ''
}
}).then(res => {
@@ -259,6 +271,7 @@
onConfirm () {
this.$refs.form.validate((valid) => {
if (valid) {
+ this.date = this.form.date
this.isShowDate = false
this.getSlwPlaybackTime()
}
diff --git a/packages/IntelligentSecurity/components/PlaybackTime.vue b/packages/IntelligentSecurity/components/PlaybackTime.vue
new file mode 100644
index 00000000..db4368cc
--- /dev/null
+++ b/packages/IntelligentSecurity/components/PlaybackTime.vue
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/IntelligentSecurity/components/Synergy.vue b/packages/IntelligentSecurity/components/Synergy.vue
index 3ce9f38c..2792ebe6 100644
--- a/packages/IntelligentSecurity/components/Synergy.vue
+++ b/packages/IntelligentSecurity/components/Synergy.vue
@@ -1,9 +1,13 @@
-
+
@@ -36,9 +40,9 @@
直播中
- {{ form.date }}
+ {{ date }}
-
回到直播
+
回到直播
@@ -53,10 +57,10 @@
@@ -80,15 +84,15 @@