From d6caa7f8cbdd1f57ed9be4571fc7d86d21bdfbeb Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 14 Aug 2021 15:59:35 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_regulatory
---
src/views/map/carGps.vue | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
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