You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1644 lines
50 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>海洋观测平台场景</title>
<script src="/models/chart.umd.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
background: #000;
font-family: Arial, sans-serif;
}
#container {
width: 100vw;
height: 100vh;
position: relative;
background: #000;
}
#info {
position: absolute;
top: 10px;
left: 10px;
color: white;
background: rgba(0, 0, 0, 0.5);
padding: 10px;
border-radius: 5px;
font-size: 14px;
z-index: 100;
}
#loading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-size: 18px;
z-index: 200;
}
.hidden {
display: none;
}
</style>
<style>
/* 面板基础样式修改 */
.panel {
position: absolute;
top: 20px;
width: 320px;
color: #e0f0ff;
z-index: 10;
height: calc(100vh - 40px);
display: flex;
flex-direction: column;
}
.left-panel {
left: 20px;
}
.right-panel {
right: 20px;
}
.panel-header {
border-bottom: 1px solid rgba(64, 156, 255, 0.4);
padding-bottom: 15px;
margin-bottom: 10px;
text-align: center;
}
.panel-header h3 {
margin: 0;
font-size: 22px;
font-weight: 600;
background: linear-gradient(90deg, #4fc3f7, #4abdf3);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 0 0 10px rgba(79, 195, 247, 0.3);
}
.panel-content {
height: 100%;
overflow-y: auto;
padding-right: 5px;
display: flex;
flex-direction: column;
}
.panel-content::-webkit-scrollbar {
width: 2px;
}
.panel-content::-webkit-scrollbar-thumb {
background: rgba(64, 156, 255, 0.5);
border-radius: 2px;
}
.panel-content::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.1);
}
.info-section,
.realtime-indicators,
.unit-status,
.environment-stats,
.power-generation,
.alert-stats {
margin-bottom: 25px;
background: rgba(25, 55, 95, 0.3);
border-radius: 10px;
padding: 15px;
border: 1px solid rgba(64, 156, 255, 0.2);
}
.info-section h4,
.realtime-indicators h4,
.unit-status h4,
.environment-stats h4,
.power-generation h4,
.alert-stats h4 {
margin: 0 0 15px 0;
font-size: 18px;
font-weight: 600;
color: #4fc3f7;
text-align: center;
position: relative;
padding-bottom: 8px;
}
.info-section h4::after,
.realtime-indicators h4::after,
.unit-status h4::after,
.environment-stats h4::after,
.power-generation h4::after,
.alert-stats h4::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 50px;
height: 2px;
background: linear-gradient(90deg, transparent, #4fc3f7, transparent);
}
.info-item,
.indicator-item,
.status-item,
.env-item,
.gen-item,
.alert-item {
display: flex;
flex-wrap: wrap;
margin-bottom: 15px;
padding-bottom: 15px;
border-bottom: 1px solid rgba(64, 156, 255, 0.2);
}
.info-item:last-child,
.indicator-item:last-child,
.status-item:last-child,
.env-item:last-child,
.gen-item:last-child,
.alert-item:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}
.info-item label,
.indicator-item label,
.status-item label,
.env-item label,
.gen-item label,
.alert-item label {
flex: 1;
font-size: 15px;
color: #cce0ff;
font-weight: 400;
}
.info-item .value,
.indicator-item .value,
.status-item .value,
.env-item .value,
.gen-item .value,
.alert-item .value {
font-weight: 700;
font-size: 16px;
text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}
.value.warning {
color: #ff9800;
text-shadow: 0 0 8px rgba(255, 152, 0, 0.7);
}
.value.critical {
color: #f44336;
text-shadow: 0 0 8px rgba(244, 67, 54, 0.7);
}
.value.normal {
color: #66bb6a;
text-shadow: 0 0 8px rgba(102, 187, 106, 0.7);
}
.progress-bar {
width: 100%;
height: 10px;
background: rgba(0, 0, 0, 0.3);
border-radius: 5px;
margin-top: 8px;
overflow: hidden;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}
.progress-fill {
height: 100%;
border-radius: 5px;
transition: width 1s ease-in-out;
box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}
.status-grid {
background: linear-gradient(90deg, #00B42A, #66bb6a);
}
.status-stopped {
background: linear-gradient(90deg, #86909C, #b0bec5);
}
.status-standby {
background: linear-gradient(90deg, #1890ff, #4fc3f7);
}
.status-maintenance {
background: linear-gradient(90deg, #FF7D00, #ffa726);
}
.status-offline {
background: linear-gradient(90deg, #faad14, #ffca28);
}
.status-fault {
background: linear-gradient(90deg, #F53F3F, #ef5350);
}
.chart-placeholder {
margin-top: 20px;
background: rgba(25, 55, 95, 0.3);
border-radius: 10px;
padding: 15px;
border: 1px solid rgba(64, 156, 255, 0.2);
}
.chart-placeholder h4 {
margin: 0 0 15px 0;
font-size: 18px;
font-weight: 600;
color: #4fc3f7;
text-align: center;
position: relative;
padding-bottom: 8px;
}
.chart-placeholder h4::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 50px;
height: 2px;
background: linear-gradient(90deg, transparent, #4fc3f7, transparent);
}
/* 数值卡片样式 */
.value-card {
background: rgba(25, 55, 95, 0.4);
border-radius: 8px;
padding: 12px;
margin-bottom: 15px;
border: 1px solid rgba(64, 156, 255, 0.3);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transition: all 0.3s ease;
}
.value-card:hover {
transform: translateY(-3px);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
border-color: rgba(64, 156, 255, 0.6);
}
.value-card .label {
font-size: 14px;
color: #a0d2ff;
margin-bottom: 5px;
}
.value-card .value {
font-size: 24px;
font-weight: 700;
text-align: center;
}
/* 状态指示器 */
.status-indicator {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 50%;
margin-right: 8px;
}
.status-indicator.grid {
background: #00B42A;
}
.status-indicator.stopped {
background: #86909C;
}
.status-indicator.standby {
background: #1890ff;
}
.status-indicator.maintenance {
background: #FF7D00;
}
.status-indicator.offline {
background: #faad14;
}
.status-indicator.fault {
background: #F53F3F;
}
</style>
<style>
/* 修改关键指标网格布局 */
.key-indicators-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
margin-bottom: 10px;
}
.indicator-card {
background-image: url(/assets/img/caidan-160_128.png);
background-size: 100% 100%;
/* background: rgba(25, 55, 95, 0.6);
border-radius: 8px; */
padding: 15px;
/* border: 1px solid rgba(64, 156, 255, 0.3); */
display: flex;
align-items: center;
/* background-image: url('/assets/img/common/a.png');
background-size: 100% 100%; */
}
.card-icon {
width: 40px;
height: 40px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
/* margin-right: 12px; */
}
.card-info {
flex: 1;
}
.card-label {
font-size: 12px;
color: #a0d2ff;
margin: 0 0 5px 0;
}
.card-value {
font-size: 18px;
font-weight: bold;
color: #4fc3f7;
margin: 0;
}
/* 修改图表区域样式 */
.chart-section {
margin-bottom: 10px;
background: rgba(25, 55, 95, 0.6);
border-radius: 8px;
padding: 15px;
border: 1px solid rgba(64, 156, 255, 0.3);
/* flex-shrink: 0; */
display: flex;
flex-direction: column;
}
.chart-section h4 {
margin: 0 0 15px 0;
font-size: 16px;
font-weight: 600;
color: #4fc3f7;
text-align: center;
padding-bottom: 8px;
border-bottom: 1px solid rgba(64, 156, 255, 0.3);
flex-shrink: 0;
}
.chart-container {
/* height: 120px; */
position: relative;
flex: 1;
}
/* 环境参数网格 */
.environment-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
margin-bottom: 10px;
}
.env-card {
background: rgba(25, 55, 95, 0.6);
border-radius: 8px;
padding: 15px;
border: 1px solid rgba(64, 156, 255, 0.3);
text-align: center;
}
.env-label {
font-size: 12px;
color: #a0d2ff;
margin: 0 0 5px 0;
}
.env-value {
font-size: 18px;
font-weight: bold;
color: #4fc3f7;
margin: 0 0 5px 0;
}
.env-status {
font-size: 12px;
margin: 0;
}
.text-success {
color: #66bb6a;
}
/* 统计数据网格 */
.stats-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 15px;
margin-bottom: 25px;
}
.stat-item {
/* background: rgba(25, 55, 95, 0.6); */
/* border-radius: 8px; */
padding: 18px;
/* border: 1px solid rgba(64, 156, 255, 0.3); */
text-align: center;
/* background-image: url('/assets/img/icon/dz.png'); */
background-image: url('/assets/img/flood/base-active.png');
background-size: 100% 100%;
}
.stat-label {
font-size: 12px;
color: #a0d2ff;
margin: 0 0 5px 0;
}
.stat-value {
font-size: 18px;
font-weight: bold;
color: #4fc3f7;
margin: 0;
}
/* 预警统计 */
.alert-summary {
background: rgba(25, 55, 95, 0.6);
border-radius: 8px;
padding: 15px;
border: 1px solid rgba(64, 156, 255, 0.3);
margin-bottom: 10px;
flex: 1;
display: flex;
flex-direction: column;
}
.alert-summary h4 {
margin: 0 0 15px 0;
font-size: 16px;
font-weight: 600;
color: #4fc3f7;
text-align: center;
padding-bottom: 8px;
border-bottom: 1px solid rgba(64, 156, 255, 0.3);
flex-shrink: 0;
}
.alert-stats-grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 10px;
flex-shrink: 0;
margin-top: 20px;
}
.alert-stat {
text-align: center;
background-image: url('/assets/img/common/bottomItemBg.png');
background-size: 100% 100%;
}
.alert-count {
font-size: 24px;
font-weight: bold;
margin: 15px 0 5px 0;
}
.alert-count.critical {
color: #f44336;
}
.alert-count.warning {
color: #ff9800;
}
.alert-count.normal {
color: #66bb6a;
}
.alert-type {
font-size: 12px;
color: #fffa18;
margin: 20px;
}
</style>
<style>
/* 运行统计区域 */
.stats-section {
margin-bottom: 25px;
background: rgba(25, 55, 95, 0.6);
border-radius: 8px;
padding: 15px;
border: 1px solid rgba(64, 156, 255, 0.3);
}
.stats-section h4 {
margin: 0 0 15px 0;
font-size: 16px;
font-weight: 600;
color: #4fc3f7;
text-align: center;
padding-bottom: 8px;
border-bottom: 1px solid rgba(64, 156, 255, 0.3);
}
.stats-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}
.stat-card {
background: rgba(16, 36, 62, 0.4);
border-radius: 6px;
padding: 12px;
text-align: center;
border: 1px solid rgba(64, 156, 255, 0.2);
}
.stat-title {
font-size: 12px;
color: #a0d2ff;
margin: 0 0 5px 0;
}
.stat-number {
font-size: 20px;
font-weight: bold;
color: #4fc3f7;
margin: 0 0 3px 0;
}
.stat-unit {
font-size: 14px;
color: #81d4fa;
}
.stat-desc {
font-size: 11px;
color: #81d4fa;
margin: 0;
}
/* 图表统计信息 */
.chart-stats {
display: flex;
justify-content: space-around;
margin-top: 15px;
padding-top: 12px;
border-top: 1px solid rgba(64, 156, 255, 0.2);
}
.chart-stats .stat-item {
text-align: center;
}
.chart-stats .stat-label {
font-size: 12px;
color: #a0d2ff;
display: block;
margin-bottom: 5px;
}
.chart-stats .stat-value {
font-size: 16px;
font-weight: bold;
color: #e8ffdc;
}
/* 状态详情 */
.status-details {
margin-top: 15px;
padding-top: 12px;
border-top: 1px solid rgba(64, 156, 255, 0.2);
}
.status-item {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
}
.status-item:last-child {
margin-bottom: 0;
}
.status-label {
font-size: 13px;
color: #cce0ff;
display: flex;
align-items: center;
}
.status-dot {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 8px;
}
.status-value {
font-size: 13px;
font-weight: bold;
color: #4fc3f7;
}
</style>
<style>
/* 预警统计详情 */
.alert-details {
/* margin-top: 20px; */
padding-top: 15px;
border-top: 1px solid rgba(64, 156, 255, 0.2);
flex: 1;
display: flex;
flex-direction: column;
}
.alert-details h5 {
font-size: 14px;
color: #4fc3f7;
margin: 0 0 12px 0;
text-align: center;
flex-shrink: 0;
}
.alert-list {
flex: 1;
overflow-y: auto;
padding-right: 5px;
}
/* 隐藏滚动条但保持滚动功能 */
.alert-list::-webkit-scrollbar {
width: 0;
background: transparent;
}
.alert-list::-webkit-scrollbar-thumb {
background: transparent;
}
/* Firefox */
.alert-list {
scrollbar-width: none;
}
/* IE/Edge */
.alert-list {
-ms-overflow-style: none;
}
.alert-item {
background: rgba(16, 36, 62, 0.4);
border-radius: 6px;
padding: 10px;
margin-bottom: 10px;
border-left: 3px solid;
}
.alert-item:last-child {
margin-bottom: 0;
}
.alert-item.critical {
border-left-color: #f44336;
}
.alert-item.warning {
border-left-color: #ff9800;
}
.alert-item.normal {
border-left-color: #66bb6a;
}
.alert-header {
display: flex;
align-items: center;
margin-bottom: 5px;
}
.alert-icon {
font-size: 14px;
margin-right: 8px;
}
.alert-item.critical .alert-icon {
color: #f44336;
}
.alert-item.warning .alert-icon {
color: #ff9800;
}
.alert-item.normal .alert-icon {
color: #66bb6a;
}
.alert-title {
flex: 1;
font-size: 13px;
font-weight: 600;
color: #e0f0ff;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.alert-time {
font-size: 11px;
color: #81d4fa;
}
.alert-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.alert-desc {
font-size: 12px;
color: #a0d2ff;
flex: 1;
margin: 0 10px 0 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.alert-status {
flex-shrink: 0;
}
.status-tag {
font-size: 10px;
padding: 2px 6px;
border-radius: 10px;
font-weight: 600;
}
.status-tag.critical {
background: rgba(244, 67, 54, 0.2);
color: #f44336;
}
.status-tag.warning {
background: rgba(255, 152, 0, 0.2);
color: #ff9800;
}
.status-tag.normal {
background: rgba(102, 187, 106, 0.2);
color: #66bb6a;
}
.alert-footer {
text-align: center;
margin-top: 12px;
flex-shrink: 0;
}
.view-all-alerts {
font-size: 12px;
color: #4fc3f7;
text-decoration: none;
}
.view-all-alerts:hover {
text-decoration: underline;
}
</style>
<style>
.chart_title {
height: 5vh;
background: url('./assets/img/common/homeTitle.png') no-repeat;
background-position: center;
background-position-x: center;
background-position-y: center;
background-size: 108% 120%;
display: flex;
justify-content: center;
align-items: center;
}
.chart_title .title span {
font-size: 2.4vh;
letter-spacing: 0.2vh;
font-family: YouSheBiaoTiHei;
font-weight: 400;
color: #ffffff;
}
.tourButton {
background-image: url('./assets/img/common/b.png');
background-size: 100% 100%;
}
/* 风机详情面板样式 */
.detail-panel {
position: absolute;
top: 20px;
left: 50%;
transform: translateX(-50%);
width: 350px;
background: rgba(25, 55, 95, 0.85);
border: 1px solid rgba(64, 156, 255, 0.6);
border-radius: 10px;
color: #e0f0ff;
z-index: 1000;
backdrop-filter: blur(5px);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
padding: 15px;
}
.detail-panel.hidden {
display: none;
}
.detail-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 10px;
border-bottom: 1px solid rgba(64, 156, 255, 0.4);
margin-bottom: 15px;
}
.detail-header h3 {
margin: 0;
font-size: 18px;
color: #4fc3f7;
font-weight: 600;
}
.close-btn {
background: none;
border: none;
color: #a0d2ff;
font-size: 20px;
cursor: pointer;
padding: 0;
width: 25px;
height: 25px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.close-btn:hover {
background: rgba(244, 67, 54, 0.2);
color: #f44336;
}
.detail-content {
padding: 5px 0;
}
.detail-item {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
padding: 8px 10px;
background: rgba(16, 36, 62, 0.5);
border-radius: 6px;
border: 1px solid rgba(64, 156, 255, 0.15);
}
.detail-item:last-child {
margin-bottom: 0;
}
.detail-item label {
font-size: 13px;
color: #cce0ff;
font-weight: 500;
}
.detail-item .value {
font-size: 15px;
font-weight: 700;
color: #4fc3f7;
}
/* 状态颜色 */
.status-grid {
color: #00B42A;
}
.status-stopped {
color: #86909C;
}
.status-standby {
color: #1890ff;
}
.status-maintenance {
color: #FF7D00;
}
.status-fault {
color: #F53F3F;
}
/* 响应式设计 */
@media (max-width: 768px) {
.detail-panel {
width: 300px;
left: 50%;
right: auto;
transform: translateX(-50%);
}
}
</style>
</head>
<body>
<div id="container">
<div id="loading">正在加载海上风电机组场景...</div>
</div>
<!-- 左侧面板 -->
<div id="left-panel" class="panel left-panel">
<div class="panel-content">
<!-- 关键指标卡片 -->
<div class="chart-section">
<div class="chart_title">
<span>小型波浪浮标</span>
</div>
<div class="key-indicators-grid">
<div class="indicator-card">
<div class="card-icon bg-primary/10">
<img src="/assets/img/icon/有效波高.png" alt="">
</div>
<div class="card-info">
<p class="card-label">有效波高</p>
<p class="card-value">1.91 m</p>
</div>
</div>
<div class="indicator-card">
<div class="card-icon bg-success/10">
<img src="/assets/img/icon/海温1.png" alt="">
</div>
<div class="card-info">
<p class="card-label">SST</p>
<p class="card-value" style="color: #d46115;">29.49 ℃</p>
</div>
</div>
</div>
</div>
<div class="chart-section">
<div class="chart_title">
<span>表面漂流浮标</span>
</div>
<div class="key-indicators-grid">
<div class="indicator-card">
<div class="card-icon bg-danger/10">
<img src="/assets/img/icon/流速.png" alt="">
</div>
<div class="card-info">
<p class="card-label">表层流速</p>
<p class="card-value"> 0.45 m/s</p>
</div>
</div>
<div class="indicator-card">
<div class="card-icon bg-danger/10">
<img src="/assets/img/icon/海温2.png" alt="">
</div>
<div class="card-info">
<p class="card-label">SST</p>
<p class="card-value" style="color:#cb601a ;">28.90 ℃</p>
</div>
</div>
</div>
</div>
<!-- 实时功率图表 -->
<div class="chart-section">
<div class="chart_title">
<span>XBT</span>
</div>
<div class="chart-container">
<canvas id="realtimePowerChart"></canvas>
</div>
<div class="chart-stats">
<div class="stat-item">
<span class="stat-label">波周期</span>
<span class="stat-value">7.7 s</span>
</div>
<div class="stat-item">
<span class="stat-label">波向</span>
<span class="stat-value">85°</span>
</div>
<div class="stat-item">
<span class="stat-label">采样频率</span>
<span class="stat-value">2.5 Hz</span>
</div>
</div>
</div>
<div class="chart-section" style="flex: 1;display: flex;flex-direction: column;">
<div class="chart_title">
<span>XCTD</span>
</div>
<div class="chart-container">
<canvas id="unitStatusChart"></canvas>
</div>
<div class="status-details">
<div class="status-item">
<span class="status-label">
<span class="status-dot status-grid"></span>
表层(0m)
</span>
<span class="status-value">29.08 ℃ / 53.20 mS/cm</span>
</div>
<div class="status-item">
<span class="status-label">
<span class="status-dot status-maintenance"></span>
中层(100m)
</span>
<span class="status-value">23.76 ℃ / 52.10 mS/cm</span>
</div>
<div class="status-item">
<span class="status-label">
<span class="status-dot status-fault"></span>
深层(1000m)
</span>
<span class="status-value">4.82 ℃ / 47.55 mS/cm</span>
</div>
</div>
</div>
</div>
</div>
<!-- 右侧面板 -->
<div id="right-panel" class="panel right-panel">
<div class="panel-content">
<!-- 环境参数 -->
<div class="chart-section">
<div class="chart_title">
<span>拖曳式磁力仪</span>
</div>
<div class="key-indicators-grid">
<div class="indicator-card">
<div class="card-icon bg-warning/10">
<img src="/assets/img/icon/总场次.png" alt="">
</div>
<div class="card-info">
<p class="card-label">总场</p>
<p class="card-value" style="color: #e48527;">48492.31</p>
<p class="env-status">nT</p>
</div>
</div>
<div class="indicator-card">
<div class="card-icon bg-warning/10">
<img src="/assets/img/icon/修正带.png" alt="">
</div>
<div class="card-info">
<p class="card-label">日变修正</p>
<p class="card-value" style="color: #f4ea2a;">-12.4</p>
<p class="env-status">nT</p>
</div>
</div>
<div class="indicator-card">
<div class="card-icon bg-warning/10">
<img src="/assets/img/icon/大气噪声.png" alt="">
</div>
<div class="card-info">
<p class="card-label">噪声RMS</p>
<p class="card-value">0.13 </p>
<p class="env-status">nT </p>
</div>
</div>
<!-- <div class="indicator-card">
<div class="card-icon bg-warning/10">
<img src="/assets/img/icon/海浪.png" alt="">
</div>
<div class="card-info">
<p class="card-label">DO (3m)</p>
<p class="card-value">7.05 mg/L</p>
<p class="env-status">正常</p>
</div>
</div> -->
</div>
</div>
<!-- 发电效率分析 -->
<div class="chart-section" style="flex: 1;min-height: 300px;">
<div class="chart_title">
<span>海水采样器</span>
</div>
<div class="chart-container" style="height: auto; flex: 1;">
<div id="efficiencyChartMini" style="width: 100%; height: 100%;"></div>
</div>
</div>
<!-- 预警统计 -->
<div class="alert-summary" style="flex: 1; display: flex; flex-direction: column;">
<div class="chart_title">
<span>侧扫声呐</span>
</div>
<!-- 详细预警信息 -->
<div class="alert-details" style="flex: 1; display: flex; flex-direction: column;">
<img src="/assets/img/声呐图.png" alt="" style="flex: 1; display: flex; flex-direction: column;">
</div>
</div>
</div>
</div>
<!-- 在你的HTML文件中添加 -->
<!-- <div style="position: absolute; bottom: 20px; right: 350px; z-index: 100;">
<div id="tourButton" onclick="toggleAutoTour()" class="tourButton"
style="padding: 20px; color: white; border: none; border-radius: 5px; cursor: pointer;">
开始漫游
</div>
</div> -->
<!-- 将原有的开始漫游按钮区域替换为经纬度显示 -->
<div style="position: absolute; bottom: 20px; right: 350px; z-index: 100;">
<div class="chart-section"
style="background: none;background-image: url('/assets/img/moshi-2-300_100.png');background-size: 100% 100%;">
<div style="text-align: center;padding: 10px 20px 40px;">
<div style="margin-bottom: 8px;">
<span
style="color: #81d4fa; font-size: 16px; font-weight: bold; margin-left: 5px;">121.4737°E</span>
</div>
<div>
<span style="color: #81d4fa; font-size: 16px; font-weight: bold; margin-left: 5px;">31.2304°N</span>
</div>
</div>
</div>
</div>
<!-- Three.js 核心库 -->
<script src="js/three.min.js"></script>
<!-- 引入RGBELoader -->
<script src="js/RGBELoader.js"></script>
<!-- <script src="https://unpkg.com/three@0.132.2/examples/js/loaders/RGBELoader.js"></script> -->
<!-- 本地Three.js扩展库 -->
<script src="js/OrbitControls.js"></script>
<!-- Water.js 水面效果 -->
<script src="js/Water.js"></script>
<!-- Sky.js 天空效果 -->
<script src="js/Sky.js"></script>
<!-- GLTF加载器 -->
<script src="js/GLTFLoader.js"></script>
<!-- DRACO解码器 - 使用本地版本 -->
<script src="js/DRACOLoader.js"></script>
<script src="draco/draco_decoder.js"></script>
<script src="draco/draco_wasm_wrapper.js"></script>
<script src="js/fflate.min.js"></script>
<script src="js/FBXLoader.js"></script>
<script src="js/echarts.min.js"></script>
<!-- 主程序 -->
<script src="fubiao_main_a1.js"></script>
<script>
// 初始化波浪参数图表
function initRealtimePowerChart() {
const ctx = document.getElementById('realtimePowerChart').getContext('2d');
new Chart(ctx, {
type: 'line',
data: {
labels: ['0m', '10m', '20m', '50m', '100m', '200m'],
datasets: [{
label: '温度 (℃)',
data: [29.15, 29.12, 28.97, 27.04, 23.88, 18.33],
borderColor: '#40a9ff',
backgroundColor: 'rgba(64, 169, 255, 0.1)',
borderWidth: 2,
pointRadius: 3,
pointBackgroundColor: '#40a9ff',
pointBorderColor: '#ffffff',
pointBorderWidth: 1,
fill: true,
tension: 0.4
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
display: false
},
tooltip: {
mode: 'index',
intersect: false,
callbacks: {
label: function (context) {
return `温度: ${context.parsed.y} ℃`;
}
}
}
},
scales: {
y: {
title: {
display: true,
text: '温度 (℃)',
color: 'rgba(255, 255, 255, 0.7)'
},
ticks: {
color: 'rgba(255, 255, 255, 0.7)',
font: {
size: 10
}
},
grid: {
color: 'rgba(255, 255, 255, 0.1)'
}
},
x: {
ticks: {
color: 'rgba(255, 255, 255, 0.7)',
font: {
size: 10
}
},
grid: {
display: false
}
}
}
}
});
}
// 初始化温度剖面图表
function initUnitStatusChart() {
const ctx = document.getElementById('unitStatusChart').getContext('2d');
new Chart(ctx, {
type: 'line',
data: {
labels: ['0m', '50m', '100m', '200m', '500m', '1000m'],
datasets: [{
label: '温度 (℃)',
data: [29.08, 27.15, 23.76, 18.20, 10.45, 4.82],
borderColor: '#00B42A', // 绿色
backgroundColor: 'rgba(0, 180, 42, 0.1)',
borderWidth: 2,
pointRadius: 3,
pointBackgroundColor: '#00B42A',
pointBorderColor: '#ffffff',
pointBorderWidth: 1,
fill: false,
yAxisID: 'y'
}, {
label: '电导率 (mS/cm)',
data: [53.20, 53.05, 52.10, 50.80, 48.90, 47.55],
borderColor: 'red', // 蓝色
backgroundColor: 'rgba(79, 195, 247, 0.1)',
borderWidth: 2,
pointRadius: 3,
pointBackgroundColor: '#4fc3f7',
pointBorderColor: '#ffffff',
pointBorderWidth: 1,
fill: false,
yAxisID: 'y1'
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
display: true,
labels: {
color: '#ffffff',
font: {
size: 10
}
}
},
tooltip: {
mode: 'index',
intersect: false,
callbacks: {
label: function (context) {
if (context.datasetIndex === 0) {
return `温度: ${context.parsed.y} ℃`;
} else {
return `电导率: ${context.parsed.y} mS/cm`;
}
}
}
}
},
scales: {
y: {
type: 'linear',
display: true,
position: 'left',
title: {
display: true,
text: '温度 (℃)',
color: 'rgba(255, 255, 255, 0.7)'
},
ticks: {
color: 'rgba(255, 255, 255, 0.7)',
font: {
size: 10
}
},
grid: {
color: 'rgba(255, 255, 255, 0.1)'
}
},
y1: {
type: 'linear',
display: true,
position: 'right',
title: {
display: true,
text: '电导率 (mS/cm)',
color: 'rgba(255, 255, 255, 0.7)'
},
ticks: {
color: 'rgba(255, 255, 255, 0.7)',
font: {
size: 10
}
},
grid: {
drawOnChartArea: false,
color: 'rgba(255, 255, 255, 0.1)'
}
},
x: {
ticks: {
color: 'rgba(255, 255, 255, 0.7)',
font: {
size: 10
}
},
grid: {
display: false
}
}
}
}
});
}
// 替换原有的 initEfficiencyChartMini 函数
function initEfficiencyChartMini() {
// 基于准备好的dom初始化echarts实例
const myChart = echarts.init(document.getElementById('efficiencyChartMini'));
// 配置选项
const option = {
// title: {
// text: '海水化学参数平行坐标系',
// subtext: '不同深度的水质参数变化趋势',
// left: 'center',
// textStyle: {
// fontSize: 22,
// color: '#1a2980'
// },
// subtextStyle: {
// fontSize: 16,
// color: '#666'
// }
// },
// tooltip: {
// trigger: 'item',
// formatter: function (params) {
// const depthNames = ['3米', '75米', '1000米'];
// let result = `<strong>${depthNames[params.data[0]]}</strong><br/>`;
// const dimensions = ['叶绿素-a', '溶解氧', '硝酸盐', '磷酸盐'];
// const units = ['µg L⁻¹', 'mg L⁻¹', 'µmol L⁻¹', 'µmol L⁻¹'];
// for (let i = 1; i < params.data.length; i++) {
// result += `${dimensions[i - 1]}: ${params.data[i]} ${units[i - 1]}<br/>`;
// }
// return result;
// }
// },
// legend: {
// data: ['3米', '75米', '1000米'],
// top: 50,
// textStyle: {
// fontSize: 14
// }
// },
parallelAxis: [
{
dim: 0,
name: '深度',
type: 'category',
data: ['3米', '75米', '1000米'],
axisLine: {
lineStyle: {
color: '#2debc1'
}
},
axisLabel: {
color: '#2debc1',
fontSize: 10
}
},
{
dim: 1,
name: '叶绿素-a',
type: 'value',
min: 0,
max: 0.5,
axisLine: {
lineStyle: {
color: '#0ecf3b'
}
},
axisLabel: {
color: '#0ecf3b',
fontSize: 10
}
},
{
dim: 2,
name: '溶解氧',
type: 'value',
min: 3,
max: 8,
axisLine: {
lineStyle: {
color: '#4fc3f7'
}
},
axisLabel: {
color: '#4fc3f7',
fontSize: 10
}
},
{
dim: 3,
name: '硝酸盐',
type: 'value',
min: 0,
max: 35,
axisLine: {
lineStyle: {
color: '#FF9800'
}
},
axisLabel: {
color: '#FF9800',
fontSize: 10
}
},
{
dim: 4,
name: '磷酸盐',
type: 'value',
min: 0,
max: 2.5,
axisLine: {
lineStyle: {
color: '#e64ff7'
}
},
axisLabel: {
color: '#e64ff7',
fontSize: 10
}
}
],
parallel: {
left: '5%',
right: '13%',
bottom: '10%',
top: '20%',
parallelAxisDefault: {
type: 'value',
nameLocation: 'end',
nameGap: 20,
nameTextStyle: {
fontSize: 14,
fontWeight: 'bold'
},
axisLine: {
lineStyle: {
width: 2
}
},
axisTick: {
lineStyle: {
color: '#aaa'
}
}
}
},
series: [
{
name: '3米',
type: 'parallel',
lineStyle: {
width: 3,
color: '#0ecf3b'
},
data: [
[0, 0.28, 7.05, 0.4, 0.08]
]
},
{
name: '75米',
type: 'parallel',
lineStyle: {
width: 3,
color: '#4fc3f7'
},
data: [
[1, 0.42, 5.12, 4.5, 0.25]
]
},
{
name: '1000米',
type: 'parallel',
lineStyle: {
width: 3,
color: '#e64ff7'
},
data: [
[2, 0.01, 4.00, 32.0, 2.10]
]
}
],
// toolbox: {
// feature: {
// saveAsImage: {
// title: '保存为图片'
// },
// dataView: {
// title: '数据视图',
// readOnly: true,
// lang: ['数据视图', '关闭', '刷新']
// }
// },
// right: 20,
// top: 20
// }
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
// 响应窗口大小变化
window.addEventListener('resize', function () {
myChart.resize();
});
}
// 页面加载后初始化所有图表
document.addEventListener('DOMContentLoaded', function () {
initRealtimePowerChart();
initUnitStatusChart();
initEfficiencyChartMini();
});
</script>
</body>
</html>