diff --git a/src/main/resources/static/css/synthesisQuery/digitalSignage.css b/src/main/resources/static/css/synthesisQuery/digitalSignage.css index 00b6711..0393aab 100644 --- a/src/main/resources/static/css/synthesisQuery/digitalSignage.css +++ b/src/main/resources/static/css/synthesisQuery/digitalSignage.css @@ -218,6 +218,7 @@ body { background: rgba(0, 0, 0, 0.6); border-radius: 10px; z-index: 999; + visibility: visible; /* display: flex; flex-direction: column; @@ -357,6 +358,19 @@ body { cursor: pointer; } +.project-overview-open-drawer-btn { + bottom: 40px; + left: 0; + position: absolute; + width: 0; + height: 0; + border-style: solid; + border-width: 14px 14px 14px 0; + border-color: transparent #d7d7d7 transparent transparent; + z-index: 999; + cursor: pointer; +} + .close-drawer-btn { position: absolute; top: 50%; diff --git a/src/main/resources/static/js/synthesisQuery/digitalSignage-new.js b/src/main/resources/static/js/synthesisQuery/digitalSignage-new.js index fa33779..0df7968 100644 --- a/src/main/resources/static/js/synthesisQuery/digitalSignage-new.js +++ b/src/main/resources/static/js/synthesisQuery/digitalSignage-new.js @@ -1416,6 +1416,11 @@ document.addEventListener("DOMContentLoaded", function () { const legendDrawer = document.querySelector(".legend-box"); const legendOpenBtn = document.querySelector(".legend-open-drawer-btn"); + const projectOverview = document.querySelector(".project-overview-box"); + const overviewOpenDrawerBtn = document.querySelector( + ".project-overview-open-drawer-btn" + ); + // const closeBtn = document.querySelector(".close-drawer-btn"); // 点击三角按钮打开抽屉 @@ -1516,50 +1521,63 @@ document.addEventListener("DOMContentLoaded", function () { legendOpenBtn.style.transform = "rotate(0deg)"; } }); + overviewOpenDrawerBtn.addEventListener("click", function () { + if (projectOverview.style.visibility === "visible") { + projectOverview.style.visibility = "hidden"; + // 修改图例的三角 - // 点击全屏图标时 使地图盒子全屏 - const fullScreenBtn = document.querySelector(".full-screen-btn"); - fullScreenBtn.addEventListener("click", function () { - if (document.fullscreenElement) { - // 退出全屏 - document.exitFullscreen(); + overviewOpenDrawerBtn.style.transform = "rotate(180deg)"; } else { - // 进入全屏 - document.documentElement.requestFullscreen(); - // 遍历树形结构数据把数据全部更改为第一个工程 - if ( - treeData[0].children && - treeData[0].children.length > 0 && - treeData[0].children[0].children && - treeData[0].children[0].children.length > 0 - ) { - nodeId = treeData[0].children[0].children[0].id; - if ( - treeData[0].children[0].children[0].lon && - treeData[0].children[0].children[0].lat - ) { - intLng = treeData[0].children[0].children[0].lon; - intLat = treeData[0].children[0].children[0].lat; - } + projectOverview.style.visibility = "visible"; + // 修改图例的三角 - if (treeData[0].children[0].children[0].title) { - projectTitle = treeData[0].children[0].children[0].title; - $(".center-title-box").text(projectTitle + "作战图"); - } - - // getScrollData(nodeId); - $(".project-overview-content").text( - treeData[0].children[0].children[0].projectOverview || - "暂无" - ); - getLegendData(nodeId); - getLocationInfo(nodeId); - } else { - initMap(); - } + overviewOpenDrawerBtn.style.transform = "rotate(0deg)"; } }); + // 点击全屏图标时 使地图盒子全屏 + // const fullScreenBtn = document.querySelector(".full-screen-btn"); + // fullScreenBtn.addEventListener("click", function () { + // if (document.fullscreenElement) { + // // 退出全屏 + // document.exitFullscreen(); + // } else { + // // 进入全屏 + // document.documentElement.requestFullscreen(); + // // 遍历树形结构数据把数据全部更改为第一个工程 + // if ( + // treeData[0].children && + // treeData[0].children.length > 0 && + // treeData[0].children[0].children && + // treeData[0].children[0].children.length > 0 + // ) { + // nodeId = treeData[0].children[0].children[0].id; + // if ( + // treeData[0].children[0].children[0].lon && + // treeData[0].children[0].children[0].lat + // ) { + // intLng = treeData[0].children[0].children[0].lon; + // intLat = treeData[0].children[0].children[0].lat; + // } + + // if (treeData[0].children[0].children[0].title) { + // projectTitle = treeData[0].children[0].children[0].title; + // $(".center-title-box").text(projectTitle + "作战图"); + // } + + // // getScrollData(nodeId); + // $(".project-overview-content").text( + // treeData[0].children[0].children[0].projectOverview || + // "暂无" + // ); + // getLegendData(nodeId); + // getLocationInfo(nodeId); + // } else { + // initMap(); + // } + // } + // }); + // 设置当鼠标移入工程概况时,并且判断当前是否溢出,溢出时预览框显示 const projectOverviewBox = document.querySelector(".project-overview-box"); const projectOverviewContent = document.querySelector( diff --git a/src/main/resources/static/pages/synthesisQuery/digitalSignage.html b/src/main/resources/static/pages/synthesisQuery/digitalSignage.html index ae7bdee..9823f67 100644 --- a/src/main/resources/static/pages/synthesisQuery/digitalSignage.html +++ b/src/main/resources/static/pages/synthesisQuery/digitalSignage.html @@ -133,6 +133,9 @@
+ + +