586 lines
20 KiB
HTML
586 lines
20 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<title>移动式检修车间系统</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
font-family: "Microsoft YaHei", sans-serif;
|
|
}
|
|
|
|
body {
|
|
background-color: #f5f5f5;
|
|
width: 100%;
|
|
height: 100vh;
|
|
display: flex;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.app-container {
|
|
display: flex;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: #fff;
|
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.sidebar {
|
|
width: 200px;
|
|
background-color: #f7f7f7;
|
|
border-right: 1px solid #e0e0e0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.sidebar-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px 10px;
|
|
background-color: #3f51b5;
|
|
color: white;
|
|
}
|
|
|
|
.logo {
|
|
width: 40px;
|
|
height: 40px;
|
|
margin-right: 10px;
|
|
background-color: #ff9800;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.logo i {
|
|
color: white;
|
|
font-size: 20px;
|
|
}
|
|
|
|
.app-title {
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.menu-item {
|
|
padding: 15px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
transition: all 0.3s;
|
|
position: relative;
|
|
background-color: #f7f7f7;
|
|
border-bottom: 1px solid #e0e0e0;
|
|
text-align: center;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.menu-item.active {
|
|
background-color: #3f51b5;
|
|
color: white;
|
|
}
|
|
|
|
.menu-item:hover:not(.active) {
|
|
background-color: #e0e0e0;
|
|
}
|
|
|
|
.current-alert {
|
|
background-color: #ffc107;
|
|
padding: 15px;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
margin-top: auto;
|
|
}
|
|
|
|
.main-content {
|
|
flex: 1;
|
|
padding: 20px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.system-title {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.system-title-icon {
|
|
width: 60px;
|
|
height: 60px;
|
|
background-color: #ff9800;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-right: 15px;
|
|
}
|
|
|
|
.system-title-text {
|
|
font-size: 24px;
|
|
font-weight: bold;
|
|
color: #333;
|
|
}
|
|
|
|
.camera-icon {
|
|
width: 60px;
|
|
height: 60px;
|
|
}
|
|
|
|
.dashboard {
|
|
display: flex;
|
|
flex: 1;
|
|
gap: 20px;
|
|
}
|
|
|
|
.parameters {
|
|
flex: 2;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.parameter-row {
|
|
display: flex;
|
|
align-items: center;
|
|
background-color: #f0f0f0;
|
|
border-radius: 5px;
|
|
padding: 15px;
|
|
height: 80px;
|
|
}
|
|
|
|
.parameter-label {
|
|
width: 100px;
|
|
font-size: 20px;
|
|
font-weight: bold;
|
|
text-align: center;
|
|
}
|
|
|
|
.parameter-value {
|
|
flex: 1;
|
|
height: 15px;
|
|
background-color: #e0e0e0;
|
|
border-radius: 10px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.parameter-bar {
|
|
height: 100%;
|
|
background-color: #3f51b5;
|
|
width: 70%;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
.parameter-arrows {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-top: 5px;
|
|
color: #3f51b5;
|
|
}
|
|
|
|
.right-panel {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
}
|
|
|
|
.camera-feed {
|
|
flex: 2;
|
|
background-color: #f0f0f0;
|
|
border-radius: 5px;
|
|
overflow: hidden;
|
|
position: relative;
|
|
}
|
|
|
|
.camera-feed img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.settings-panel {
|
|
flex: 1;
|
|
background-color: #3f51b5;
|
|
border-radius: 5px;
|
|
padding: 15px;
|
|
color: white;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.settings-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.settings-label {
|
|
font-size: 18px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.settings-value {
|
|
font-size: 18px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.settings-button {
|
|
align-self: flex-end;
|
|
padding: 10px 30px;
|
|
background-color: rgba(255, 255, 255, 0.2);
|
|
border: none;
|
|
border-radius: 5px;
|
|
color: white;
|
|
font-size: 18px;
|
|
cursor: pointer;
|
|
transition: background-color 0.3s;
|
|
}
|
|
|
|
.settings-button:hover {
|
|
background-color: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
/* 弹窗样式 */
|
|
.modal {
|
|
display: none;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
z-index: 1000;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.modal-content {
|
|
background-color: white;
|
|
padding: 30px;
|
|
border-radius: 10px;
|
|
width: 60%;
|
|
max-width: 600px;
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.modal-title {
|
|
font-size: 20px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.close-button {
|
|
background: none;
|
|
border: none;
|
|
font-size: 24px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.modal-body {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.setting-group {
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.setting-label {
|
|
display: block;
|
|
margin-bottom: 5px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.setting-input {
|
|
width: 100%;
|
|
padding: 10px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.modal-footer {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 10px;
|
|
}
|
|
|
|
.modal-button {
|
|
padding: 10px 20px;
|
|
border: none;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.cancel-button {
|
|
background-color: #f0f0f0;
|
|
}
|
|
|
|
.save-button {
|
|
background-color: #3f51b5;
|
|
color: white;
|
|
}
|
|
|
|
/* 已移除设计说明面板相关样式 */
|
|
|
|
@media (max-width: 1024px) {
|
|
.sidebar {
|
|
width: 150px;
|
|
}
|
|
|
|
.parameter-label {
|
|
width: 80px;
|
|
font-size: 18px;
|
|
}
|
|
}
|
|
</style>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
|
</head>
|
|
<body>
|
|
<div class="app-container">
|
|
<div class="sidebar">
|
|
<div class="sidebar-header">
|
|
<div class="logo">
|
|
<i class="fas fa-tools"></i>
|
|
</div>
|
|
<div class="app-title">检修系统</div>
|
|
</div>
|
|
<div class="menu-item active">现场环境参数</div>
|
|
<div class="menu-item">参数记录</div>
|
|
<div class="menu-item">视频监控</div>
|
|
<div class="menu-item">日志</div>
|
|
<div class="menu-item">报警</div>
|
|
<div class="current-alert">当前报警项目</div>
|
|
</div>
|
|
|
|
<div class="main-content" style="display: flex; flex-direction: column;">
|
|
<div class="header">
|
|
<div class="system-title">
|
|
<div class="system-title-icon">
|
|
<i class="fas fa-clipboard-list" style="font-size: 30px; color: white;"></i>
|
|
</div>
|
|
<div class="system-title-text">移动式检修车间系统</div>
|
|
</div>
|
|
<div class="camera-icon">
|
|
<i class="fas fa-video" style="font-size: 30px;"></i>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="display: flex; flex: 1;">
|
|
<div class="dashboard" style="flex: 2;">
|
|
<div class="parameters">
|
|
<div class="parameter-row">
|
|
<div class="parameter-label">当前</div>
|
|
<div class="parameter-value">
|
|
<div class="parameter-bar" style="width: 70%;"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="parameter-row">
|
|
<div class="parameter-label">温度</div>
|
|
<div class="parameter-value">
|
|
<div class="parameter-bar" style="width: 50%;"></div>
|
|
</div>
|
|
<div class="parameter-arrows">
|
|
<i class="fas fa-arrow-left"></i>
|
|
<i class="fas fa-arrow-right"></i>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="parameter-row">
|
|
<div class="parameter-label">湿度</div>
|
|
<div class="parameter-value">
|
|
<div class="parameter-bar" style="width: 60%;"></div>
|
|
</div>
|
|
<div class="parameter-arrows">
|
|
<i class="fas fa-arrow-left"></i>
|
|
<i class="fas fa-arrow-right"></i>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="parameter-row">
|
|
<div class="parameter-label">洁净度</div>
|
|
<div class="parameter-value">
|
|
<div class="parameter-bar" style="width: 40%;"></div>
|
|
</div>
|
|
<div class="parameter-arrows">
|
|
<i class="fas fa-arrow-left"></i>
|
|
<i class="fas fa-arrow-right"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="right-panel">
|
|
<div class="camera-feed">
|
|
<img src="https://images.unsplash.com/photo-1581094794329-c8112a89af12?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="检修车间">
|
|
</div>
|
|
|
|
<div class="settings-panel">
|
|
<div>
|
|
<div class="settings-row">
|
|
<div class="settings-label">温度</div>
|
|
<div class="settings-value">25°C</div>
|
|
</div>
|
|
<div class="settings-row">
|
|
<div class="settings-label">湿度</div>
|
|
<div class="settings-value">45%</div>
|
|
</div>
|
|
</div>
|
|
<button class="settings-button" id="openSettings">设定</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="flex: 1; background-color: rgba(255, 255, 255, 0.95); margin-left: 20px; padding: 15px; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); font-size: 13px; max-height: 100%; overflow-y: auto;">
|
|
<h3 style="margin-bottom: 10px; color: #3f51b5; text-align: center; font-size: 16px;">设计说明</h3>
|
|
<div style="margin-bottom: 15px;">
|
|
<h4 style="margin-bottom: 5px; color: #3f51b5;">整体布局</h4>
|
|
<p>采用左侧导航栏 + 右侧主内容区的经典布局,符合平板横屏应用的使用习惯</p>
|
|
</div>
|
|
<div style="margin-bottom: 15px;">
|
|
<h4 style="margin-bottom: 5px; color: #3f51b5;">色彩方案</h4>
|
|
<p>主色调采用深蓝色(#3f51b5),搭配橙色(#ff9800)作为点缀,体现专业性和科技感</p>
|
|
</div>
|
|
<div style="margin-bottom: 15px;">
|
|
<h4 style="margin-bottom: 5px; color: #3f51b5;">交互功能</h4>
|
|
<ul style="padding-left: 20px; margin: 5px 0;">
|
|
<li>点击左侧菜单项可切换不同功能模块</li>
|
|
<li>点击"设定"按钮可打开参数设置弹窗</li>
|
|
<li>在设置弹窗中可调整各项参数阈值</li>
|
|
<li>点击"当前报警项目"可查看报警详情</li>
|
|
</ul>
|
|
</div>
|
|
<div style="margin-bottom: 15px;">
|
|
<h4 style="margin-bottom: 5px; color: #3f51b5;">设计理念</h4>
|
|
<ul style="padding-left: 20px; margin: 5px 0;">
|
|
<li><strong>简洁明了:</strong>界面布局清晰,信息层次分明</li>
|
|
<li><strong>专业可靠:</strong>色彩和元素设计体现工业应用的专业性</li>
|
|
<li><strong>易于操作:</strong>按钮和交互元素尺寸适中,便于触控</li>
|
|
<li><strong>信息聚焦:</strong>重要信息突出显示,帮助用户快速获取关键数据</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 设置弹窗 -->
|
|
<div class="modal" id="settingsModal">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<div class="modal-title">环境参数设置</div>
|
|
<button class="close-button" id="closeModal">×</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="setting-group">
|
|
<label class="setting-label">温度阈值 (°C)</label>
|
|
<input type="number" class="setting-input" value="25" min="10" max="40">
|
|
</div>
|
|
<div class="setting-group">
|
|
<label class="setting-label">湿度阈值 (%)</label>
|
|
<input type="number" class="setting-input" value="45" min="20" max="80">
|
|
</div>
|
|
<div class="setting-group">
|
|
<label class="setting-label">洁净度阈值</label>
|
|
<input type="number" class="setting-input" value="100" min="0" max="200">
|
|
</div>
|
|
<div class="setting-group">
|
|
<label class="setting-label">报警启用</label>
|
|
<select class="setting-input">
|
|
<option value="all">全部启用</option>
|
|
<option value="temp">仅温度</option>
|
|
<option value="humidity">仅湿度</option>
|
|
<option value="cleanliness">仅洁净度</option>
|
|
<option value="none">全部禁用</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="modal-button cancel-button" id="cancelSettings">取消</button>
|
|
<button class="modal-button save-button" id="saveSettings">保存</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 已移除浮动设计说明,直接集成到主界面 -->
|
|
|
|
<script>
|
|
// 设置弹窗交互
|
|
const settingsModal = document.getElementById('settingsModal');
|
|
const openSettings = document.getElementById('openSettings');
|
|
const closeModal = document.getElementById('closeModal');
|
|
const cancelSettings = document.getElementById('cancelSettings');
|
|
const saveSettings = document.getElementById('saveSettings');
|
|
|
|
openSettings.addEventListener('click', () => {
|
|
settingsModal.style.display = 'flex';
|
|
});
|
|
|
|
closeModal.addEventListener('click', () => {
|
|
settingsModal.style.display = 'none';
|
|
});
|
|
|
|
cancelSettings.addEventListener('click', () => {
|
|
settingsModal.style.display = 'none';
|
|
});
|
|
|
|
saveSettings.addEventListener('click', () => {
|
|
// 这里可以添加保存设置的逻辑
|
|
settingsModal.style.display = 'none';
|
|
alert('设置已保存');
|
|
});
|
|
|
|
// 点击其他地方关闭弹窗
|
|
window.addEventListener('click', (event) => {
|
|
if (event.target === settingsModal) {
|
|
settingsModal.style.display = 'none';
|
|
}
|
|
});
|
|
|
|
// 菜单交互
|
|
const menuItems = document.querySelectorAll('.menu-item');
|
|
menuItems.forEach(item => {
|
|
item.addEventListener('click', () => {
|
|
menuItems.forEach(i => i.classList.remove('active'));
|
|
item.classList.add('active');
|
|
});
|
|
});
|
|
|
|
// 已移除设计说明交互代码
|
|
|
|
// 模拟参数变化
|
|
setInterval(() => {
|
|
const bars = document.querySelectorAll('.parameter-bar');
|
|
bars.forEach(bar => {
|
|
const currentWidth = parseInt(bar.style.width);
|
|
const change = Math.random() > 0.5 ? 2 : -2;
|
|
let newWidth = currentWidth + change;
|
|
if (newWidth < 30) newWidth = 30;
|
|
if (newWidth > 90) newWidth = 90;
|
|
bar.style.width = newWidth + '%';
|
|
});
|
|
}, 3000);
|
|
</script>
|
|
</body>
|
|
</html> |