A页面 嵌套 B页面的代码

主要处理  leaflet 的 marker 的 popopen,     marker的点击的显示/隐藏 pop   会导致pop中的页面的内容,消失,不在页面中,导致bootstrap的冻结表格实现不了(元素节点还没加载出来,自然冻结不了)

把B页面 嵌 在 A 页面的marker 的 弹窗中

A页面部分代码:

// ---------------点击弹出信息/str----------
let marker = L.marker([31.749662, 120.63073]).addTo(map)
marker.bindPopup(
'<div style="width:100%;height:100%">'+
'<iframe style="width:100%;height:100%;" frameborder=0 border=0 scrolling="no" name="iframe1" src="projectFXHG.html"></iframe>'+
'</div>', { minWidth: 300, maxHeight: 320 })

B页面

  

<!DOCTYPE html>
<html> <head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>调用地图【EPSG:4490】</title> <link rel="stylesheet" href="./Lib/JS/bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="./Lib/JS/bootstrap-table/bootstrap-table.css">
<link rel="stylesheet" href="./Lib/JS/bootstrap-table-fixed-columns-master/bootstrap-table-fixed-columns.css">
<link rel="stylesheet" href="Lib/leaflet.css">
<script src="Lib/jquery.min.js"></script>
<script src="./Lib/JS/bootstrap/js/bootstrap.js"></script>
<script src="./Lib/JS/bootstrap-table/bootstrap-table.js"></script>
<script src="./Lib/JS/bootstrap-table-fixed-columns-master/bootstrap-table-fixed-columns.js"></script>
<script src="./Lib/JS/echarts/echarts.js"></script>
<script src="Lib/leaflet.js"></script>
<script src="Lib/proj4.js"></script>
<script src="Lib/proj4leaflet.js"></script>
<script src="Lib/esri-leaflet_v2.2.4.js"></script> <style>
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
font: 14px "Helvetica Neue", Arial, Helvetica, sans-serif;
} .box {
position: absolute;
z-index: 1001;
width: 100vh;
color: white;
} .infor {
position: absolute;
z-index: 1001;
TOP: 20%;
border: 1px green solid;
height: 450px;
background-color: white;
color: #5e636c;
display: flex;
flex-direction: column;
width: 300px; } .pop-li1 {
border: 1px solid #d8dce5;
width: 35%;
padding: 5px;
} .pop-li2 {
border: 1px solid #d8dce5;
width: 64%;
padding: 5px;
} .pop-table {
margin-top: 9px;
} .checked {
border-bottom: 0px;
background-color: #38a0f4;
} #eventList:hover {
cursor: pointer;
background-color: #38a0f469;
} #before24:hover {
cursor: pointer;
background-color: #38a0f469;
} .leaflet-container a {
color: black;
} .leaflet-popup-content {
width: 300px !important;
height: 290px;
background-color: #fff;
position: relative;
padding: 5px;
} #map {
margin: 0 auto;
height: 100%;
widows: 100%;
}
</style>
</head> <body>
<div style="width:100%;height:100%;">
<div style="margin-bottom: 5px;"><div style="display: inline-block;width: 12px;height: 14px;background-color: #38a0f4;"></div><span style="color:#38a0f4;margin-left: 6px;">点位2</span></div>
<ul class="nav nav-pills">
<li id="eventList" class="active pop-li1 checked" onclick="checked()">报警事件列表</li>
<li id="before24" class="pop-li2" onclick="initEcharts()">前后24小时污染物浓度趋势</li>
</ul>
<div class="tab-content pop-table">
<div class="tab-pane active" id="A" style="height:200px;">
<table id="poptable" class="table table-bordered table-hover"
data-toggle="table"
data-classes="table table-hover"
data-show-columns="false"
data-striped="true"
data-show-toggle="false"
data-search="false"
data-show-refresh="false"
data-toolbar="#toolbar"
data-height="220"
>
<thead>
<tr>
<th>报警时间</th>
<th>报警内容</th>
</tr>
</thead>
<tr>
<td>2018-08-18 08:30:34</td>
<td>小时超标报警</td>
</tr>
<tr>
<td>2018-08-18 08:30:34</td>
<td>小时超标报警</td>
</tr>
<tr>
<td>2018-08-18 08:30:34</td>
<td>小时超标报警</td>
</tr>
<tr>
<td>2018-08-18 08:30:34</td>
<td>小时超标报警</td>
</tr>
<tr>
<td>2018-08-18 08:30:34</td>
<td>小时超标报警</td>
</tr>
<tr>
<td>2018-08-18 08:30:34</td>
<td>小时超标报警</td>
</tr>
</table>
</div>
<div class="tab-pane" id="B">
<div style="display: flex;margin-top: 12px;">
<div style="width: 26%;padding-top: 7px;"> 查询因子: </div>
<div style="flex-grow:1">
<select class="form-control">
<option>SOz</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
</div>
<div id="main" style="width: 300px;height:180px;overflow:auto;margin-top:15px"></div>
</div>
</div>
</div>
<script>
function checked() {
if ($("#eventList").hasClass("checked")) {
$("#before24").removeClass("checked")
$("#B").removeClass("active")
$("#A").addClass("active")
} else {
$("#eventList").addClass("checked")
$("#before24").removeClass("checked")
$("#B").removeClass("active")
$("#A").addClass("active")
} } function initEcharts() {
// $('.leaflet-popup-content-wrapper').css({'width':'283px','height': '232px'}); $("#before24").addClass("checked");
$("#eventList").removeClass("checked")
$("#A").removeClass("active")
$("#B").addClass("active") var myChart = echarts.init(document.getElementById('main'));
// 指定图表的配置项和数据
var option = {
// 给echarts图设置背景色
backgroundColor: '#FBFBFB',
title: {
text: '2019-06-13',
textStyle: {
fontSize: '12'
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
legend: {
data: ['SQz']
},
grid: {
top: '20%',
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
}, xAxis: [{
axisLabel: {
rotate: 30,
interval: 0
}, type: 'category',
boundaryGap: false,
data: function () {
let list = ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00']
return list;
}() }],
yAxis: { type: 'value' }, series: [{
name: 'SQz',
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
color: '#007bff',
smooth: true,
symbolSize: 10
}]
}; // 使用刚指定的配置项和数据显示图表。
myChart.setOption(option); } </script>
</body> </html>

  

leaflet 的 marker 弹框 iframe 嵌套代码的更多相关文章

  1. 分享一下在aspx页面弹框的设置代码

    public static class MessageBox { /// <summary> /// 显示消息提示对话框 /// </summary> /// <para ...

  2. 微信小程序之底部弹框预约插件

    代码地址如下:http://www.demodashi.com/demo/13982.html 一.前期准备工作: 软件环境:微信开发者工具 官方下载地址:https://mp.weixin.qq.c ...

  3. layer弹框在实际项目中的一些应用

    官方介绍:layer至今仍作为layui的代表作,受众广泛并非偶然,而是这五年多的坚持,不断完善和维护.不断建设和提升社区服务,使得猿们纷纷自发传播,乃至于成为今天的Layui最强劲的源动力.目前,l ...

  4. vue 弹框

    弹框展示: 代码: <template> <div> <el-col :span="9" style="text-align: right; ...

  5. layer的iframe弹框中父子元素的传值

    项目中,左侧导航树,右侧是 iframe 嵌套的页面,在右侧页面中又有layer弹框,可以说是有两层 iframe 框架. 所以查询网上的parent什么的方法都不能用.自己摸索的下面的方法: 1.父 ...

  6. selenium常用api之切换:table切换、alert弹框切换、iframe框架切换

    10.查看浏览器打开了多少个table和当前页面在哪个table 测试:打开了浏览器后,打开了一个新的标签页之后,显示此时有2个table,浏览器中当前页面展示的是第2个页面,但是代码打印显示的仍然是 ...

  7. git 本地提交代码到 github 远程库,没有弹框 github login

     git 本地提交代码到 github 远程库,没有弹框 github login:  原因: win10 有个凭据管理器,给保存了历史登陆用户名密码,导致无法切换用户. 解决办法: 删除历史登陆用户 ...

  8. python selenium处理iframe和弹框(一)

    处理iframe和弹框 # encoding:utf-8 from selenium import webdriver import time driver = webdriver.Firefox() ...

  9. easyui 中iframe嵌套页面,提示弹窗遮罩的解决方法,parent.$.messager.alert和parent.$.messager.confirm

    项目中用到easyui 布局,用到north,west,center三个区域,且在center中间区域嵌入iframe标签.在主内容区做一些小提示弹窗(例如删除前的弹窗提示确认)时,会遇到遮罩问题,由 ...

随机推荐

  1. XDFZOI 月赛 201905 Sliver

    组题人自己组完过后,才发现自己还是太弱了... T1 简单模拟. 按照游戏规则直接模拟显然是不明智的,所以我们可以像石头剪刀布一样,将判断改变为检验. 同时,我们发现,一共只有48种牌,所以我们可以直 ...

  2. if语句 条件测试 shell编程之条件语句

    shell 编程之条件语句一.条件测试  ① test命令 测试  ② 文件测试  ③ 整数值比较  ④ 字符串比较  ⑤ 逻辑测试二.if语句的结构  单分支结构  双分支结构  多分支结构三.ca ...

  3. python 构造函数 析构函数

    #构造函数是在对象被创建是自动调用的方法,用来完成初始化操作class Test(object): def __init__(self, name): self.name = name print(' ...

  4. 短信链接点击跳转到微信小程序

    短信轰炸的时代,之前链接都是跳转到网页的,后来发现粘性不强,再次唤醒用户成本较高,但小程序的订阅功能,再次唤醒成本较低,还便于给用户通知结果.所以现在链接都改跳转到小程序了.废话不多说,现在就看看是如 ...

  5. Guava Cache使用的三种姿势

    姿势一 使用expiredAferWriter 优点 简单 粗暴 缺点 同步阻塞问题:如果多个线程同时请求同一个过期的key,只有一个线程能够获得去加载缓存的锁,但是其他未获取加载缓存锁的线程也会阻塞 ...

  6. 【LeetCode】28. 实现 strStr()

    28. 实现 strStr() 知识点:字符串:KMP算法 题目描述 实现 strStr() 函数. 给你两个字符串 haystack 和 needle ,请你在 haystack 字符串中找出 ne ...

  7. 如何用css画一个彩虹---v客学院技术分享

    无意间看到了CSS radial-gradient() 函数实现了如下图的样式 仔细一看还真有点像灯光下的鸡蛋,O(∩_∩)O哈哈~ 今天我就来用radial-gradient()函数教大家画一个简单 ...

  8. spring-1-spring介绍和IOC容器开发

    一.介绍 1.版本 2.下载(jar包依赖) 下载 所以搜索:https://repo.spring.io/release/org/springframework/spring/ 文件分配 maven ...

  9. Lesson2 Thirteen equals one

    ​ Lesson2 Thirteen equals one equal ['i:kwəl] v. 等于 He equaled the world record. Nobody equals him i ...

  10. shell脚本(10)-流程控制while

    一.while循环介绍 while循环与for一样,一般不知道循环次数使用for,不知道循环的次数时推荐使用while 二.while语法 while [ condition ] #条件为真才会循环, ...