From 1e7d96a0b08d74328ed7ae56fbd6a2d365eaadb5 Mon Sep 17 00:00:00 2001
From: jxdnsong <592566207@qq.com>
Date: Wed, 03 Feb 2021 16:39:32 +0800
Subject: [PATCH] 地图定位
---
src/views/realTimePolice/real.vue | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/views/realTimePolice/real.vue b/src/views/realTimePolice/real.vue
index 6b17377..36f57b6 100644
--- a/src/views/realTimePolice/real.vue
+++ b/src/views/realTimePolice/real.vue
@@ -281,7 +281,8 @@
>
<iframe
id="mapDiv"
- src="https://s16s652780.51mypc.cn/jfpt/map/index.html"
+ ref="mapDiv"
+ src="/map/index.html"
frameborder="0"
width="100%"
height="100%"
@@ -776,9 +777,11 @@
},
handleMap(row) {
this.showMap = true;
- debugger;
- var sddsds = document.getElementById("mapDiv");
- document.getElementById("mapDiv").contentWindow.dw(row.jd,row.wd)
+ this.$nextTick(() => {
+ this.$refs.mapDiv.onload = () => {
+ window.frames[0].locationObj = {x:row.jd,y:row.wd};
+ };
+ })
},
handleManage(row) {
this.form = row;
--
Gitblit v1.9.3