MSI\liwei 3 gadi atpakaļ
vecāks
revīzija
d514ad060b

+ 3 - 1
src/components/Videoplayer/index.vue

@@ -7,7 +7,9 @@ export default {
       cameracode:"",
   },
   mounted(){
-    window.cameraid = this.cameraid;
+    console.log(this.cameracode);
+    // window.cameraid = this.cameracode;
+    console.log(window.cameraid)
     initPlugin();
   },
   unmounted() {

+ 15 - 4
src/components/map/index.vue

@@ -7,12 +7,14 @@
   <el-dialog
       title="提示"
       :visible.sync="dialogVisible"
+      v-if="dialogVisible"
       width="50%"
       height="80rem"
       :before-close="handleClose">
-      <div style="height:70rem">
-         <videodiv :cameracode="ccode" style="width:100%;height:60rem;"></videodiv>
-      </div>
+      <!-- <div style="height:70rem"> -->
+         <!-- <div style="width:92rem;height:70rem;background-color:white"></div> -->
+         <videodiv :cameracode="ccode" style="width:920px;height:700px"></videodiv>
+      <!-- </div> -->
       <!-- <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
         <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
@@ -54,6 +56,7 @@ import { Feature } from "ol";
 
 // import {Vector as SourceVec} from "ol/source";
 // import {Feature} from "ol";
+import videodiv from "@/components/Videoplayer/index.vue"
 import {LineString, Point} from "ol/geom";
 // import {Icon, Stroke, Style} from "ol/style";
 // import {Vector as LayerVec} from "ol/layer";
@@ -78,6 +81,9 @@ export default {
       ccode:''
     };
   },
+   components:{
+      videodiv
+    },
   mounted() {
 
     this.initdev();
@@ -107,9 +113,11 @@ export default {
                         alert("我是线:" + tadata.towerNumber)
                     }
                     if (tadata.sectionId == "point") {
-                         that.dialogVisible = true
                          console.log(tadata.data)
                          this.ccode = tadata.data.cameraIndexCode
+                         console.log(this.ccode);
+                         window.cameraid = this.ccode;
+                         that.dialogVisible = true
                     }
                     //含有lnglat 参数的点标记触发事件
                 }
@@ -384,6 +392,9 @@ const vector = new LayerVec({
                 }
             }
         },
+        handleClose(){
+          
+        }
   }
 };
 </script>

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

@@ -106,20 +106,20 @@ export default {
         loadNode(node, resolve){
              console.log(node.data.indexCode);
             //  this.regionIndexCode = node.data.indexCode;
-              setTimeout(() => {
-              var data;
-              if (hasChild) {
-                data = [{
-                  name: 'zone' + this.count++
-                }, {
-                  name: 'zone' + this.count++
-                }];
-              } else {
-                data = [];
-              }
+        //       setTimeout(() => {
+        //       var data;
+        //       if (hasChild) {
+        //         data = [{
+        //           name: 'zone' + this.count++
+        //         }, {
+        //           name: 'zone' + this.count++
+        //         }];
+        //       } else {
+        //         data = [];
+        //       }
 
-          resolve(data);
-        }, 500);
+        //   resolve(data);
+        // }, 500);
 
         if (node.level > 1) return resolve([]);