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. C语言:警告提示及解决方法

    #include <stdio.h> int main(){ struct{ char *name; //姓名 int num; //学号 int age; //年龄 char group ...

  2. [刘阳Java]_酷炫视频播放器制作_界面篇

    今天开始分享一篇酷炫播放器制作,包括界面+JS.整个案例非常类似腾讯视频,优酷视频,爱奇艺视频.我们先看一下效果图,然后这篇文章主要界面篇 是不是效果比较酷炫,那么我接着来给大家说一下这个界面设计思路 ...

  3. Apache atlas liunx环境安装部署手册

    一.        背景 本文使用一台ubuntu虚拟机安装Apache-atlas,使用集成包unzip apache-atlas-2.1.0.zip进行快速安装部署,该集成包高度集成了hadoop ...

  4. Linux系统下Java 转换Word到PDF时,结果文档内容乱码的解决方法

    本文分享在Linux系统下,通过Java 程序代码将Word转为PDF文档时,结果文档内容出现乱码该如何解决.具体可参考如下内容: 1.问题出现的背景 在Windows系统中,使用Spire.Doc ...

  5. CentOS下 Django部署 nginx+uWSGI+Django(二)

    该篇内容承接CentOS下 Django部署 uWSGI+Django(一),细节流程可参考此篇内容. 1. 当前系统 CentOS Linux release 7.6.1810 Python 2.7 ...

  6. my.ini修改后启动失败

    修改之后ini文件后不要直接关闭在记事本里点击另存为,编码选择为ANSI编码格式,再保存就行了

  7. windows上安装python3里没有pip问题,解决办法!

    安装python3: 1.下载python:https://www.python.org/downloads/ 2.安装:   3.安装完成进cmd里验证,但发现无pip包 所以操作步骤如下: 1.下 ...

  8. javascript学习(五)之标准对象

    一.RegExp:正则表达式是一种用来匹配字符串的强有力的武器.它的设计思想是用一种描述性的语言来给字符串定义一个规则, 凡是符合规则的字符串,我们就认为它"匹配"了,否则,该字符 ...

  9. 记一次系统崩溃事件【Mac版】

    事件:Mac系统崩溃,导致电脑数据丢失,以及数据安全备份措施的不到位的教训! 解决措施: 1.开机后按:Command+R 按开机键 ,进入Mac 实用工具, 选择磁盘工具.由于没有备份直接抹掉磁盘. ...

  10. S7-200通过以太网模块,使用kepware与ifix建立通讯连接要点

    在前阵子项目改造中,需要利用先前的S7-200 PLC与ifix进行通讯,故而,在做好上位机后,在现场实际测试了下.通过CP243-1以太网模块,顺利与KEPWARE建立连接,其中当然也有些要点要注意 ...