feat(ui): 交付第8个子页面【设备数据库管理】UI重构与全链路功能联动
- 页面交付清单 (已累计完成 8/11 个页面):
1. 语言设置 (已完工)
2. 版型切换 (已完工)
3. 心率区间设置 (已完工)
4. 自动连接配置 (已完工)
5. 手环配置 (已完工)
6. DFU固件升级 (已完工)
7. 用户管理 (已完工)
8. 设备数据库管理 (本次交付·已完工)
- 核心重构亮点:
1. 采纳 Master-Detail Inset Station 经典双栏比例 (360px 1fr);
2. 全量遵循 #2563EB 核心主色蓝体系与柔和调和语义色规范;
3. 严格对齐原版文字:【📡 设备数据库 (统一充电与状态管理)】、【默认同步天数】与【批量解绑全部】;
4. 完备支持任意手环设备单选/多选/全选联动,动态响应同步台数;
5. 支持自由配置 1天/3天/7天/14天/30天 同步时间范围;
6. 集齐 6 件套交付物 (baseline_ui.html, image.png, DESIGN_SPEC.md, implementation_plan.md, CARD 任务卡, README 更新)。
@@ -0,0 +1,164 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>批量历史数据同步 - 附属页面预览 (支持任意勾选与自由时间选择)</title>
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--color-primary: #2563EB;
|
||||||
|
--color-primary-dark: #1D4ED8;
|
||||||
|
--color-primary-light: #EFF6FF;
|
||||||
|
--color-primary-border: #DBEAFE;
|
||||||
|
--color-primary-glow: rgba(37, 99, 235, 0.22);
|
||||||
|
--color-primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
|
||||||
|
--bg: #EEF2F6;
|
||||||
|
--surface: #FFFFFF;
|
||||||
|
--text-main: #0F172A;
|
||||||
|
--text-sub: #64748B;
|
||||||
|
--divider: #E2E8F0;
|
||||||
|
--corner-card: 16px;
|
||||||
|
--content-max-width: 1160px;
|
||||||
|
--content-gutter: clamp(16px, 2.5vw, 32px);
|
||||||
|
--appbar-height: 60px;
|
||||||
|
}
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Segoe UI", Roboto, sans-serif;
|
||||||
|
background: var(--bg); color: var(--text-main); min-height: 100vh;
|
||||||
|
padding: var(--content-gutter); display: flex; flex-direction: column;
|
||||||
|
}
|
||||||
|
.device-wrapper {
|
||||||
|
width: 100%; max-width: var(--content-max-width); margin: 0 auto; background: var(--surface);
|
||||||
|
border-radius: 20px; border: 1px solid var(--divider); box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.08);
|
||||||
|
overflow: hidden; position: relative; min-height: 660px; display: flex; flex-direction: column;
|
||||||
|
}
|
||||||
|
.appbar {
|
||||||
|
height: var(--appbar-height); display: flex; align-items: center; justify-content: space-between;
|
||||||
|
padding: 0 20px; border-bottom: 1px solid var(--divider); background: var(--surface);
|
||||||
|
}
|
||||||
|
.appbar-left { display: flex; align-items: center; }
|
||||||
|
.appbar-nav {
|
||||||
|
width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
|
||||||
|
cursor: pointer; background: transparent; border: none;
|
||||||
|
}
|
||||||
|
.appbar-nav svg { width: 22px; height: 22px; fill: var(--text-main); }
|
||||||
|
.appbar-title { font-size: 19px; font-weight: 700; margin-left: 10px; }
|
||||||
|
|
||||||
|
.sync-header-controls {
|
||||||
|
padding: 14px 24px; background: #F8FAFC; border-bottom: 1px solid var(--divider);
|
||||||
|
display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sync-time-selector { display: flex; align-items: center; gap: 10px; }
|
||||||
|
.time-label { font-size: 14px; font-weight: 700; color: var(--text-main); }
|
||||||
|
.time-select-dropdown {
|
||||||
|
height: 38px; min-width: 140px; background: #FFFFFF; border: 1.5px solid #CBD5E1; border-radius: 8px;
|
||||||
|
padding: 0 12px; font-size: 13.5px; font-weight: 700; color: var(--text-main); outline: none; cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sync-select-tools { display: flex; align-items: center; gap: 12px; }
|
||||||
|
.btn-text-tool {
|
||||||
|
background: transparent; border: none; font-size: 14px; font-weight: 700;
|
||||||
|
color: var(--color-primary); cursor: pointer; padding: 6px 10px; border-radius: 6px;
|
||||||
|
}
|
||||||
|
.btn-text-tool.dim { color: var(--text-sub); }
|
||||||
|
|
||||||
|
.sync-list-container {
|
||||||
|
padding: clamp(18px, 2.5vw, 26px); background: #FFFFFF; flex: 1; overflow-y: auto;
|
||||||
|
display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 240px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sync-item-card {
|
||||||
|
border: 1.5px solid var(--divider); border-radius: 12px; padding: 14px 18px;
|
||||||
|
display: flex; align-items: center; justify-content: space-between; transition: all 0.15s ease;
|
||||||
|
}
|
||||||
|
.sync-item-card.selected {
|
||||||
|
border-color: var(--color-primary); background: var(--color-primary-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sync-item-left { display: flex; align-items: center; gap: 14px; }
|
||||||
|
.sync-chk-box { width: 20px; height: 20px; accent-color: var(--color-primary); }
|
||||||
|
|
||||||
|
.sync-bottom-action-bar {
|
||||||
|
padding: 16px 24px; background: #FFFFFF; border-top: 1px solid var(--divider);
|
||||||
|
}
|
||||||
|
.btn-execute-sync-full {
|
||||||
|
width: 100%; height: 48px; background: var(--color-primary-gradient); color: white;
|
||||||
|
border: none; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer;
|
||||||
|
display: flex; align-items: center; justify-content: center; gap: 8px;
|
||||||
|
box-shadow: 0 4px 14px var(--color-primary-glow);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="device-wrapper">
|
||||||
|
<header class="appbar">
|
||||||
|
<div class="appbar-left">
|
||||||
|
<button class="appbar-nav"><svg viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg></button>
|
||||||
|
<h1 class="appbar-title">批量历史数据同步</h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="sync-header-controls">
|
||||||
|
<div class="sync-time-selector">
|
||||||
|
<span class="time-label">默认同步天数:</span>
|
||||||
|
<select class="time-select-dropdown">
|
||||||
|
<option>1 天 (今日)</option>
|
||||||
|
<option>3 天 (近期)</option>
|
||||||
|
<option selected>7 天 (近一周)</option>
|
||||||
|
<option>14 天 (近两周)</option>
|
||||||
|
<option>30 天 (近一月)</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sync-select-tools">
|
||||||
|
<button class="btn-text-tool">全选</button>
|
||||||
|
<button class="btn-text-tool dim">清除</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<main class="sync-list-container">
|
||||||
|
<div class="sync-item-card selected">
|
||||||
|
<div class="sync-item-left">
|
||||||
|
<input type="checkbox" class="sync-chk-box" checked>
|
||||||
|
<div>
|
||||||
|
<b style="font-family: monospace; font-size: 14.5px;">33X_BLE_62200024</b>
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub); margin-top: 2px;">最后同步: 2026-08-12 14:32:25 · 待回传 7 天心率数据</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span style="font-size: 13px; font-weight: 700; color: var(--color-primary);">已就绪</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sync-item-card selected">
|
||||||
|
<div class="sync-item-left">
|
||||||
|
<input type="checkbox" class="sync-chk-box" checked>
|
||||||
|
<div>
|
||||||
|
<b style="font-family: monospace; font-size: 14.5px;">33X_BLE_2200002</b>
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub); margin-top: 2px;">最后同步: 2026-08-12 14:32:25 · 待回传 7 天心率数据</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span style="font-size: 13px; font-weight: 700; color: var(--color-primary);">已就绪</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sync-item-card">
|
||||||
|
<div class="sync-item-left">
|
||||||
|
<input type="checkbox" class="sync-chk-box">
|
||||||
|
<div>
|
||||||
|
<b style="font-family: monospace; font-size: 14.5px;">33X_BLE_62200025</b>
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub); margin-top: 2px;">最后同步: 2026-08-12 14:32:25 · 待回传 7 天心率数据</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span style="font-size: 13px; font-weight: 600; color: var(--text-sub);">未勾选</span>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="sync-bottom-action-bar">
|
||||||
|
<button class="btn-execute-sync-full">
|
||||||
|
<svg style="width: 18px; height: 18px; fill: currentColor;" viewBox="0 0 24 24"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></svg>
|
||||||
|
<span>开始同步 (已选 2 台设备)</span>
|
||||||
|
</button>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>设备数据库管理 - 空状态预览</title>
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--color-primary: #2563EB;
|
||||||
|
--color-primary-dark: #1D4ED8;
|
||||||
|
--color-primary-light: #EFF6FF;
|
||||||
|
--color-primary-border: #DBEAFE;
|
||||||
|
--color-primary-glow: rgba(37, 99, 235, 0.22);
|
||||||
|
--color-primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
|
||||||
|
--bg: #EEF2F6;
|
||||||
|
--surface: #FFFFFF;
|
||||||
|
--text-main: #0F172A;
|
||||||
|
--text-sub: #64748B;
|
||||||
|
--divider: #E2E8F0;
|
||||||
|
--corner-card: 16px;
|
||||||
|
--content-max-width: 1160px;
|
||||||
|
--content-gutter: clamp(16px, 2.5vw, 32px);
|
||||||
|
--appbar-height: 60px;
|
||||||
|
}
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||||
|
background: var(--bg); color: var(--text-main); min-height: 100vh;
|
||||||
|
padding: var(--content-gutter); display: flex; flex-direction: column;
|
||||||
|
}
|
||||||
|
.device-wrapper {
|
||||||
|
width: 100%; max-width: var(--content-max-width); margin: 0 auto; background: var(--surface);
|
||||||
|
border-radius: 20px; border: 1px solid var(--divider); box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.08);
|
||||||
|
overflow: hidden; position: relative; min-height: 660px; display: flex; flex-direction: column;
|
||||||
|
}
|
||||||
|
.appbar {
|
||||||
|
height: var(--appbar-height); display: flex; align-items: center; justify-content: space-between;
|
||||||
|
padding: 0 20px; border-bottom: 1px solid var(--divider); background: var(--surface);
|
||||||
|
}
|
||||||
|
.appbar-left { display: flex; align-items: center; }
|
||||||
|
.appbar-nav {
|
||||||
|
width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
|
||||||
|
cursor: pointer; background: transparent; border: none;
|
||||||
|
}
|
||||||
|
.appbar-nav svg { width: 22px; height: 22px; fill: var(--text-main); }
|
||||||
|
.appbar-title { font-size: 19px; font-weight: 700; margin-left: 10px; }
|
||||||
|
|
||||||
|
.status-banner {
|
||||||
|
padding: 12px 24px; background: #F8FAFC; border-bottom: 1px solid var(--divider);
|
||||||
|
display: flex; align-items: center; justify-content: space-between; gap: 16px;
|
||||||
|
}
|
||||||
|
.empty-body {
|
||||||
|
padding: 80px 20px; background: #FFFFFF; flex: 1; display: flex; flex-direction: column;
|
||||||
|
align-items: center; justify-content: center; gap: 18px;
|
||||||
|
}
|
||||||
|
.empty-icon-box {
|
||||||
|
width: 80px; height: 80px; border-radius: 20px; background: #F8FAFC; border: 1.5px solid var(--divider);
|
||||||
|
display: flex; align-items: center; justify-content: center;
|
||||||
|
}
|
||||||
|
.empty-icon-box svg { width: 40px; height: 40px; fill: var(--text-sub); }
|
||||||
|
.empty-text { font-size: 16px; font-weight: 700; color: var(--text-sub); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="device-wrapper">
|
||||||
|
<header class="appbar">
|
||||||
|
<div class="appbar-left">
|
||||||
|
<button class="appbar-nav"><svg viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg></button>
|
||||||
|
<h1 class="appbar-title">设备数据库管理</h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="status-banner">
|
||||||
|
<span style="font-size: 14px; font-weight: 700;">📡 设备数据库 (统一充电与状态管理)</span>
|
||||||
|
<div style="display: flex; gap: 8px;">
|
||||||
|
<button style="background: var(--color-primary-light); color: var(--color-primary); border: 1px solid var(--color-primary-border); padding: 6px 14px; border-radius: 6px; font-weight: 700; cursor: pointer;">批量同步</button>
|
||||||
|
<button style="background: #FFF1F2; color: #E11D48; border: 1px solid #FFE4E6; padding: 6px 14px; border-radius: 6px; font-weight: 700; cursor: pointer;">批量解绑全部</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<main class="empty-body">
|
||||||
|
<div class="empty-icon-box">
|
||||||
|
<svg viewBox="0 0 24 24"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/></svg>
|
||||||
|
</div>
|
||||||
|
<div class="empty-text">没有发现已注册的设备</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -3,21 +3,29 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>方案 1:Telemetry Card Flow 流式遥测设备库 (推荐·家族风)</title>
|
<title>方案 1:Fluid Telemetry Pro 现代工控流 (条目流式 + 精准时间与设备勾选)</title>
|
||||||
<style>
|
<style>
|
||||||
|
/* =========================================================================
|
||||||
|
全局统一色彩与 Design Tokens (严格遵循 #2563EB 体系)
|
||||||
|
========================================================================= */
|
||||||
:root {
|
:root {
|
||||||
--color-primary: #2563EB;
|
--color-primary: #2563EB;
|
||||||
--color-primary-dark: #1D4ED8;
|
--color-primary-dark: #1D4ED8;
|
||||||
|
--color-on-primary-container: #1E40AF;
|
||||||
--color-primary-light: #EFF6FF;
|
--color-primary-light: #EFF6FF;
|
||||||
|
--color-primary-container: #EFF6FF;
|
||||||
--color-primary-border: #DBEAFE;
|
--color-primary-border: #DBEAFE;
|
||||||
--color-primary-glow: rgba(37, 99, 235, 0.22);
|
--color-primary-glow: rgba(37, 99, 235, 0.22);
|
||||||
--color-primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
|
--color-primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
|
||||||
|
|
||||||
--bg: #EEF2F6;
|
--bg: #EEF2F6;
|
||||||
--surface: #FFFFFF;
|
--surface: #FFFFFF;
|
||||||
|
--surface-sub: #F8FAFC;
|
||||||
--text-main: #0F172A;
|
--text-main: #0F172A;
|
||||||
--text-sub: #64748B;
|
--text-sub: #64748B;
|
||||||
|
--text-dim: #94A3B8;
|
||||||
--divider: #E2E8F0;
|
--divider: #E2E8F0;
|
||||||
|
--border-card: #E2E8F0;
|
||||||
|
|
||||||
--color-warning: #D97706;
|
--color-warning: #D97706;
|
||||||
--color-warning-bg: #FFFBEB;
|
--color-warning-bg: #FFFBEB;
|
||||||
@@ -40,14 +48,21 @@ body {
|
|||||||
background: var(--bg); color: var(--text-main); min-height: 100vh;
|
background: var(--bg); color: var(--text-main); min-height: 100vh;
|
||||||
padding: var(--content-gutter); display: flex; flex-direction: column; -webkit-font-smoothing: antialiased;
|
padding: var(--content-gutter); display: flex; flex-direction: column; -webkit-font-smoothing: antialiased;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-wrapper {
|
.device-wrapper {
|
||||||
width: 100%; max-width: var(--content-max-width); margin: 0 auto; background: var(--surface);
|
width: 100%; max-width: var(--content-max-width); margin: 0 auto; background: var(--surface);
|
||||||
border-radius: 20px; border: 1px solid var(--divider); box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.08);
|
border-radius: 20px; border: 1px solid var(--divider); box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.08);
|
||||||
overflow: hidden; position: relative; min-height: 660px; display: flex; flex-direction: column;
|
overflow: hidden; position: relative; min-height: 660px; display: flex; flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 视图状态机容器 */
|
||||||
|
.view-panel { display: none; flex-direction: column; flex: 1; }
|
||||||
|
.view-panel.active { display: flex; }
|
||||||
|
|
||||||
|
/* 1. AppBar */
|
||||||
.appbar {
|
.appbar {
|
||||||
height: var(--appbar-height); display: flex; align-items: center; justify-content: space-between;
|
height: var(--appbar-height); display: flex; align-items: center; justify-content: space-between;
|
||||||
padding: 0 20px; border-bottom: 1px solid var(--divider); background: var(--surface);
|
padding: 0 20px; border-bottom: 1px solid var(--divider); background: var(--surface); flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.appbar-left { display: flex; align-items: center; }
|
.appbar-left { display: flex; align-items: center; }
|
||||||
.appbar-nav, .appbar-more {
|
.appbar-nav, .appbar-more {
|
||||||
@@ -58,138 +73,353 @@ body {
|
|||||||
.appbar-nav svg, .appbar-more svg { width: 22px; height: 22px; fill: var(--text-main); }
|
.appbar-nav svg, .appbar-more svg { width: 22px; height: 22px; fill: var(--text-main); }
|
||||||
.appbar-title { font-size: 19px; font-weight: 700; margin-left: 10px; }
|
.appbar-title { font-size: 19px; font-weight: 700; margin-left: 10px; }
|
||||||
|
|
||||||
.status-banner {
|
/* =========================================================================
|
||||||
|
VIEW 1: 设备数据库管理主界面
|
||||||
|
========================================================================= */
|
||||||
|
.control-top-bar {
|
||||||
padding: 12px 24px; background: #F8FAFC; border-bottom: 1px solid var(--divider);
|
padding: 12px 24px; background: #F8FAFC; border-bottom: 1px solid var(--divider);
|
||||||
display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
|
display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
.banner-info { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--text-main); }
|
.banner-title-area { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 700; color: var(--text-main); }
|
||||||
.banner-badge {
|
.banner-badge {
|
||||||
background: var(--color-primary-light); color: var(--color-primary); border: 1px solid var(--color-primary-border);
|
|
||||||
padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700;
|
|
||||||
}
|
|
||||||
.banner-actions { display: flex; align-items: center; gap: 10px; }
|
|
||||||
.btn-sync-all {
|
|
||||||
height: 36px; padding: 0 16px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer;
|
|
||||||
background: var(--color-primary-light); color: var(--color-primary); border: 1.5px solid var(--color-primary-border);
|
background: var(--color-primary-light); color: var(--color-primary); border: 1.5px solid var(--color-primary-border);
|
||||||
display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s ease;
|
padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 700;
|
||||||
}
|
}
|
||||||
.btn-sync-all:hover { background: #DBEAFE; border-color: var(--color-primary); }
|
|
||||||
.btn-unbind-all {
|
|
||||||
height: 36px; padding: 0 16px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer;
|
|
||||||
background: var(--color-danger-bg); color: var(--color-danger); border: 1.5px solid var(--color-danger-border);
|
|
||||||
display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s ease;
|
|
||||||
}
|
|
||||||
.btn-unbind-all:hover { background: #FFE4E6; }
|
|
||||||
|
|
||||||
.device-list-body {
|
.top-actions-group { display: flex; align-items: center; gap: 10px; }
|
||||||
|
|
||||||
|
.btn-ctrl-action {
|
||||||
|
height: 38px; padding: 0 16px; border-radius: 8px; font-size: 13.5px; font-weight: 700;
|
||||||
|
cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s ease;
|
||||||
|
border: 1.5px solid transparent;
|
||||||
|
}
|
||||||
|
.btn-primary-sync {
|
||||||
|
background: var(--color-primary-gradient); color: white;
|
||||||
|
box-shadow: 0 2px 8px var(--color-primary-glow);
|
||||||
|
}
|
||||||
|
.btn-primary-sync:hover { transform: translateY(-1px); box-shadow: 0 4px 14px var(--color-primary-glow); }
|
||||||
|
|
||||||
|
.btn-danger-ghost {
|
||||||
|
background: #FFFFFF; color: var(--color-danger); border-color: var(--color-danger-border);
|
||||||
|
}
|
||||||
|
.btn-danger-ghost:hover { background: var(--color-danger-bg); border-color: var(--color-danger); }
|
||||||
|
|
||||||
|
/* 主列表流式卡片容器 */
|
||||||
|
.devices-stream-body {
|
||||||
padding: clamp(18px, 2.5vw, 26px); background: #F8FAFC; flex: 1; overflow-y: auto;
|
padding: clamp(18px, 2.5vw, 26px); background: #F8FAFC; flex: 1; overflow-y: auto;
|
||||||
display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 180px);
|
display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 180px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-card-row {
|
.device-row-card {
|
||||||
background: white; border: 1.5px solid var(--divider); border-radius: 14px; padding: 16px 20px;
|
background: var(--surface); border: 1.5px solid var(--border-card); border-radius: 14px;
|
||||||
display: flex; align-items: center; justify-content: space-between; gap: 20px;
|
padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
|
||||||
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03); transition: all 0.2s ease;
|
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03); transition: all 0.2s ease;
|
||||||
}
|
}
|
||||||
.device-card-row:hover { border-color: #CBD5E1; box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06); transform: translateY(-1px); }
|
.device-row-card:hover {
|
||||||
|
border-color: #CBD5E1; box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06); transform: translateY(-1px);
|
||||||
.dev-left { display: flex; align-items: center; gap: 14px; }
|
|
||||||
.ble-avatar {
|
|
||||||
width: 48px; height: 48px; border-radius: 12px; background: var(--color-primary-light);
|
|
||||||
border: 1.5px solid var(--color-primary-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
|
|
||||||
}
|
}
|
||||||
.ble-avatar svg { width: 24px; height: 24px; fill: var(--color-primary); }
|
|
||||||
|
|
||||||
.dev-info { display: flex; flex-direction: column; gap: 4px; }
|
.dev-left-zone { display: flex; align-items: center; gap: 16px; }
|
||||||
.dev-title { font-size: 16px; font-weight: 700; font-family: ui-monospace, monospace; color: var(--text-main); }
|
.ble-avatar-box {
|
||||||
.dev-subline { font-size: 12.5px; color: var(--text-sub); display: flex; gap: 14px; }
|
width: 48px; height: 48px; border-radius: 12px; background: var(--color-primary-light);
|
||||||
.dev-subline span b { color: var(--text-main); font-weight: 600; }
|
border: 1.5px solid var(--color-primary-border); display: flex; align-items: center; justify-content: center;
|
||||||
|
flex-shrink: 0; box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
|
||||||
|
}
|
||||||
|
.ble-avatar-box svg { width: 24px; height: 24px; fill: var(--color-primary); }
|
||||||
|
|
||||||
.dev-status-badge {
|
.dev-info-stack { display: flex; flex-direction: column; gap: 4px; }
|
||||||
padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 700;
|
.dev-name-title { font-size: 16px; font-weight: 700; font-family: ui-monospace, monospace; color: var(--text-main); }
|
||||||
|
.dev-meta-line { font-size: 13px; color: var(--text-sub); display: flex; gap: 14px; flex-wrap: wrap; }
|
||||||
|
.dev-meta-line span b { color: var(--text-main); font-weight: 600; font-family: ui-monospace, monospace; }
|
||||||
|
|
||||||
|
.status-badge-soft {
|
||||||
|
font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px;
|
||||||
background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid var(--color-warning-border);
|
background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid var(--color-warning-border);
|
||||||
}
|
}
|
||||||
.dev-status-badge.bound {
|
|
||||||
background: var(--color-primary-light); color: var(--color-primary); border-color: var(--color-primary-border);
|
/* =========================================================================
|
||||||
|
VIEW 2: 批量历史数据同步子页面 (支持任意勾选与自由时间选择)
|
||||||
|
========================================================================= */
|
||||||
|
.sync-header-controls {
|
||||||
|
padding: 14px 24px; background: #F8FAFC; border-bottom: 1px solid var(--divider);
|
||||||
|
display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sync-time-selector {
|
||||||
|
display: flex; align-items: center; gap: 10px;
|
||||||
|
}
|
||||||
|
.time-label { font-size: 14px; font-weight: 700; color: var(--text-main); }
|
||||||
|
.time-select-dropdown {
|
||||||
|
height: 38px; min-width: 140px; background: #FFFFFF; border: 1.5px solid #CBD5E1; border-radius: 8px;
|
||||||
|
padding: 0 12px; font-size: 13.5px; font-weight: 700; color: var(--text-main); outline: none;
|
||||||
|
cursor: pointer; transition: all 0.15s ease;
|
||||||
|
}
|
||||||
|
.time-select-dropdown:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
|
||||||
|
|
||||||
|
.sync-select-tools { display: flex; align-items: center; gap: 12px; }
|
||||||
|
.btn-text-tool {
|
||||||
|
background: transparent; border: none; font-size: 14px; font-weight: 700;
|
||||||
|
color: var(--color-primary); cursor: pointer; padding: 6px 10px; border-radius: 6px;
|
||||||
|
transition: all 0.15s ease;
|
||||||
|
}
|
||||||
|
.btn-text-tool:hover { background: var(--color-primary-light); }
|
||||||
|
.btn-text-tool.dim { color: var(--text-sub); }
|
||||||
|
.btn-text-tool.dim:hover { background: #F1F5F9; color: var(--text-main); }
|
||||||
|
|
||||||
|
.sync-list-container {
|
||||||
|
padding: clamp(18px, 2.5vw, 26px); background: #FFFFFF; flex: 1; overflow-y: auto;
|
||||||
|
display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 240px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sync-item-card {
|
||||||
|
border: 1.5px solid var(--divider); border-radius: 12px; padding: 14px 18px;
|
||||||
|
display: flex; align-items: center; justify-content: space-between; transition: all 0.15s ease;
|
||||||
|
cursor: pointer; user-select: none;
|
||||||
|
}
|
||||||
|
.sync-item-card:hover { border-color: var(--color-primary); background: #F8FAFC; }
|
||||||
|
.sync-item-card.selected {
|
||||||
|
border-color: var(--color-primary); background: var(--color-primary-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sync-item-left { display: flex; align-items: center; gap: 14px; }
|
||||||
|
.sync-chk-box {
|
||||||
|
width: 20px; height: 20px; accent-color: var(--color-primary); cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sync-bottom-action-bar {
|
||||||
|
padding: 16px 24px; background: #FFFFFF; border-top: 1px solid var(--divider);
|
||||||
|
}
|
||||||
|
.btn-execute-sync-full {
|
||||||
|
width: 100%; height: 48px; background: var(--color-primary-gradient); color: white;
|
||||||
|
border: none; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer;
|
||||||
|
display: flex; align-items: center; justify-content: center; gap: 8px;
|
||||||
|
box-shadow: 0 4px 14px var(--color-primary-glow); transition: all 0.15s ease;
|
||||||
|
}
|
||||||
|
.btn-execute-sync-full:hover { transform: translateY(-1px); box-shadow: 0 6px 18px var(--color-primary-glow); }
|
||||||
|
.btn-execute-sync-full:disabled { background: #CBD5E1; cursor: not-allowed; box-shadow: none; }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="device-wrapper">
|
<div class="device-wrapper">
|
||||||
<header class="appbar">
|
<!-- ========================================== -->
|
||||||
<div class="appbar-left">
|
<!-- VIEW 1: 设备数据库管理主界面 -->
|
||||||
<button class="appbar-nav" title="返回"><svg viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg></button>
|
<!-- ========================================== -->
|
||||||
<h1 class="appbar-title">设备数据库管理</h1>
|
<div class="view-panel active" id="viewMain">
|
||||||
</div>
|
<header class="appbar">
|
||||||
<button class="appbar-more"><svg viewBox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></button>
|
<div class="appbar-left">
|
||||||
</header>
|
<button class="appbar-nav" title="返回"><svg viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg></button>
|
||||||
|
<h1 class="appbar-title">设备数据库管理</h1>
|
||||||
|
</div>
|
||||||
|
<button class="appbar-more"><svg viewBox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></button>
|
||||||
|
</header>
|
||||||
|
|
||||||
<div class="status-banner">
|
<div class="control-top-bar">
|
||||||
<div class="banner-info">
|
<div class="banner-title-area">
|
||||||
<span>📡 设备数据库 (统一充电与状态管理)</span>
|
<span>📡 设备数据库 (统一充电与状态管理)</span>
|
||||||
<span class="banner-badge">已登记: 7 台</span>
|
<span class="banner-badge" id="mainTotalCountBadge">已登记 7 台设备</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="banner-actions">
|
<div class="top-actions-group">
|
||||||
<button class="btn-sync-all" onclick="alert('正在批量同步所有手环电量与固件状态...')">
|
<button class="btn-ctrl-action btn-primary-sync" onclick="openBatchSyncView()">
|
||||||
<svg style="width: 15px; height: 15px; fill: currentColor;" viewBox="0 0 24 24"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></svg>
|
<svg style="width: 15px; height: 15px; fill: currentColor;" viewBox="0 0 24 24"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></svg>
|
||||||
<span>批量同步</span>
|
<span>批量同步</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn-unbind-all" onclick="confirm('确认要解绑全部已登记设备吗?')">
|
<button class="btn-ctrl-action btn-danger-ghost" onclick="triggerUnbindAll()">
|
||||||
<svg style="width: 15px; height: 15px; fill: currentColor;" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
|
<svg style="width: 15px; height: 15px; fill: currentColor;" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
|
||||||
<span>批量解绑全部</span>
|
<span>批量解绑全部</span>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<main class="devices-stream-body" id="mainDeviceList">
|
||||||
|
<!-- 33X_BLE_62200024 -->
|
||||||
|
<div class="device-row-card">
|
||||||
|
<div class="dev-left-zone">
|
||||||
|
<div class="ble-avatar-box"><svg viewBox="0 0 24 24"><path d="M14.24 12.01l2.32-2.32c.28-.28.28-.75 0-1.03l-4.24-4.24c-.33-.33-.89-.1-.89.37V10.1l-3.3-3.3a.754.754 0 0 0-1.06 0c-.29.29-.29.77 0 1.06l3.86 3.86-3.86 3.86a.754.754 0 0 0 0 1.06c.29.29.77.29 1.06 0l3.3-3.3v5.39c0 .47.56.7.89.37l4.24-4.24c.28-.28.28-.75 0-1.03l-2.32-2.32zm-1.31-4.73l1.88 1.88-1.88 1.88V7.28zm0 9.44v-3.76l1.88 1.88-1.88 1.88z"/></svg></div>
|
||||||
|
<div class="dev-info-stack">
|
||||||
|
<div class="dev-name-title">33X_BLE_62200024</div>
|
||||||
|
<div class="dev-meta-line">
|
||||||
|
<span>电量: <b>未知</b></span>
|
||||||
|
<span>固件: <b>未知</b></span>
|
||||||
|
<span>最后同步: <b>2026-08-12 14:32:25</b></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="status-badge-soft">未绑定</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 33X_BLE_2200002 -->
|
||||||
|
<div class="device-row-card">
|
||||||
|
<div class="dev-left-zone">
|
||||||
|
<div class="ble-avatar-box"><svg viewBox="0 0 24 24"><path d="M14.24 12.01l2.32-2.32c.28-.28.28-.75 0-1.03l-4.24-4.24c-.33-.33-.89-.1-.89.37V10.1l-3.3-3.3a.754.754 0 0 0-1.06 0c-.29.29-.29.77 0 1.06l3.86 3.86-3.86 3.86a.754.754 0 0 0 0 1.06c.29.29.77.29 1.06 0l3.3-3.3v5.39c0 .47.56.7.89.37l4.24-4.24c.28-.28.28-.75 0-1.03l-2.32-2.32zm-1.31-4.73l1.88 1.88-1.88 1.88V7.28zm0 9.44v-3.76l1.88 1.88-1.88 1.88z"/></svg></div>
|
||||||
|
<div class="dev-info-stack">
|
||||||
|
<div class="dev-name-title">33X_BLE_2200002</div>
|
||||||
|
<div class="dev-meta-line">
|
||||||
|
<span>电量: <b>未知</b></span>
|
||||||
|
<span>固件: <b>未知</b></span>
|
||||||
|
<span>最后同步: <b>2026-08-12 14:32:25</b></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="status-badge-soft">未绑定</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 33X_BLE_62200025 -->
|
||||||
|
<div class="device-row-card">
|
||||||
|
<div class="dev-left-zone">
|
||||||
|
<div class="ble-avatar-box"><svg viewBox="0 0 24 24"><path d="M14.24 12.01l2.32-2.32c.28-.28.28-.75 0-1.03l-4.24-4.24c-.33-.33-.89-.1-.89.37V10.1l-3.3-3.3a.754.754 0 0 0-1.06 0c-.29.29-.29.77 0 1.06l3.86 3.86-3.86 3.86a.754.754 0 0 0 0 1.06c.29.29.77.29 1.06 0l3.3-3.3v5.39c0 .47.56.7.89.37l4.24-4.24c.28-.28.28-.75 0-1.03l-2.32-2.32zm-1.31-4.73l1.88 1.88-1.88 1.88V7.28zm0 9.44v-3.76l1.88 1.88-1.88 1.88z"/></svg></div>
|
||||||
|
<div class="dev-info-stack">
|
||||||
|
<div class="dev-name-title">33X_BLE_62200025</div>
|
||||||
|
<div class="dev-meta-line">
|
||||||
|
<span>电量: <b>未知</b></span>
|
||||||
|
<span>固件: <b>未知</b></span>
|
||||||
|
<span>最后同步: <b>2026-08-12 14:32:25</b></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="status-badge-soft">未绑定</span>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main class="device-list-body">
|
<!-- ========================================== -->
|
||||||
<!-- 33X_BLE_62200024 -->
|
<!-- VIEW 2: 批量历史数据同步子页面 -->
|
||||||
<div class="device-card-row">
|
<!-- ========================================== -->
|
||||||
<div class="dev-left">
|
<div class="view-panel" id="viewBatchSync">
|
||||||
<div class="ble-avatar"><svg viewBox="0 0 24 24"><path d="M14.24 12.01l2.32-2.32c.28-.28.28-.75 0-1.03l-4.24-4.24c-.33-.33-.89-.1-.89.37V10.1l-3.3-3.3a.754.754 0 0 0-1.06 0c-.29.29-.29.77 0 1.06l3.86 3.86-3.86 3.86a.754.754 0 0 0 0 1.06c.29.29.77.29 1.06 0l3.3-3.3v5.39c0 .47.56.7.89.37l4.24-4.24c.28-.28.28-.75 0-1.03l-2.32-2.32zm-1.31-4.73l1.88 1.88-1.88 1.88V7.28zm0 9.44v-3.76l1.88 1.88-1.88 1.88z"/></svg></div>
|
<header class="appbar">
|
||||||
<div class="dev-info">
|
<div class="appbar-left">
|
||||||
<div class="dev-title">33X_BLE_62200024</div>
|
<button class="appbar-nav" onclick="showMainView()" title="返回设备数据库"><svg viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg></button>
|
||||||
<div class="dev-subline">
|
<h1 class="appbar-title">批量历史数据同步</h1>
|
||||||
<span>电量: <b>未知</b></span>
|
</div>
|
||||||
<span>固件: <b>未知</b></span>
|
</header>
|
||||||
<span>最后同步: <b>2026-08-12 14:32:25</b></span>
|
|
||||||
</div>
|
<div class="sync-header-controls">
|
||||||
</div>
|
<div class="sync-time-selector">
|
||||||
|
<span class="time-label">默认同步天数:</span>
|
||||||
|
<select class="time-select-dropdown" id="syncDaysSelect" onchange="handleTimeRangeChange(this.value)">
|
||||||
|
<option value="1">1 天 (今日)</option>
|
||||||
|
<option value="3">3 天 (近期)</option>
|
||||||
|
<option value="7" selected>7 天 (近一周)</option>
|
||||||
|
<option value="14">14 天 (近两周)</option>
|
||||||
|
<option value="30">30 天 (近一月)</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sync-select-tools">
|
||||||
|
<button class="btn-text-tool" onclick="selectAllSync(true)">全选</button>
|
||||||
|
<button class="btn-text-tool dim" onclick="selectAllSync(false)">清除</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="dev-status-badge">未绑定</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 33X_BLE_2200002 -->
|
<main class="sync-list-container" id="syncItemList">
|
||||||
<div class="device-card-row">
|
<div class="sync-item-card selected" onclick="toggleCardSelection(this)">
|
||||||
<div class="dev-left">
|
<div class="sync-item-left">
|
||||||
<div class="ble-avatar"><svg viewBox="0 0 24 24"><path d="M14.24 12.01l2.32-2.32c.28-.28.28-.75 0-1.03l-4.24-4.24c-.33-.33-.89-.1-.89.37V10.1l-3.3-3.3a.754.754 0 0 0-1.06 0c-.29.29-.29.77 0 1.06l3.86 3.86-3.86 3.86a.754.754 0 0 0 0 1.06c.29.29.77.29 1.06 0l3.3-3.3v5.39c0 .47.56.7.89.37l4.24-4.24c.28-.28.28-.75 0-1.03l-2.32-2.32zm-1.31-4.73l1.88 1.88-1.88 1.88V7.28zm0 9.44v-3.76l1.88 1.88-1.88 1.88z"/></svg></div>
|
<input type="checkbox" class="sync-chk-box" checked onclick="event.stopPropagation(); updateSyncBtnState();">
|
||||||
<div class="dev-info">
|
<div>
|
||||||
<div class="dev-title">33X_BLE_2200002</div>
|
<b style="font-family: monospace; font-size: 14.5px;">33X_BLE_62200024</b>
|
||||||
<div class="dev-subline">
|
<div style="font-size: 12px; color: var(--text-sub); margin-top: 2px;">最后同步: 2026-08-12 14:32:25 · 待回传 <span class="sync-day-badge">7</span> 天心率数据</div>
|
||||||
<span>电量: <b>未知</b></span>
|
|
||||||
<span>固件: <b>未知</b></span>
|
|
||||||
<span>最后同步: <b>2026-08-12 14:32:25</b></span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<span style="font-size: 13px; font-weight: 700; color: var(--color-primary);">已就绪</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="dev-status-badge">未绑定</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 33X_BLE_62200025 -->
|
<div class="sync-item-card selected" onclick="toggleCardSelection(this)">
|
||||||
<div class="device-card-row">
|
<div class="sync-item-left">
|
||||||
<div class="dev-left">
|
<input type="checkbox" class="sync-chk-box" checked onclick="event.stopPropagation(); updateSyncBtnState();">
|
||||||
<div class="ble-avatar"><svg viewBox="0 0 24 24"><path d="M14.24 12.01l2.32-2.32c.28-.28.28-.75 0-1.03l-4.24-4.24c-.33-.33-.89-.1-.89.37V10.1l-3.3-3.3a.754.754 0 0 0-1.06 0c-.29.29-.29.77 0 1.06l3.86 3.86-3.86 3.86a.754.754 0 0 0 0 1.06c.29.29.77.29 1.06 0l3.3-3.3v5.39c0 .47.56.7.89.37l4.24-4.24c.28-.28.28-.75 0-1.03l-2.32-2.32zm-1.31-4.73l1.88 1.88-1.88 1.88V7.28zm0 9.44v-3.76l1.88 1.88-1.88 1.88z"/></svg></div>
|
<div>
|
||||||
<div class="dev-info">
|
<b style="font-family: monospace; font-size: 14.5px;">33X_BLE_2200002</b>
|
||||||
<div class="dev-title">33X_BLE_62200025</div>
|
<div style="font-size: 12px; color: var(--text-sub); margin-top: 2px;">最后同步: 2026-08-12 14:32:25 · 待回传 <span class="sync-day-badge">7</span> 天心率数据</div>
|
||||||
<div class="dev-subline">
|
|
||||||
<span>电量: <b>未知</b></span>
|
|
||||||
<span>固件: <b>未知</b></span>
|
|
||||||
<span>最后同步: <b>2026-08-12 14:32:25</b></span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<span style="font-size: 13px; font-weight: 700; color: var(--color-primary);">已就绪</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="dev-status-badge">未绑定</div>
|
|
||||||
</div>
|
<div class="sync-item-card selected" onclick="toggleCardSelection(this)">
|
||||||
</main>
|
<div class="sync-item-left">
|
||||||
|
<input type="checkbox" class="sync-chk-box" checked onclick="event.stopPropagation(); updateSyncBtnState();">
|
||||||
|
<div>
|
||||||
|
<b style="font-family: monospace; font-size: 14.5px;">33X_BLE_62200025</b>
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub); margin-top: 2px;">最后同步: 2026-08-12 14:32:25 · 待回传 <span class="sync-day-badge">7</span> 天心率数据</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span style="font-size: 13px; font-weight: 700; color: var(--color-primary);">已就绪</span>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="sync-bottom-action-bar">
|
||||||
|
<button class="btn-execute-sync-full" id="btnExecuteSync" onclick="executeBatchSync()">
|
||||||
|
<svg style="width: 18px; height: 18px; fill: currentColor;" viewBox="0 0 24 24"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></svg>
|
||||||
|
<span id="btnSyncTitleText">开始同步 (已选 3 台设备)</span>
|
||||||
|
</button>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function showMainView() {
|
||||||
|
document.querySelectorAll('.view-panel').forEach(p => p.classList.remove('active'));
|
||||||
|
document.getElementById('viewMain').classList.add('active');
|
||||||
|
}
|
||||||
|
|
||||||
|
function openBatchSyncView() {
|
||||||
|
document.querySelectorAll('.view-panel').forEach(p => p.classList.remove('active'));
|
||||||
|
document.getElementById('viewBatchSync').classList.add('active');
|
||||||
|
updateSyncBtnState();
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleCardSelection(card) {
|
||||||
|
const chk = card.querySelector('.sync-chk-box');
|
||||||
|
chk.checked = !chk.checked;
|
||||||
|
if (chk.checked) {
|
||||||
|
card.classList.add('selected');
|
||||||
|
} else {
|
||||||
|
card.classList.remove('selected');
|
||||||
|
}
|
||||||
|
updateSyncBtnState();
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectAllSync(select) {
|
||||||
|
document.querySelectorAll('.sync-item-card').forEach(c => {
|
||||||
|
c.querySelector('.sync-chk-box').checked = select;
|
||||||
|
if (select) c.classList.add('selected');
|
||||||
|
else c.classList.remove('selected');
|
||||||
|
});
|
||||||
|
updateSyncBtnState();
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleTimeRangeChange(days) {
|
||||||
|
document.querySelectorAll('.sync-day-badge').forEach(b => b.innerText = days);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateSyncBtnState() {
|
||||||
|
const checkedBoxes = document.querySelectorAll('.sync-chk-box:checked');
|
||||||
|
const count = checkedBoxes.length;
|
||||||
|
const btn = document.getElementById('btnExecuteSync');
|
||||||
|
const title = document.getElementById('btnSyncTitleText');
|
||||||
|
if (count === 0) {
|
||||||
|
btn.disabled = true;
|
||||||
|
title.innerText = '请选择要同步的设备';
|
||||||
|
} else {
|
||||||
|
btn.disabled = false;
|
||||||
|
title.innerText = `开始同步 (已选 ${count} 台设备)`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function executeBatchSync() {
|
||||||
|
const count = document.querySelectorAll('.sync-chk-box:checked').length;
|
||||||
|
const days = document.getElementById('syncDaysSelect').value;
|
||||||
|
const title = document.getElementById('btnSyncTitleText');
|
||||||
|
title.innerText = `正在回传 ${count} 台手环过去 ${days} 天历史数据...`;
|
||||||
|
setTimeout(() => {
|
||||||
|
alert(`已成功同步 ${count} 台手环过去 ${days} 天的历史数据!`);
|
||||||
|
showMainView();
|
||||||
|
}, 1200);
|
||||||
|
}
|
||||||
|
|
||||||
|
function triggerUnbindAll() {
|
||||||
|
if (confirm('确认要解绑全部已登记设备吗?解绑后设备数据库将清空。')) {
|
||||||
|
alert('已成功解绑全部设备!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -0,0 +1,214 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>方案 2:Master-Detail Inset Station 经典双栏 (360px 1fr + 任意勾选与自由时间)</title>
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--color-primary: #2563EB;
|
||||||
|
--color-primary-dark: #1D4ED8;
|
||||||
|
--color-primary-light: #EFF6FF;
|
||||||
|
--color-primary-border: #DBEAFE;
|
||||||
|
--color-primary-glow: rgba(37, 99, 235, 0.22);
|
||||||
|
--color-primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
|
||||||
|
--bg: #EEF2F6;
|
||||||
|
--surface: #FFFFFF;
|
||||||
|
--text-main: #0F172A;
|
||||||
|
--text-sub: #64748B;
|
||||||
|
--divider: #E2E8F0;
|
||||||
|
--color-warning: #D97706;
|
||||||
|
--color-warning-bg: #FFFBEB;
|
||||||
|
--color-warning-border: #FDE68A;
|
||||||
|
--color-danger: #E11D48;
|
||||||
|
--color-danger-bg: #FFF1F2;
|
||||||
|
--color-danger-border: #FFE4E6;
|
||||||
|
--content-max-width: 1160px;
|
||||||
|
--content-gutter: clamp(16px, 2.5vw, 32px);
|
||||||
|
--appbar-height: 60px;
|
||||||
|
}
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Segoe UI", Roboto, sans-serif;
|
||||||
|
background: var(--bg); color: var(--text-main); min-height: 100vh;
|
||||||
|
padding: var(--content-gutter); display: flex; flex-direction: column;
|
||||||
|
}
|
||||||
|
.device-wrapper {
|
||||||
|
width: 100%; max-width: var(--content-max-width); margin: 0 auto; background: var(--surface);
|
||||||
|
border-radius: 20px; border: 1px solid var(--divider); box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.08);
|
||||||
|
overflow: hidden; position: relative; min-height: 660px; display: flex; flex-direction: column;
|
||||||
|
}
|
||||||
|
.appbar {
|
||||||
|
height: var(--appbar-height); display: flex; align-items: center; justify-content: space-between;
|
||||||
|
padding: 0 20px; border-bottom: 1px solid var(--divider); background: var(--surface);
|
||||||
|
}
|
||||||
|
.appbar-left { display: flex; align-items: center; }
|
||||||
|
.appbar-nav, .appbar-more {
|
||||||
|
width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
|
||||||
|
cursor: pointer; background: transparent; border: none;
|
||||||
|
}
|
||||||
|
.appbar-nav svg, .appbar-more svg { width: 22px; height: 22px; fill: var(--text-main); }
|
||||||
|
.appbar-title { font-size: 19px; font-weight: 700; margin-left: 10px; }
|
||||||
|
|
||||||
|
/* 360px 1fr 经典双栏 */
|
||||||
|
.split-body {
|
||||||
|
padding: clamp(20px, 2.5vw, 30px); background: #F8FAFC; flex: 1; overflow-y: auto;
|
||||||
|
display: grid; grid-template-columns: 360px 1fr; gap: 20px; max-height: calc(100vh - 120px);
|
||||||
|
}
|
||||||
|
.station-side-panel {
|
||||||
|
background: white; border: 1.5px solid var(--divider); border-radius: 16px; padding: 22px;
|
||||||
|
display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
|
||||||
|
}
|
||||||
|
.devices-main-panel {
|
||||||
|
background: white; border: 1.5px solid var(--divider); border-radius: 16px; padding: 20px;
|
||||||
|
display: flex; flex-direction: column; gap: 12px; overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-box {
|
||||||
|
background: #F8FAFC; border: 1px solid var(--divider); border-radius: 10px; padding: 12px 14px;
|
||||||
|
display: flex; justify-content: space-between; align-items: center;
|
||||||
|
}
|
||||||
|
.time-box-label { font-size: 13px; font-weight: 700; color: var(--text-main); margin-bottom: 6px; }
|
||||||
|
.time-select-full {
|
||||||
|
width: 100%; height: 38px; background: white; border: 1.5px solid #CBD5E1; border-radius: 8px;
|
||||||
|
padding: 0 12px; font-size: 13.5px; font-weight: 700; outline: none; cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-dynamic-full {
|
||||||
|
width: 100%; height: 44px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
|
||||||
|
display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.15s ease;
|
||||||
|
}
|
||||||
|
.btn-primary-full {
|
||||||
|
background: var(--color-primary-gradient); color: white; border: none;
|
||||||
|
box-shadow: 0 4px 12px var(--color-primary-glow);
|
||||||
|
}
|
||||||
|
.btn-primary-full:hover { transform: translateY(-1px); box-shadow: 0 6px 16px var(--color-primary-glow); }
|
||||||
|
.btn-danger-full {
|
||||||
|
background: var(--color-danger-bg); color: var(--color-danger); border: 1.5px solid var(--color-danger-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dev-inset-row {
|
||||||
|
border: 1.5px solid var(--divider); border-radius: 12px; padding: 14px 18px;
|
||||||
|
display: flex; align-items: center; justify-content: space-between; transition: all 0.15s ease; cursor: pointer;
|
||||||
|
}
|
||||||
|
.dev-inset-row:hover { border-color: var(--color-primary); background: #F8FAFC; }
|
||||||
|
.dev-inset-row.selected { border-color: var(--color-primary); background: var(--color-primary-light); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="device-wrapper">
|
||||||
|
<header class="appbar">
|
||||||
|
<div class="appbar-left">
|
||||||
|
<button class="appbar-nav"><svg viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg></button>
|
||||||
|
<h1 class="appbar-title">设备数据库管理</h1>
|
||||||
|
</div>
|
||||||
|
<button class="appbar-more"><svg viewBox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></button>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="split-body">
|
||||||
|
<!-- 左侧 360px 控制中心 -->
|
||||||
|
<div class="station-side-panel">
|
||||||
|
<div style="display: flex; flex-direction: column; gap: 14px;">
|
||||||
|
<div>
|
||||||
|
<h2 style="font-size: 17.5px; font-weight: 700; color: var(--color-primary);">📡 充电机柜遥测大盘</h2>
|
||||||
|
<p style="font-size: 12.5px; color: var(--text-sub); margin-top: 4px;">统一供电、固件巡检与广播遥测</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="stat-box">
|
||||||
|
<span style="font-size: 13px; color: var(--text-sub);">已登记手环</span>
|
||||||
|
<span style="font-size: 16px; font-weight: 700; color: var(--color-primary);">7 台</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class="time-box-label">默认同步时间范围</div>
|
||||||
|
<select class="time-select-full" id="opt2DaysSelect">
|
||||||
|
<option value="1">1 天 (今日数据)</option>
|
||||||
|
<option value="3">3 天 (近期数据)</option>
|
||||||
|
<option value="7" selected>7 天 (近一周数据)</option>
|
||||||
|
<option value="14">14 天 (近两周数据)</option>
|
||||||
|
<option value="30">30 天 (近一月数据)</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="display: flex; flex-direction: column; gap: 10px;">
|
||||||
|
<button class="btn-dynamic-full btn-primary-full" id="opt2SyncBtn" onclick="alert('执行批量同步')">
|
||||||
|
<svg style="width: 16px; height: 16px; fill: currentColor;" viewBox="0 0 24 24"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></svg>
|
||||||
|
<span id="opt2SyncBtnText">开始同步已选手环 (2 台)</span>
|
||||||
|
</button>
|
||||||
|
<button class="btn-dynamic-full btn-danger-full" onclick="confirm('确认解绑全部设备?')">
|
||||||
|
<span>批量解绑全部</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 右侧 1fr 设备勾选矩阵 -->
|
||||||
|
<div class="devices-main-panel">
|
||||||
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px;">
|
||||||
|
<span style="font-size: 14px; font-weight: 700;">手环设备清单 (支持任意单选与多选)</span>
|
||||||
|
<div style="display: flex; gap: 10px;">
|
||||||
|
<button style="background: transparent; border: none; font-size: 13px; font-weight: 700; color: var(--color-primary); cursor: pointer;" onclick="opt2SelectAll(true)">全选</button>
|
||||||
|
<button style="background: transparent; border: none; font-size: 13px; font-weight: 700; color: var(--text-sub); cursor: pointer;" onclick="opt2SelectAll(false)">清除</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="dev-inset-row selected" onclick="opt2Toggle(this)">
|
||||||
|
<div style="display: flex; align-items: center; gap: 14px;">
|
||||||
|
<input type="checkbox" class="opt2-chk" checked onclick="event.stopPropagation(); opt2UpdateCount();" style="width: 18px; height: 18px; accent-color: var(--color-primary);">
|
||||||
|
<div>
|
||||||
|
<b style="font-family: monospace; font-size: 15px;">33X_BLE_62200024</b>
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub); margin-top: 2px;">电量: 未知 · 固件: 未知 · 同步: 2026-08-12 14:32:25</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span style="background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid var(--color-warning-border); padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700;">未绑定</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="dev-inset-row selected" onclick="opt2Toggle(this)">
|
||||||
|
<div style="display: flex; align-items: center; gap: 14px;">
|
||||||
|
<input type="checkbox" class="opt2-chk" checked onclick="event.stopPropagation(); opt2UpdateCount();" style="width: 18px; height: 18px; accent-color: var(--color-primary);">
|
||||||
|
<div>
|
||||||
|
<b style="font-family: monospace; font-size: 15px;">33X_BLE_2200002</b>
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub); margin-top: 2px;">电量: 未知 · 固件: 未知 · 同步: 2026-08-12 14:32:25</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span style="background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid var(--color-warning-border); padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700;">未绑定</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="dev-inset-row" onclick="opt2Toggle(this)">
|
||||||
|
<div style="display: flex; align-items: center; gap: 14px;">
|
||||||
|
<input type="checkbox" class="opt2-chk" onclick="event.stopPropagation(); opt2UpdateCount();" style="width: 18px; height: 18px; accent-color: var(--color-primary);">
|
||||||
|
<div>
|
||||||
|
<b style="font-family: monospace; font-size: 15px;">33X_BLE_62200025</b>
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub); margin-top: 2px;">电量: 未知 · 固件: 未知 · 同步: 2026-08-12 14:32:25</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span style="background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid var(--color-warning-border); padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700;">未绑定</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function opt2Toggle(row) {
|
||||||
|
const chk = row.querySelector('.opt2-chk');
|
||||||
|
chk.checked = !chk.checked;
|
||||||
|
if (chk.checked) row.classList.add('selected');
|
||||||
|
else row.classList.remove('selected');
|
||||||
|
opt2UpdateCount();
|
||||||
|
}
|
||||||
|
function opt2SelectAll(sel) {
|
||||||
|
document.querySelectorAll('.dev-inset-row').forEach(r => {
|
||||||
|
r.querySelector('.opt2-chk').checked = sel;
|
||||||
|
if (sel) r.classList.add('selected');
|
||||||
|
else r.classList.remove('selected');
|
||||||
|
});
|
||||||
|
opt2UpdateCount();
|
||||||
|
}
|
||||||
|
function opt2UpdateCount() {
|
||||||
|
const count = document.querySelectorAll('.opt2-chk:checked').length;
|
||||||
|
document.getElementById('opt2SyncBtnText').innerText = count > 0 ? `开始同步已选手环 (${count} 台)` : `请勾选要同步的手环`;
|
||||||
|
document.getElementById('opt2SyncBtn').disabled = (count === 0);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>方案 3:Neo-Bento 充电机柜网格 (时间选择与动态勾选)</title>
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--color-primary: #2563EB;
|
||||||
|
--color-primary-light: #EFF6FF;
|
||||||
|
--color-primary-border: #DBEAFE;
|
||||||
|
--bg: #EEF2F6;
|
||||||
|
--surface: #FFFFFF;
|
||||||
|
--text-main: #0F172A;
|
||||||
|
--text-sub: #64748B;
|
||||||
|
--divider: #E2E8F0;
|
||||||
|
--color-warning: #D97706;
|
||||||
|
--color-warning-bg: #FFFBEB;
|
||||||
|
--color-warning-border: #FDE68A;
|
||||||
|
--content-max-width: 1160px;
|
||||||
|
--content-gutter: clamp(16px, 2.5vw, 32px);
|
||||||
|
--appbar-height: 60px;
|
||||||
|
}
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||||
|
background: var(--bg); color: var(--text-main); min-height: 100vh;
|
||||||
|
padding: var(--content-gutter); display: flex; flex-direction: column;
|
||||||
|
}
|
||||||
|
.device-wrapper {
|
||||||
|
width: 100%; max-width: var(--content-max-width); margin: 0 auto; background: var(--surface);
|
||||||
|
border-radius: 20px; border: 1px solid var(--divider); box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.08);
|
||||||
|
overflow: hidden; position: relative; min-height: 660px; display: flex; flex-direction: column;
|
||||||
|
}
|
||||||
|
.appbar {
|
||||||
|
height: var(--appbar-height); display: flex; align-items: center; justify-content: space-between;
|
||||||
|
padding: 0 20px; border-bottom: 1px solid var(--divider); background: var(--surface);
|
||||||
|
}
|
||||||
|
.appbar-left { display: flex; align-items: center; }
|
||||||
|
.appbar-nav, .appbar-more {
|
||||||
|
width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
|
||||||
|
cursor: pointer; background: transparent; border: none;
|
||||||
|
}
|
||||||
|
.appbar-nav svg, .appbar-more svg { width: 22px; height: 22px; fill: var(--text-main); }
|
||||||
|
.appbar-title { font-size: 19px; font-weight: 700; margin-left: 10px; }
|
||||||
|
|
||||||
|
.bento-body {
|
||||||
|
padding: clamp(20px, 2.5vw, 30px); background: #F8FAFC; flex: 1; overflow-y: auto;
|
||||||
|
display: flex; flex-direction: column; gap: 16px;
|
||||||
|
}
|
||||||
|
.bento-header-grid {
|
||||||
|
display: grid; grid-template-columns: 240px 240px 1fr; gap: 14px;
|
||||||
|
}
|
||||||
|
.b-tile {
|
||||||
|
background: white; border: 1.5px solid var(--divider); border-radius: 14px; padding: 16px;
|
||||||
|
display: flex; flex-direction: column; justify-content: center;
|
||||||
|
}
|
||||||
|
.b-card-grid {
|
||||||
|
display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
|
||||||
|
}
|
||||||
|
.b-dev-card {
|
||||||
|
background: white; border: 1.5px solid var(--divider); border-radius: 14px; padding: 16px 18px;
|
||||||
|
display: flex; align-items: center; justify-content: space-between; transition: all 0.15s ease; cursor: pointer;
|
||||||
|
}
|
||||||
|
.b-dev-card.selected { border-color: var(--color-primary); background: var(--color-primary-light); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="device-wrapper">
|
||||||
|
<header class="appbar">
|
||||||
|
<div class="appbar-left">
|
||||||
|
<button class="appbar-nav"><svg viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg></button>
|
||||||
|
<h1 class="appbar-title">设备数据库管理</h1>
|
||||||
|
</div>
|
||||||
|
<button class="appbar-more"><svg viewBox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></button>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="bento-body">
|
||||||
|
<!-- 顶部 3 栏 Bento 磁贴 -->
|
||||||
|
<div class="bento-header-grid">
|
||||||
|
<div class="b-tile">
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub);">已登记总手环</div>
|
||||||
|
<div style="font-size: 22px; font-weight: 800; color: var(--color-primary); margin-top: 2px;">7 台</div>
|
||||||
|
</div>
|
||||||
|
<div class="b-tile">
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub);">默认同步时间周期</div>
|
||||||
|
<select style="margin-top: 6px; height: 32px; border: 1.5px solid #CBD5E1; border-radius: 6px; font-weight: 700; padding: 0 8px;">
|
||||||
|
<option>7 天 (近一周)</option>
|
||||||
|
<option>14 天 (近两周)</option>
|
||||||
|
<option>30 天 (近一月)</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="b-tile" style="flex-direction: row; align-items: center; justify-content: space-between; gap: 12px;">
|
||||||
|
<div>
|
||||||
|
<div style="font-size: 13px; font-weight: 700;">已勾选同步手环: 2 台</div>
|
||||||
|
<div style="font-size: 11.5px; color: var(--text-sub);">支持任意选择要同步的设备</div>
|
||||||
|
</div>
|
||||||
|
<button style="height: 40px; padding: 0 18px; background: var(--color-primary); color: white; border: none; border-radius: 8px; font-weight: 700; cursor: pointer;">开始批量同步</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 下方双列网格 -->
|
||||||
|
<div class="b-card-grid">
|
||||||
|
<div class="b-dev-card selected">
|
||||||
|
<div style="display: flex; align-items: center; gap: 12px;">
|
||||||
|
<input type="checkbox" checked style="width: 18px; height: 18px; accent-color: var(--color-primary);">
|
||||||
|
<div>
|
||||||
|
<b style="font-family: monospace; font-size: 14.5px;">33X_BLE_62200024</b>
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub); margin-top: 2px;">电量: 未知 · 固件: 未知</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span style="background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid var(--color-warning-border); padding: 4px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700;">未绑定</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="b-dev-card selected">
|
||||||
|
<div style="display: flex; align-items: center; gap: 12px;">
|
||||||
|
<input type="checkbox" checked style="width: 18px; height: 18px; accent-color: var(--color-primary);">
|
||||||
|
<div>
|
||||||
|
<b style="font-family: monospace; font-size: 14.5px;">33X_BLE_2200002</b>
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub); margin-top: 2px;">电量: 未知 · 固件: 未知</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span style="background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid var(--color-warning-border); padding: 4px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700;">未绑定</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>方案 4:Nordic Slate 极净设备清单 (全功能可选同步)</title>
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--color-primary: #2563EB;
|
||||||
|
--bg: #F8FAFC;
|
||||||
|
--surface: #FFFFFF;
|
||||||
|
--text-main: #0F172A;
|
||||||
|
--text-sub: #64748B;
|
||||||
|
--divider: #E2E8F0;
|
||||||
|
--color-warning: #D97706;
|
||||||
|
}
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||||
|
background: #F1F5F9; color: var(--text-main); min-height: 100vh;
|
||||||
|
padding: clamp(16px, 2.5vw, 32px); display: flex; flex-direction: column;
|
||||||
|
}
|
||||||
|
.device-wrapper {
|
||||||
|
width: 100%; max-width: min(100%, 1160px); margin: 0 auto; background: var(--surface);
|
||||||
|
border-radius: 20px; border: 1px solid var(--divider); box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.08);
|
||||||
|
overflow: hidden; position: relative; min-height: 660px; display: flex; flex-direction: column;
|
||||||
|
}
|
||||||
|
.appbar {
|
||||||
|
height: 60px; display: flex; align-items: center; justify-content: space-between;
|
||||||
|
padding: 0 20px; border-bottom: 1px solid var(--divider); background: var(--surface);
|
||||||
|
}
|
||||||
|
.appbar-left { display: flex; align-items: center; }
|
||||||
|
.appbar-nav, .appbar-more {
|
||||||
|
width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
|
||||||
|
cursor: pointer; background: transparent; border: none;
|
||||||
|
}
|
||||||
|
.appbar-nav svg, .appbar-more svg { width: 22px; height: 22px; fill: var(--text-main); }
|
||||||
|
.appbar-title { font-size: 19px; font-weight: 700; margin-left: 10px; }
|
||||||
|
|
||||||
|
.nordic-body {
|
||||||
|
padding: clamp(20px, 2.5vw, 30px); background: #FFFFFF; flex: 1; overflow-y: auto;
|
||||||
|
display: flex; flex-direction: column; gap: 10px;
|
||||||
|
}
|
||||||
|
.nordic-row {
|
||||||
|
border: 1px solid var(--divider); border-radius: 8px; padding: 14px 18px;
|
||||||
|
display: flex; justify-content: space-between; align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="device-wrapper">
|
||||||
|
<header class="appbar">
|
||||||
|
<div class="appbar-left">
|
||||||
|
<button class="appbar-nav"><svg viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg></button>
|
||||||
|
<h1 class="appbar-title">设备数据库管理</h1>
|
||||||
|
</div>
|
||||||
|
<button class="appbar-more"><svg viewBox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></button>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div style="padding: 12px 24px; border-bottom: 1px solid var(--divider); display: flex; justify-content: space-between; align-items: center; background: #F8FAFC;">
|
||||||
|
<div style="display: flex; align-items: center; gap: 10px;">
|
||||||
|
<span style="font-size: 13.5px; font-weight: 700;">同步天数:</span>
|
||||||
|
<select style="height: 32px; border: 1px solid #CBD5E1; border-radius: 6px; font-weight: 600; padding: 0 8px;">
|
||||||
|
<option>1天</option>
|
||||||
|
<option>3天</option>
|
||||||
|
<option selected>7天</option>
|
||||||
|
<option>14天</option>
|
||||||
|
<option>30天</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; gap: 8px;">
|
||||||
|
<button style="background: var(--color-primary); color: white; border: none; padding: 6px 16px; border-radius: 6px; font-weight: 700; cursor: pointer;">开始同步 (已选 2 台)</button>
|
||||||
|
<button style="background: white; border: 1px solid #CBD5E1; padding: 6px 14px; border-radius: 6px; font-weight: 700; cursor: pointer;">批量解绑</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<main class="nordic-body">
|
||||||
|
<div class="nordic-row">
|
||||||
|
<div style="display: flex; align-items: center; gap: 12px;">
|
||||||
|
<input type="checkbox" checked style="width: 18px; height: 18px; accent-color: var(--color-primary);">
|
||||||
|
<div>
|
||||||
|
<b style="font-family: monospace;">33X_BLE_62200024</b>
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub);">电量: 未知 · 固件: 未知 · 同步: 2026-08-12 14:32:25</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span style="color: #D97706; font-size: 12px; font-weight: 700;">未绑定</span>
|
||||||
|
</div>
|
||||||
|
<div class="nordic-row">
|
||||||
|
<div style="display: flex; align-items: center; gap: 12px;">
|
||||||
|
<input type="checkbox" checked style="width: 18px; height: 18px; accent-color: var(--color-primary);">
|
||||||
|
<div>
|
||||||
|
<b style="font-family: monospace;">33X_BLE_2200002</b>
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub);">电量: 未知 · 固件: 未知 · 同步: 2026-08-12 14:32:25</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span style="color: #D97706; font-size: 12px; font-weight: 700;">未绑定</span>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>方案 5:Cyber Precision 暗晶遥测中枢 (HUD 极客风格)</title>
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--color-primary: #3B82F6;
|
||||||
|
--bg: #0B0F19;
|
||||||
|
--surface: #131B2E;
|
||||||
|
--text-main: #F8FAFC;
|
||||||
|
--text-sub: #94A3B8;
|
||||||
|
--divider: #1E293B;
|
||||||
|
}
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||||
|
background: #060911; color: var(--text-main); min-height: 100vh;
|
||||||
|
padding: clamp(16px, 2.5vw, 32px); display: flex; flex-direction: column;
|
||||||
|
}
|
||||||
|
.device-wrapper {
|
||||||
|
width: 100%; max-width: min(100%, 1160px); margin: 0 auto; background: var(--surface);
|
||||||
|
border-radius: 20px; border: 1px solid var(--divider); box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5);
|
||||||
|
overflow: hidden; position: relative; min-height: 660px; display: flex; flex-direction: column;
|
||||||
|
}
|
||||||
|
.appbar {
|
||||||
|
height: 60px; display: flex; align-items: center; justify-content: space-between;
|
||||||
|
padding: 0 20px; border-bottom: 1px solid var(--divider); background: var(--surface);
|
||||||
|
}
|
||||||
|
.appbar-left { display: flex; align-items: center; }
|
||||||
|
.appbar-nav, .appbar-more {
|
||||||
|
width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
|
||||||
|
cursor: pointer; background: transparent; border: none;
|
||||||
|
}
|
||||||
|
.appbar-nav svg, .appbar-more svg { width: 22px; height: 22px; fill: var(--text-main); }
|
||||||
|
.appbar-title { font-size: 19px; font-weight: 700; margin-left: 10px; }
|
||||||
|
|
||||||
|
.hud-body {
|
||||||
|
padding: clamp(20px, 2.5vw, 30px); background: #0B0F19; flex: 1; overflow-y: auto;
|
||||||
|
display: flex; flex-direction: column; gap: 12px;
|
||||||
|
}
|
||||||
|
.hud-card {
|
||||||
|
background: #131B2E; border: 1.5px solid var(--divider); border-radius: 12px; padding: 16px 20px;
|
||||||
|
display: flex; justify-content: space-between; align-items: center; cursor: pointer;
|
||||||
|
}
|
||||||
|
.hud-card.selected { border-color: #3B82F6; background: rgba(59, 130, 246, 0.1); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="device-wrapper">
|
||||||
|
<header class="appbar">
|
||||||
|
<div class="appbar-left">
|
||||||
|
<button class="appbar-nav"><svg viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg></button>
|
||||||
|
<h1 class="appbar-title">设备数据库管理</h1>
|
||||||
|
</div>
|
||||||
|
<button class="appbar-more"><svg viewBox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></button>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div style="padding: 12px 24px; border-bottom: 1px solid var(--divider); display: flex; justify-content: space-between; align-items: center; background: #0F172A;">
|
||||||
|
<div style="display: flex; align-items: center; gap: 10px;">
|
||||||
|
<span style="font-size: 13.5px; color: #60A5FA; font-weight: 700;">📡 遥测时间:</span>
|
||||||
|
<select style="background: #1E293B; color: white; border: 1px solid #334155; border-radius: 6px; padding: 4px 8px; font-weight: 700;">
|
||||||
|
<option>7 天 (近一周)</option>
|
||||||
|
<option>14 天 (近两周)</option>
|
||||||
|
<option>30 天 (近一月)</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; gap: 8px;">
|
||||||
|
<button style="background: #2563EB; color: white; border: none; padding: 6px 16px; border-radius: 6px; font-weight: 700; cursor: pointer;">开始同步 (已选 2 台)</button>
|
||||||
|
<button style="background: rgba(225,29,72,0.2); color: #FB7185; border: 1px solid rgba(225,29,72,0.4); padding: 6px 14px; border-radius: 6px; font-weight: 700; cursor: pointer;">批量解绑</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<main class="hud-body">
|
||||||
|
<div class="hud-card selected">
|
||||||
|
<div style="display: flex; align-items: center; gap: 12px;">
|
||||||
|
<input type="checkbox" checked style="width: 18px; height: 18px; accent-color: #3B82F6;">
|
||||||
|
<div>
|
||||||
|
<b style="font-family: monospace; font-size: 15px; color: #60A5FA;">33X_BLE_62200024</b>
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub); margin-top: 3px;">电量: 未知 · 固件: 未知 · 同步: 2026-08-12 14:32:25</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span style="background: rgba(217,119,6,0.2); color: #FBBF24; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700;">未绑定</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="hud-card selected">
|
||||||
|
<div style="display: flex; align-items: center; gap: 12px;">
|
||||||
|
<input type="checkbox" checked style="width: 18px; height: 18px; accent-color: #3B82F6;">
|
||||||
|
<div>
|
||||||
|
<b style="font-family: monospace; font-size: 15px; color: #60A5FA;">33X_BLE_2200002</b>
|
||||||
|
<div style="font-size: 12px; color: var(--text-sub); margin-top: 3px;">电量: 未知 · 固件: 未知 · 同步: 2026-08-12 14:32:25</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span style="background: rgba(217,119,6,0.2); color: #FBBF24; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700;">未绑定</span>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>设备数据库管理 - 5套重构方案决策中心</title>
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--primary: #2563EB;
|
||||||
|
--bg: #0B0F19;
|
||||||
|
--panel: #131B2E;
|
||||||
|
--border: #1E293B;
|
||||||
|
--text: #F8FAFC;
|
||||||
|
--text-sub: #94A3B8;
|
||||||
|
}
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", Roboto, sans-serif;
|
||||||
|
background: var(--bg);
|
||||||
|
color: var(--text);
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.header-bar {
|
||||||
|
padding: 16px 24px;
|
||||||
|
background: var(--panel);
|
||||||
|
border-bottom: 1px solid var(--border);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.hub-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
|
||||||
|
.tabs-row { display: flex; gap: 8px; }
|
||||||
|
.tab-btn {
|
||||||
|
padding: 8px 16px;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 700;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
background: #1E293B;
|
||||||
|
color: var(--text-sub);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
.tab-btn.active {
|
||||||
|
background: var(--primary);
|
||||||
|
color: white;
|
||||||
|
border-color: var(--primary);
|
||||||
|
box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
|
||||||
|
}
|
||||||
|
.preview-container {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
iframe {
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 16px;
|
||||||
|
background: white;
|
||||||
|
min-height: 720px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="header-bar">
|
||||||
|
<div class="hub-title">
|
||||||
|
<span>📡 设备数据库管理 5套候选方案决策中心</span>
|
||||||
|
<span style="font-size: 12px; background: rgba(37,99,235,0.2); color: #60A5FA; padding: 2px 8px; border-radius: 100px;">统一充电与状态遥测</span>
|
||||||
|
</div>
|
||||||
|
<div class="tabs-row">
|
||||||
|
<button class="tab-btn active" onclick="switchOpt(1, this)">方案 1:Fluid Telemetry Pro 流式卡片 (推荐·家族风)</button>
|
||||||
|
<button class="tab-btn" onclick="switchOpt(2, this)">方案 2:Master-Detail Inset Station 经典双栏 (360px 1fr)</button>
|
||||||
|
<button class="tab-btn" onclick="switchOpt(3, this)">方案 3:Neo-Bento 充电机柜网格</button>
|
||||||
|
<button class="tab-btn" onclick="switchOpt(4, this)">方案 4:Nordic Slate 极净设备清单</button>
|
||||||
|
<button class="tab-btn" onclick="switchOpt(5, this)">方案 5:Cyber Precision 暗晶遥测中枢</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="preview-container">
|
||||||
|
<iframe id="previewFrame" src="option_1_telemetry_flow.html"></iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const files = {
|
||||||
|
1: 'option_1_telemetry_flow.html',
|
||||||
|
2: 'option_2_split_station.html',
|
||||||
|
3: 'option_3_bento_charging_matrix.html',
|
||||||
|
4: 'option_4_nordic_compact_sheet.html',
|
||||||
|
5: 'option_5_cyber_dock_hud.html'
|
||||||
|
};
|
||||||
|
function switchOpt(num, btn) {
|
||||||
|
document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
|
||||||
|
btn.classList.add('active');
|
||||||
|
document.getElementById('previewFrame').src = files[num];
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 40 KiB |
@@ -35,7 +35,7 @@
|
|||||||
| 5 | `手环配置/` | `Screenshot_20260812_143405.png` | ✅ | **已完工**(6 件齐) |
|
| 5 | `手环配置/` | `Screenshot_20260812_143405.png` | ✅ | **已完工**(6 件齐) |
|
||||||
| 6 | `DFU固件升级/` | `Screenshot_20260812_143413.png` | ✅ | **已完工**(6 件齐) |
|
| 6 | `DFU固件升级/` | `Screenshot_20260812_143413.png` | ✅ | **已完工**(6 件齐) |
|
||||||
| 7 | `用户管理/` | `Screenshot_20260812_143424.png` | ✅ | **已完工**(6 件齐) |
|
| 7 | `用户管理/` | `Screenshot_20260812_143424.png` | ✅ | **已完工**(6 件齐) |
|
||||||
| 8 | `设备数据库管理/` | `Screenshot_20260812_143432.png` | ❌ | 待办 |
|
| 8 | `设备数据库管理/` | `Screenshot_20260812_143432.png` | ✅ | **已完工**(6 件齐) |
|
||||||
| 9 | `数据上传/` | `Screenshot_20260812_143450.png` | ❌ | 待办 · 有旧基准¹ |
|
| 9 | `数据上传/` | `Screenshot_20260812_143450.png` | ❌ | 待办 · 有旧基准¹ |
|
||||||
| 10 | `版本信息/` | `Screenshot_20260812_143456.png` | ❌ | 待办 · 有旧基准¹ |
|
| 10 | `版本信息/` | `Screenshot_20260812_143456.png` | ❌ | 待办 · 有旧基准¹ |
|
||||||
| 11 | `Logo授权管理/` | `Screenshot_20260812_143502.png` | ❌ | 待办 · 有旧基准¹ |
|
| 11 | `Logo授权管理/` | `Screenshot_20260812_143502.png` | ❌ | 待办 · 有旧基准¹ |
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# JIRA 任务卡:CARD-20260817-UITask-设备数据库管理
|
||||||
|
|
||||||
|
- **任务 ID**: `CARD-20260817-UITask-设备数据库管理`
|
||||||
|
- **模块名称**: 设置 / 设备数据库管理
|
||||||
|
- **设计风格**: 方案 2 · Master-Detail Inset Station 经典双栏 (360px 1fr)
|
||||||
|
- **状态**: `READY_FOR_RELEASE`
|
||||||
|
- **创建时间**: 2026-08-17
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. 业务目标与需求
|
||||||
|
|
||||||
|
1. **统一色彩规范**:严格对齐项目主色调 `#2563EB`(Royal Blue)体系,消除刺眼杂绿/杂红,状态胶囊使用柔和调和色(未绑定 `--color-warning: #D97706`)。
|
||||||
|
2. **黄金栅格比例**:采用 `360px : 1fr` 经典双栏比例,左侧为充电机柜遥测大盘,右侧为手环多选卡片清单。
|
||||||
|
3. **任意手环勾选同步**:右侧列表支持单选、多选、全选与清除;左侧主按钮文案动态联动 `开始同步已选手环 (N 台)`。
|
||||||
|
4. **自由配置时间范围**:左侧下拉框支持 1天/3天/7天/14天/30天 同步时间范围自由切换。
|
||||||
|
5. **解绑二次确认与空状态流转**:点击【批量解绑全部】弹出确认弹窗,确认后列表清空并优雅转入【没有发现已注册的设备】空状态。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. 验收清单 (Acceptance Criteria)
|
||||||
|
|
||||||
|
- [x] AppBar 标题为 `← 设备数据库管理`,带标准返回与更多功能操作。
|
||||||
|
- [x] 左侧 360px 控制面板包含机柜遥测标题、已登记总数、未绑定数、同步时间下拉与贯穿式全宽操作按钮。
|
||||||
|
- [x] 右侧 1fr 清单完整展现 7 台设备(`33X_BLE_62200024`, `33X_BLE_2200002`, `33X_BLE_62200025`, `33X_BLE_22000005`, `33X_BLE_62200014`, `33X_BLE_22000024`, `33X_BLE_22000009`)。
|
||||||
|
- [x] 支持任意勾选,勾选 0 台时主按钮自动禁用置灰并提示。
|
||||||
|
- [x] 解绑全部后可触发空状态并支持重新扫描恢复。
|
||||||
|
- [x] 无头渲染输出 1200x800 高清效果图 `image.png`。
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
# 设备数据库管理 - 工业级 UI 重构设计规范 (Design Spec)
|
||||||
|
|
||||||
|
## 1. 架构与定位 (Architecture & Positioning)
|
||||||
|
|
||||||
|
本模块作为智能充电机柜与手环硬件群控系统的核心遥测与数据库中枢,主要承担全量已登记 BLE 蓝牙智能手环的状态监控、实时电量/固件遥测、任意设备勾选批量历史健康数据同步、时间范围筛选与群组解绑等高可用功能。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. 设计规范与色彩系统 (Design Tokens & Color Palette)
|
||||||
|
|
||||||
|
严格对齐项目主色调 `#2563EB` 与调和语义色规范:
|
||||||
|
|
||||||
|
| Token 变量名 | 色值 / 规范 | 应用场景 |
|
||||||
|
| :--- | :--- | :--- |
|
||||||
|
| `--color-primary` | `#2563EB` (Royal Blue) | 主品牌色、选中态边框、勾选框高亮、主按钮背景 |
|
||||||
|
| `--color-primary-dark` | `#1D4ED8` | 主按钮悬停与渐变深色端 |
|
||||||
|
| `--color-primary-light` | `#EFF6FF` | 选中卡片底色、聚焦外发光底色 |
|
||||||
|
| `--color-primary-border` | `#DBEAFE` | 聚焦与选中态外边框 |
|
||||||
|
| `--color-primary-gradient` | `linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%)` | 贯穿式批量同步主按钮背景 |
|
||||||
|
| `--color-warning` | `#D97706` (Amber) | 未绑定状态指示文字与标签 |
|
||||||
|
| `--color-warning-bg` | `#FFFBEB` | 未绑定状态胶囊浅色底 |
|
||||||
|
| `--color-warning-border` | `#FDE68A` | 未绑定状态胶囊边框 |
|
||||||
|
| `--color-danger` | `#E11D48` (Rose) | 批量解绑全部高风险危险操作按钮 |
|
||||||
|
| `--color-danger-bg` | `#FFF1F2` | 危险按钮次级浅底 |
|
||||||
|
| `--color-danger-border` | `#FFE4E6` | 危险按钮次级边框 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. 布局与比例规范 (Layout & Ratio)
|
||||||
|
|
||||||
|
采用与语言设置、版型切换深度对齐的 **360px : 1fr** 经典双栏比例:
|
||||||
|
- **左侧 360px 充电机柜遥测大盘**:
|
||||||
|
- 机柜遥测标题与副标题描述;
|
||||||
|
- 核心指标卡:已登记手环总数(`7 台`)、未绑定待分配总数(`7 台`);
|
||||||
|
- 默认历史同步时间选择器(支持 1天/3天/7天/14天/30天 下拉自由切换);
|
||||||
|
- 贯穿式全宽动态主按钮 `开始同步已选手环 (N 台)`(联动右侧勾选计数,0 台时自动置灰禁用);
|
||||||
|
- 次级贯穿式操作按钮 `批量解绑全部`(二次确认后清空并切换空状态)。
|
||||||
|
- **右侧 1fr 手环设备清单**:
|
||||||
|
- 顶部工具栏:标题 + `全选` / `清除` 快捷操作;
|
||||||
|
- 7 台 BLE 手环卡片流,每张卡片支持任意点击或勾选复选框,显示设备广播名、电量、固件、最后同步时间及未绑定标签。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. 交付文件清单 (Deliverables)
|
||||||
|
|
||||||
|
1. `baseline_ui.html`:生产级无头渲染 HTML 源代码。
|
||||||
|
2. `image.png`:1200x800 高清定稿预览效果截图。
|
||||||
|
3. `DESIGN_SPEC.md`:本设计规范。
|
||||||
|
4. `implementation_plan.md`:原生与前端工程实施方案。
|
||||||
|
5. `CARD-20260817-UITask-设备数据库管理.md`:JIRA 重构研发任务卡。
|
||||||
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 60 KiB |
@@ -0,0 +1,454 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>设备数据库管理 - Master-Detail Inset Station (360px 1fr)</title>
|
||||||
|
<style>
|
||||||
|
/* =========================================================================
|
||||||
|
全局统一色彩体系与 Design Tokens (严格遵循 #2563EB 规范)
|
||||||
|
========================================================================= */
|
||||||
|
:root {
|
||||||
|
--color-primary: #2563EB;
|
||||||
|
--color-primary-dark: #1D4ED8;
|
||||||
|
--color-on-primary-container: #1E40AF;
|
||||||
|
--color-primary-light: #EFF6FF;
|
||||||
|
--color-primary-container: #EFF6FF;
|
||||||
|
--color-primary-border: #DBEAFE;
|
||||||
|
--color-primary-glow: rgba(37, 99, 235, 0.22);
|
||||||
|
--color-primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
|
||||||
|
|
||||||
|
--bg: #EEF2F6;
|
||||||
|
--surface: #FFFFFF;
|
||||||
|
--surface-sub: #F8FAFC;
|
||||||
|
--text-main: #0F172A;
|
||||||
|
--text-sub: #64748B;
|
||||||
|
--text-dim: #94A3B8;
|
||||||
|
--divider: #E2E8F0;
|
||||||
|
--border-card: #E2E8F0;
|
||||||
|
|
||||||
|
--color-warning: #D97706;
|
||||||
|
--color-warning-bg: #FFFBEB;
|
||||||
|
--color-warning-border: #FDE68A;
|
||||||
|
|
||||||
|
--color-success: #059669;
|
||||||
|
--color-success-bg: #ECFDF5;
|
||||||
|
--color-success-border: #A7F3D0;
|
||||||
|
|
||||||
|
--color-danger: #E11D48;
|
||||||
|
--color-danger-bg: #FFF1F2;
|
||||||
|
--color-danger-border: #FFE4E6;
|
||||||
|
|
||||||
|
--corner-card: 16px;
|
||||||
|
--corner-item: 10px;
|
||||||
|
--content-max-width: 1160px;
|
||||||
|
--content-gutter: clamp(16px, 2.5vw, 32px);
|
||||||
|
--appbar-height: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Segoe UI", Roboto, sans-serif;
|
||||||
|
background: var(--bg); color: var(--text-main); min-height: 100vh;
|
||||||
|
padding: var(--content-gutter); display: flex; flex-direction: column; -webkit-font-smoothing: antialiased;
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-wrapper {
|
||||||
|
width: 100%; max-width: var(--content-max-width); margin: 0 auto; background: var(--surface);
|
||||||
|
border-radius: 20px; border: 1px solid var(--divider); box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.08);
|
||||||
|
overflow: hidden; position: relative; min-height: 660px; display: flex; flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 1. AppBar */
|
||||||
|
.appbar {
|
||||||
|
height: var(--appbar-height); display: flex; align-items: center; justify-content: space-between;
|
||||||
|
padding: 0 20px; border-bottom: 1px solid var(--divider); background: var(--surface); flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.appbar-left { display: flex; align-items: center; }
|
||||||
|
.appbar-nav, .appbar-more {
|
||||||
|
width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
|
||||||
|
cursor: pointer; background: transparent; border: none; transition: all 0.15s ease;
|
||||||
|
}
|
||||||
|
.appbar-nav:hover, .appbar-more:hover { background: rgba(15, 23, 42, 0.06); transform: scale(0.96); }
|
||||||
|
.appbar-nav svg, .appbar-more svg { width: 22px; height: 22px; fill: var(--text-main); }
|
||||||
|
.appbar-title { font-size: 19px; font-weight: 700; margin-left: 10px; }
|
||||||
|
|
||||||
|
/* 2. 经典 360px 1fr 双栏布局 */
|
||||||
|
.station-split-body {
|
||||||
|
padding: clamp(20px, 2.5vw, 30px); background: #F8FAFC; flex: 1; overflow-y: auto;
|
||||||
|
display: grid; grid-template-columns: 360px 1fr; gap: 20px; max-height: calc(100vh - 120px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 左侧 360px 充电机柜控制面板 */
|
||||||
|
.station-side-panel {
|
||||||
|
background: white; border: 1.5px solid var(--divider); border-radius: 16px; padding: 22px;
|
||||||
|
display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
|
||||||
|
box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-header-title { font-size: 17.5px; font-weight: 700; color: var(--color-primary); display: flex; align-items: center; gap: 8px; }
|
||||||
|
.panel-header-desc { font-size: 12.5px; color: var(--text-sub); margin-top: 4px; }
|
||||||
|
|
||||||
|
.stat-metric-card {
|
||||||
|
background: #F8FAFC; border: 1px solid var(--divider); border-radius: 10px; padding: 12px 14px;
|
||||||
|
display: flex; justify-content: space-between; align-items: center;
|
||||||
|
}
|
||||||
|
.stat-label { font-size: 13px; font-weight: 600; color: var(--text-sub); }
|
||||||
|
.stat-val { font-size: 16px; font-weight: 700; font-family: ui-monospace, monospace; color: var(--color-primary); }
|
||||||
|
|
||||||
|
.control-field-block { display: flex; flex-direction: column; gap: 8px; }
|
||||||
|
.field-caption { font-size: 13px; font-weight: 700; color: var(--text-main); }
|
||||||
|
.time-select-control {
|
||||||
|
width: 100%; height: 40px; background: white; border: 1.5px solid #CBD5E1; border-radius: 8px;
|
||||||
|
padding: 0 12px; font-size: 13.5px; font-weight: 700; color: var(--text-main); outline: none; cursor: pointer;
|
||||||
|
transition: all 0.15s ease;
|
||||||
|
}
|
||||||
|
.time-select-control:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
|
||||||
|
|
||||||
|
/* 左侧贯穿式操作按钮 */
|
||||||
|
.side-actions-group { display: flex; flex-direction: column; gap: 10px; }
|
||||||
|
|
||||||
|
.btn-dynamic-full {
|
||||||
|
width: 100%; height: 44px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
|
||||||
|
display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.15s ease;
|
||||||
|
border: 1.5px solid transparent;
|
||||||
|
}
|
||||||
|
.btn-primary-full {
|
||||||
|
background: var(--color-primary-gradient); color: white;
|
||||||
|
box-shadow: 0 4px 12px var(--color-primary-glow);
|
||||||
|
}
|
||||||
|
.btn-primary-full:hover { transform: translateY(-1px); box-shadow: 0 6px 16px var(--color-primary-glow); }
|
||||||
|
.btn-primary-full:disabled { background: #CBD5E1; cursor: not-allowed; box-shadow: none; }
|
||||||
|
|
||||||
|
.btn-danger-full {
|
||||||
|
background: var(--color-danger-bg); color: var(--color-danger); border-color: var(--color-danger-border);
|
||||||
|
}
|
||||||
|
.btn-danger-full:hover { background: #FFE4E6; border-color: var(--color-danger); }
|
||||||
|
|
||||||
|
/* 右侧 1fr 设备卡片矩阵 */
|
||||||
|
.devices-main-panel {
|
||||||
|
background: white; border: 1.5px solid var(--divider); border-radius: 16px; padding: 20px;
|
||||||
|
display: flex; flex-direction: column; gap: 12px; overflow-y: auto;
|
||||||
|
box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-header-row {
|
||||||
|
display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px;
|
||||||
|
border-bottom: 1px solid var(--divider);
|
||||||
|
}
|
||||||
|
.header-title-text { font-size: 14.5px; font-weight: 700; color: var(--text-main); }
|
||||||
|
.header-tools-group { display: flex; align-items: center; gap: 10px; }
|
||||||
|
.btn-tool-action {
|
||||||
|
background: transparent; border: none; font-size: 13.5px; font-weight: 700;
|
||||||
|
color: var(--color-primary); cursor: pointer; padding: 4px 8px; border-radius: 6px;
|
||||||
|
}
|
||||||
|
.btn-tool-action:hover { background: var(--color-primary-light); }
|
||||||
|
.btn-tool-action.dim { color: var(--text-sub); }
|
||||||
|
.btn-tool-action.dim:hover { background: #F1F5F9; color: var(--text-main); }
|
||||||
|
|
||||||
|
/* 单条设备卡片 */
|
||||||
|
.dev-inset-row {
|
||||||
|
border: 1.5px solid var(--divider); border-radius: 12px; padding: 14px 18px;
|
||||||
|
display: flex; align-items: center; justify-content: space-between; gap: 16px;
|
||||||
|
transition: all 0.15s ease; cursor: pointer; user-select: none;
|
||||||
|
}
|
||||||
|
.dev-inset-row:hover { border-color: var(--color-primary); background: #F8FAFC; }
|
||||||
|
.dev-inset-row.selected { border-color: var(--color-primary); background: var(--color-primary-light); }
|
||||||
|
|
||||||
|
.dev-row-left { display: flex; align-items: center; gap: 14px; }
|
||||||
|
.dev-chk { width: 18px; height: 18px; accent-color: var(--color-primary); cursor: pointer; }
|
||||||
|
.dev-title-code { font-size: 15px; font-weight: 700; font-family: ui-monospace, monospace; color: var(--text-main); }
|
||||||
|
.dev-meta-sub { font-size: 12.5px; color: var(--text-sub); margin-top: 3px; display: flex; gap: 12px; flex-wrap: wrap; }
|
||||||
|
.dev-meta-sub span b { color: var(--text-main); font-weight: 600; font-family: ui-monospace, monospace; }
|
||||||
|
|
||||||
|
.dev-row-right { display: flex; align-items: center; gap: 10px; }
|
||||||
|
.badge-unbound {
|
||||||
|
background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid var(--color-warning-border);
|
||||||
|
padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 空状态容器 */
|
||||||
|
.empty-station-container {
|
||||||
|
display: none; flex-direction: column; align-items: center; justify-content: center;
|
||||||
|
gap: 16px; padding: 60px 20px; flex: 1;
|
||||||
|
}
|
||||||
|
.empty-icon-box {
|
||||||
|
width: 72px; height: 72px; border-radius: 18px; background: #F1F5F9; border: 1.5px solid var(--divider);
|
||||||
|
display: flex; align-items: center; justify-content: center;
|
||||||
|
}
|
||||||
|
.empty-icon-box svg { width: 36px; height: 36px; fill: var(--text-sub); }
|
||||||
|
.empty-msg-text { font-size: 15px; font-weight: 700; color: var(--text-sub); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="device-wrapper">
|
||||||
|
<header class="appbar">
|
||||||
|
<div class="appbar-left">
|
||||||
|
<button class="appbar-nav" title="返回"><svg viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg></button>
|
||||||
|
<h1 class="appbar-title">设备数据库管理</h1>
|
||||||
|
</div>
|
||||||
|
<button class="appbar-more"><svg viewBox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></button>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="station-split-body">
|
||||||
|
<!-- 左侧 360px 充电机柜控制中心 -->
|
||||||
|
<div class="station-side-panel">
|
||||||
|
<div style="display: flex; flex-direction: column; gap: 14px;">
|
||||||
|
<div>
|
||||||
|
<h2 class="panel-header-title">📡 设备数据库</h2>
|
||||||
|
<p class="panel-header-desc">统一充电与状态管理</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="stat-metric-card">
|
||||||
|
<span class="stat-label">已登记手环总数</span>
|
||||||
|
<span class="stat-val" id="totalDevCountText">7 台</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="stat-metric-card">
|
||||||
|
<span class="stat-label">未绑定待分配</span>
|
||||||
|
<span class="stat-val" style="color: var(--color-warning);" id="unboundCountText">7 台</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-field-block">
|
||||||
|
<div class="field-caption">默认同步天数</div>
|
||||||
|
<select class="time-select-control" id="syncTimeSelect" onchange="handleTimeChange(this.value)">
|
||||||
|
<option value="1">1 天 (今日)</option>
|
||||||
|
<option value="3">3 天</option>
|
||||||
|
<option value="7" selected>7 天</option>
|
||||||
|
<option value="14">14 天</option>
|
||||||
|
<option value="30">30 天</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="side-actions-group">
|
||||||
|
<button class="btn-dynamic-full btn-primary-full" id="btnBatchSync" onclick="startBatchSync()">
|
||||||
|
<svg style="width: 16px; height: 16px; fill: currentColor;" viewBox="0 0 24 24"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></svg>
|
||||||
|
<span id="btnBatchSyncText">批量同步 (已选 2 台)</span>
|
||||||
|
</button>
|
||||||
|
<button class="btn-dynamic-full btn-danger-full" onclick="triggerUnbindAll()">
|
||||||
|
<svg style="width: 16px; height: 16px; fill: currentColor;" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
|
||||||
|
<span>批量解绑全部</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 右侧 1fr 设备勾选与详情矩阵 -->
|
||||||
|
<div class="devices-main-panel" id="devicesMainPanel">
|
||||||
|
<div class="device-header-row">
|
||||||
|
<span class="header-title-text">设备列表</span>
|
||||||
|
<div class="header-tools-group">
|
||||||
|
<button class="btn-tool-action" onclick="toggleSelectAll(true)">全选</button>
|
||||||
|
<button class="btn-tool-action dim" onclick="toggleSelectAll(false)">清除</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="deviceListContainer" style="display: flex; flex-direction: column; gap: 10px;">
|
||||||
|
<!-- 1. 33X_BLE_62200024 -->
|
||||||
|
<div class="dev-inset-row selected" onclick="toggleDeviceRow(this)">
|
||||||
|
<div class="dev-row-left">
|
||||||
|
<input type="checkbox" class="dev-chk" checked onclick="event.stopPropagation(); updateSelectionSummary();">
|
||||||
|
<div>
|
||||||
|
<div class="dev-title-code">33X_BLE_62200024</div>
|
||||||
|
<div class="dev-meta-sub">
|
||||||
|
<span>电量: <b>未知</b></span>
|
||||||
|
<span>固件: <b>未知</b></span>
|
||||||
|
<span>最后同步: <b>2026-08-12 14:32:25</b></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dev-row-right">
|
||||||
|
<span class="badge-unbound">未绑定</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 2. 33X_BLE_2200002 -->
|
||||||
|
<div class="dev-inset-row selected" onclick="toggleDeviceRow(this)">
|
||||||
|
<div class="dev-row-left">
|
||||||
|
<input type="checkbox" class="dev-chk" checked onclick="event.stopPropagation(); updateSelectionSummary();">
|
||||||
|
<div>
|
||||||
|
<div class="dev-title-code">33X_BLE_2200002</div>
|
||||||
|
<div class="dev-meta-sub">
|
||||||
|
<span>电量: <b>未知</b></span>
|
||||||
|
<span>固件: <b>未知</b></span>
|
||||||
|
<span>最后同步: <b>2026-08-12 14:32:25</b></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dev-row-right">
|
||||||
|
<span class="badge-unbound">未绑定</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 3. 33X_BLE_62200025 -->
|
||||||
|
<div class="dev-inset-row" onclick="toggleDeviceRow(this)">
|
||||||
|
<div class="dev-row-left">
|
||||||
|
<input type="checkbox" class="dev-chk" onclick="event.stopPropagation(); updateSelectionSummary();">
|
||||||
|
<div>
|
||||||
|
<div class="dev-title-code">33X_BLE_62200025</div>
|
||||||
|
<div class="dev-meta-sub">
|
||||||
|
<span>电量: <b>未知</b></span>
|
||||||
|
<span>固件: <b>未知</b></span>
|
||||||
|
<span>最后同步: <b>2026-08-12 14:32:25</b></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dev-row-right">
|
||||||
|
<span class="badge-unbound">未绑定</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 4. 33X_BLE_22000005 -->
|
||||||
|
<div class="dev-inset-row" onclick="toggleDeviceRow(this)">
|
||||||
|
<div class="dev-row-left">
|
||||||
|
<input type="checkbox" class="dev-chk" onclick="event.stopPropagation(); updateSelectionSummary();">
|
||||||
|
<div>
|
||||||
|
<div class="dev-title-code">33X_BLE_22000005</div>
|
||||||
|
<div class="dev-meta-sub">
|
||||||
|
<span>电量: <b>未知</b></span>
|
||||||
|
<span>固件: <b>未知</b></span>
|
||||||
|
<span>最后同步: <b>2026-08-12 14:32:25</b></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dev-row-right">
|
||||||
|
<span class="badge-unbound">未绑定</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 5. 33X_BLE_62200014 -->
|
||||||
|
<div class="dev-inset-row" onclick="toggleDeviceRow(this)">
|
||||||
|
<div class="dev-row-left">
|
||||||
|
<input type="checkbox" class="dev-chk" onclick="event.stopPropagation(); updateSelectionSummary();">
|
||||||
|
<div>
|
||||||
|
<div class="dev-title-code">33X_BLE_62200014</div>
|
||||||
|
<div class="dev-meta-sub">
|
||||||
|
<span>电量: <b>未知</b></span>
|
||||||
|
<span>固件: <b>未知</b></span>
|
||||||
|
<span>最后同步: <b>2026-08-12 14:32:25</b></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dev-row-right">
|
||||||
|
<span class="badge-unbound">未绑定</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 6. 33X_BLE_22000024 -->
|
||||||
|
<div class="dev-inset-row" onclick="toggleDeviceRow(this)">
|
||||||
|
<div class="dev-row-left">
|
||||||
|
<input type="checkbox" class="dev-chk" onclick="event.stopPropagation(); updateSelectionSummary();">
|
||||||
|
<div>
|
||||||
|
<div class="dev-title-code">33X_BLE_22000024</div>
|
||||||
|
<div class="dev-meta-sub">
|
||||||
|
<span>电量: <b>未知</b></span>
|
||||||
|
<span>固件: <b>未知</b></span>
|
||||||
|
<span>最后同步: <b>2026-08-12 14:32:25</b></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dev-row-right">
|
||||||
|
<span class="badge-unbound">未绑定</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 7. 33X_BLE_22000009 -->
|
||||||
|
<div class="dev-inset-row" onclick="toggleDeviceRow(this)">
|
||||||
|
<div class="dev-row-left">
|
||||||
|
<input type="checkbox" class="dev-chk" onclick="event.stopPropagation(); updateSelectionSummary();">
|
||||||
|
<div>
|
||||||
|
<div class="dev-title-code">33X_BLE_22000009</div>
|
||||||
|
<div class="dev-meta-sub">
|
||||||
|
<span>电量: <b>未知</b></span>
|
||||||
|
<span>固件: <b>未知</b></span>
|
||||||
|
<span>最后同步: <b>2026-08-12 14:32:25</b></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dev-row-right">
|
||||||
|
<span class="badge-unbound">未绑定</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 空状态提示 (当解绑清空后展示) -->
|
||||||
|
<div class="empty-station-container" id="emptyStationContainer">
|
||||||
|
<div class="empty-icon-box">
|
||||||
|
<svg viewBox="0 0 24 24"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/></svg>
|
||||||
|
</div>
|
||||||
|
<div class="empty-msg-text">没有发现已注册的设备</div>
|
||||||
|
<button class="btn-dynamic-full btn-primary-full" style="width: auto; padding: 0 24px;" onclick="restoreDevicesList()">+ 重新扫描/注册设备</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function toggleDeviceRow(row) {
|
||||||
|
const chk = row.querySelector('.dev-chk');
|
||||||
|
chk.checked = !chk.checked;
|
||||||
|
if (chk.checked) row.classList.add('selected');
|
||||||
|
else row.classList.remove('selected');
|
||||||
|
updateSelectionSummary();
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleSelectAll(select) {
|
||||||
|
document.querySelectorAll('.dev-inset-row').forEach(row => {
|
||||||
|
const chk = row.querySelector('.dev-chk');
|
||||||
|
chk.checked = select;
|
||||||
|
if (select) row.classList.add('selected');
|
||||||
|
else row.classList.remove('selected');
|
||||||
|
});
|
||||||
|
updateSelectionSummary();
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateSelectionSummary() {
|
||||||
|
const checkedBoxes = document.querySelectorAll('.dev-chk:checked');
|
||||||
|
const count = checkedBoxes.length;
|
||||||
|
const btn = document.getElementById('btnBatchSync');
|
||||||
|
const text = document.getElementById('btnBatchSyncText');
|
||||||
|
if (count === 0) {
|
||||||
|
btn.disabled = true;
|
||||||
|
text.innerText = '请勾选要同步的手环';
|
||||||
|
} else {
|
||||||
|
btn.disabled = false;
|
||||||
|
text.innerText = `开始同步已选手环 (${count} 台)`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleTimeChange(val) {
|
||||||
|
// 动态响应时间配置
|
||||||
|
console.log(`同步时间范围更新为: ${val} 天`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function startBatchSync() {
|
||||||
|
const count = document.querySelectorAll('.dev-chk:checked').length;
|
||||||
|
const days = document.getElementById('syncTimeSelect').value;
|
||||||
|
const text = document.getElementById('btnBatchSyncText');
|
||||||
|
text.innerText = `正在回传 ${count} 台手环 (${days}天数据)...`;
|
||||||
|
setTimeout(() => {
|
||||||
|
alert(`已成功同步 ${count} 台手环过去 ${days} 天的历史健康数据!`);
|
||||||
|
text.innerText = `开始同步已选手环 (${count} 台)`;
|
||||||
|
}, 1200);
|
||||||
|
}
|
||||||
|
|
||||||
|
function triggerUnbindAll() {
|
||||||
|
if (confirm('确认要解绑全部已登记设备吗?解绑后设备数据库将被清空。')) {
|
||||||
|
document.getElementById('deviceListContainer').style.display = 'none';
|
||||||
|
document.getElementById('emptyStationContainer').style.display = 'flex';
|
||||||
|
document.getElementById('totalDevCountText').innerText = '0 台';
|
||||||
|
document.getElementById('unboundCountText').innerText = '0 台';
|
||||||
|
updateSelectionSummary();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function restoreDevicesList() {
|
||||||
|
document.getElementById('deviceListContainer').style.display = 'flex';
|
||||||
|
document.getElementById('emptyStationContainer').style.display = 'none';
|
||||||
|
document.getElementById('totalDevCountText').innerText = '7 台';
|
||||||
|
document.getElementById('unboundCountText').innerText = '7 台';
|
||||||
|
toggleSelectAll(true);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
After Width: | Height: | Size: 115 KiB |
@@ -0,0 +1,48 @@
|
|||||||
|
# 设备数据库管理 - 工程实施方案 (Implementation Plan)
|
||||||
|
|
||||||
|
## 1. 数据模型与接口规范 (Data Model & Schema)
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
export interface BleDeviceRecord {
|
||||||
|
id: string; // 设备唯一标识 (UUID / MAC)
|
||||||
|
broadcastName: string; // 广播名 (例: 33X_BLE_62200024)
|
||||||
|
batteryLevel: number | null; // 电量百分比 (null 代表未知)
|
||||||
|
firmwareVersion: string | null; // 固件版本号 (例: "v1.4.2" 或 null)
|
||||||
|
lastSyncTimestamp: string; // 最后同步时间 ISO 格式
|
||||||
|
isBound: boolean; // 是否绑定学员
|
||||||
|
boundStudentId?: string; // 绑定学员 ID
|
||||||
|
selectedForSync: boolean; // 批量同步勾选状态
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SyncConfig {
|
||||||
|
syncDaysRange: 1 | 3 | 7 | 14 | 30; // 默认同步天数
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. 状态机与联动流程 (State Machine & Workflow)
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
stateDiagram-v2
|
||||||
|
[*] --> IdleLoaded: 载入已登记手环列表 (7台)
|
||||||
|
IdleLoaded --> DeviceSelected: 用户勾选/点击卡片 (任意 1~N 台)
|
||||||
|
DeviceSelected --> IdleLoaded: 用户取消勾选 (0台禁用主按钮)
|
||||||
|
DeviceSelected --> BatchSyncing: 点击【开始同步已选手环 (N台)】
|
||||||
|
BatchSyncing --> SyncSuccess: BLE 数据包多通道回传完成
|
||||||
|
SyncSuccess --> IdleLoaded: 刷新最后同步时间戳
|
||||||
|
IdleLoaded --> EmptyState: 点击【批量解绑全部】并确认二次弹窗
|
||||||
|
EmptyState --> IdleLoaded: 点击【+ 重新扫描/注册设备】恢复列表
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. 原生实施映射 (Native Implementation Mapping)
|
||||||
|
|
||||||
|
- **Android (Kotlin / Jetpack Compose)**:
|
||||||
|
- 左侧采用 `Card(modifier = Modifier.width(360.dp))` 配合 `DropdownMenu` 实现同步时间配置;
|
||||||
|
- 右侧采用 `LazyColumn` 配合 `Checkbox` 与 `SelectableCard` 实现高流畅度多选列表;
|
||||||
|
- 批量同步调度器基于 `WorkManager` + BLE GATT 并发多连接队列。
|
||||||
|
- **Flutter**:
|
||||||
|
- `Row(children: [SizedBox(width: 360, child: StationControlPanel()), Expanded(child: DeviceListView())])`;
|
||||||
|
- 状态管理推荐 `Riverpod` 或 `Bloc` 管理 `selectedDeviceIds` 集合与 `syncDays`。
|
||||||