From 64d69413b9e2ca5ed5fb273299520c5fa72c529f Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 14 Aug 2021 10:58:10 +0800
Subject: [PATCH] 插件,及插件相关的修改

---
 src/views/map/carGps.vue           |   23 ++++++++++++++++++-----
 public/carVideo/children.html      |    6 +++---
 public/carVideo/VideoWebPlugin.exe |    0 
 3 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/public/carVideo/VideoWebPlugin.exe b/public/carVideo/VideoWebPlugin.exe
new file mode 100644
index 0000000..13223f7
--- /dev/null
+++ b/public/carVideo/VideoWebPlugin.exe
Binary files differ
diff --git a/public/carVideo/children.html b/public/carVideo/children.html
index 45ce976..4ed36a9 100644
--- a/public/carVideo/children.html
+++ b/public/carVideo/children.html
@@ -24,7 +24,7 @@
     margin: auto;
     width: 800px;
     height: 400px;
-    border: 1px solid red;
+    color: #fff;
   }
 
   .cbInfoDiv {
@@ -350,7 +350,7 @@
 
             initBtnClicked();
 
-            setTimeout(function() {
+            setTimeout(function () {
               $("#playBtn").trigger('click');
             }, 3000)
           });
@@ -369,7 +369,7 @@
             initPlugin();
           }, 3000)
         } else {
-          $("#playWnd").html("插件启动失败,请检查插件是否安装!");
+          $("#playWnd").html("插件启动失败,请检查插件是否安装!<a href='./VideoWebPlugin.exe' target='_blank' style='color: var(--mcblue)'>点击下载</a>");
         }
       },
       cbConnectClose: function (bNormalClose) {
diff --git a/src/views/map/carGps.vue b/src/views/map/carGps.vue
index 3bdc114..4581d5c 100644
--- a/src/views/map/carGps.vue
+++ b/src/views/map/carGps.vue
@@ -2,7 +2,7 @@
  * @Author: Morpheus
  * @Date: 2021-07-05 16:31:54
  * @Last Modified by: Morpheus
- * @Last Modified time: 2021-08-11 16:41:36
+ * @Last Modified time: 2021-08-14 10:57:44
  * menu-name 押运人员定位
  */
 <template>
@@ -152,7 +152,8 @@
             loading: true,
             trackTime: [],
             detailObj: {},
-            dialogVisible: false
+            dialogVisible: false,
+            map: null,
         };
     },
     created () {
@@ -284,15 +285,27 @@
         },
 
         childParameter (data) {
-
+            this.map = data;
             this.$nextTick(function () {
                 data.on('singleclick', this.realVideo)
             })
 
         },
 
-        realVideo () {
-            this.dialogVisible = true
+        realVideo (e) {
+            var that = this;
+            // 在点击时获取像素区域
+            var pixel = this.map.getEventPixel(e.originalEvent)
+
+            this.map.forEachFeatureAtPixel(pixel, function (feature) {
+
+                const cont = feature.values_.attributes
+
+                if (cont != undefined) {
+                    that.dialogVisible = true
+                }
+            })
+
         }
 
     },

--
Gitblit v1.9.3