fix(ui): 优化用户管理顶部用户表下拉选择器控件形态与交互

This commit is contained in:
zhy200308
2026-08-17 18:06:07 +08:00
parent 96c82ad25d
commit 393f1a97f4
3 changed files with 358 additions and 13 deletions
@@ -0,0 +1,195 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>方案 1:Telemetry Card Flow 流式遥测设备库 (推荐·家族风)</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;
--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;
}
.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; 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; }
.status-banner {
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;
}
.banner-info { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--text-main); }
.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);
display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s ease;
}
.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 {
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);
}
.device-card-row {
background: white; border: 1.5px solid var(--divider); border-radius: 14px; 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;
}
.device-card-row: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-title { font-size: 16px; font-weight: 700; font-family: ui-monospace, monospace; color: var(--text-main); }
.dev-subline { font-size: 12.5px; color: var(--text-sub); display: flex; gap: 14px; }
.dev-subline span b { color: var(--text-main); font-weight: 600; }
.dev-status-badge {
padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 700;
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);
}
</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>
<div class="status-banner">
<div class="banner-info">
<span>📡 设备数据库 (统一充电与状态管理)</span>
<span class="banner-badge">已登记: 7 台</span>
</div>
<div class="banner-actions">
<button class="btn-sync-all" onclick="alert('正在批量同步所有手环电量与固件状态...')">
<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>
</button>
<button class="btn-unbind-all" onclick="confirm('确认要解绑全部已登记设备吗?')">
<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>
</button>
</div>
</div>
<main class="device-list-body">
<!-- 33X_BLE_62200024 -->
<div class="device-card-row">
<div class="dev-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>
<div class="dev-info">
<div class="dev-title">33X_BLE_62200024</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 class="dev-status-badge">未绑定</div>
</div>
<!-- 33X_BLE_2200002 -->
<div class="device-card-row">
<div class="dev-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>
<div class="dev-info">
<div class="dev-title">33X_BLE_2200002</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 class="dev-status-badge">未绑定</div>
</div>
<!-- 33X_BLE_62200025 -->
<div class="device-card-row">
<div class="dev-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>
<div class="dev-info">
<div class="dev-title">33X_BLE_62200025</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 class="dev-status-badge">未绑定</div>
</div>
</main>
</div>
</body>
</html>