From d429b1bfccd6d83369f151001621579ffddde4d9 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 22 Apr 2021 18:48:28 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jfpt-Vue
---
src/views/security/security.vue | 22 +++++++++++++++++-----
public/map/widgets/securityMap/SecurityMap.js | 10 +++-------
2 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/public/map/widgets/securityMap/SecurityMap.js b/public/map/widgets/securityMap/SecurityMap.js
index c2b1228..1ca59f9 100644
--- a/public/map/widgets/securityMap/SecurityMap.js
+++ b/public/map/widgets/securityMap/SecurityMap.js
@@ -164,8 +164,8 @@
moveThis: null,
//基础路径
- pathUrl: "http://localhost:89",
- //pathUrl:"https://web.byisf.com/api/blade-jfpts",
+ //pathUrl: "http://localhost:89",
+ pathUrl: "https://web.byisf.com/api/blade-jfpts",
// 电子围栏需要新增的Id
newElectronicFenceId: null,
@@ -275,6 +275,7 @@
var lttd = that.getQueryStringByKey('wd');
anumber = that.getQueryStringByKey('code');
realname = that.getQueryString('name');
+ console.log(lgtd, 1111);
//如果处警员的位置信息存在
if (lgtd != null && lgtd != "") {
//所在位置标记
@@ -311,17 +312,12 @@
//that.polygonFlag = true;
that.newElectronicFenceId = anumber;
}
-
}
}
})
} else {
//当前处警员没有位置信息,则默认定位到市中心位置
that.isPosition = false;
- var lgtd1 = '115.862321';
- var lttd1 = '28.591108';
- //所在位置标记
- that.addPoint(that.addEntitys, lgtd1, lttd1, './images/security.png');
}
//调用点击事件
diff --git a/src/views/security/security.vue b/src/views/security/security.vue
index 62f4cdb..b641cb7 100644
--- a/src/views/security/security.vue
+++ b/src/views/security/security.vue
@@ -251,15 +251,27 @@
//打开地图
handleMap(row) {
var that =this;
+
that.baseUrl = `/map/index.html?ISinit=1&openid=SecurityMap&jd=${row.jd}&wd=${row.wd}&code=${row.code}&name=${row.realName}`;
this.showMap=true;
this.$refs.securityMap.onload = () => {
if (window.frames[0].init) {
- window.frames[0].init("SecurityMap", {
- x: row.jd,
- y: row.wd,
- code:row.code
- });
+ if(row.jd==""){
+ //如果处警员无位置信息,则赋值一个默认数据,否则地图无法加载
+ window.frames[0].init("SecurityMap", {
+ x: "115.862321",
+ y: "28.591108",
+ code:row.code
+ });
+ }else{
+ window.frames[0].init("SecurityMap", {
+
+ x: row.jd,
+ y: row.wd,
+ code:row.code
+ });
+ }
+
} else {
console.log(`没有找到到window.frames[0].init`)
}
--
Gitblit v1.9.3