Commit cd26406c authored by 拾柒's avatar 拾柒

修改历史记录

parent 5c6b2211
...@@ -51,6 +51,7 @@ export default { ...@@ -51,6 +51,7 @@ export default {
name: "playback", name: "playback",
data() { data() {
return { return {
code: '',
// startTime // startTime
startTime: '', startTime: '',
// endTime // endTime
...@@ -69,7 +70,7 @@ export default { ...@@ -69,7 +70,7 @@ export default {
player1: null, player1: null,
player2: null, player2: null,
player3: null, player3: null,
carryRowCode:{}, carryRowCode: {},
oWebControl: null, oWebControl: null,
initCount: 0, initCount: 0,
pubKey: '', pubKey: '',
...@@ -85,20 +86,16 @@ export default { ...@@ -85,20 +86,16 @@ export default {
}, },
created() { created() {
this.carryRowCode = this.$route.query.carryRowCode; this.carryRowCode = this.$route.query.carryRowCode;
this.code = this.$route.query.carryRowCode.code;
this.startTime = this.$route.query.monitoringStarttime this.startTime = this.$route.query.monitoringStarttime
this.endTime = this.$route.query.monitoringFinallytime this.endTime = this.$route.query.monitoringFinallytime
console.info('时间参数')
console.info(this.startTime)
console.info(this.endTime)
}, },
mounted() { mounted() {
console.info('路由传递数据',this.$route.query.carryRowCode)
this.carryRowCode = this.$route.query.carryRowCode; this.carryRowCode = this.$route.query.carryRowCode;
this.code = this.$route.query.carryRowCode.code;
this.startTime = this.$route.query.carryRowCode.monitoringStarttime this.startTime = this.$route.query.carryRowCode.monitoringStarttime
this.endTime = this.$route.query.carryRowCode.monitoringFinallytime this.endTime = this.$route.query.carryRowCode.monitoringFinallytime
console.info('时间参数')
console.info(this.startTime)
console.info(this.endTime)
// this.getIndex() // this.getIndex()
this.getToken() this.getToken()
}, },
...@@ -119,6 +116,12 @@ export default { ...@@ -119,6 +116,12 @@ export default {
beforeDestroy() { beforeDestroy() {
}, },
methods: { methods: {
// 返回
back(){
this.$router.push({
path: "/monitoringhistory/history",
})
},
fulScreen() { fulScreen() {
this.player.fullScreen() this.player.fullScreen()
}, },
...@@ -151,7 +154,6 @@ export default { ...@@ -151,7 +154,6 @@ export default {
getAccessToken().then(response => { getAccessToken().then(response => {
console.log('查看获取的token值',response) console.log('查看获取的token值',response)
if (response.data.code == 200) { if (response.data.code == 200) {
console.log('查看获取的token值',response.data.data)
this.accessToken = response.data.data.accessToken this.accessToken = response.data.data.accessToken
this.getHistoryStream(response.data.data.accessToken) this.getHistoryStream(response.data.data.accessToken)
// this.getInit(this.accessToken) // this.getInit(this.accessToken)
...@@ -160,12 +162,18 @@ export default { ...@@ -160,12 +162,18 @@ export default {
}, },
// 根据传递的设备编号以及token以及开始时间结束时间获取获取url // 根据传递的设备编号以及token以及开始时间结束时间获取获取url
getHistoryStream(token){ getHistoryStream(token){
console.info('1111') getHistoryStream(this.code,token,this.startTime,this.endTime).then(res => {
getHistoryStream(this.carryRowCode,token,this.startTime,this.endTime).then(res => { console.info('回放视频流',res)
console.info("4564",res) if(res.data.code == 200){
if(res.data){ this.getInit(token,res.data.data.url)
this.getInit() } else {
this.$message.warning('当前视频没有回放')
this.back()
} }
// console.info("4564",res)
// if(res.data){
// this.getInit()
// }
}) })
}, },
...@@ -173,8 +181,10 @@ export default { ...@@ -173,8 +181,10 @@ export default {
console.info('视频流是',videoUrl) console.info('视频流是',videoUrl)
this.player = new EZUIKit.EZUIKitPlayer({ this.player = new EZUIKit.EZUIKitPlayer({
id: 'video-container', // 视频容器ID id: 'video-container', // 视频容器ID
accessToken: 'at.9lcurm31d95uy8x214qfw0d84a2ks1mf-7egp0jjnr5-0whlhqz-j7dkim7lh', // accessToken: 'at.9lcurm31d95uy8x214qfw0d84a2ks1mf-7egp0jjnr5-0whlhqz-j7dkim7lh',
url: 'ezopen://open.ys7.com/AW5687499/1.hd.local.rec?begin=20240805100000&end=20240805235959', accessToken: token,
// url: 'ezopen://open.ys7.com/AW5687499/1.hd.local.rec?begin=20240805100000&end=20240805235959',
url: videoUrl,
// simple - 极简版; pcLive-pc直播;pcRec-pc回放; mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版; // simple - 极简版; pcLive-pc直播;pcRec-pc回放; mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版;
template: 'simple', //模板 template: 'simple', //模板
plugin: ['talk'], // 加载插件,talk-对讲 plugin: ['talk'], // 加载插件,talk-对讲
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment