From 4439f33538d980db4a9f0db44a867d8b3cc2a31b Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 24 Apr 2021 15:47:20 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jfpt-Vue
---
public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js | 43 +++----------------------------------------
1 files changed, 3 insertions(+), 40 deletions(-)
diff --git a/public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js b/public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js
index b231345..4f57b3f 100644
--- a/public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js
+++ b/public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js
@@ -197,9 +197,7 @@
if (und == '控制端') {//控制端弹窗关闭
parent[0].layer.close(indexControl);
parent[0].layer.close(+indexControl + 1);
- // console.log('控制:', indexControl)
}
- // console.log('tucen:', mySelf.indexs)
if (eour == undefined) {
var dataO = evt;
@@ -210,27 +208,9 @@
nams: evt.graphic.attributes.deviceName,
type: evt.graphic.attributes.jtype,
}
- // console.log(dataO);
- // console.log(aa - bb);
var cache = [];
//解决重复JSON.stringify将循环结构转换为JSON。有几率出错,err:TypeError: Converting circular structure to JSON
-
-
- // var setdata = JSON.stringify(evt.graphic.attributes
-
- // , function (key, value) {
- // if (typeof value === 'object' && value !== null) {
- // if (cache.indexOf(value) !== -1) {
- // // 移除
- // return;
- // }
- // // 收集所有的值
- // cache.push(value);
- // }
- // return value;
- // }
- // );
-
+ //舍弃上面方法,原因是对象里面嵌入对象,造成不能转换成JSON,吧对象去掉就好,
var as = evt.graphic.attributes;
for (let key in as) {
if (typeof as[key] == 'object') {
@@ -240,16 +220,6 @@
}
}
var setdata = JSON.stringify(as);
- // console.log(setdata);
- // var newkeys = Object.keys(evt.graphic.attributes);
- // var newvalues = Object.values(evt.graphic.attributes);
- // var str = "";
- // newkeys.forEach(function (item,index) {
- // str += item
- // })
-
-
- // console.log(cache);
cache = null;
var fCard = (posi, setdata, winSize) => { // 弹窗函数
var that = this,
@@ -265,6 +235,7 @@
extend: 'myskin/FlareClusterLayer.css'
});
that.layuiLayer.close(that.layuiLayer.index);
+ //两个弹窗
// layer.alert('layer 新皮肤');
// that.layuiLayer.open({
// title: '',
@@ -394,6 +365,7 @@
// $("#layui-layer-iframe" + index).contents().find("#sidIput").val(setdata);
// },
// })
+ //一个弹窗
that.layuiLayer.open({ //第二个iframe
title: '',
type: 2,
@@ -414,14 +386,6 @@
// tipsMore: true, //允许多个tipe
// content: num,
success: function (layero, index) { //成功后添加全局点击关闭
- // var z = document.onclick = ()=>{
- // parent[0].layer.close(index);
- // // // parent[0].layer.close(+index + 1);
- // z = null;
- // }
- //尝试传值
- //js对象转json对象
- // $("#layui-layer-iframe" + index).contents().find("input").val(JSON.stringify(evt.graphic.attributes));
$("#layui-layer-iframe" + index).contents().find("#sidIput").val(setdata);
},
@@ -513,7 +477,6 @@
}
}
-
},
//Add a data point to be clustered.
--
Gitblit v1.9.3