Files
zkxw/docs/ui-demos/scheme-d-top-mega-bento-tech-blue.html
T
2026-06-12 10:37:56 +08:00

1180 lines
42 KiB
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>方案 D · 科技蓝组件库 Demo — 中科兴皖</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
<style>
:root {
--primary: #3b82f6;
--primary-dark: #2563eb;
--primary-deep: #1d4ed8;
--primary-light: #60a5fa;
--primary-bg: #f5f9ff;
--primary-glow: rgba(59, 130, 246, 0.35);
--text: #1e293b;
--text-muted: #64748b;
--border: #e8f0fe;
--surface: #ffffff;
--bg-page: #fafcff;
--table-head: #f8fafc;
--row-alt: #fafbfc;
--row-hover: #f1f5ff;
--radius: 10px;
--shadow: 0 1px 3px rgba(59, 130, 246, 0.05);
}
* { box-sizing: border-box; }
body {
margin: 0;
min-height: 100vh;
font-family: Inter, -apple-system, sans-serif;
font-size: 14px;
color: var(--text);
background: linear-gradient(180deg, #fefefe 0%, #fafcff 45%, #f8fbff 100%);
position: relative;
}
body::before {
content: "";
position: fixed;
inset: 0;
z-index: 0;
pointer-events: none;
background-image:
linear-gradient(rgba(59, 130, 246, 0.025) 1px, transparent 1px),
linear-gradient(90deg, rgba(59, 130, 246, 0.025) 1px, transparent 1px);
background-size: 48px 48px;
mask-image: linear-gradient(180deg, black 0%, transparent 55%);
}
/* 顶栏 */
.topbar {
height: 56px;
padding: 0 24px;
display: flex;
align-items: center;
gap: 24px;
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(14px);
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 50;
}
.logo {
display: flex;
align-items: center;
gap: 8px;
font-weight: 700;
font-size: 15px;
flex-shrink: 0;
color: #0f172a;
}
.logo-mark {
width: 28px;
height: 28px;
border-radius: 8px;
background: linear-gradient(135deg, var(--primary-light), var(--primary));
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 0 16px var(--primary-glow);
}
.logo span { color: var(--primary); }
.mega-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.mega-item {
position: relative;
padding: 8px 14px;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
color: var(--text-muted);
cursor: pointer;
transition: all 0.15s;
}
.mega-item:hover { background: var(--primary-bg); color: var(--primary-dark); }
.mega-item.active {
background: var(--primary);
color: #fff;
box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.search-pill {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 14px;
border-radius: 999px;
background: var(--primary-bg);
border: 1px solid var(--border);
font-size: 13px;
color: var(--text-muted);
}
.avatar {
width: 32px;
height: 32px;
border-radius: 50%;
background: linear-gradient(135deg, var(--primary-light), var(--primary));
border: 2px solid #fff;
}
.content {
padding: 24px;
max-width: 1320px;
margin: 0 auto;
position: relative;
z-index: 1;
}
/* 内容 Tab */
.tabs-strip {
display: flex;
flex-wrap: wrap;
align-items: flex-end;
gap: 4px;
margin: 0 0 20px;
padding: 0 2px 10px;
border-bottom: 1px solid var(--border);
}
.tab-chip {
appearance: none;
border: 1px solid var(--border);
background: var(--surface);
color: var(--text-muted);
font-size: 13px;
font-weight: 600;
font-family: inherit;
padding: 8px 16px;
border-radius: 8px 8px 0 0;
cursor: pointer;
margin-bottom: -11px;
position: relative;
z-index: 1;
transition: all 0.15s;
}
.tab-chip:hover { color: var(--text); background: var(--row-alt); }
.tab-chip.is-active {
color: var(--primary-dark);
background: var(--surface);
border-bottom-color: var(--surface);
box-shadow: 0 -2px 0 var(--primary) inset;
z-index: 2;
}
.tab-panel { display: none; animation: fade-in 0.2s ease; }
.tab-panel.is-active { display: block; }
@keyframes fade-in { from { opacity: 0.85; } to { opacity: 1; } }
.section-head { margin-bottom: 16px; }
.section-head h1 { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: #0f172a; }
.section-head p { margin: 0; font-size: 13px; color: var(--text-muted); }
/* ===== 面板 / 列表 ===== */
.panel {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow);
overflow: hidden;
margin-bottom: 24px;
}
.panel-top {
padding: 12px 16px;
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.title-bar-heading {
margin: 0;
font-size: 15px;
font-weight: 700;
display: flex;
align-items: center;
gap: 10px;
}
.title-bar-heading::before {
content: "";
width: 4px;
height: 18px;
background: linear-gradient(180deg, var(--primary-light), var(--primary));
border-radius: 2px;
}
.filter-block {
padding: 12px 16px 10px;
border-bottom: 1px solid var(--border);
}
.filter-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px 14px;
margin-bottom: 10px;
}
@media (max-width: 900px) { .filter-grid { grid-template-columns: repeat(2, 1fr); } }
.filter-field label {
display: block;
font-size: 11px;
font-weight: 500;
color: var(--text-muted);
margin-bottom: 4px;
}
.input, .select {
width: 100%;
height: 36px;
padding: 0 12px;
border: 1px solid var(--border);
border-radius: 8px;
font-size: 14px;
font-family: inherit;
color: var(--text);
background: var(--surface);
}
.select {
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 12px center;
padding-right: 32px;
cursor: pointer;
}
.input:focus, .select:focus, .textarea:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
}
.filter-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 10px;
padding-top: 10px;
}
.filter-actions-end { display: flex; gap: 8px; }
.btn {
height: 36px;
padding: 0 14px;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
font-family: inherit;
cursor: pointer;
border: 1px solid var(--border);
background: var(--surface);
color: var(--text);
display: inline-flex;
align-items: center;
gap: 6px;
transition: all 0.15s;
}
.btn:hover { background: var(--row-hover); border-color: #cbd5e1; }
.btn-primary {
background: var(--primary);
border-color: var(--primary);
color: #fff;
box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.list-body { border-top: 1px solid var(--border); }
.list-toolbar-row {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
padding: 8px 16px;
background: var(--table-head);
border-bottom: 1px solid var(--border);
}
.list-toolbar-selected {
font-size: 12px;
font-weight: 600;
color: var(--text-muted);
padding-right: 10px;
margin-right: 4px;
border-right: 1px solid var(--border);
line-height: 36px;
}
.sel-num { color: var(--primary-dark); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.list-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
min-width: 960px;
}
.list-table th, .list-table td {
padding: 11px 16px;
text-align: left;
border-bottom: 1px solid var(--border);
}
.list-table th {
font-size: 12px;
font-weight: 600;
color: var(--text-muted);
background: var(--table-head);
}
.list-table tbody tr:nth-child(even) td { background: var(--row-alt); }
.list-table tbody tr:hover td { background: var(--row-hover); }
.list-table .th-op, .list-table .td-op {
position: sticky;
right: 0;
min-width: 260px;
text-align: center;
background: inherit;
box-shadow: -4px 0 8px rgba(15, 23, 42, 0.04);
}
.list-table thead .th-op { background: var(--table-head); z-index: 2; }
.cell-ops {
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
gap: 6px;
}
.btn-op {
height: 28px;
padding: 0 8px;
font-size: 12px;
font-weight: 600;
border-radius: 6px;
border: 1px solid var(--border);
background: var(--surface);
cursor: pointer;
font-family: inherit;
color: var(--text);
display: inline-flex;
align-items: center;
gap: 4px;
white-space: nowrap;
transition: all 0.15s;
}
.btn-op:hover { background: var(--primary-bg); border-color: var(--primary); color: var(--primary-dark); }
.btn-op.danger:hover { background: #fef2f2; border-color: #fca5a5; color: #dc2626; }
.tag {
display: inline-block;
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
font-weight: 600;
}
.tag.success { background: var(--primary-bg); color: var(--primary-dark); }
.tag.warning { background: #fffbeb; color: #d97706; }
.tag.info { background: #f1f5f9; color: #64748b; }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-muted); }
.list-pager {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 10px;
padding: 8px 16px;
border-top: 1px solid var(--border);
}
.pager-meta { font-size: 13px; color: var(--text-muted); }
.pager-controls { display: flex; align-items: center; gap: 8px; }
.pager-num {
min-width: 32px;
height: 32px;
padding: 0 8px;
font-size: 13px;
border-radius: 8px;
}
.pager-num.is-current {
background: var(--primary);
border-color: var(--primary);
color: #fff;
}
/* ===== Bento 工作台 ===== */
.bento {
display: grid;
grid-template-columns: repeat(12, 1fr);
gap: 16px;
}
.bento-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 20px;
transition: box-shadow 0.2s;
}
.bento-card.span-4 { grid-column: span 4; }
.bento-card.span-8 { grid-column: span 8; }
.bento-card.span-12 { grid-column: span 12; }
@media (max-width: 900px) {
.bento-card.span-4, .bento-card.span-8 { grid-column: span 12; }
}
.bento-card.hero-card {
background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
color: #f8fafc;
border: none;
}
.hero-card .stat {
font-family: 'JetBrains Mono', monospace;
font-size: 32px;
font-weight: 600;
color: #93c5fd;
}
.card-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.card-value { font-family: 'JetBrains Mono', monospace; font-size: 28px; font-weight: 600; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
padding: 14px 8px;
border-radius: 10px;
background: var(--primary-bg);
border: 1px solid var(--border);
text-decoration: none;
color: var(--text);
font-size: 13px;
transition: all 0.15s;
}
.quick-item:hover { border-color: var(--primary); color: var(--primary-dark); }
.quick-item svg { color: var(--primary); }
/* ===== 弹窗组件展示区 ===== */
.dialog-gallery {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
margin-bottom: 24px;
}
@media (max-width: 1100px) { .dialog-gallery { grid-template-columns: 1fr; } }
.dialog-preview-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
}
.dialog-preview-head {
padding: 12px 16px;
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
}
.dialog-preview-head h3 { margin: 0; font-size: 14px; font-weight: 700; }
.dialog-preview-body {
padding: 16px;
background: #f8fafc;
min-height: 320px;
display: flex;
align-items: flex-start;
justify-content: center;
}
.dialog-preview-body .dialog {
transform: scale(0.92);
transform-origin: top center;
width: 100%;
pointer-events: none;
}
.dialog-preview-foot {
padding: 12px 16px;
border-top: 1px solid var(--border);
display: flex;
justify-content: flex-end;
}
/* 弹窗本体 */
.backdrop {
position: fixed;
inset: 0;
background: rgba(15, 23, 42, 0.35);
backdrop-filter: none;
display: none;
align-items: flex-start;
justify-content: center;
z-index: 200;
padding: 32px 16px;
overflow-y: auto;
}
.backdrop.open { display: flex; }
.dialog {
width: 100%;
background: var(--surface);
border-radius: var(--radius);
border: 1px solid var(--border);
box-shadow: 0 16px 48px rgba(59, 130, 246, 0.12);
overflow: hidden;
display: flex;
flex-direction: column;
max-height: calc(100vh - 64px);
}
.dialog-lg { max-width: 720px; }
.dialog-view-xl { max-width: 920px; }
.dialog-head {
padding: 16px 22px;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.dialog-head h3 { margin: 0; font-size: 17px; font-weight: 600; color: #0f172a; }
.dialog-head .note { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }
.dialog-scroll {
overflow-y: auto;
padding: 20px 22px;
flex: 1;
}
.dialog-foot {
padding: 12px 22px;
border-top: 1px solid var(--border);
display: flex;
justify-content: flex-end;
gap: 8px;
background: var(--table-head);
flex-shrink: 0;
}
.form-grid-2 {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 14px 16px;
}
@media (max-width: 560px) { .form-grid-2 { grid-template-columns: 1fr; } }
.form-col-span-2 { grid-column: 1 / -1; }
.field { margin-bottom: 0; }
.field label {
display: block;
font-size: 13px;
font-weight: 500;
margin-bottom: 6px;
color: var(--text);
}
.form-label-tip { font-size: 12px; color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.textarea {
width: 100%;
min-height: 72px;
padding: 10px 12px;
border: 1px solid var(--border);
border-radius: 8px;
font-size: 14px;
font-family: inherit;
resize: vertical;
}
/* 查看弹窗 */
.view-hero {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: 16px;
padding: 20px 22px;
background: linear-gradient(135deg, var(--primary-bg) 0%, var(--surface) 55%);
border-bottom: 1px solid var(--border);
}
.view-hero-icon {
width: 56px;
height: 56px;
border-radius: 12px;
background: linear-gradient(135deg, var(--primary-light), var(--primary));
display: flex;
align-items: center;
justify-content: center;
color: #fff;
flex-shrink: 0;
}
.view-hero-main h2 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.view-hero-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.view-hero-meta { margin: 8px 0 0; font-size: 13px; color: var(--text-muted); }
.view-section { padding: 18px 22px; border-bottom: 1px solid var(--border); }
.view-section:last-child { border-bottom: none; }
.view-section h3 {
margin: 0 0 14px;
font-size: 13px;
font-weight: 700;
color: var(--text-muted);
letter-spacing: 0.04em;
}
.view-kv-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px 28px;
}
@media (max-width: 640px) { .view-kv-grid { grid-template-columns: 1fr; } }
.view-kv {
display: grid;
grid-template-columns: 96px 1fr;
gap: 4px 12px;
font-size: 13px;
}
.view-kv dt { margin: 0; color: var(--text-muted); font-weight: 500; }
.view-kv dd { margin: 0; color: var(--text); }
.scheme-badge {
position: fixed;
bottom: 16px;
right: 16px;
padding: 8px 14px;
background: rgba(15, 23, 42, 0.88);
color: #94a3b8;
border-radius: 8px;
font-size: 12px;
z-index: 100;
display: flex;
align-items: center;
gap: 10px;
}
.scheme-badge a { color: #93c5fd; text-decoration: none; }
</style>
</head>
<body>
<header class="topbar">
<div class="logo">
<div class="logo-mark">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5z"/></svg>
</div>
中科兴皖<span>一体化</span>
</div>
<nav class="mega-nav">
<div class="mega-item active">质检管理</div>
<div class="mega-item">细胞存储</div>
<div class="mega-item">生产管理</div>
<div class="mega-item">市场 · 系统</div>
</nav>
<div class="topbar-right">
<div class="search-pill">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>
搜索 ⌘K
</div>
<div class="avatar"></div>
</div>
</header>
<main class="content">
<div class="tabs-strip" role="tablist">
<button class="tab-chip is-active" data-tab="dashboard" role="tab">工作台</button>
<button class="tab-chip" data-tab="list" role="tab">列表页</button>
<button class="tab-chip" data-tab="dialogs" role="tab">弹窗组件</button>
</div>
<!-- Tab: 工作台 -->
<div class="tab-panel is-active" id="panel-dashboard">
<div class="section-head">
<h1>工作台</h1>
<p>浅蓝背景 + 电光蓝主色 #3B82F6 · Bento 宫格概览</p>
</div>
<div class="bento">
<div class="bento-card hero-card span-4">
<div class="card-label" style="color:#94a3b8">今日待办</div>
<div class="stat">18</div>
<p style="margin:8px 0 0;font-size:13px;color:#94a3b8">质检 6 · 生产 5 · 财务 4</p>
</div>
<div class="bento-card span-4">
<div class="card-label">进行中工单</div>
<div class="card-value" style="color:var(--primary)">12</div>
</div>
<div class="bento-card span-4">
<div class="card-label">本月完成率</div>
<div class="card-value" style="color:var(--primary)">96.8%</div>
</div>
<div class="bento-card span-12">
<div class="card-label">快捷入口</div>
<div class="quick-grid">
<a class="quick-item" href="#" onclick="switchTab('list');return false">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 11l3 3L22 4"/></svg>
质检工单列表
</a>
<a class="quick-item" href="#" onclick="openDialog('add');return false">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 5v14M5 12h14"/></svg>
新增弹窗
</a>
<a class="quick-item" href="#" onclick="switchTab('dialogs');return false">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"/></svg>
弹窗组件库
</a>
</div>
</div>
</div>
</div>
<!-- Tab: 列表页 -->
<div class="tab-panel" id="panel-list">
<div class="section-head">
<h1>质检工单</h1>
<p>标准列表:筛选区 → 工具栏 → 表格(含操作列)→ 分页</p>
</div>
<div class="panel">
<div class="panel-top">
<h2 class="title-bar-heading">质检工单</h2>
</div>
<div class="filter-block">
<div class="filter-grid">
<div class="filter-field">
<label>工单编号</label>
<input class="input" type="text" placeholder="请输入工单编号" />
</div>
<div class="filter-field">
<label>样本编号</label>
<input class="input" type="text" placeholder="请输入样本编号" />
</div>
<div class="filter-field">
<label>状态</label>
<select class="select">
<option>全部</option>
<option>进行中</option>
<option>已完成</option>
<option>待执行</option>
</select>
</div>
<div class="filter-field">
<label>检测项目</label>
<select class="select">
<option>全部</option>
<option>细胞活性检测</option>
<option>支原体检测</option>
</select>
</div>
</div>
<div class="filter-actions">
<button class="btn btn-link" type="button" style="border:none;background:transparent;color:var(--primary-dark);font-weight:600">展开更多条件</button>
<div class="filter-actions-end">
<button class="btn" type="button">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M7 12h10M10 18h4"/></svg>
重置
</button>
<button class="btn btn-primary" type="button">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>
查询
</button>
</div>
</div>
</div>
<div class="list-body">
<div class="list-toolbar-row">
<span class="list-toolbar-selected">已选 <span class="sel-num">1</span> 项</span>
<button class="btn btn-primary" type="button" onclick="openDialog('add')">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 5v14M5 12h14"/></svg>
新增
</button>
<button class="btn" type="button">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/></svg>
导出
</button>
<button class="btn" type="button">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>
批量删除
</button>
</div>
<div class="table-scroll">
<table class="list-table">
<thead>
<tr>
<th style="width:40px"><input type="checkbox" /></th>
<th>工单编号</th>
<th>样本编号</th>
<th>检测项目</th>
<th>状态</th>
<th>负责人</th>
<th>创建时间</th>
<th class="th-op">操作</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" checked /></td>
<td class="mono">QC-2026-0312</td>
<td class="mono">SMP-A10284</td>
<td>细胞活性检测</td>
<td><span class="tag warning">进行中</span></td>
<td>张工</td>
<td>2026-06-10 14:32</td>
<td class="td-op">
<div class="cell-ops">
<button class="btn-op" type="button" onclick="openDialog('view')">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>
查看
</button>
<button class="btn-op" type="button" onclick="openDialog('edit')">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>
编辑
</button>
<button class="btn-op danger" type="button">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>
删除
</button>
</div>
</td>
</tr>
<tr>
<td><input type="checkbox" /></td>
<td class="mono">QC-2026-0311</td>
<td class="mono">SMP-B22015</td>
<td>支原体检测</td>
<td><span class="tag success">已完成</span></td>
<td>李工</td>
<td>2026-06-09 09:15</td>
<td class="td-op">
<div class="cell-ops">
<button class="btn-op" type="button" onclick="openDialog('view')">查看</button>
<button class="btn-op" type="button" onclick="openDialog('edit')">编辑</button>
<button class="btn-op danger" type="button">删除</button>
</div>
</td>
</tr>
<tr>
<td><input type="checkbox" /></td>
<td class="mono">QC-2026-0310</td>
<td class="mono">SMP-C33008</td>
<td>无菌检测</td>
<td><span class="tag info">待执行</span></td>
<td>王工</td>
<td>2026-06-08 16:48</td>
<td class="td-op">
<div class="cell-ops">
<button class="btn-op" type="button" onclick="openDialog('view')">查看</button>
<button class="btn-op" type="button" onclick="openDialog('edit')">编辑</button>
<button class="btn-op danger" type="button">删除</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="list-pager">
<span class="pager-meta">共 128 条</span>
<div class="pager-controls">
<select class="select pager-select" style="width:auto;min-width:72px;height:32px">
<option>10</option>
<option>20</option>
<option>50</option>
</select>
<span class="pager-meta">条/页</span>
<button class="btn pager-num" disabled>上一页</button>
<button class="btn pager-num is-current">1</button>
<button class="btn pager-num">2</button>
<button class="btn pager-num">3</button>
<button class="btn pager-num">下一页</button>
</div>
</div>
</div>
</div>
</div>
<!-- Tab: 弹窗组件 -->
<div class="tab-panel" id="panel-dialogs">
<div class="section-head">
<h1>弹窗组件库</h1>
<p>新增 / 编辑 / 查看三种弹窗样式预览,点击「全屏打开」体验完整交互</p>
</div>
<div class="dialog-gallery">
<!-- 新增弹窗预览 -->
<div class="dialog-preview-card">
<div class="dialog-preview-head">
<h3>新增弹窗</h3>
<span class="tag info">dialog-lg · 两列表单</span>
</div>
<div class="dialog-preview-body">
<div class="dialog dialog-lg">
<div class="dialog-head"><h3>新增质检工单</h3></div>
<div class="dialog-scroll" style="padding:14px 16px">
<div class="form-grid-2">
<div class="field"><label>样本编号</label><input class="input" placeholder="请输入" disabled /></div>
<div class="field"><label>检测项目</label><select class="select" disabled><option>细胞活性检测</option></select></div>
<div class="field form-col-span-2"><label>备注</label><textarea class="textarea" placeholder="选填" disabled></textarea></div>
</div>
</div>
<div class="dialog-foot">
<button class="btn" disabled>取消</button>
<button class="btn btn-primary" disabled>确定</button>
</div>
</div>
</div>
<div class="dialog-preview-foot">
<button class="btn btn-primary" type="button" onclick="openDialog('add')">全屏打开</button>
</div>
</div>
<!-- 编辑弹窗预览 -->
<div class="dialog-preview-card">
<div class="dialog-preview-head">
<h3>编辑弹窗</h3>
<span class="tag info">dialog-lg · 预填数据</span>
</div>
<div class="dialog-preview-body">
<div class="dialog dialog-lg">
<div class="dialog-head"><h3>编辑质检工单</h3></div>
<div class="dialog-scroll" style="padding:14px 16px">
<div class="form-grid-2">
<div class="field"><label>工单编号</label><input class="input" value="QC-2026-0312" disabled /></div>
<div class="field"><label>状态</label><select class="select" disabled><option>进行中</option></select></div>
<div class="field"><label>负责人</label><input class="input" value="张工" disabled /></div>
<div class="field"><label>优先级</label><select class="select" disabled><option>普通</option></select></div>
</div>
</div>
<div class="dialog-foot">
<button class="btn" disabled>取消</button>
<button class="btn btn-primary" disabled>确定</button>
</div>
</div>
</div>
<div class="dialog-preview-foot">
<button class="btn btn-primary" type="button" onclick="openDialog('edit')">全屏打开</button>
</div>
</div>
<!-- 查看弹窗预览 -->
<div class="dialog-preview-card">
<div class="dialog-preview-head">
<h3>查看弹窗</h3>
<span class="tag info">dialog-view-xl · 只读</span>
</div>
<div class="dialog-preview-body">
<div class="dialog dialog-view-xl">
<div class="view-hero" style="padding:14px 16px">
<div class="view-hero-icon" style="width:40px;height:40px;border-radius:8px">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2"><path d="M9 11l3 3L22 4"/></svg>
</div>
<div class="view-hero-main">
<h2 style="font-size:15px;margin:0 0 4px">QC-2026-0312</h2>
<div class="view-hero-tags"><span class="tag warning">进行中</span></div>
</div>
</div>
<div class="view-section" style="padding:12px 16px">
<dl class="view-kv"><dt>样本编号</dt><dd>SMP-A10284</dd></dl>
</div>
<div class="dialog-foot">
<button class="btn" disabled>关闭</button>
</div>
</div>
</div>
<div class="dialog-preview-foot">
<button class="btn btn-primary" type="button" onclick="openDialog('view')">全屏打开</button>
</div>
</div>
</div>
</div>
</main>
<!-- 新增弹窗 -->
<div class="backdrop" id="backdrop-add" role="dialog" aria-modal="true">
<div class="dialog dialog-lg">
<div class="dialog-head">
<h3>新增质检工单</h3>
<p class="note">label-position=top · 两列栅格 form-grid-2</p>
</div>
<div class="dialog-scroll">
<div class="form-grid-2">
<div class="field">
<label>样本编号<span class="form-label-tip">必填</span></label>
<input class="input" type="text" placeholder="请输入样本编号" />
</div>
<div class="field">
<label>检测项目</label>
<select class="select">
<option>请选择检测项目</option>
<option>细胞活性检测</option>
<option>支原体检测</option>
<option>无菌检测</option>
</select>
</div>
<div class="field">
<label>负责人</label>
<select class="select">
<option>请选择负责人</option>
<option>张工</option>
<option>李工</option>
</select>
</div>
<div class="field">
<label>计划完成时间</label>
<input class="input" type="date" />
</div>
<div class="field form-col-span-2">
<label>检测要求<span class="form-label-tip">选填</span></label>
<textarea class="textarea" placeholder="请输入检测要求或特殊说明"></textarea>
</div>
<div class="field form-col-span-2">
<label>备注</label>
<textarea class="textarea" placeholder="请输入备注"></textarea>
</div>
</div>
</div>
<div class="dialog-foot">
<button class="btn" type="button" onclick="closeDialog('add')">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 6L6 18M6 6l12 12"/></svg>
取消
</button>
<button class="btn btn-primary" type="button" onclick="closeDialog('add')">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 6L9 17l-5-5"/></svg>
确定
</button>
</div>
</div>
</div>
<!-- 编辑弹窗 -->
<div class="backdrop" id="backdrop-edit" role="dialog" aria-modal="true">
<div class="dialog dialog-lg">
<div class="dialog-head">
<h3>编辑质检工单</h3>
<p class="note">QC-2026-0312 · 表单预填可编辑</p>
</div>
<div class="dialog-scroll">
<div class="form-grid-2">
<div class="field">
<label>工单编号</label>
<input class="input" type="text" value="QC-2026-0312" readonly style="background:#f8fafc;color:var(--text-muted)" />
</div>
<div class="field">
<label>样本编号</label>
<input class="input" type="text" value="SMP-A10284" />
</div>
<div class="field">
<label>检测项目</label>
<select class="select">
<option selected>细胞活性检测</option>
<option>支原体检测</option>
</select>
</div>
<div class="field">
<label>状态</label>
<select class="select">
<option selected>进行中</option>
<option>已完成</option>
<option>待执行</option>
</select>
</div>
<div class="field">
<label>负责人</label>
<select class="select">
<option selected>张工</option>
<option>李工</option>
</select>
</div>
<div class="field">
<label>优先级</label>
<select class="select">
<option>普通</option>
<option selected>紧急</option>
</select>
</div>
<div class="field form-col-span-2">
<label>备注</label>
<textarea class="textarea">需在 6 月 12 日前完成复核。</textarea>
</div>
</div>
</div>
<div class="dialog-foot">
<button class="btn" type="button" onclick="closeDialog('edit')">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 6L6 18M6 6l12 12"/></svg>
取消
</button>
<button class="btn btn-primary" type="button" onclick="closeDialog('edit')">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 6L9 17l-5-5"/></svg>
确定
</button>
</div>
</div>
</div>
<!-- 查看弹窗 -->
<div class="backdrop" id="backdrop-view" role="dialog" aria-modal="true">
<div class="dialog dialog-view-xl">
<div class="dialog-scroll" style="padding:0">
<div class="view-hero">
<div class="view-hero-icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2"><path d="M9 11l3 3L22 4"/><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"/></svg>
</div>
<div class="view-hero-main">
<h2>QC-2026-0312</h2>
<div class="view-hero-tags">
<span class="tag warning">进行中</span>
<span class="tag info">细胞活性检测</span>
</div>
<p class="view-hero-meta">样本 SMP-A10284 · 负责人 张工 · 创建于 2026-06-10 14:32</p>
</div>
</div>
<div class="view-section">
<h3>基本信息</h3>
<div class="view-kv-grid">
<dl class="view-kv"><dt>工单编号</dt><dd class="mono">QC-2026-0312</dd></dl>
<dl class="view-kv"><dt>样本编号</dt><dd class="mono">SMP-A10284</dd></dl>
<dl class="view-kv"><dt>检测项目</dt><dd>细胞活性检测</dd></dl>
<dl class="view-kv"><dt>状态</dt><dd><span class="tag warning">进行中</span></dd></dl>
<dl class="view-kv"><dt>负责人</dt><dd>张工</dd></dl>
<dl class="view-kv"><dt>计划完成</dt><dd>2026-06-12</dd></dl>
<dl class="view-kv" style="grid-column:1/-1"><dt>检测要求</dt><dd>按 SOP-QC-008 标准流程执行,需双人复核。</dd></dl>
<dl class="view-kv" style="grid-column:1/-1"><dt>备注</dt><dd>需在 6 月 12 日前完成复核。</dd></dl>
</div>
</div>
<div class="view-section">
<h3>操作记录</h3>
<div class="view-kv-grid">
<dl class="view-kv"><dt>创建人</dt><dd>系统管理员</dd></dl>
<dl class="view-kv"><dt>创建时间</dt><dd>2026-06-10 14:32:08</dd></dl>
<dl class="view-kv"><dt>更新人</dt><dd>张工</dd></dl>
<dl class="view-kv"><dt>更新时间</dt><dd>2026-06-11 09:15:22</dd></dl>
</div>
</div>
</div>
<div class="dialog-foot">
<button class="btn" type="button" onclick="closeDialog('view')">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 6L6 18M6 6l12 12"/></svg>
关闭
</button>
<button class="btn btn-primary" type="button" onclick="closeDialog('view');openDialog('edit')">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>
编辑
</button>
</div>
</div>
</div>
<div class="scheme-badge">
方案 D · 科技蓝组件库
<a href="scheme-d-top-mega-bento.html">薄荷绿版</a>
<a href="index.html">返回对比</a>
</div>
<script>
function switchTab(id) {
document.querySelectorAll('.tab-chip').forEach(t => {
t.classList.toggle('is-active', t.dataset.tab === id)
})
document.querySelectorAll('.tab-panel').forEach(p => {
p.classList.toggle('is-active', p.id === 'panel-' + id)
})
}
document.querySelectorAll('.tab-chip').forEach(chip => {
chip.onclick = () => switchTab(chip.dataset.tab)
})
function openDialog(type) {
document.getElementById('backdrop-' + type).classList.add('open')
document.body.style.overflow = 'hidden'
}
function closeDialog(type) {
document.getElementById('backdrop-' + type).classList.remove('open')
document.body.style.overflow = ''
}
document.querySelectorAll('.backdrop').forEach(el => {
el.addEventListener('click', e => {
if (e.target === el) {
el.classList.remove('open')
document.body.style.overflow = ''
}
})
})
document.addEventListener('keydown', e => {
if (e.key === 'Escape') {
document.querySelectorAll('.backdrop.open').forEach(el => el.classList.remove('open'))
document.body.style.overflow = ''
}
})
</script>
</body>
</html>