var currentClik;//
|
|
function getEarth() {
|
if ($(".cesium-viewer").css("display") == "block") {
|
$(".cesium-viewer").hide();//隐藏div
|
}
|
else {
|
$(".cesium-viewer").show();//隐藏div
|
}
|
}
|
function baseMap() {
|
layui.use(['element', 'layer', 'form', 'upload', 'tree', 'util'], function () {
|
var layer = layui.layer;
|
layer.config({
|
extend: 'myskin/style.css' //同样需要先加载新皮肤
|
});
|
layer.closeAll();//首先关闭所有的弹窗
|
layer.open({
|
type: 2,
|
title: '<i class="iconfont icon-dituliulan i-item" style="font-size: 18px; color: white;"></i> ' + " 切换底图",
|
maxmin: true,
|
skin: 'layer-ext-myskin',
|
shade: 0,
|
maxmin: false,
|
scrollbar: false,
|
shadeClose: true, //点击遮罩关闭层
|
area: ['356px', '280px'],
|
offset: [layerPageStyle.offsetX, layerPageStyle.offsetY],
|
resize: false,
|
content: 'project/baseMap.html',
|
success: function (layero, index) {
|
|
var iframe = window['layui-layer-iframe' + index];//拿到iframe元素
|
iframe.init(isTerrainLoad)//向此iframe层方法 传递参数
|
|
}
|
});
|
|
});
|
}
|
function relatedProj() {
|
layui.use(['element', 'layer', 'form', 'upload', 'tree', 'util'], function () {
|
var layer = layui.layer;
|
layer.config({
|
extend: 'myskin/style.css' //同样需要先加载新皮肤
|
});
|
layer.closeAll();//首先关闭所有的弹窗
|
layer.open({
|
type: 2,
|
title: '<i class="iconfont icon-dituliulan i-item" style="font-size: 18px; color: white;"></i> ' + " 剖面全景",
|
maxmin: true,
|
skin: 'layer-ext-myskin',
|
shade: 0,
|
maxmin: false,
|
scrollbar: false,
|
shadeClose: true, //点击遮罩关闭层
|
area: ['356px', '280px'],
|
offset: [layerPageStyle.offsetX, layerPageStyle.offsetY],
|
resize: false,
|
content: 'project/relatedProject.html',
|
success: function (layero, index) {
|
|
}
|
});
|
|
});
|
}
|
//绘制图形
|
function darwPlot() {
|
layui.use(['element', 'layer', 'form', 'upload', 'tree', 'util'], function () {
|
var layer = layui.layer;
|
layer.config({
|
extend: 'myskin/style.css' //同样需要先加载新皮肤
|
});
|
|
layer.closeAll();
|
layer.open({
|
type: 2,
|
title: '<i class="iconfont icon-huitu i-item" style="font-size: 18px; color: white;"></i> ' + "绘制图形",
|
maxmin: true,
|
skin: 'layer-ext-myskin',
|
shade: 0,
|
maxmin: false,
|
scrollbar: false,
|
shadeClose: true, //点击遮罩关闭层
|
area: ['275px', '240px'],
|
resize: false,
|
offset: [layerPageStyle.offsetX, layerPageStyle.offsetY],
|
content: 'project/drawPlot.html',
|
success: function (layero, index) {
|
darwPage = window[layero.find('iframe')[0]['name']];
|
}
|
});
|
|
});
|
}
|
//视窗管理
|
function dataView() {
|
layui.use(['element', 'layer', 'form', 'upload', 'tree', 'util'], function () {
|
var layer = layui.layer;
|
layer.config({
|
extend: 'myskin/style.css' //同样需要先加载新皮肤
|
});
|
layer.closeAll();
|
layer.open({
|
type: 2,
|
title: '<i class="iconfont icon-shichuang i-item" style="font-size: 18px; color: white;"></i>' + ' 导出场景',
|
maxmin: true,
|
skin: 'layer-ext-myskin',
|
shade: 0,
|
maxmin: false,
|
scrollbar: false,
|
shadeClose: true, //点击遮罩关闭层
|
area: ['340px', '180px'],
|
resize: false,
|
offset: [layerPageStyle.offsetX, layerPageStyle.offsetY],
|
content: 'project/windowAnalysis.html',
|
success: function (layero, index) {
|
dataViewPage = window[layero.find('iframe')[0]['name']];
|
}
|
});
|
|
});
|
}
|
//shp图层
|
function shpFeature(){
|
layui.use(['element', 'layer', 'form', 'upload', 'tree', 'util'], function () {
|
var layer = layui.layer;
|
layer.config({
|
extend: 'myskin/style.css' //同样需要先加载新皮肤
|
});
|
layer.closeAll();
|
layer.open({
|
type: 2,
|
title: '<i class="iconfont icon-shichuang i-item" style="font-size: 18px; color: white;"></i>' + ' shp添加',
|
maxmin: true,
|
skin: 'layer-ext-myskin',
|
shade: 0,
|
maxmin: false,
|
scrollbar: false,
|
shadeClose: true, //点击遮罩关闭层
|
area: ['290px', '340px'],
|
resize: false,
|
offset: [layerPageStyle.offsetX, layerPageStyle.offsetY],
|
content: 'project/shpAdd.html',
|
success: function (layero, index) {
|
dataViewPage = window[layero.find('iframe')[0]['name']];
|
}
|
});
|
|
});
|
}
|
|
|
//空间量算
|
function measureAnalysis() {
|
layui.use(['element', 'layer', 'form', 'upload', 'tree', 'util'], function () {
|
var layer = layui.layer;
|
layer.config({
|
extend: 'myskin/style.css' //同样需要先加载新皮肤
|
});
|
|
layer.closeAll();
|
layer.open({
|
type: 2,
|
title: '<i class="iconfont icon-liangsuan i-item" style="font-size: 18px; color: white;"></i> ' + " 空间量算",
|
maxmin: true,
|
skin: 'layer-ext-myskin',
|
shade: 0,
|
maxmin: false,
|
scrollbar: false,
|
shadeClose: true, //点击遮罩关闭层
|
area: ['320px', '230px'],
|
resize: false,
|
offset: [layerPageStyle.offsetX, layerPageStyle.offsetY],
|
content: 'project/measureAnalysis.html',
|
success: function (layero, index) {
|
measurePage = window[layero.find('iframe')[0]['name']];
|
},
|
end: function () {
|
measureClear();
|
}
|
});
|
|
});
|
}
|
|
//淹没分析
|
function floodAnaysis() {
|
layui.use(['element', 'layer', 'form', 'upload', 'tree', 'util'], function () {
|
var layer = layui.layer;
|
layer.config({
|
extend: 'myskin/style.css' //同样需要先加载新皮肤
|
});
|
layer.closeAll();
|
layer.open({
|
type: 2,
|
title: '<i class="iconfont icon-yanmeifenxi i-item" style="font-size: 18px; color: white;"></i> ' + "淹没分析",
|
maxmin: true,
|
skin: 'layer-ext-myskin',
|
shade: 0,
|
maxmin: false,
|
scrollbar: false,
|
shadeClose: true, //点击遮罩关闭层
|
area: ['380px', '300px'],
|
resize: false,
|
offset: [layerPageStyle.offsetX, layerPageStyle.offsetY],
|
content: 'project/floodAnalysis.html',
|
success: function (layero, index) {
|
floodPage = window[layero.find('iframe')[0]['name']];
|
},
|
end: function () {
|
sub_analysis_drawClear();
|
sub_analysis_clear();
|
}
|
});
|
|
});
|
}
|
|
//日斩分析
|
function sunshineAnalysis() {
|
layui.use(['element', 'layer', 'form', 'upload', 'tree', 'util'], function () {
|
var layer = layui.layer;
|
layer.config({
|
extend: 'myskin/style.css' //同样需要先加载新皮肤
|
});
|
layer.closeAll();
|
|
layer.open({
|
type: 2,
|
title: '<i class="iconfont icon-rizhaofenxi i-item" style="font-size: 18px; color: white;"></i> ' + "日照分析",
|
maxmin: true,
|
skin: 'layer-ext-myskin',
|
shade: 0,
|
maxmin: false,
|
scrollbar: true,
|
shadeClose: true, //点击遮罩关闭层
|
area: ['350px', '250px'],
|
resize: false,
|
offset: [layerPageStyle.offsetX, layerPageStyle.offsetY],
|
content: 'project/sunshineAnalysis.html',
|
success: function (layero, index) {
|
sunshinePage = window[layero.find('iframe')[0]['name']];
|
},
|
end: function () {
|
sunshineStop();
|
}
|
});
|
|
});
|
}
|
//视域分析
|
function viewshedAnalysis() {
|
layui.use(['element', 'layer', 'form', 'upload', 'tree', 'util'], function () {
|
var layer = layui.layer;
|
layer.config({
|
extend: 'myskin/style.css' //同样需要先加载新皮肤
|
});
|
|
layer.closeAll();
|
layer.open({
|
type: 2,
|
title: '<i class="iconfont icon-shiyufenxi i-item" style="font-size: 18px; color: white;"></i> ' + "视域分析",
|
maxmin: true,
|
skin: 'layer-ext-myskin',
|
shade: 0,
|
maxmin: false,
|
scrollbar: false,
|
shadeClose: true, //点击遮罩关闭层
|
area: ['340px', '220px'],
|
resize: false,
|
offset: [layerPageStyle.offsetX, layerPageStyle.offsetY],
|
content: 'project/viewedAnalysis.html',
|
success: function (layero, index) {
|
viewshedPage = window[layero.find('iframe')[0]['name']];
|
},
|
end: function () {
|
clearViewshed();
|
}
|
});
|
|
});
|
}
|
//地形修改
|
function terrainAnalysis() {
|
layui.use(['element', 'layer', 'form', 'upload', 'tree', 'util'], function () {
|
var layer = layui.layer;
|
layer.config({
|
extend: 'myskin/style.css' //同样需要先加载新皮肤
|
});
|
|
layer.closeAll();
|
layer.open({
|
type: 2,
|
title: '<i class="iconfont icon-dixingtu i-item" style="font-size: 18px; color: white;"></i> ' + "地形控制",
|
maxmin: true,
|
skin: 'layer-ext-myskin',
|
shade: 0,
|
maxmin: false,
|
scrollbar: true,
|
shadeClose: true, //点击遮罩关闭层
|
area: ['330px', '230px'],
|
resize: false,
|
offset: [layerPageStyle.offsetX, layerPageStyle.offsetY],
|
content: 'project/terrainAnalysis.html',
|
success: function (layero, index) {
|
terrainPage = window[layero.find('iframe')[0]['name']];
|
}
|
});
|
|
});
|
}
|
function drawTerrainDraw(options) {
|
layui.use(['element', 'layer', 'form', 'upload', 'tree', 'util'], function () {
|
var layer = layui.layer;
|
layer.config({
|
extend: 'myskin/style.css' //同样需要先加载新皮肤
|
});
|
// layer.closeAll();//首先关闭所有的弹窗
|
layer.open({
|
type: 2,
|
title: '<i class="iconfont icon-dixingtu i-item" style="font-size: 18px; color: white;"></i> ' + "地形控制绘制",
|
maxmin: true,
|
skin: 'layer-ext-myskin',
|
shade: 0,
|
maxmin: false,
|
scrollbar: false,
|
shadeClose: true, //点击遮罩关闭层
|
offset: [layerPageStyle.offsetX, layerPageStyle.offsetY],
|
area: ['300px', '340px'],
|
resize: false,
|
content: 'project/terrainDrawConfirm.html',
|
success: function (layero, index) {
|
terrainDrawPage = window[layero.find('iframe')[0]['name']];
|
terrainDrawPage.layerIndex = index;
|
terrainDrawPage.options = options;
|
terrainDraw(options);
|
},
|
end: function (index, layero) {
|
terrainDrawClean(options);
|
}
|
});
|
});
|
}
|
|
//通视
|
function visibleAnalysis() {
|
|
layui.use(['element', 'layer', 'form', 'upload', 'tree', 'util'], function () {
|
var layer = layui.layer;
|
layer.config({
|
extend: 'myskin/style.css' //同样需要先加载新皮肤
|
});
|
|
layer.closeAll();
|
layer.open({
|
type: 2,
|
title: '<i class="iconfont icon-tongshi i-item" style="font-size: 18px; color: white;"></i> ' + "通视分析",
|
maxmin: true,
|
skin: 'layer-ext-myskin',
|
shade: 0,
|
maxmin: false,
|
scrollbar: true,
|
shadeClose: true, //点击遮罩关闭层
|
area: ['330px', '175'],
|
resize: false,
|
offset: [layerPageStyle.offsetX, layerPageStyle.offsetY],
|
content: 'project/visibleAnalysis.html',
|
success: function (layero, index) {
|
visiblePage = window[layero.find('iframe')[0]['name']];
|
},
|
end: function () {
|
clearVisible();
|
}
|
});
|
|
});
|
}
|
|
//空间影响分析
|
|
function spatialimpactAnalysis() {
|
layui.use(['element', 'layer', 'form', 'upload', 'tree', 'util'], function () {
|
var layer = layui.layer;
|
layer.config({
|
extend: 'myskin/style.css' //同样需要先加载新皮肤
|
});
|
|
layer.closeAll();
|
layer.open({
|
type: 2,
|
title: '<i class="iconfont icon-tongshi i-item" style="font-size: 18px; color: white;"></i> ' + "空间影响分析",
|
maxmin: true,
|
skin: 'layer-ext-myskin',
|
shade: 0,
|
maxmin: false,
|
scrollbar: true,
|
shadeClose: true, //点击遮罩关闭层
|
area: ['340px', '175'],
|
resize: false,
|
offset: [layerPageStyle.offsetX, layerPageStyle.offsetY],
|
content: 'project/spatialimpactAnalysis.html',
|
success: function (layero, index) {
|
spatialimpact = window[layero.find('iframe')[0]['name']];
|
},
|
end: function () {
|
clearRadar();
|
}
|
});
|
|
});
|
}
|
|
function depthExport() {
|
layui.use(['element', 'layer', 'form', 'upload', 'tree', 'util'], function () {
|
var layer = layui.layer;
|
layer.config({
|
extend: 'myskin/style.css' //同样需要先加载新皮肤
|
});
|
|
layer.closeAll();
|
layer.open({
|
type: 2,
|
title: '<i class="iconfont icon-tongshi i-item" style="font-size: 18px; color: white;"></i> ' + "地形高程导出",
|
maxmin: true,
|
skin: 'layer-ext-myskin',
|
shade: 0,
|
maxmin: false,
|
scrollbar: true,
|
shadeClose: true, //点击遮罩关闭层
|
area: ['360px', '260px'],
|
resize: false,
|
offset: [layerPageStyle.offsetX, layerPageStyle.offsetY],
|
content: 'project/depthExport.html',
|
success: function (layero, index) {
|
depthPage = window[layero.find('iframe')[0]['name']];
|
depthPage.Cesium = Cesium;
|
depthPage.viewer = viewer;
|
},
|
end: function () {
|
depthPage.clearDraw();
|
}
|
});
|
|
});
|
}
|
//搜索查询
|
function search(id) {
|
layui.use('laytpl', function () {
|
$("#left-bar-search").fadeIn({
|
duration: 500,
|
});
|
var laytpl = layui.laytpl;
|
if (id == 'searchBtn') {//建工搜索
|
|
var pList = getProjectList();
|
|
//模板引擎 searchpanel
|
var getTpl = searchpanel.innerHTML, view = document.getElementById('left-bar-search-content');
|
laytpl(getTpl).render(pList, function (html) {
|
view.innerHTML = html;
|
});
|
addProjectIcons(pList);
|
}
|
});
|
}
|
|
function hideSearch() {
|
$("#left-bar-search").fadeOut({
|
duration: 500,
|
})
|
}
|
|
//隐藏left-bar
|
function hideLeftBar() {
|
$("#left-bar").fadeOut({
|
duration: 500,
|
})
|
}
|
|
function hideLeftBarChildren() {
|
$("#left-bar-children").fadeOut({
|
duration: 500,
|
})
|
}
|
|
|
|
function sysHelp() {
|
alert("连接到系统帮助文档");
|
}
|
|
function sysConfig(isshow) {
|
if (isshow) {
|
$("#left_bar").animate({
|
left: "0"//left移bm 0px
|
});
|
document.getElementById('left_bar_shadow').style.display = "block";
|
} else {
|
$("#left_bar").animate({
|
left: "-320"//left移bm 0px
|
});
|
document.getElementById('left_bar_shadow').style.display = "none";
|
}
|
layui.use('layer', function () {
|
layui.layer.closeAll();
|
})
|
|
}
|
layui.use('form', function () {
|
var form = layui.form;
|
form.on('switch(switchTest)', function (data) {
|
if(this.checked){
|
addMouseClickListener();
|
}else{
|
CesiumPop.removeDiv();
|
mouseClickHandler = mouseClickHandler && mouseClickHandler.destroy();
|
}
|
});
|
})
|