门口门禁-地图-摄像头点位播放功能

2024-07-22新BI页面
water_xu 2024-06-19 09:36:41 +08:00
parent cfe9594a91
commit 95d447013e
3 changed files with 98 additions and 4 deletions

View File

@ -73,7 +73,7 @@
<td width="80px">{{ item.CAR_IN - item.CAR_OUT}}</td> <td width="80px">{{ item.CAR_IN - item.CAR_OUT}}</td>
</tr> </tr>
</table> </table>
<table class="table-ui"> <table class="table-ui" v-if= "type != 'CAMERA'">
<tr v-if="carRecordAllList != null && carRecordAllList.length > 0"> <tr v-if="carRecordAllList != null && carRecordAllList.length > 0">
<td colspan="6"> <td colspan="6">
<table class="table-ui"> <table class="table-ui">
@ -126,7 +126,7 @@
</tr> </tr>
</table> </table>
<div class="video"> <div class="video">
<video-play v-if="type === 'CAMERA' && info.GATEVIDEO_ID" :id="info.GATEVIDEO_ID" :type="type" :gangkou="gangkou"/> <video-play-gate v-if="type === 'CAMERA' && GATE_VIDEO_ID" :id="GATE_VIDEO_ID" :type="type" :gangkou="gangkou"/>
</div> </div>
</div> </div>
</template> </template>
@ -135,8 +135,9 @@
import { requestFN } from '@/utils/request' import { requestFN } from '@/utils/request'
import moment from 'moment' import moment from 'moment'
import videoPlay from './video_play.vue' import videoPlay from './video_play.vue'
import videoPlayGate from './video_play_gate.vue'
export default { export default {
components: { videoPlay }, components: { videoPlay, videoPlayGate },
props: { props: {
id: { id: {
type: String, type: String,
@ -221,6 +222,11 @@ export default {
} }
} }
} }
if (this.type == 'CAMERA') {
Object.assign(this.info, data.pd.info)
this.info.CODE = data.pd.video.EXTERNALINDEXCODE
this.info.VIDEONAME = data.pd.video.NAME
}
this.$forceUpdate() this.$forceUpdate()
}).catch((e) => { }).catch((e) => {

View File

@ -0,0 +1,88 @@
<template>
<div>
<div id="aLiVideoPlayer" class="prism-player"/>
</div>
</template>
<script>
import { requestFN } from '@/utils/request'
export default {
props: {
id: {
type: String,
default() {
return ''
}
},
type: {
type: String,
default() {
return ''
}
},
gangkou: {
type: String,
default: ''
},
requestUrl: {
type: String,
default: '/mkmjGateVideo/goAllVideo'
}
},
data() {
return {
hls: false,
player: null,
url: ''
}
},
beforeDestroy() {
this.player && this.player.dispose()
},
created() {
this.showVideo()
},
methods: {
showVideo() {
requestFN(
this.requestUrl,
{
GATE_VIDEO_ID: this.id
}
).then((data) => {
// for (let i = 0; i < data.videoList.length; i++) {
// if (data.videoList[0].HLSVIDEOURL) {
// this.url = data.videoList[0].GBSVIDEOURL
// this.hls = true
// } else {
this.hls = false
this.$nextTick(() => {
// eslint-disable-next-line no-undef
this.player = new Aliplayer({
'id': 'aLiVideoPlayer',
'source': data.video.HLSVIDEOURL.data.url,
'width': '100%',
'height': '500px',
'autoplay': true,
'isLive': true,
'rePlay': false,
'playsinline': true,
'preload': true,
'controlBarVisibility': 'hover',
'useH5Prism': true
}, function(player) {
console.log('The player is created')
})
})
// }
// }
})
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -2132,7 +2132,7 @@ export default {
point.position.y = +varList[i].LATITUDE point.position.y = +varList[i].LATITUDE
point.dialog_width = dialog_width point.dialog_width = dialog_width
point.MAP_POINT_NAME = varList[i].MAP_POINT_NAME point.MAP_POINT_NAME = varList[i].MAP_POINT_NAME
point.GATE_VIDEO_ID = varList[i].VIDEO_RESOURCE_ID point.GATE_VIDEO_ID = varList[i].GATE_VIDEO_ID
// 使 // 使
point.gangkou = this.gangkouActive point.gangkou = this.gangkouActive
// //