禅道bug修复

This commit is contained in:
BianLzhaoMin 2025-05-06 16:41:55 +08:00
parent 8c6904d538
commit 48159d28f5
4 changed files with 53 additions and 15 deletions

View File

@ -313,7 +313,7 @@ body {
align-items: center; align-items: center;
position: absolute; position: absolute;
top: 15px; top: 15px;
right: 15px; right: 60px;
z-index: 999; z-index: 999;
} }
@ -342,3 +342,16 @@ body {
background-color: #8ea8e0; background-color: #8ea8e0;
color: #fff; color: #fff;
} }
.full-screen-btn {
position: absolute;
top: 15px;
right: 15px;
z-index: 999;
cursor: pointer;
}
.full-screen-btn img {
width: 38px;
height: 38px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -154,6 +154,11 @@ function getLocationInfo(id) {
console.log(result, "获取位置信息---"); console.log(result, "获取位置信息---");
const { data } = result; const { data } = result;
crossingList = [];
crossingListNew = [];
cablewayList = [];
towerList = [];
if (data.cablewaTransVos.length > 0) { if (data.cablewaTransVos.length > 0) {
cablewayList = data.cablewaTransVos; cablewayList = data.cablewaTransVos;
} else { } else {
@ -204,6 +209,9 @@ function initMap() {
// 以第一个点为中心初始化地图 // 以第一个点为中心初始化地图
map.centerAndZoom(new BMapGL.Point(intLng, intLat), 15); map.centerAndZoom(new BMapGL.Point(intLng, intLat), 15);
map.enableScrollWheelZoom(true); map.enableScrollWheelZoom(true);
// 每次初始化的时候清除所有标点以及线
map.clearOverlays();
var styleJson = [ var styleJson = [
// 隐藏道路 // 隐藏道路
{ {
@ -294,7 +302,7 @@ function initMap() {
// 添加标点 // 添加标点
function addAllMapPoints() { function addAllMapPoints() {
// 清除地图上所有现有的标记 // 清除地图上所有现有的标记
map.clearOverlays(); // map.clearOverlays();
// const bounds = []; // const bounds = [];
const bounds = []; const bounds = [];
@ -326,11 +334,11 @@ function addAllMapPoints() {
// } // }
// addedPoints[pointKey] = true; // addedPoints[pointKey] = true;
// const point = new BMapGL.Point( const point = new BMapGL.Point(
// pointData.baiduLon, pointData.baiduLon,
// pointData.baiduLat pointData.baiduLat
// ); );
const point = new BMapGL.Point(117.132663, 31.877325); // const point = new BMapGL.Point(117.132663, 31.877325);
bounds.push(point); bounds.push(point);
// 检查图标是否存在,不存在则使用默认图标 // 检查图标是否存在,不存在则使用默认图标
@ -920,17 +928,17 @@ function getScrollData(id) {
let describeHtml = ""; let describeHtml = "";
if (item.spanType === "跨线路") { if (item.spanType === "跨线路") {
describeHtml += ` describeHtml += `
<i>上层线路${item.upperLine}</i> <i>上层线路${item.upperLine || "/"}</i>
<i>下层线路: ${item.lowerLine}</i> <i>下层线路: ${item.lowerLine || "/"}</i>
<i>交叉角度: ${item.intersectionAngle} °</i> <i>交叉角度: ${item.intersectionAngle || "/"}</i>
<i>垂直距离: ${item.verticalDistance} m</i> <i>垂直距离: ${item.verticalDistance || "/"}</i>
<i>安全裕度: ${item.safetyMargin} °</i> <i>安全裕度: ${item.safetyMargin || "/"}</i>
`; `;
} else { } else {
describeHtml += ` describeHtml += `
<i>垂直净距${item.verticalClearDistance} m</i> <i>垂直净距${item.verticalClearDistance || "/"} m</i>
<i>杆塔间距: ${item.towerSpacing} m</i> <i>杆塔间距: ${item.towerSpacing || "/"} m</i>
<i>公路宽度: ${item.highwayWidth} m</i> <i>公路宽度: ${item.highwayWidth || "/"} m</i>
`; `;
} }
@ -1077,6 +1085,8 @@ document.addEventListener("DOMContentLoaded", function () {
) { ) {
setActiveNode(obj.elem); setActiveNode(obj.elem);
nodeId = obj.data.id; nodeId = obj.data.id;
intLng = obj.data.lon;
intLat = obj.data.lat;
getScrollData(nodeId); getScrollData(nodeId);
getLegendData(nodeId); getLegendData(nodeId);
getLocationInfo(nodeId); getLocationInfo(nodeId);
@ -1141,4 +1151,14 @@ document.addEventListener("DOMContentLoaded", function () {
switchBtnItemMap.classList.remove("active"); switchBtnItemMap.classList.remove("active");
isMap = false; isMap = false;
}); });
// 点击全屏图标时 使地图盒子全屏
const fullScreenBtn = document.querySelector(".full-screen-btn");
fullScreenBtn.addEventListener("click", function () {
if (document.fullscreenElement) {
document.exitFullscreen();
} else {
document.documentElement.requestFullscreen();
}
});
}); });

View File

@ -100,6 +100,11 @@
混合 混合
</div> </div>
</div> </div>
<!-- 右上角全屏图标 -->
<div class="full-screen-btn">
<img src="../../img/digitalSignage/full-screen.png" alt="" />
</div>
</div> </div>
</body> </body>
<script src="../../js/synthesisQuery/digitalSignage.js" charset="UTF-8" type="text/javascript"></script> <script src="../../js/synthesisQuery/digitalSignage.js" charset="UTF-8" type="text/javascript"></script>