forked from p51497208/geo_info_platform
64 lines
2.0 KiB
JavaScript
64 lines
2.0 KiB
JavaScript
/*
|
|
* @Description:
|
|
* @Author: tangjiang
|
|
* @Github:
|
|
* @Date: 2019-12-11 09:17:17
|
|
* @LastEditors: tangjiang
|
|
* @LastEditTime: 2019-12-11 11:50:01
|
|
*/
|
|
$(document).ready(function () {
|
|
$('#btn').on('click', function () {
|
|
|
|
if ($('.fixed-left').hasClass('active')) {
|
|
// 改变样式
|
|
$('.fixed-left').removeClass('active');
|
|
$('.video_img, .search-area').show();
|
|
$('.screen_icon').addClass('icon-kuoda').removeClass('icon-suoxiao');
|
|
|
|
// 重新加载知识图谱
|
|
|
|
} else {
|
|
$('.fixed-left').addClass('active');
|
|
$('.video_img, .search-area').hide();
|
|
$('.screen_icon').addClass('icon-suoxiao').removeClass('icon-kuoda');
|
|
}
|
|
});
|
|
|
|
// 用户登录信息
|
|
$('.drop-down').on('mouseover', function () {
|
|
$('.drop-down-list').show();
|
|
}).on('mouseout', function () {
|
|
var timer = setTimeout(function () {
|
|
$('.drop-down-list').hide();
|
|
}, 300);
|
|
$('.drop-down-list').on('mouseover', function () {
|
|
clearTimeout(timer);
|
|
$('.drop-down-list').show();
|
|
}).on('mouseout', function () {
|
|
$('.drop-down-list').hide();
|
|
});
|
|
});
|
|
|
|
// 收缩左侧侧边栏
|
|
$('.collpase-icon').on('click', function() {
|
|
if ($('.fixed-left').hasClass('collpased')) {
|
|
$('.fixed-left').removeClass('collpased');
|
|
$('.map_header').css({left: 0});
|
|
// $('.collpase-icon').remove('icon-zhankai').add('icon-shouqi');
|
|
// $('.collpase-icon').addClass('icon-zhankai').remove('icon-shouqi');
|
|
} else {
|
|
$('.fixed-left').addClass('collpased');
|
|
$('.map_header').css({left: '400px'});
|
|
// $('.collpase-icon').remove('icon-shouqi').add('icon-zhankai');
|
|
}
|
|
|
|
if ($(this).hasClass('icon-zhankai')) {
|
|
$(this).removeClass('icon-zhankai').addClass('icon-shouqi')
|
|
} else {
|
|
$(this).removeClass('icon-shouqi').addClass('icon-zhankai')
|
|
}
|
|
// $(this).hasClass('icon-zhankai')
|
|
// ? $(this).removeClass('icon-zhankai').addClass('icon-shouqi')
|
|
// : $(this).removeClass('icon-shouqi').addClass('icon-zhankai)
|
|
})
|
|
}); |