已申请列表预览视频

This commit is contained in:
chenchenzai 2022-11-22 16:22:56 +08:00
parent 40b050d75c
commit adb32a06c2
3 changed files with 98 additions and 4 deletions

View File

@ -103,9 +103,24 @@
:footer="null" :footer="null"
@cancel="clear" @cancel="clear"
> >
<p>Some contents...</p> <div style="width: 100%; display: flex; justify-content: center">
<p>Some contents...</p> <div
<p>Some contents...</p> style="width: 100%; height: 100%; position: relative">
<div class="waterMark waterMark-left-top">
{{ userInfo.usernameShow }}
</div>
<div class="waterMark waterMark-right-top">
{{ userInfo.realNameShow }}
</div>
<div class="waterMark waterMark-left-bottom">
{{ userInfo.usernameShow }}
</div>
<div class="waterMark waterMark-right-bottom">
{{ userInfo.realNameShow }}
</div>
<h5-player :video-url="videoUrl" :stop-flag="selectedFlag"></h5-player>
</div>
</div>
</a-modal> </a-modal>
</template> </template>
<script setup> <script setup>
@ -121,6 +136,8 @@
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import H5Player from '@/views/home/components/H5Player.vue'
import {getCameraLiveStream} from '@/api/file'
const dataList = reactive({ toBeApplied: [], requested: [], selectItem: {} }) const dataList = reactive({ toBeApplied: [], requested: [], selectItem: {} })
const showVisible = ref(false) const showVisible = ref(false)
// //
@ -229,6 +246,7 @@
const selectItem = (item) => { const selectItem = (item) => {
if (item.approveStatus == '通过') { if (item.approveStatus == '通过') {
dataList.selectItem = item dataList.selectItem = item
getVideoUrl(item.cameraInfo);
showVisible.value = true showVisible.value = true
} else { } else {
dataList.selectItem = {} dataList.selectItem = {}
@ -283,6 +301,18 @@
} }
init() init()
initApply() initApply()
const videoUrl = ref('')
const selectedFalg = ref(true)
//
const getVideoUrl = (data) =>{
let param = data;
getCameraLiveStream(param).then((res) => {
//console.log('555555rrrrr',res)
if(res.data.data){
videoUrl.value = res.data.data.url;
}
})
}
mybus.on('selectCamera', (obj) => { mybus.on('selectCamera', (obj) => {
// 10 // 10
if (dataList.toBeApplied.length + dataList.requested.length >= 10) { if (dataList.toBeApplied.length + dataList.requested.length >= 10) {
@ -362,5 +392,44 @@
width: 2.5rem; width: 2.5rem;
height: 3rem; height: 3rem;
} }
.waterMark {
position: absolute;
z-index: 99999999;
color: #0058e1;
font-size: 22px;
font-weight: bold;
opacity: 0.4;
transform: rotate(-25deg);
width: 470px;
}
//
.waterMark-left-top {
left: 50px;
top: 100px;
text-align: left;
}
//
.waterMark-right-top {
right: 50px;
top: 100px;
text-align: right;
}
//
.waterMark-left-bottom {
left: 50px;
bottom: 100px;
text-align: left;
}
//
.waterMark-right-bottom {
right: 50px;
bottom: 100px;
text-align: right;
}
} }
</style> </style>

View File

@ -621,6 +621,7 @@
:title="'视频监控点选择'" :title="'视频监控点选择'"
destroyOnClose destroyOnClose
footer="{null}" footer="{null}"
@cancel="handleCancel"
> >
<div style="width: 100%; display: flex; justify-content: center"> <div style="width: 100%; display: flex; justify-content: center">
<div <div
@ -642,7 +643,7 @@
{{ userInfo.realNameShow }} {{ userInfo.realNameShow }}
</div> </div>
<!--地图上点击之后弹出的操作弹窗--> <!--地图上点击之后弹出的操作弹窗-->
<camera-popup-on-map :camera-Data-List="cameraDataList" :selected-flag="selectedFlag"></camera-popup-on-map> <camera-popup-on-map :camera-Data-List="cameraDataList" :selected-flag="selectedFlag" :reset-flag="resetFlag"></camera-popup-on-map>
</div> </div>
</div> </div>
@ -2269,6 +2270,14 @@
const operationPopupFlag = ref(false)// const operationPopupFlag = ref(false)//
// //
const selectedFlag = ref(false) const selectedFlag = ref(false)
//
const resetFlag = ref(false)
//
const handleCancel = () => {
//console.log('');
resetFlag.value = true
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.infrastructrueBox { .infrastructrueBox {

View File

@ -73,6 +73,10 @@
selectedFlag:{ selectedFlag:{
type: Boolean, type: Boolean,
default: false default: false
},
resetFlag:{
type: Boolean,
default: false
} }
}, },
mounted() { mounted() {
@ -83,6 +87,18 @@
// debug: true, // debug: true,
// }), // }),
// }, // },
watch: {
resetFlag: {
//
handler(newVal, oldVal) {
if (newVal) {
this.defaultIndex = 0;
}
},
//
immediate: true,
},
},
data() { data() {
return { return {
openVideo: false, openVideo: false,