From d74734fd32b892c4e71dccc0f85db7f3e9d36f18 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Tue, 27 Apr 2021 09:14:34 +0800
Subject: [PATCH] websocket调整
---
src/views/security/security.vue | 32 ++++++++++++++++++++------------
1 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/src/views/security/security.vue b/src/views/security/security.vue
index ab70287..86c5c0b 100644
--- a/src/views/security/security.vue
+++ b/src/views/security/security.vue
@@ -70,7 +70,7 @@
selectionList: [],
option: {
height: 'auto',
- calcHeight: 30,
+ calcHeight: 54,
tip: false,
searchShow: true,
searchMenuSpan: 6,
@@ -118,11 +118,11 @@
prop: "online_status",
dicData: [{
label: "离线",
- value: 0
+ value: "0"
},
{
label: "在线",
- value: 1
+ value: "1"
},
],
},
@@ -248,20 +248,28 @@
});
});
},
+ //打开地图
handleMap(row) {
-
var that =this;
- that.baseUrl = `/map/index.html?ISinit=1&openid=SecurityMap&jd=${row.jd}&wd=${row.wd}`;
+ that.baseUrl = `/map/index.html?ISinit=1&openid=SecurityMap&jd=${row.jd}&wd=${row.wd}&code=${row.code}&name=${row.realName}`;
this.showMap=true;
- console.log(this.$refs,111);
- console.log(this.$refs.securityMap,222);
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