sgworld = window.external.createSgworld();
|
var rb = new rightBottomDatlog();
|
var form = "";
|
layui.use('form', function () {
|
form = layui.form;
|
GetTDGFear();
|
});
|
|
//获取光伏的年份
|
|
function GetTDGFear() {
|
$.ajax({
|
url: "../../Ashx/TDGF.ashx",
|
type: "post",
|
data: { Action: "GetTDGFYear" },
|
dataType: "json",
|
async: false,
|
success: function (result) {
|
var html = "";
|
$.each(result, function (index, value) {
|
html += '<input type="checkbox" name="year" value="' + value.Year + '" title="' + value.Year + '" lay-skin="primary">'
|
});
|
$(".timeYear").empty();
|
$(".timeYear").append(html);
|
form.render();
|
}
|
})
|
}
|
|
|
|
function sure() {
|
var type = "";
|
var arrYear = new Array();
|
$("input:checkbox[name='year']:checked").each(function (i) {
|
arrYear[i] = $(this).val();
|
});
|
|
|
if (arrYear.length == 0) {
|
alert("请选择年份");
|
return false;
|
}
|
//关闭所有的图层
|
// sgworld.ProjectTree.SetVisibility("", false);
|
//定义所需要的json对象存储内容
|
var lakeUrl = [];
|
//循坏打开需要打开的图层
|
for (var i = 0; i < arrYear.length; i++) {
|
//var layerId = sgworld.ProjectTree.FindItem(path);
|
////关闭其他图层
|
//sgworld.ProjectTree.SetVisibility(layerId, true);
|
lakeUrl.push(arrYear[i]);
|
|
}
|
|
//存储到持久化机制里面
|
localStorage.setItem("openShp", JSON.stringify(lakeUrl));
|
//获取文件的路径
|
var url = getRootPath();
|
|
|
window.external.closeDialog("右下");
|
window.external.createPmDialogDock("右下", url + "/chart/chartTDGF.html?Type=choose", rb.width, rb.height, rb.top, rb.left, rb.bottom, rb.right);
|
}
|
|
function closeCurrent() {
|
window.external.closeDialog("右上");
|
window.external.closeDialog("右下");
|
}
|