MSI\liwei 3 年之前
父節點
當前提交
e7e5a51c5e
共有 2 個文件被更改,包括 15 次插入6 次删除
  1. 2 1
      public/index.html
  2. 13 5
      src/views/qdtl/video/video.vue

+ 2 - 1
public/index.html

@@ -475,7 +475,8 @@
 
 
         function startPreview(cameraIndexCode=window.cameraid,index=-1) {
-            var cameraIndexCode = window.cameraid; //获取输入的监控点编号值,必填
+        
+            var cameraIndexCode = cameraIndexCode; //获取输入的监控点编号值,必填
             var streamMode = 0; //主子码流标识:0-主码流,1-子码流
             var transMode = 1; //传输协议:0-UDP,1-TCP
             var gpuMode = 0; //是否启用GPU硬解,0-不启用,1-启用

+ 13 - 5
src/views/qdtl/video/video.vue

@@ -40,6 +40,7 @@ export default {
       return {
         videoData:[],
         expandedKeys:[],
+        videoIndex:0,
         data: [{
           id: 1,
           label: '一级 1',
@@ -203,17 +204,24 @@ export default {
           console.log(data);
           console.log(node);
           var arry = this.$refs.tree.getCheckedNodes()
-          var pointArry = this.$refs.mapv.pointArry;
-          console.log(pointArry);
+          // console.log(data.cameraIndexCode);
+          // var pointArry = this.$refs.mapv.pointArry;
+
           if(data.lnglat != null){
               if(node == false){
-                   this.$refs.mapv.removeLayer(data.id);
+                  console.log(data.cameraIndexCode);
               }else if(node == true){
-                   this.$refs.mapv.addMarker(data.lnglat.split(','),'监控 (2) 拷贝 20.png',0.2,data.id,data);
+                  console.log(data.cameraIndexCode);
+                  window.startPreview(data.cameraIndexCode,this.videoIndex);
+                  if(this.videoIndex < 8){
+                      this.videoIndex = this.videoIndex+1
+                  }else{
+                      this.videoIndex = 0
+                  }
               }
-
           }
 
+          // window.startPreview(window.cameraid,-1);
          // startPreview(code,0-8)
           // for(var index in arry){
           //       var obj = arry[index]