xyh123999 2 years ago
parent
commit
5141ee57b5
1 changed files with 61 additions and 23 deletions
  1. 61 23
      src/views/taskScreen.vue

+ 61 - 23
src/views/taskScreen.vue

@@ -200,8 +200,8 @@
                     class="moreBtn_style"
                   ></el-image>
                 </div>
-                <div class="video_title">{{ videoPlayerName[0] }}</div>
-                <hk-camara  v-if="HKCamaraShow" :companyVideoData="VideoData" @init="HKCardInit" />
+                <div class="video_title">{{ camaraName[0] }}</div>
+                <hk-camara  v-if="HKCamaraShow" :companyVideoData="camaraData" @init="HKCardInit" />
               </div>
               <div class="commandMonitoring_task">
                 <div class="map_more_box">
@@ -214,7 +214,7 @@
                     训练态势监控
                   </div>
                   <el-image
-                    @click="showFull('allVideo')"
+                    @click="showFull1('allVideo')"
                     style="width: 20px; height: 20px; margin-right: 6px; margin-top: -10px"
                     :src="require('../assets/img/iconMore.svg')"
                     fit="contain"
@@ -223,7 +223,7 @@
                 </div>
                 <!-- <div class="video_body2"><HKVideo2  :companyVideoData="mainVideoData" :videoType="2"></HKVideo2></div> -->
                 <div class="task_outer_cotnainer_status">
-                  <hkv v-if="HKCardShow" :companyVideoData="VideoData" ref="hkv"/>
+                  <hkv v-if="HKCardShow" :companyVideoData="cardData" ref="hkv"/>
                   <div class="center_no_data" v-if="false">
                     <el-image
                       style="width: 100px; height: 100px; margin-right: 6px"
@@ -343,10 +343,10 @@ export default {
       currentTaskGrade: "",
       unitSubGradeValue: "",
       gridData: [],
-      dataSrc: ["", "", "", "", ""],
+      camaraSrc: ["", "", "", "", ""],
       completionRate: false,
       playerList: [],
-      videoPlayerName: ["监控名称", "监控名称", "监控名称", "监控名称", "监控名称"],
+      camaraName: ["监控名称", "监控名称", "监控名称", "监控名称", "监控名称"],
       videoList: [
         "videoPlayerTask",
         "videoPlayer_first",
@@ -356,7 +356,10 @@ export default {
       ],
       mainVideoData: {},
       currentSubject: '',
-      VideoData:[],
+      camaraData:[],
+      cardData:[],
+      cardName:[],
+      cardSrc:[]
     };
   },
   methods:{
@@ -675,13 +678,25 @@ export default {
     },
     // 全屏事件
     showFull(id){
-      console.log('this.VideoData :>> ', this.VideoData);
+      console.log('this.camaraData :>> ', this.camaraData);
       console.log('ckx debug  监控大屏' )
       this.$router.push(
         {
           path: './monitorScreen',
           query: {
-            videoData: JSON.stringify(this.VideoData)
+            camaraData: JSON.stringify(this.camaraData)
+          }
+        }
+      )
+    },
+     showFull1(id){
+      console.log('this.camaraData :>> ', this.cardData);
+      console.log('ckx debug  监控大屏' )
+      this.$router.push(
+        {
+          path: './monitorScreen',
+          query: {
+            camaraData: JSON.stringify(this.cardData)
           }
         }
       )
@@ -791,23 +806,45 @@ export default {
       this.currentSubject = subjectName;
       const res = await request("/dt_screen/rest/v2/video/videos/getSubjectUrls", "post", params, false);
       let index = 0;
-      this.dataSrc = ["", "", "", "", ""];
-      this.videoPlayerName = ["监控名称", "监控名称", "监控名称", "监控名称", "监控名称"];
+      this.camaraSrc = ["", "", "", "", ""];
+      this.camaraName = ["监控名称", "监控名称", "监控名称", "监控名称", "监控名称"];
       for (let item in res.data.data) {
-        this.dataSrc[index] = res.data.data[item].url;
-        this.videoPlayerName[index++] = res.data.data[item].name;
+        this.camaraSrc[index] = res.data.data[item].url;
+        this.camaraName[index++] = res.data.data[item].name;
       }
       setTimeout(() => {
 
-        for(let index = 0; index < this.dataSrc.length;index++)
+        for(let index = 0; index < this.camaraSrc.length;index++)
         {
-          this.VideoData.push(this.resolveUrl(this.dataSrc[index]))
+          this.camaraData.push(this.resolveUrl(this.camaraSrc[index]))
         }
       }, 1000);
 
       setTimeout(() => {
         this.HKCardShow = true;
       }, 800);
+
+       let params1 = {
+        subjectName: subjectName,
+        taskId: this.wholeOutTaskId
+      };
+      this.currentSubject = subjectName;
+      const res1 = await request("/dt_screen/rest/v2/video/videos/getSubjectCardUrls", "post", params1, false);
+      let index1 = 0;
+      this.cardSrc = ["", "", "", "", ""];
+      this.cardName = ["监控名称", "监控名称", "监控名称", "监控名称", "监控名称"];
+      for (let item in res1.data.data) {
+        this.cardSrc[index1] = res1.data.data[item].url;
+        this.card[index1++] = res1.data.data[item].name;
+      }
+      setTimeout(() => {
+
+        for(let index = 0; index < this.cardSrc.length;index++)
+        {
+          this.cardData.push(this.resolveUrl(this.cardSrc[index]))
+        }
+      }, 1000);
+
     },
     resolveUrl(url){
       if(url ==''){
@@ -831,7 +868,8 @@ export default {
       if(subjectName != this.currentSubject) {
         this.currentSubject = subjectName;
         this.$refs.hkv.stopAll();
-        this.VideoData = [];
+        this.camaraData = [];
+        this.cardData = [];
         this.initUrl(subjectName);
       }
     }
@@ -851,13 +889,13 @@ export default {
     //   }, 1000);
     //   setTimeout(() => {
 
-    //  console.log('this.dataSrc :>> ', this.dataSrc);
-    // for(let index = 0; index < this.dataSrc.length;index++)
+    //  console.log('this.camaraSrc :>> ', this.camaraSrc);
+    // for(let index = 0; index < this.camaraSrc.length;index++)
     // {
-    //   this.VideoData.push(this.resolveUrl(this.dataSrc[index]))
+    //   this.camaraData.push(this.resolveUrl(this.camaraSrc[index]))
     // }
 
-    // console.log('this.VideoData :>> ', this.VideoData);
+    // console.log('this.camaraData :>> ', this.camaraData);
 
     // }, 1000);
 
@@ -871,9 +909,9 @@ export default {
     //
     // //     // 过14秒调用
     // setTimeout(() => {
-    //   for (let index = 0; index < this.dataSrc.length; index++) {
-    //     console.log('object :>> ',this.dataSrc[index]);
-    //     this.initVideo(this.dataSrc[index], this.videoList[index]);
+    //   for (let index = 0; index < this.camaraSrc.length; index++) {
+    //     console.log('object :>> ',this.camaraSrc[index]);
+    //     this.initVideo(this.camaraSrc[index], this.videoList[index]);
     //   }
     // }, 5000);
   },