Commit cd26406c authored by 拾柒's avatar 拾柒

修改历史记录

parent 5c6b2211
......@@ -51,6 +51,7 @@ export default {
name: "playback",
data() {
return {
code: '',
// startTime
startTime: '',
// endTime
......@@ -69,7 +70,7 @@ export default {
player1: null,
player2: null,
player3: null,
carryRowCode:{},
carryRowCode: {},
oWebControl: null,
initCount: 0,
pubKey: '',
......@@ -85,20 +86,16 @@ export default {
},
created() {
this.carryRowCode = this.$route.query.carryRowCode;
this.code = this.$route.query.carryRowCode.code;
this.startTime = this.$route.query.monitoringStarttime
this.endTime = this.$route.query.monitoringFinallytime
console.info('时间参数')
console.info(this.startTime)
console.info(this.endTime)
},
mounted() {
console.info('路由传递数据',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.endTime = this.$route.query.carryRowCode.monitoringFinallytime
console.info('时间参数')
console.info(this.startTime)
console.info(this.endTime)
// this.getIndex()
this.getToken()
},
......@@ -119,6 +116,12 @@ export default {
beforeDestroy() {
},
methods: {
// 返回
back(){
this.$router.push({
path: "/monitoringhistory/history",
})
},
fulScreen() {
this.player.fullScreen()
},
......@@ -151,7 +154,6 @@ export default {
getAccessToken().then(response => {
console.log('查看获取的token值',response)
if (response.data.code == 200) {
console.log('查看获取的token值',response.data.data)
this.accessToken = response.data.data.accessToken
this.getHistoryStream(response.data.data.accessToken)
// this.getInit(this.accessToken)
......@@ -160,12 +162,18 @@ export default {
},
// 根据传递的设备编号以及token以及开始时间结束时间获取获取url
getHistoryStream(token){
console.info('1111')
getHistoryStream(this.carryRowCode,token,this.startTime,this.endTime).then(res => {
console.info("4564",res)
if(res.data){
this.getInit()
getHistoryStream(this.code,token,this.startTime,this.endTime).then(res => {
console.info('回放视频流',res)
if(res.data.code == 200){
this.getInit(token,res.data.data.url)
} else {
this.$message.warning('当前视频没有回放')
this.back()
}
// console.info("4564",res)
// if(res.data){
// this.getInit()
// }
})
},
......@@ -173,8 +181,10 @@ export default {
console.info('视频流是',videoUrl)
this.player = new EZUIKit.EZUIKitPlayer({
id: 'video-container', // 视频容器ID
accessToken: 'at.9lcurm31d95uy8x214qfw0d84a2ks1mf-7egp0jjnr5-0whlhqz-j7dkim7lh',
url: 'ezopen://open.ys7.com/AW5687499/1.hd.local.rec?begin=20240805100000&end=20240805235959',
// accessToken: 'at.9lcurm31d95uy8x214qfw0d84a2ks1mf-7egp0jjnr5-0whlhqz-j7dkim7lh',
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-语音版;
template: 'simple', //模板
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