$(function () {
|
layui.use(['element', 'form', 'laydate'], function () {
|
var $ = layui.jquery
|
, element = layui.element; //Tab的切换功能,切换事件监听等,需要依赖element模块
|
var form = layui.form;
|
var laydate = layui.laydate;
|
var sgworld = parent.sgworld;
|
|
laydate.render({
|
elem: '#timeShadow'
|
, type: 'datetime'
|
, done: function (value, date, endDate) {
|
yyfx_handleSetCurrentTime(value);
|
window.parent.fnLayerHauto(window.parent.SmartEarthPopupData.layerProp, '290')
|
}
|
, ready: function (date) {
|
window.parent.fnLayerHauto(window.parent.SmartEarthPopupData.layerProp, '500')
|
}
|
});
|
laydate.render({
|
elem: '#timez'
|
, type: 'datetime'
|
, done: function (value, date, endDate) {
|
yyfx_handleSetCurrentTime(value);
|
window.parent.fnLayerHauto(window.parent.SmartEarthPopupData.layerProp, '215')
|
}
|
, ready: function (date) {
|
window.parent.fnLayerHauto(window.parent.SmartEarthPopupData.layerProp, '425')
|
}
|
});
|
//开启阴影分析
|
//监听指定开关
|
form.on('switch(switchShadow)', function (data) {
|
var chk = this.checked ? true : false;
|
if (chk) {
|
parent.shadows = true;
|
$('.dateBox').show();
|
//当前操作
|
sgworld.ProjectTree.pushStateItem("阴影分析");
|
yyfx_handleGetCurrentTime();
|
window.parent.fnLayerHauto(window.parent.SmartEarthPopupData.layerProp, '290')
|
} else {
|
parent.shadows = false;
|
$('.dateBox').hide();
|
sgworld.ProjectTree.endtemporaryItem();
|
//yyfx_handlePause();
|
sgworld._Viewer.shadows = false;
|
window.parent.fnLayerHauto(window.parent.SmartEarthPopupData.layerProp, '100')
|
}
|
});
|
if (parent.shadows) {
|
$('#switchShadow').next().click();
|
$('#switchShadow').attr('value', 'on');
|
$('.dateBox').show();
|
yyfx_handleGetCurrentTime()
|
}
|
});
|
})
|