250 lines
11 KiB
Plaintext
250 lines
11 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8"%>
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
|
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
|
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
|
|
|
<!DOCTYPE html>
|
|
<!-- <html lang="zh-CN"> -->
|
|
<!-- BEGIN HEAD -->
|
|
<head>
|
|
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
|
<!-- 引入daterangepicker-->
|
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
|
|
|
<style type="text/css">
|
|
.tree{
|
|
overflow:auto;
|
|
height:100%;
|
|
}
|
|
.tree::-webkit-scrollbar{
|
|
width:6px;
|
|
height:100%;
|
|
}
|
|
.tree::-webkit-scrollbar-thumb{
|
|
width:4px;
|
|
height:60px;
|
|
background-color:#ccc;
|
|
border-radius:3px;
|
|
}
|
|
.tree::-webkit-scrollbar-track
|
|
{
|
|
border-radius: 10px;
|
|
background-color: rgba(255,255,255,.5);
|
|
}
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var tabst='1';
|
|
$(function() {
|
|
var windowhight=$(window).height();
|
|
var windowwidth=$(window).width();
|
|
$('#main').attr("style","height:"+(windowhight)+"px;width:"+(windowwidth)+"px;");
|
|
|
|
$('#headimg').css("background","url("+getRootPath()+"/images/bim/成都首页抬头.png) no-repeat");
|
|
$('#headimg').css("background-size","contain");
|
|
|
|
$('#tab1').css("display","block");
|
|
$('#tab1name').css("font-weight","600");
|
|
$('#tab1name').css("background","url("+getRootPath()+"/images/bim/短亮线.png) no-repeat");
|
|
$('#tab1name').css("background-size","contain");
|
|
|
|
$('#img1').css("background","url("+getRootPath()+"/images/bim/CDBIM首页树边框.png) no-repeat");
|
|
$('#img1').css("background-size","contain");
|
|
inittree1('-1','');
|
|
inittree2('-1','');
|
|
|
|
$('#fzimg').css("background","url("+getRootPath()+"/images/bim/仿真图标.png) no-repeat");
|
|
$('#fzimg').css("background-size","contain");
|
|
|
|
$('#cjimg').css("background","url("+getRootPath()+"/images/bim/测距图标.png) no-repeat");
|
|
$('#cjimg').css("background-size","contain");
|
|
|
|
$('#fhimg').css("background","url("+getRootPath()+"/images/bim/返回图标.png) no-repeat");
|
|
$('#fhimg').css("background-size","contain");
|
|
|
|
});
|
|
|
|
var inittree1 = function(id,name) {
|
|
$.post(ext.contextPath + '/bim/CDBIM/getTree.do', {type:'landmark',id:id,name:name} , function(data) {
|
|
// console.info(data);
|
|
if(name==''){
|
|
$('#tab1Tree').treeview({
|
|
data: data,
|
|
levels: 1,
|
|
showBorder: false,
|
|
backColor: "transparent",
|
|
onhoverColor: "#4e72b8"
|
|
});
|
|
}else{
|
|
$('#tab1Tree').treeview({
|
|
data: data,
|
|
levels: 2,
|
|
showBorder: false,
|
|
backColor: "transparent",
|
|
onhoverColor: "#4e72b8"
|
|
});
|
|
}
|
|
|
|
$('#tab1Tree').on('nodeSelected', function(event, data) {
|
|
handleEvent();
|
|
// if(data.type=='${Type_mp}'){
|
|
// showMPCurveView(data.mpid);
|
|
// }else if(data.type=='${Type_sys}'||data.type=='${Type_user}'){
|
|
// $("#curve_id").val(data.id);
|
|
// showProgrammeCurveView();
|
|
// }
|
|
});
|
|
},'json');
|
|
}
|
|
|
|
var inittree2 = function(id,name) {
|
|
$.post(ext.contextPath + '/bim/CDBIM/getTree.do', {type:'equipment',id:id,name:name} , function(data) {
|
|
// console.info(data);
|
|
if(name==''){
|
|
$('#tab2Tree').treeview({
|
|
data: data,
|
|
levels: 1,
|
|
showBorder: false,
|
|
backColor: "transparent",
|
|
onhoverColor: "#4e72b8"
|
|
});
|
|
}else{
|
|
$('#tab2Tree').treeview({
|
|
data: data,
|
|
levels: 2,
|
|
showBorder: false,
|
|
backColor: "transparent",
|
|
onhoverColor: "#4e72b8"
|
|
});
|
|
}
|
|
$('#tab2Tree').on('nodeSelected', function(event, data) {
|
|
// if(data.type=='${Type_mp}'){
|
|
// showMPCurveView(data.mpid);
|
|
// }else if(data.type=='${Type_sys}'||data.type=='${Type_user}'){
|
|
// $("#curve_id").val(data.id);
|
|
// showProgrammeCurveView();
|
|
// }
|
|
});
|
|
},'json');
|
|
}
|
|
|
|
//获取url地址根目录 当前taomcat下路径
|
|
function getRootPath(){
|
|
var pathName = window.location.pathname.substring(1);
|
|
// var webName = pathName == '' ? '' : pathName.substring(0, pathName.indexOf('/'));
|
|
return window.location.protocol + '//' + window.location.host;
|
|
}
|
|
|
|
function tabChange(st){
|
|
if(st=='1'){
|
|
tabst='1';
|
|
$('#tab1').css("display","block");
|
|
$('#tab1name').css("font-weight","600");
|
|
$('#tab1name').css("background","url("+getRootPath()+"/images/bim/短亮线.png) no-repeat");
|
|
$('#tab1name').css("background-size","contain");
|
|
|
|
$('#tab2').css("display","none");
|
|
$('#tab2name').css("font-weight","400");
|
|
$('#tab2name').css("background","");
|
|
$('#tab2name').css("background-size","");
|
|
}else if(st=='2'){
|
|
tabst='2';
|
|
$('#tab2').css("display","block");
|
|
$('#tab2name').css("font-weight","600");
|
|
$('#tab2name').css("background","url("+getRootPath()+"/images/bim/短亮线.png) no-repeat");
|
|
$('#tab2name').css("background-size","contain");
|
|
|
|
$('#tab1').css("display","none");
|
|
$('#tab1name').css("font-weight","400");
|
|
$('#tab1name').css("background","");
|
|
$('#tab1name').css("background-size","");
|
|
}
|
|
}
|
|
|
|
function handleEvent() {
|
|
console.log(121);
|
|
// iframe的id
|
|
var id = document.getElementById('iframeid');
|
|
// 触发子页面的监听事件
|
|
// console.log(id.contentWindow);
|
|
id.contentWindow.postMessage('mzw', '*');
|
|
console.log("cs");
|
|
}
|
|
|
|
// window.addEventListener('message',function(e){
|
|
// console.log("csssssssssssssss",e.data);
|
|
// },false);
|
|
|
|
function doTreeNameSearch(){
|
|
var name=$('#treeNameSearch').val();
|
|
if(tabst=='1'){
|
|
if(name!=''){
|
|
inittree1('0',name);
|
|
}else{
|
|
inittree1('-1',name);
|
|
}
|
|
}else if(tabst=='2'){
|
|
if(name!=''){
|
|
inittree2('0',name);
|
|
}else{
|
|
inittree2('-1',name);
|
|
}
|
|
}
|
|
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
|
<div id="main" >
|
|
<div id="headimg" style="width: 100%;height: 168px;position:absolute;left:0px;top:0px;"></div>
|
|
|
|
<div id="img1" style="width:225px;height:549px;position:absolute;left:15px;top:150px;padding:15px;">
|
|
<!-- <div style="width:230px;height:500px;position:absolute;left:15px;top:100px;background:rgba(43,102,169,0.5);border-radius:8px;padding:15px;"> -->
|
|
<div style="float:left;width: 100%;height:30px;">
|
|
<input type="text" class="form-control pull-left" id="treeNameSearch" style="width:130px;height:25px;background-color:#0a2447;color: #11CAFF;border-radius:6px;border: 1px solid #11CAFF;" >
|
|
<div class="input-group-btn pull-left" style="height:25px;">
|
|
<button type="button" class="btn btn-default" onclick="doTreeNameSearch();" style="background-color:transparent;color: #11CAFF;border: 0px;height:25px;line-height:15px;"><i class="fa fa-search"></i> 查询</button>
|
|
</div>
|
|
</div>
|
|
<div style="float:left;width: 100%;height:40px;">
|
|
<div style="float:left;width: 50%;height: 100%;color:#13B4E5;cursor: pointer;padding: 5px;" onclick="tabChange('1');">
|
|
<div id="tab1name" style="float:left;width: 100%;height:100%;text-align: center;line-height: 35px;">景观地标</div>
|
|
</div>
|
|
<div style="float:left;width: 50%;height: 100%;color:#13B4E5;cursor: pointer;padding: 5px;" onclick="tabChange('2');">
|
|
<div id="tab2name" style="float:left;width: 100%;height:100%;text-align: center;line-height: 35px;">监测设备</div>
|
|
</div>
|
|
</div>
|
|
<div id="tab1" style="float:left;width: 100%;height:449px;display: none;color:#13B4E5;">
|
|
<div id="tab1Tree" class="tree" ></div>
|
|
</div>
|
|
<div id="tab2" style="float:left;width: 100%;height:449px;display: none;color:#13B4E5;">
|
|
<div id="tab2Tree" class="tree" ></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="width: 212px;height: 72px;position:absolute;right:15px;top:150px;background: rgba(9,26,70,0.80);border: 1px solid #47a9e2;border-radius:5px;">
|
|
<div style="float:left;height: 100%;width: 33.3%;padding-top: 5px;">
|
|
<div id="fzimg" style="margin-left: 14px;height: 40px;width: 40px;"></div>
|
|
<div style="padding-left: 20px;height: 32px;font-size: 14px;color: #11caff;">仿真</div>
|
|
</div>
|
|
<div style="float:left;height: 100%;width: 33.3%;padding-top: 5px;">
|
|
<div id="cjimg" style="margin-left: 14px;height: 40px;width: 40px;"></div>
|
|
<div style="padding-left: 20px;height: 32px;font-size: 14px;color: #11caff;">测距</div>
|
|
</div>
|
|
<div style="float:left;height: 100%;width: 33.3%;padding-top: 5px;">
|
|
<div id="fhimg" style="margin-left: 14px;height: 40px;width: 40px;"></div>
|
|
<div style="padding-left: 20px;height: 32px;font-size: 14px;color: #11caff;">返回</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="width: 214px;height: 222px;position:absolute;right:15px;top:410px;background:rgba(43,102,169,0.5);border-radius:8px;"></div>
|
|
|
|
<!-- <iframe id="iframeid" src="http://180.76.177.120:8802/ChengDu_threejs_20210207/html/" allowTransparency="true" style="width:100%;height:100%;" frameBorder="0" scrolling="auto"></iframe> -->
|
|
<iframe id="iframeid" src="http://118.122.125.134:8081/CDBIM/data/showOnlyLineForBIM.do?unitId=028CDBIM&mpcode=HC0101_c16" allowTransparency="true" style="width:100%;height:100%;" frameBorder="0" scrolling="auto"></iframe>
|
|
</div>
|
|
</body>
|
|
</html>
|