389 lines
14 KiB
HTML
389 lines
14 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>方案 C · 双栏模块导航 — 中科兴皖</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: #10b981;
|
|
--primary-dark: #059669;
|
|
--primary-bg: #ecfdf5;
|
|
--text: #1e293b;
|
|
--text-muted: #64748b;
|
|
--border: #d9e8e2;
|
|
--surface: #ffffff;
|
|
--bg-page: #f8fafc;
|
|
--rail-bg: #0f172a;
|
|
--panel-bg: #f8fafc;
|
|
--radius: 10px;
|
|
}
|
|
* { box-sizing: border-box; }
|
|
body {
|
|
margin: 0;
|
|
min-height: 100vh;
|
|
font-family: Inter, -apple-system, sans-serif;
|
|
font-size: 14px;
|
|
color: var(--text);
|
|
background: var(--bg-page);
|
|
}
|
|
.layout { display: flex; min-height: 100vh; }
|
|
|
|
/* 第一栏:图标轨 56px */
|
|
.rail {
|
|
width: 56px;
|
|
flex-shrink: 0;
|
|
background: var(--rail-bg);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 12px 0;
|
|
}
|
|
.rail-logo {
|
|
width: 32px; height: 32px;
|
|
border-radius: 8px;
|
|
background: linear-gradient(135deg, var(--primary), #059669);
|
|
display: flex; align-items: center; justify-content: center;
|
|
margin-bottom: 12px;
|
|
}
|
|
.rail-btn {
|
|
width: 40px; height: 40px;
|
|
border-radius: 8px;
|
|
display: flex; align-items: center; justify-content: center;
|
|
color: #64748b;
|
|
cursor: pointer;
|
|
transition: all 0.15s;
|
|
margin: 2px 0;
|
|
}
|
|
.rail-btn:hover { background: rgba(255,255,255,0.08); color: #e2e8f0; }
|
|
.rail-btn.active { background: rgba(16,185,129,0.2); color: var(--primary); }
|
|
|
|
/* 第二栏:模块子菜单 200px,可折叠 */
|
|
.sub-panel {
|
|
width: 200px;
|
|
flex-shrink: 0;
|
|
background: var(--panel-bg);
|
|
border-right: 1px solid var(--border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
transition: width 0.25s ease, opacity 0.25s;
|
|
overflow: hidden;
|
|
}
|
|
.sub-panel.collapsed { width: 0; border-right: none; }
|
|
.sub-header {
|
|
padding: 16px 14px 12px;
|
|
border-bottom: 1px solid var(--border);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
.sub-header h3 {
|
|
margin: 0;
|
|
font-size: 13px;
|
|
font-weight: 700;
|
|
color: var(--text);
|
|
white-space: nowrap;
|
|
}
|
|
.collapse-btn {
|
|
width: 28px; height: 28px;
|
|
border-radius: 6px;
|
|
border: 1px solid var(--border);
|
|
background: var(--surface);
|
|
display: flex; align-items: center; justify-content: center;
|
|
cursor: pointer;
|
|
color: var(--text-muted);
|
|
flex-shrink: 0;
|
|
}
|
|
.collapse-btn:hover { border-color: var(--primary); color: var(--primary-dark); }
|
|
.sub-nav { flex: 1; overflow-y: auto; padding: 8px 10px; }
|
|
.sub-nav a {
|
|
display: block;
|
|
padding: 8px 12px;
|
|
margin: 2px 0;
|
|
border-radius: 8px;
|
|
color: var(--text-muted);
|
|
text-decoration: none;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
transition: all 0.15s;
|
|
}
|
|
.sub-nav a:hover { background: var(--surface); color: var(--text); }
|
|
.sub-nav a.active {
|
|
background: var(--primary-bg);
|
|
color: var(--primary-dark);
|
|
font-weight: 600;
|
|
}
|
|
.sub-nav .nav-section {
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
color: var(--text-muted);
|
|
padding: 12px 12px 4px;
|
|
letter-spacing: 0.03em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
|
.header {
|
|
height: 56px;
|
|
padding: 0 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
background: var(--surface);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.header-left { display: flex; align-items: center; gap: 12px; }
|
|
.expand-btn {
|
|
width: 32px; height: 32px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--border);
|
|
background: var(--surface);
|
|
display: none;
|
|
align-items: center; justify-content: center;
|
|
cursor: pointer;
|
|
color: var(--text-muted);
|
|
}
|
|
.sub-panel.collapsed ~ .main .expand-btn { display: flex; }
|
|
.crumb { font-size: 13px; color: var(--text-muted); }
|
|
.crumb b { color: var(--text); font-weight: 600; }
|
|
|
|
.content { padding: 24px; flex: 1; }
|
|
.panel {
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
|
overflow: hidden;
|
|
}
|
|
.panel-top {
|
|
padding: 16px 20px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.panel-top h2 {
|
|
margin: 0;
|
|
font-size: 15px;
|
|
font-weight: 700;
|
|
display: flex; align-items: center; gap: 10px;
|
|
}
|
|
.panel-top h2::before {
|
|
content: "";
|
|
width: 4px; height: 18px;
|
|
background: var(--primary);
|
|
border-radius: 2px;
|
|
}
|
|
.toolbar {
|
|
display: flex; align-items: center; gap: 8px;
|
|
padding: 12px 20px;
|
|
background: #f8fafc;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.sel-num { font-size: 13px; color: var(--primary-dark); font-weight: 600; margin-right: 8px; }
|
|
.btn {
|
|
display: inline-flex; align-items: center; gap: 6px;
|
|
padding: 7px 14px; border-radius: 8px;
|
|
font-size: 13px; font-weight: 600; cursor: pointer;
|
|
border: 1px solid var(--border);
|
|
background: var(--surface);
|
|
color: var(--text);
|
|
}
|
|
.btn-primary { background: var(--primary); color: #fff; border: none; }
|
|
table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
|
th {
|
|
padding: 10px 16px; text-align: left;
|
|
font-weight: 600; color: var(--text-muted);
|
|
background: #f8fafc;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
|
|
tr:hover td { background: #fafafa; }
|
|
.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; }
|
|
.mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-muted); }
|
|
|
|
.hint-bar {
|
|
margin-bottom: 16px;
|
|
padding: 12px 16px;
|
|
background: var(--primary-bg);
|
|
border: 1px solid rgba(16,185,129,0.25);
|
|
border-radius: var(--radius);
|
|
font-size: 13px;
|
|
color: var(--text-muted);
|
|
display: flex; align-items: center; gap: 8px;
|
|
}
|
|
.hint-bar strong { color: var(--primary-dark); }
|
|
|
|
.scheme-badge {
|
|
position: fixed; bottom: 16px; right: 16px;
|
|
padding: 8px 14px;
|
|
background: rgba(15,23,42,0.85);
|
|
color: #94a3b8;
|
|
border-radius: 8px;
|
|
font-size: 12px; z-index: 100;
|
|
}
|
|
.scheme-badge a { color: #6ee7b7; text-decoration: none; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="layout">
|
|
<nav class="rail" aria-label="一级模块">
|
|
<div class="rail-logo">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5z"/></svg>
|
|
</div>
|
|
<div class="rail-btn" data-module="storage" title="细胞存储">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/></svg>
|
|
</div>
|
|
<div class="rail-btn active" data-module="qc" title="质检管理">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" 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="rail-btn" data-module="prod" title="生产管理">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="7" width="20" height="14" rx="2"/></svg>
|
|
</div>
|
|
<div class="rail-btn" data-module="clinical" title="临床应用">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg>
|
|
</div>
|
|
<div class="rail-btn" data-module="market" title="市场信息">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/></svg>
|
|
</div>
|
|
<div class="rail-btn" data-module="system" title="系统管理">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3"/><path d="M12 1v2M12 21v2"/></svg>
|
|
</div>
|
|
</nav>
|
|
|
|
<aside class="sub-panel" id="subPanel">
|
|
<div class="sub-header">
|
|
<h3 id="moduleTitle">质检管理</h3>
|
|
<button class="collapse-btn" id="collapseBtn" title="收起子菜单">
|
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 18l-6-6 6-6"/></svg>
|
|
</button>
|
|
</div>
|
|
<nav class="sub-nav" id="subNav">
|
|
<!-- 动态填充 -->
|
|
</nav>
|
|
</aside>
|
|
|
|
<div class="main">
|
|
<header class="header">
|
|
<div class="header-left">
|
|
<button class="expand-btn" id="expandBtn" title="展开子菜单">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 18l6-6-6-6"/></svg>
|
|
</button>
|
|
<div class="crumb"><span id="crumbModule">质检管理</span> / <b id="crumbPage">质检工单</b></div>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="content">
|
|
<div class="hint-bar">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="var(--primary)" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>
|
|
<span>当前模块仅展示 <strong id="menuCount">8</strong> 个子菜单(非全部 60+),点击左侧图标切换业务域。子面板可折叠以释放内容宽度。</span>
|
|
</div>
|
|
|
|
<div class="panel">
|
|
<div class="panel-top"><h2 id="pageTitle">质检工单</h2></div>
|
|
<div class="toolbar">
|
|
<span class="sel-num">已选 0 项</span>
|
|
<button class="btn btn-primary">
|
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 5v14M5 12h14"/></svg>
|
|
新增
|
|
</button>
|
|
</div>
|
|
<table>
|
|
<thead>
|
|
<tr><th>工单编号</th><th>样本编号</th><th>状态</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="mono">QC-2026-0312</td>
|
|
<td class="mono">SMP-A10284</td>
|
|
<td><span class="tag warning">进行中</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mono">QC-2026-0311</td>
|
|
<td class="mono">SMP-B22015</td>
|
|
<td><span class="tag success">已完成</span></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="scheme-badge">方案 C · 双栏模块导航 · <a href="index.html">返回对比</a></div>
|
|
|
|
<script>
|
|
const menus = {
|
|
storage: {
|
|
title: '细胞存储',
|
|
items: ['采集协议单录入', '采集协议单', '样本信息管理', '缴费信息', '缴退费财务确认', '入库放行审核', '样本接收信息', '储存证管理']
|
|
},
|
|
qc: {
|
|
title: '质检管理',
|
|
items: ['样本接收', '质检工单', '环境检测管理', '质检任务', '入库放行审核', '接收检查项配置', '质检项目管理', '质检物料库']
|
|
},
|
|
prod: {
|
|
title: '生产管理',
|
|
items: ['库位管理', '细胞产品库', '生产工单', '生产任务', '耗材管理', '试剂管理', 'SOP文档', '工艺库管理']
|
|
},
|
|
clinical: {
|
|
title: '临床应用',
|
|
items: ['临床申请单', '体检管理', '输注计划管理', '缴费信息', '出库放行审核']
|
|
},
|
|
market: {
|
|
title: '市场基础信息',
|
|
items: ['客户管理', '渠道信息管理', '细胞产品价格体系管理', '市场物料库', '样本编码管理']
|
|
},
|
|
system: {
|
|
title: '系统管理',
|
|
items: ['用户管理', '角色管理', '菜单管理', '部门管理', '租户管理']
|
|
}
|
|
}
|
|
|
|
let currentModule = 'qc'
|
|
let currentPage = '质检工单'
|
|
|
|
function renderSubNav(module) {
|
|
const data = menus[module]
|
|
document.getElementById('moduleTitle').textContent = data.title
|
|
document.getElementById('menuCount').textContent = data.items.length
|
|
const nav = document.getElementById('subNav')
|
|
nav.innerHTML = data.items.map(item =>
|
|
`<a href="#" class="${item === currentPage ? 'active' : ''}" data-page="${item}">${item}</a>`
|
|
).join('')
|
|
nav.querySelectorAll('a').forEach(a => {
|
|
a.onclick = e => {
|
|
e.preventDefault()
|
|
currentPage = a.dataset.page
|
|
document.getElementById('crumbPage').textContent = currentPage
|
|
document.getElementById('pageTitle').textContent = currentPage
|
|
nav.querySelectorAll('a').forEach(x => x.classList.remove('active'))
|
|
a.classList.add('active')
|
|
}
|
|
})
|
|
}
|
|
|
|
document.querySelectorAll('.rail-btn').forEach(btn => {
|
|
btn.onclick = () => {
|
|
document.querySelectorAll('.rail-btn').forEach(b => b.classList.remove('active'))
|
|
btn.classList.add('active')
|
|
currentModule = btn.dataset.module
|
|
currentPage = menus[currentModule].items[0]
|
|
document.getElementById('crumbModule').textContent = menus[currentModule].title
|
|
document.getElementById('crumbPage').textContent = currentPage
|
|
document.getElementById('pageTitle').textContent = currentPage
|
|
renderSubNav(currentModule)
|
|
document.getElementById('subPanel').classList.remove('collapsed')
|
|
}
|
|
})
|
|
|
|
const subPanel = document.getElementById('subPanel')
|
|
document.getElementById('collapseBtn').onclick = () => subPanel.classList.add('collapsed')
|
|
document.getElementById('expandBtn').onclick = () => subPanel.classList.remove('collapsed')
|
|
|
|
renderSubNav(currentModule)
|
|
</script>
|
|
</body>
|
|
</html>
|