diff --git a/sec-beidou/src/main/resources/templates/page/device_overview.html b/sec-beidou/src/main/resources/templates/page/device_overview.html index 29ac597a..cc6e1453 100644 --- a/sec-beidou/src/main/resources/templates/page/device_overview.html +++ b/sec-beidou/src/main/resources/templates/page/device_overview.html @@ -23,7 +23,7 @@ display: flex; flex-direction: column; } - + .stats-panel > .layui-card-body { height: auto; min-height: 60px; @@ -32,7 +32,7 @@ flex-direction: column; justify-content: center; } - + .top-panel-number { font-size: 30px; border-right: 1px solid #eceff9; @@ -56,9 +56,9 @@ display: flex; flex-direction: column; } - .stats-panel .layui-col-xs3 a, + .stats-panel .layui-col-xs3 a, .stats-panel .layui-col-md4 a, - .stats-panel .layui-col-xs3 div a, + .stats-panel .layui-col-xs3 div a, .stats-panel .layui-col-md4 div a { display: block; margin-bottom: 2px; @@ -69,22 +69,18 @@ } .btn-wrap { z-index: 999; - position: absolute; - bottom: 20px; - right: 20px; - padding: 10px; - border-radius: 4px; - background-color: white; - box-shadow: 0 2px 4px rgba(0,0,0,0.2); - display: flex; - flex-direction: row; - flex-wrap: wrap; - width: auto; + position: fixed; + bottom: 2rem; + margin-left: 1rem; + padding: .5rem .5rem; + border-radius: .25rem; + background-color: #fff; + box-shadow: 0 2px 6px 0 rgba(27, 142, 236, 0.5); } .btn { - width: auto; - min-width: 75px; + width: 75px; height: 30px; + float: left; background-color: #fff; color: rgba(27, 142, 236, 1); font-size: 14px; @@ -95,20 +91,44 @@ line-height: 30px; cursor: pointer; transition: all 0.3s ease; - float: none; - display: inline-block; } .btn:hover, .btn.active { background-color: rgba(27, 142, 236, 0.8); color: #fff; } - #map-container { - height: 75vh; - width: 100%; - padding:0px; + /* 页面布局优化 */ + + .layuimini-main { + height: calc(100vh - 40px); + display: flex; + flex-direction: column; + } + + .map-wrapper { + flex: 1; + display: flex; + flex-direction: column; position: relative; + } + + .map-card { + flex: 1; + background: white; + border-radius: 8px; + box-shadow: 0 2px 8px rgba(0,0,0,0.1); + border: 1px solid #e6e8eb; + display: flex; + flex-direction: column; overflow: hidden; } + + #map-container { + flex: 1; + width: 100%; + padding: 0; + margin: 0; + position: relative; + } .map-control-card { position: absolute; top: 10px; @@ -169,122 +189,153 @@ border-radius: 6px; } + /* 设备总览条样式 */ + .device-overview-bar { + background: white; + border: 1px solid #e6e8eb; + border-radius: 6px; + box-shadow: 0 2px 6px rgba(0,0,0,0.08); + padding: 10px 15px; + margin-bottom: 10px; + color: #333; + } + + .overview-stats { + display: flex; + flex-wrap: wrap; + gap: 8px; + align-items: center; + } + + .stat-item { + display: flex; + align-items: center; + /* background: #f8f9fa; + border: 1px solid #e9ecef; */ + border-radius: 4px; + padding: 5px 10px; + min-width: 85px; + transition: background-color 0.2s ease; + cursor: pointer; + height: 28px; + } + + .stat-item:hover { + background: #e9ecef; + } + + .stat-item.non-clickable { + cursor: default; + } + + .stat-item.non-clickable:hover { + background: #f8f9fa; + } + + .stat-dot { + width: 6px; + height: 6px; + border-radius: 50%; + margin-right: 6px; + flex-shrink: 0; + } + + .dot-green { background-color: #48bb78; } + .dot-blue { background-color: #4299e1; } + .dot-gray { background-color: #a0aec0; } + .dot-orange { background-color: #ed8936; } + .dot-red { background-color: #f56565; } + .dot-yellow { background-color: #ecc94b; } + + .stat-item span:nth-child(2) { + font-size: 12px; + color: #666; + margin-right: 4px; + white-space: nowrap; + } + + .stat-number { + font-size: 13px; + font-weight: bold; + color: #333; + } + @media screen and (max-width: 768px) { + .layuimini-main { + height: calc(100vh - 20px); + height: calc(100dvh - 20px); /* 动态视口高度,支持移动端 */ + overflow: hidden; + } + + .map-wrapper { + flex: 1; + overflow: hidden; + } + + .map-card { + margin: 8px; + height: calc(100% - 16px); + overflow: hidden; + } + + #map-container { + height: 100%; + overflow: hidden; + } + .map-control-card { position: static; display: block; margin-bottom: 1em; - width: 100%; - box-sizing: border-box; } - #map-container { - height: 75vh!important; - min-height: 300px; + .device-overview-bar { + padding: 8px 12px; + margin-bottom: 8px; + flex-shrink: 0; + } + + .overview-stats { + gap: 4px; + flex-wrap: wrap; + } + + .stat-item { + flex: 0 0 auto; + min-width: auto; + width: auto; + max-width: calc(33.33% - 3px); + padding: 3px 6px; + font-size: 10px; + height: 20px; + white-space: nowrap; overflow: hidden; - position: relative; + text-overflow: ellipsis; } - .ol-viewport, - .ol-layers, - .ol-layer { - height: 100% !important; + .stat-item span:not(.stat-dot):not(.stat-number) { + display: none; + } + + .stat-dot { + width: 4px; + height: 4px; + margin-right: 3px; + flex-shrink: 0; + } + + .stat-number { + font-size: 11px; + font-weight: bold; } .btn-wrap { position: static; - margin: 10px auto; - width: 100%; - justify-content: center; - box-sizing: border-box; + margin: 0; + padding: 8px; + margin-bottom: 8px; + flex-shrink: 0; } - - .btn { - margin-bottom: 5px; - font-size: 12px; - padding: 0 5px; - } - - .measure-buttons { - display: flex; - justify-content: space-between; - } - - .search-box input { - height: 36px; - } - - .search-box button { - height: 36px; - width: 60px; - } - } - - .measure-buttons { - margin-top: 10px; - display: flex; - gap: 5px; - } - - .ol-scale-line { - position: absolute; - bottom: 8px; - left: 8px; - background: rgba(255, 255, 255, 0.8); - padding: 5px; - border-radius: 4px; - } - - .ol-scale-line-inner { - border: 1px solid #000; - border-top: none; - color: #000; - font-size: 12px; - text-align: center; - margin: 1px; - padding: 0px 2px; - } - - .ol-scale-container { - display: none; - } - - .ol-tooltip { - position: relative; - background: rgba(0, 0, 0, 0.7); - border-radius: 4px; - color: white; - padding: 6px 10px; - opacity: 0.9; - white-space: nowrap; - font-size: 14px; - pointer-events: none; - font-weight: bold; - box-shadow: 0 1px 3px rgba(0,0,0,0.3); - } - .ol-tooltip-measure { - opacity: 1; - font-weight: bold; - } - .ol-tooltip-static { - background-color: #ffcc33; - color: black; - border: 1px solid white; - box-shadow: 0 2px 5px rgba(0,0,0,0.2); - } - .ol-tooltip-measure:before, - .ol-tooltip-static:before { - border-top: 6px solid rgba(0, 0, 0, 0.7); - border-right: 6px solid transparent; - border-left: 6px solid transparent; - content: ""; - position: absolute; - bottom: -6px; - margin-left: -7px; - left: 50%; - } - .ol-tooltip-static:before { - border-top-color: #ffcc33; } @@ -294,47 +345,61 @@