diff --git a/src/main/resources/static/css/synthesisQuery/digitalSignage.css b/src/main/resources/static/css/synthesisQuery/digitalSignage.css new file mode 100644 index 0000000..adc6b1c --- /dev/null +++ b/src/main/resources/static/css/synthesisQuery/digitalSignage.css @@ -0,0 +1,138 @@ +html { + width: 100%; + height: 100%; + margin: 0; +} + +body { + margin: 0; + font-family: "Alibaba PuHuiTi R"; + height: 98%; +} + +/** 去除百度地图的水印和logo */ +.BMap_cpyCtrl, +.anchorBL { + display: none; +} + +.layout { + display: flex; + justify-content: center; + align-items: center; +} + +#main-box { + position: relative; + width: 100%; + height: 100%; + padding: 0 1% 0 1%; + box-sizing: border-box; + background-color: #fff; + border-radius: 5px; + font-weight: normal; +} + +#map-box { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +.scroll-box, +.legend-box { + position: absolute; + background: rgba(0, 0, 0, 0.5); + color: #fff; + z-index: 999; +} + +/* 左上角滚动盒子 */ +.scroll-box { + top: 15px; + left: 15px; + width: 460px; + height: 180px; +} + +.scroll-box-title, +.scroll-box-content { + width: 100%; +} + +.scroll-box-title { + height: 30px; + line-height: 30px; + font-weight: bold; +} + +.scroll-box-content { + height: 150px; + /* overflow-y: auto; */ + overflow: hidden; +} + +.flex-box { + padding: 6px 0; + display: flex; + box-sizing: border-box; +} + +.flex-box span:first-child { + width: 20%; +} + +.flex-box span:nth-child(2) { + width: 30%; +} + +.flex-box span:last-child { + width: 50%; +} + +.flex-box span { + text-align: center; +} + +.content-item { + border-bottom: 1px solid rgb(45, 187, 223); + font-size: 14px; +} + +.content-item span { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.content-item span i { + padding: 1px 0; + font-style: normal; +} + +/* 左下角图例 */ +.legend-box { + bottom: 15px; + left: 15px; + width: 140px; + height: 252px; + display: flex; + flex-direction: column; + justify-content: space-around; + border-radius: 10px; +} + +.legend-box .legend-item { + display: flex; + align-items: center; + justify-content: space-around; + font-size: 13px; +} + +.legend-box .legend-item img { + width: 18px; + height: 18px; +} diff --git a/src/main/resources/static/img/digitalSignage/blue.png b/src/main/resources/static/img/digitalSignage/blue.png new file mode 100644 index 0000000..fcc276d Binary files /dev/null and b/src/main/resources/static/img/digitalSignage/blue.png differ diff --git a/src/main/resources/static/img/digitalSignage/green.png b/src/main/resources/static/img/digitalSignage/green.png new file mode 100644 index 0000000..b4adc9b Binary files /dev/null and b/src/main/resources/static/img/digitalSignage/green.png differ diff --git a/src/main/resources/static/img/digitalSignage/orange.png b/src/main/resources/static/img/digitalSignage/orange.png new file mode 100644 index 0000000..38052e4 Binary files /dev/null and b/src/main/resources/static/img/digitalSignage/orange.png differ diff --git a/src/main/resources/static/img/digitalSignage/sd.png b/src/main/resources/static/img/digitalSignage/sd.png new file mode 100644 index 0000000..d5fcb25 Binary files /dev/null and b/src/main/resources/static/img/digitalSignage/sd.png differ diff --git a/src/main/resources/static/img/digitalSignage/white.png b/src/main/resources/static/img/digitalSignage/white.png new file mode 100644 index 0000000..40276ba Binary files /dev/null and b/src/main/resources/static/img/digitalSignage/white.png differ diff --git a/src/main/resources/static/img/digitalSignage/yellow.png b/src/main/resources/static/img/digitalSignage/yellow.png new file mode 100644 index 0000000..749b868 Binary files /dev/null and b/src/main/resources/static/img/digitalSignage/yellow.png differ diff --git a/src/main/resources/static/img/digitalSignage/zt_green.png b/src/main/resources/static/img/digitalSignage/zt_green.png new file mode 100644 index 0000000..927352b Binary files /dev/null and b/src/main/resources/static/img/digitalSignage/zt_green.png differ diff --git a/src/main/resources/static/img/digitalSignage/zt_purple.png b/src/main/resources/static/img/digitalSignage/zt_purple.png new file mode 100644 index 0000000..c803931 Binary files /dev/null and b/src/main/resources/static/img/digitalSignage/zt_purple.png differ diff --git a/src/main/resources/static/img/digitalSignage/zt_red.png b/src/main/resources/static/img/digitalSignage/zt_red.png new file mode 100644 index 0000000..7ac847c Binary files /dev/null and b/src/main/resources/static/img/digitalSignage/zt_red.png differ diff --git a/src/main/resources/static/js/synthesisQuery/digitalSignage.js b/src/main/resources/static/js/synthesisQuery/digitalSignage.js new file mode 100644 index 0000000..b7ec05b --- /dev/null +++ b/src/main/resources/static/js/synthesisQuery/digitalSignage.js @@ -0,0 +1,221 @@ +const map = new BMapGL.Map("map-box"); // 创建Map实例 +map.centerAndZoom(new BMapGL.Point(116.404, 39.915), 11); // 初始化地图,设置中心点坐标和地图级别 +map.enableScrollWheelZoom(true); //开启鼠标滚轮缩放 + +// 获取左上角滚动数据源 +function getScrollData() { + const scrollData = [ + { + name: "跨线路", + location: "N11-N12999", + content: [ + { + name: "垂直净度", + value: "9896", + }, + { + name: "垂直净度", + value: "9896", + }, + { + name: "垂直净度", + value: "9896", + }, + ], + }, + { + name: "跨越地点", + location: "N11-N12336", + content: [ + { + name: "垂直净度", + value: "9896", + }, + { + name: "垂直净度", + value: "9896", + }, + { + name: "垂直净度", + value: "9896", + }, + ], + }, + { + name: "跨越地点", + location: "N11-N128885", + content: [ + { + name: "垂直净度", + value: "9896", + }, + { + name: "垂直净度", + value: "9896", + }, + { + name: "垂直净度", + value: "9896", + }, + ], + }, + { + name: "跨越地点", + location: "N11-N128773", + content: [ + { + name: "垂直净度", + value: "9896", + }, + { + name: "垂直净度", + value: "9896", + }, + { + name: "垂直净度", + value: "9896", + }, + ], + }, + ]; + + let scrollBox = $(".content-wrapper"); + let innerHtml = ""; + scrollData.forEach((item, index) => { + // 跨域描述内容 + let describeHtml = ""; + if (item.content && item.content.length > 0) { + item.content.forEach((d, dIndex) => { + describeHtml += `${d.name}:${d.value}`; + }); + } + + // 单行数据 + innerHtml += `
+ ${item.name} + ${item.location} + ${describeHtml} +
`; + }); + scrollBox.html(innerHtml); +} + +getScrollData(); + +document.addEventListener("DOMContentLoaded", function () { + const scrollContent = document.getElementById("scrollContent"); + const originalContent = scrollContent.querySelector(".content-wrapper"); + const cloneContent = scrollContent.querySelector(".clone-content"); + + // 克隆原始内容到克隆容器 + cloneContent.innerHTML = originalContent.innerHTML; + + // 设置滚动动画 + let scrollPosition = 0; + const scrollSpeed = 20; // 滚动速度(像素/秒) + let lastTimestamp = 0; + + function animateScroll(timestamp) { + if (!lastTimestamp) lastTimestamp = timestamp; + const deltaTime = timestamp - lastTimestamp; + lastTimestamp = timestamp; + + // 计算新的滚动位置 + scrollPosition += (scrollSpeed * deltaTime) / 1000; + + // 获取内容总高度 + const contentHeight = originalContent.scrollHeight; + + // 当滚动到克隆内容的开始时,重置位置以实现无缝衔接 + if (scrollPosition >= contentHeight) { + scrollPosition = 0; + } + + // 应用滚动 + scrollContent.scrollTop = scrollPosition; + + // 继续动画 + requestAnimationFrame(animateScroll); + } + + // 启动动画 + requestAnimationFrame(animateScroll); + + // 鼠标悬停时暂停滚动 + scrollContent.addEventListener("mouseenter", function () { + scrollSpeed = 0; + }); + + scrollContent.addEventListener("mouseleave", function () { + scrollSpeed = 30; // 恢复原始速度 + }); +}); + +// 获取左下角图例数据源 +function getLegendData() { + const legendData = [ + { + name: "基础开挖", + value: "6", + icon: "../../img/digitalSignage/yellow.png", + }, + { + name: "开挖完成", + value: "6", + icon: "../../img/digitalSignage/green.png", + }, + { + name: "浇筑完成", + value: "6", + icon: "../../img/digitalSignage/blue.png", + }, + { + name: "铁塔组立", + value: "6", + icon: "../../img/digitalSignage/orange.png", + }, + { + name: "组塔完成", + value: "6", + icon: "../../img/digitalSignage/zt_red.png", + }, + { + name: "架线完成", + value: "6", + icon: "../../img/digitalSignage/zt_purple.png", + }, + { + name: "附件安装", + value: "6", + icon: "../../img/digitalSignage/zt_green.png", + }, + { + name: "未 开 始", + value: "6", + icon: "../../img/digitalSignage/white.png", + }, + { + name: "索道运输", + value: "6", + icon: "../../img/digitalSignage/sd.png", + }, + { + name: "项 目 部", + value: "6", + icon: "../../img/digitalSignage/yellow.png", + }, + ]; + + const legendBox = $(".legend-box"); + let innerHtml = ""; + legendData.forEach((item, index) => { + innerHtml += `
+ + ${item.name} + ${item.value} +
`; + }); + legendBox.html(innerHtml); +} + +getLegendData(); diff --git a/src/main/resources/static/pages/synthesisQuery/digitalSignage.html b/src/main/resources/static/pages/synthesisQuery/digitalSignage.html new file mode 100644 index 0000000..6bdcdf2 --- /dev/null +++ b/src/main/resources/static/pages/synthesisQuery/digitalSignage.html @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + 电子看板 + + + + + +
+ +
+ + + +
+
+ 跨域类型 + 跨越地点 + 跨域描述 +
+
+ +
+ +
+ +
+ +
+
+
+ + +
+
+ +
+
+
+ + + + \ No newline at end of file