Browse Source

隐藏视频播放头部分

cuiHe 4 months ago
parent
commit
f5f0439325
2 changed files with 15 additions and 6 deletions
  1. 1 1
      src/components/base-equipment-state/index.vue
  2. 14 5
      src/views/big-screen/single.vue

+ 1 - 1
src/components/base-equipment-state/index.vue

@@ -54,7 +54,7 @@
   }
 
   const bigScreen = async (item: any) => {
-    router.push(`/big-screen/single?id=${item.id}&code=${item.code}`)
+    router.push(`/big-screen/single?id=${item.id}&code=${item.code}&name=${item.name}`)
   }
 </script>
 

+ 14 - 5
src/views/big-screen/single.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="bg">
     <div class="top-bg" @click="backMainPage">
-      <div class="device-name">豫中云 - {{ deviceCode }}</div>
+      <div class="device-name">豫中云 - {{ deviceName }}</div>
     </div>
     <div class="left">
       <div class="left_top" v-loading="loading">
@@ -396,6 +396,7 @@ let loading = ref(false)
 let myVideo: any = ref(null)
 const deviceId = ref(0)
 const deviceCode = ref('')
+const deviceName = ref('')
 const deviceData: any = ref({})
 //大车变量
 const craneData: any = ref({})
@@ -437,6 +438,7 @@ let videoDataState = true;
 onMounted(async () => {
   deviceId.value = parseInt(useQuery('id'))
   deviceCode.value = useQuery('code')
+  deviceName.value = useQuery('name')
   init()
   getData()
 })
@@ -457,11 +459,12 @@ const init = async () => {
     myVideo.value = new EZUIKit.EZUIKitPlayer({
       id: 'video-container', // 视频容器ID
       width: 402,
-      height: 236,
+      height: 270,
       accessToken: videoData.data.token,
       url: videoData.data.cameras[0].url,
       template: 'security',
       audio: 0,
+      header: [], 
       footer: ['hd', 'fullScreen'],
       handleSuccess: () => {
         ElMessage.success('连接成功!')
@@ -1075,8 +1078,10 @@ const formatStr = (value: string) => {
   color: #ABC0E0;
   background-color: rgba(51, 74, 108, 0.2);
   border: 1px solid #455A7A;
-}</style>
-<style lang="less">.right_alert {
+}
+</style>
+<style lang="less">
+.right_alert {
   .el-carousel__button {
     width: 5px;
     height: 5px;
@@ -1093,4 +1098,8 @@ const formatStr = (value: string) => {
     top: 20px;
     transform: none
   }
-}</style>
+}
+#video-container-headControl {
+  display: none!important;
+}
+</style>