From 0fd73b26d4e3c5d2dc153429ef82bf2fd8f77168 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 12 十二月 2024 19:49:30 +0800
Subject: [PATCH] ll

---
 screen/src/views/SecurityControl.vue |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/screen/src/views/SecurityControl.vue b/screen/src/views/SecurityControl.vue
index 1ace36c..1496439 100644
--- a/screen/src/views/SecurityControl.vue
+++ b/screen/src/views/SecurityControl.vue
@@ -108,10 +108,11 @@
           </div>
         </div>
         <div class="center_box">
-          <div v-if="showJk" class="jiankong">
+          <div v-show="showJk" class="jiankong">
             <img class="jk_bg" src="@/assets/images/SecurityControl/jiankong_bg@2x.png" alt="">
             <div class="content">
-              <video :src="activeVideo" class="video"></video>
+              <Video v-if="showJk && activeMenu && activeMenu.indexCode" :href="data.videoPluginUrl" :indexCode="activeMenu.indexCode" />
+              <!-- <div class="player_bg" style="width: 100%;height: 100%;" id="playWnd"> </div> -->
             </div>
             <div class="right_wrap">
               <div class="menus">
@@ -144,7 +145,7 @@
             </div>
 
           </div>
-          <div v-else class="center_box_one">
+          <div v-show="!showJk" class="center_box_one">
             <div class="list">
               <div class="item">
                 <div class="name_wrap">
@@ -384,7 +385,7 @@
             </div>
             <img src="@/assets/images/task/title@2x.png" class="bg" alt="" />
           </div>
-          <div class="monitoring" @click="showJk = !showJk">
+          <div class="monitoring" @click="changeMon">
             <img src="@/assets/images/SecurityControl/ic_jiankong@2x.png" class="icon" alt="">
             <div>鐩戞帶鍒楄〃</div>
             <img v-if="showJk" src="@/assets/images/SecurityControl/jiankong_ic_close@2x.png" class="top" alt="">
@@ -476,7 +477,7 @@
 </template>
 
 <script setup>
-import { ref, onMounted } from 'vue'
+import { ref, onMounted, nextTick } from 'vue'
 import VScaleScreen from 'v-scale-screen'
 import Percent from '@/components/percent.vue'
 import dayjs from 'dayjs'
@@ -485,6 +486,7 @@
 import * as echarts from 'echarts'
 import 'swiper/css/swiper.min.css'
 import Swiper from 'swiper'
+import Video from './videoUrl/Video.vue'
 import {
   getEnergyCenterData,
   afgetCarmeraPreviemUrl,
@@ -507,8 +509,6 @@
   time.value = dayjs().format('HH:mm:ss')
 
 }, 1000)
-
-
 
 const arr = ['#68e2e3', '#50afd3', '#377cdb', '#d5ae3a']
 const initEnergy = () => {
@@ -839,7 +839,7 @@
     data4.value = res.data || {}
     let obj = data4.value
     data4.value.total = obj.levelNum + obj.retentionNum + obj.registerVisitNum + obj.waitVisitNum
-    const result = res.data.visitRetentionDataList || []
+    const result = res.data?.visitRetentionDataList || []
     dataList3.value = result.map(i => {
       if (i.timeOutMinute) {
         i.timeOutMinute = Math.abs(i.timeOutMinute)
@@ -908,6 +908,13 @@
     data5.value = result.filter(item => item.carmeraList && item.carmeraList.length > 0)
   })
 }
+const changeMon = () => {
+  showJk.value = !showJk.value
+  if(!showJk.value){
+    activeJkIndex.value = -1
+    activeMenu.value = {}
+  }
+}
 const menuClick = (val) => {
   if (val == activeJkIndex.value) {
     activeJkIndex.value = -1
@@ -917,11 +924,8 @@
 }
 const menuItemClick = (val) => {
   activeMenu.value = val
-  afgetCarmeraPreviemUrl({ indexCode: val.indexCode }).then(res => {
-    activeVideo.value = res.data
-  })
-}
 
+}
 const autoplayFlag = (list = [], leng = 4, time = 2000) => {
   if (list.length > leng) {
     return { delay: time, disableOnInteraction: false }
@@ -962,6 +966,7 @@
 
 
 
+
 onMounted(() => {
   getData1()
   getData2()

--
Gitblit v1.9.3