CI / check (push) Failing after 15m48s
Signed-off-by: 南通一次元科技有限公司 <guwangtu@icimeta.com>
1514 lines
63 KiB
HTML
1514 lines
63 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>综合管理平台 · CYBER PLATFORM</title>
|
||
<style>
|
||
|
||
* { margin:0; padding:0; box-sizing:border-box; }
|
||
|
||
:root {
|
||
--bg-deep: #0a0e1a;
|
||
--bg-panel: #111827;
|
||
--bg-card: #1a1f35;
|
||
--bg-card-hover: #1e2540;
|
||
--border: rgba(0,212,255,0.15);
|
||
--border-active: rgba(0,212,255,0.6);
|
||
--text-primary: #e2e8f0;
|
||
--text-secondary: #94a3b8;
|
||
--text-muted: #64748b;
|
||
--cyan: #00d4ff;
|
||
--cyan-glow: rgba(0,212,255,0.4);
|
||
--amber: #ff8c00;
|
||
--amber-glow: rgba(255,140,0,0.4);
|
||
--magenta: #ff0080;
|
||
--magenta-glow: rgba(255,0,128,0.3);
|
||
--green: #00ff88;
|
||
--red: #ff3366;
|
||
--gold: #d4af37;
|
||
}
|
||
|
||
body {
|
||
font-family: 'Noto Sans SC', sans-serif;
|
||
background: var(--bg-deep);
|
||
color: var(--text-primary);
|
||
overflow-x: hidden;
|
||
min-height: 100vh;
|
||
}
|
||
|
||
/* ===== 多层动态背景 ===== */
|
||
/* 第0层:背景图片 */
|
||
.bg-image {
|
||
position: fixed;
|
||
top: 0; left: 0; right: 0; bottom: 0;
|
||
background: url('/static/bg_gundam.jpg') no-repeat center center / cover;
|
||
pointer-events: none;
|
||
z-index: 0;
|
||
opacity: 0.25;
|
||
filter: saturate(1.2) contrast(1.1);
|
||
}
|
||
.bg-image::after {
|
||
content: '';
|
||
position: absolute;
|
||
top: 0; left: 0; right: 0; bottom: 0;
|
||
background: linear-gradient(180deg,
|
||
rgba(10,14,26,0.6) 0%,
|
||
rgba(10,14,26,0.4) 30%,
|
||
rgba(10,14,26,0.7) 70%,
|
||
rgba(10,14,26,0.85) 100%
|
||
);
|
||
}
|
||
|
||
/* 第1层:移动网格 */
|
||
body::before {
|
||
content: '';
|
||
position: fixed;
|
||
top: 0; left: 0; right: 0; bottom: 0;
|
||
background-image:
|
||
linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
|
||
linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
|
||
background-size: 50px 50px;
|
||
pointer-events: none;
|
||
z-index: 0;
|
||
animation: gridMove 30s linear infinite;
|
||
}
|
||
@keyframes gridMove {
|
||
0% { transform: translate(0,0); }
|
||
100% { transform: translate(50px,50px); }
|
||
}
|
||
|
||
/* 第2层:渐变光晕 + 六边形纹理 */
|
||
body::after {
|
||
content: '';
|
||
position: fixed;
|
||
top: 0; left: 0; right: 0; bottom: 0;
|
||
background:
|
||
radial-gradient(ellipse 80% 50% at 20% 0%, rgba(0,212,255,0.08) 0%, transparent 60%),
|
||
radial-gradient(ellipse 60% 40% at 80% 100%, rgba(255,0,128,0.06) 0%, transparent 60%),
|
||
radial-gradient(ellipse 50% 30% at 50% 50%, rgba(255,140,0,0.03) 0%, transparent 60%),
|
||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='52' viewBox='0 0 60 52'%3E%3Cpath d='M30 0 L60 17 L60 35 L30 52 L0 35 L0 17 Z' fill='none' stroke='%2300d4ff' stroke-width='0.5' opacity='0.06'/%3E%3C/svg%3E");
|
||
pointer-events: none;
|
||
z-index: 0;
|
||
animation: pulseGlow 8s ease-in-out infinite alternate;
|
||
}
|
||
@keyframes pulseGlow {
|
||
0% { opacity: 0.7; }
|
||
100% { opacity: 1; }
|
||
}
|
||
|
||
/* 第3层:粒子 Canvas */
|
||
#bg-particles {
|
||
position: fixed;
|
||
top: 0; left: 0;
|
||
width: 100%; height: 100%;
|
||
pointer-events: none;
|
||
z-index: 0;
|
||
}
|
||
|
||
/* 第4层:扫描光带 */
|
||
.bg-scan {
|
||
position: fixed;
|
||
top: 0; left: 0; right: 0;
|
||
height: 200px;
|
||
background: linear-gradient(180deg, transparent, rgba(0,212,255,0.04) 50%, transparent);
|
||
pointer-events: none;
|
||
z-index: 0;
|
||
animation: bgScan 12s ease-in-out infinite;
|
||
}
|
||
@keyframes bgScan {
|
||
0% { top: -200px; opacity: 0; }
|
||
10% { opacity: 1; }
|
||
90% { opacity: 1; }
|
||
100% { top: 100vh; opacity: 0; }
|
||
}
|
||
|
||
/* 第5层:流光线 */
|
||
.bg-lines {
|
||
position: fixed;
|
||
top: 0; left: 0; right: 0; bottom: 0;
|
||
pointer-events: none;
|
||
z-index: 0;
|
||
overflow: hidden;
|
||
}
|
||
.bg-line {
|
||
position: absolute;
|
||
height: 1px;
|
||
background: linear-gradient(90deg, transparent, rgba(0,212,255,0.3), transparent);
|
||
width: 200px;
|
||
animation: lineFly 8s linear infinite;
|
||
opacity: 0;
|
||
}
|
||
.bg-line:nth-child(1) { top: 15%; animation-delay: 0s; animation-duration: 7s; }
|
||
.bg-line:nth-child(2) { top: 35%; animation-delay: 2s; animation-duration: 9s; background: linear-gradient(90deg, transparent, rgba(255,140,0,0.2), transparent); }
|
||
.bg-line:nth-child(3) { top: 55%; animation-delay: 4s; animation-duration: 6s; }
|
||
.bg-line:nth-child(4) { top: 75%; animation-delay: 1s; animation-duration: 10s; background: linear-gradient(90deg, transparent, rgba(255,0,128,0.15), transparent); }
|
||
.bg-line:nth-child(5) { top: 90%; animation-delay: 5s; animation-duration: 8s; }
|
||
@keyframes lineFly {
|
||
0% { left: -200px; opacity: 0; }
|
||
10% { opacity: 1; }
|
||
90% { opacity: 1; }
|
||
100% { left: 100vw; opacity: 0; }
|
||
}
|
||
|
||
/* ===== 顶栏 ===== */
|
||
.topbar {
|
||
position: relative;
|
||
z-index: 10;
|
||
background: rgba(10,14,26,0.85);
|
||
backdrop-filter: blur(20px);
|
||
border-bottom: 1px solid var(--border);
|
||
padding: 14px 32px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
}
|
||
.topbar-left { display:flex; align-items:center; gap:16px; }
|
||
.logo-mark {
|
||
width:42px; height:42px;
|
||
border:2px solid var(--cyan);
|
||
border-radius:10px;
|
||
display:flex; align-items:center; justify-content:center;
|
||
position:relative;
|
||
background:rgba(0,212,255,0.05);
|
||
}
|
||
.logo-mark::before {
|
||
content:''; position:absolute; inset:3px;
|
||
border:1px solid rgba(0,212,255,0.3);
|
||
border-radius:6px;
|
||
}
|
||
.logo-mark span { font-family:'Orbitron',sans-serif; font-weight:900; font-size:18px; color:var(--cyan); text-shadow:0 0 12px var(--cyan-glow); }
|
||
.platform-title { font-family:'Orbitron',sans-serif; font-size:18px; font-weight:700; letter-spacing:2px; color:var(--cyan); text-shadow:0 0 8px var(--cyan-glow); }
|
||
.platform-sub { font-size:11px; color:var(--text-muted); letter-spacing:1px; margin-top:2px; }
|
||
|
||
.topbar-right { display:flex; align-items:center; gap:20px; }
|
||
.status-pill {
|
||
display:flex; align-items:center; gap:8px;
|
||
padding:6px 14px; border-radius:20px;
|
||
background:rgba(0,255,136,0.08); border:1px solid rgba(0,255,136,0.2);
|
||
font-size:12px; color:var(--green);
|
||
}
|
||
.status-dot { width:8px; height:8px; border-radius:50%; background:var(--green); box-shadow:0 0 8px var(--green); animation:pulse 2s ease-in-out infinite; }
|
||
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }
|
||
|
||
.clock { font-family:'Orbitron',monospace; font-size:14px; color:var(--text-secondary); letter-spacing:1px; }
|
||
.user-avatar {
|
||
width:36px; height:36px; border-radius:50%;
|
||
background:linear-gradient(135deg, var(--cyan), var(--magenta));
|
||
display:flex; align-items:center; justify-content:center;
|
||
font-weight:700; font-size:14px; color:var(--bg-deep);
|
||
border:2px solid var(--border-active);
|
||
cursor:pointer;
|
||
}
|
||
|
||
/* ===== 主体布局 ===== */
|
||
.app-body { position:relative; z-index:1; display:flex; min-height:calc(100vh - 63px); }
|
||
|
||
/* ===== 侧边栏 ===== */
|
||
.sidebar {
|
||
width:280px; flex-shrink:0;
|
||
background:rgba(17,24,39,0.6);
|
||
backdrop-filter:blur(16px);
|
||
border-right:1px solid var(--border);
|
||
padding:24px 16px;
|
||
display:flex; flex-direction:column;
|
||
}
|
||
.sidebar-label {
|
||
font-family:'Orbitron',sans-serif;
|
||
font-size:11px; font-weight:600; letter-spacing:2px;
|
||
color:var(--text-muted); text-transform:uppercase;
|
||
padding:0 12px 16px;
|
||
border-bottom:1px solid var(--border);
|
||
margin-bottom:16px;
|
||
}
|
||
.nav-item {
|
||
display:flex; align-items:center; gap:14px;
|
||
padding:16px 14px; border-radius:10px;
|
||
cursor:pointer; transition:all .3s;
|
||
margin-bottom:8px;
|
||
border:1px solid transparent;
|
||
position:relative;
|
||
}
|
||
.nav-item:hover {
|
||
background:rgba(0,212,255,0.05);
|
||
border-color:var(--border);
|
||
}
|
||
.nav-item.active {
|
||
background:linear-gradient(135deg, rgba(0,212,255,0.1), rgba(0,212,255,0.02));
|
||
border-color:var(--border-active);
|
||
box-shadow:inset 0 0 20px rgba(0,212,255,0.05);
|
||
}
|
||
.nav-item.active::before {
|
||
content:''; position:absolute; left:0; top:20%; bottom:20%;
|
||
width:3px; background:var(--cyan); border-radius:0 3px 3px 0;
|
||
box-shadow:0 0 12px var(--cyan-glow);
|
||
}
|
||
.nav-icon {
|
||
width:44px; height:44px; border-radius:10px;
|
||
display:flex; align-items:center; justify-content:center;
|
||
font-size:20px; flex-shrink:0;
|
||
border:1px solid var(--border);
|
||
transition:all .3s;
|
||
}
|
||
.nav-icon.audit { background:rgba(0,212,255,0.08); color:var(--cyan); border-color:rgba(0,212,255,0.2); }
|
||
.nav-icon.risk { background:rgba(255,140,0,0.08); color:var(--amber); border-color:rgba(255,140,0,0.2); }
|
||
.nav-icon.future { background:rgba(255,0,128,0.06); color:var(--magenta); border-color:rgba(255,0,128,0.15); }
|
||
.nav-item:hover .nav-icon { transform:scale(1.08); }
|
||
.nav-item.active .nav-icon.audit { box-shadow:0 0 16px var(--cyan-glow); }
|
||
.nav-item.active .nav-icon.risk { box-shadow:0 0 16px var(--amber-glow); }
|
||
|
||
.nav-text { flex:1; min-width:0; }
|
||
.nav-name { font-size:15px; font-weight:500; color:var(--text-primary); }
|
||
.nav-desc { font-size:11px; color:var(--text-muted); margin-top:3px; }
|
||
|
||
.nav-badge {
|
||
padding:3px 10px; border-radius:12px;
|
||
font-size:11px; font-weight:700;
|
||
font-family:'Orbitron',monospace;
|
||
}
|
||
.badge-cyan { background:rgba(0,212,255,0.12); color:var(--cyan); border:1px solid rgba(0,212,255,0.2); }
|
||
.badge-amber { background:rgba(255,140,0,0.12); color:var(--amber); border:1px solid rgba(255,140,0,0.2); }
|
||
|
||
.sidebar-footer { margin-top:auto; padding-top:16px; border-top:1px solid var(--border); }
|
||
.sys-info { font-size:11px; color:var(--text-muted); line-height:1.8; padding:0 12px; }
|
||
.sys-info span { color:var(--text-secondary); }
|
||
|
||
/* ===== 主内容区 ===== */
|
||
.main { flex:1; padding:32px 40px; overflow-y:auto; }
|
||
|
||
/* 面包屑 */
|
||
.breadcrumb {
|
||
font-size:12px; color:var(--text-muted);
|
||
margin-bottom:24px; letter-spacing:1px;
|
||
display:flex; align-items:center; gap:8px;
|
||
}
|
||
.breadcrumb .sep { color:var(--text-muted); }
|
||
.breadcrumb .current { color:var(--cyan); }
|
||
|
||
/* 模块标题区 */
|
||
.module-header {
|
||
display:flex; align-items:center; justify-content:space-between;
|
||
margin-bottom:32px;
|
||
}
|
||
.module-title-block h1 {
|
||
font-family:'Orbitron',sans-serif;
|
||
font-size:28px; font-weight:700;
|
||
color:var(--text-primary);
|
||
letter-spacing:1px;
|
||
}
|
||
.module-title-block h1 .accent { color:var(--cyan); text-shadow:0 0 16px var(--cyan-glow); }
|
||
.module-title-block .tagline {
|
||
font-size:13px; color:var(--text-secondary);
|
||
margin-top:6px; letter-spacing:0.5px;
|
||
}
|
||
.module-action {
|
||
display:flex; gap:12px;
|
||
}
|
||
.btn-cyber {
|
||
padding:10px 20px; border-radius:8px;
|
||
font-size:13px; font-weight:600;
|
||
border:1px solid var(--border-active);
|
||
background:rgba(0,212,255,0.05);
|
||
color:var(--cyan);
|
||
cursor:pointer; transition:all .25s;
|
||
text-transform:uppercase; letter-spacing:1px;
|
||
font-family:'Orbitron',sans-serif;
|
||
}
|
||
.btn-cyber:hover { background:rgba(0,212,255,0.15); box-shadow:0 0 20px var(--cyan-glow); }
|
||
.btn-cyber.primary { background:var(--cyan); color:var(--bg-deep); }
|
||
.btn-cyber.primary:hover { box-shadow:0 0 24px var(--cyan-glow); }
|
||
|
||
/* 卡片仪表盘 */
|
||
.dashboard-grid {
|
||
display:grid;
|
||
grid-template-columns:repeat(auto-fill, minmax(360px, 1fr));
|
||
gap:24px;
|
||
}
|
||
|
||
/* 单模块视图:右侧只显示当前选中的模块 */
|
||
.dashboard-grid.single { grid-template-columns:1fr; }
|
||
.dashboard-grid.single .sys-card { display:none; }
|
||
.dashboard-grid.single .sys-card.is-active { display:block; max-width:1120px; width:100%; margin:0 auto; }
|
||
.dashboard-grid.single .sys-card.is-active .sys-card-header { padding:34px 34px 24px; }
|
||
.dashboard-grid.single .sys-card.is-active .sys-card-title h3 { font-size:23px; }
|
||
.dashboard-grid.single .sys-card.is-active .sys-card-stats { gap:20px; }
|
||
.dashboard-grid.single .sys-card.is-active .stat-box { padding:20px; }
|
||
.dashboard-grid.single .sys-card.is-active .stat-num { font-size:34px; }
|
||
|
||
/* 模块详情区 */
|
||
.sys-card-detail {
|
||
padding:0 34px 22px;
|
||
display:grid;
|
||
grid-template-columns:repeat(2,minmax(0,1fr));
|
||
gap:6px 34px;
|
||
}
|
||
.sys-card-detail:empty { display:none; }
|
||
.detail-row {
|
||
display:flex; align-items:center; justify-content:space-between; gap:18px;
|
||
padding:9px 0; font-size:13px;
|
||
border-bottom:1px dashed rgba(255,255,255,0.07);
|
||
}
|
||
.detail-row .k { color:var(--text-muted); }
|
||
.detail-row .v { color:var(--text-primary); font-weight:600; text-align:right; }
|
||
|
||
/* 原混合信息条隐藏,信息已并入各模块详情 */
|
||
.info-strip { display:none !important; }
|
||
|
||
@media (max-width:720px) {
|
||
.sys-card-detail { grid-template-columns:1fr; padding:0 22px 18px; }
|
||
}
|
||
|
||
/* 大卡片 */
|
||
.sys-card {
|
||
background:var(--bg-card);
|
||
border-radius:14px;
|
||
padding:0;
|
||
border:1px solid var(--border);
|
||
overflow:hidden;
|
||
cursor:pointer;
|
||
transition:all .35s cubic-bezier(.4,0,.2,1);
|
||
position:relative;
|
||
}
|
||
.sys-card::before {
|
||
content:''; position:absolute; top:0; left:0; right:0; height:3px;
|
||
background:var(--card-accent);
|
||
box-shadow:0 0 12px var(--card-glow);
|
||
}
|
||
.sys-card:hover {
|
||
border-color:var(--card-accent);
|
||
transform:translateY(-6px);
|
||
box-shadow:0 16px 40px rgba(0,0,0,0.4), 0 0 24px var(--card-glow);
|
||
}
|
||
.sys-card-header {
|
||
padding:28px 28px 20px;
|
||
display:flex; align-items:flex-start; gap:20px;
|
||
}
|
||
.sys-card-icon {
|
||
width:60px; height:60px; border-radius:14px;
|
||
display:flex; align-items:center; justify-content:center;
|
||
font-size:28px; flex-shrink:0;
|
||
background:var(--card-icon-bg);
|
||
border:1px solid var(--card-accent);
|
||
position:relative;
|
||
}
|
||
.sys-card-icon::after {
|
||
content:''; position:absolute; inset:2px;
|
||
border:1px solid rgba(255,255,255,0.05);
|
||
border-radius:10px;
|
||
}
|
||
.sys-card-title h3 {
|
||
font-family:'Orbitron',sans-serif;
|
||
font-size:18px; font-weight:700;
|
||
color:var(--text-primary);
|
||
letter-spacing:1px;
|
||
}
|
||
.sys-card-title .desc {
|
||
font-size:12px; color:var(--text-muted);
|
||
margin-top:5px; line-height:1.5;
|
||
}
|
||
|
||
.sys-card-stats {
|
||
padding:0 28px 24px;
|
||
display:grid; grid-template-columns:repeat(3,1fr); gap:16px;
|
||
}
|
||
.stat-box {
|
||
padding:16px;
|
||
background:rgba(255,255,255,0.02);
|
||
border:1px solid rgba(255,255,255,0.04);
|
||
border-radius:10px;
|
||
text-align:center;
|
||
transition:all .25s;
|
||
}
|
||
.sys-card:hover .stat-box { border-color:var(--card-accent); background:rgba(255,255,255,0.04); }
|
||
.stat-num {
|
||
font-family:'Orbitron',monospace;
|
||
font-size:28px; font-weight:700;
|
||
color:var(--card-accent);
|
||
text-shadow:0 0 12px var(--card-glow);
|
||
line-height:1;
|
||
}
|
||
.stat-label {
|
||
font-size:11px; color:var(--text-muted);
|
||
margin-top:8px; letter-spacing:0.5px;
|
||
}
|
||
|
||
.sys-card-footer {
|
||
padding:16px 28px;
|
||
border-top:1px solid var(--border);
|
||
display:flex; align-items:center; justify-content:space-between;
|
||
}
|
||
.sys-card-footer .status {
|
||
font-size:12px; color:var(--text-secondary);
|
||
display:flex; align-items:center; gap:8px;
|
||
}
|
||
.sys-card-footer .status .dot {
|
||
width:8px; height:8px; border-radius:50%;
|
||
background:var(--card-accent);
|
||
box-shadow:0 0 8px var(--card-glow);
|
||
}
|
||
.enter-link {
|
||
font-family:'Orbitron',sans-serif;
|
||
font-size:13px; font-weight:600;
|
||
color:var(--card-accent);
|
||
display:flex; align-items:center; gap:6px;
|
||
transition:gap .25s;
|
||
}
|
||
.sys-card:hover .enter-link { gap:12px; }
|
||
|
||
/* 添加新模块卡片 */
|
||
.sys-card.add-new {
|
||
border:1px dashed rgba(255,255,255,0.1);
|
||
background:transparent;
|
||
display:flex; flex-direction:column; align-items:center; justify-content:center;
|
||
min-height:340px;
|
||
}
|
||
.sys-card.add-new::before { display:none; }
|
||
.sys-card.add-new:hover { border-color:var(--cyan); background:rgba(0,212,255,0.03); }
|
||
.add-new .plus-icon {
|
||
width:60px; height:60px; border-radius:50%;
|
||
border:2px dashed var(--text-muted);
|
||
display:flex; align-items:center; justify-content:center;
|
||
font-size:32px; color:var(--text-muted);
|
||
margin-bottom:16px; transition:all .3s;
|
||
}
|
||
.sys-card.add-new:hover .plus-icon { border-color:var(--cyan); color:var(--cyan); }
|
||
.add-new p { color:var(--text-muted); font-size:14px; }
|
||
.add-new .hint { font-size:11px; color:var(--text-muted); opacity:0.6; margin-top:6px; }
|
||
|
||
/* 小信息卡片行 */
|
||
.info-strip {
|
||
display:grid; grid-template-columns:repeat(auto-fill, minmax(260px,1fr));
|
||
gap:16px; margin-top:24px;
|
||
}
|
||
.info-card {
|
||
background:var(--bg-card);
|
||
border:1px solid var(--border);
|
||
border-radius:10px; padding:20px;
|
||
transition:all .25s;
|
||
}
|
||
.info-card:hover { border-color:var(--border-active); background:var(--bg-card-hover); }
|
||
.info-card h4 {
|
||
font-size:13px; font-weight:600;
|
||
color:var(--text-secondary);
|
||
margin-bottom:14px;
|
||
display:flex; align-items:center; gap:8px;
|
||
}
|
||
.info-card .icon { font-size:16px; }
|
||
.info-row {
|
||
display:flex; justify-content:space-between; align-items:center;
|
||
padding:7px 0; font-size:13px;
|
||
border-bottom:1px solid rgba(255,255,255,0.03);
|
||
}
|
||
.info-row:last-child { border-bottom:none; }
|
||
.info-row .label { color:var(--text-muted); }
|
||
.info-row .val { font-family:'Orbitron',monospace; font-weight:600; color:var(--text-primary); }
|
||
.info-row .val.cyan { color:var(--cyan); }
|
||
.info-row .val.amber { color:var(--amber); }
|
||
.info-row .val.green { color:var(--green); }
|
||
.info-row .val.red { color:var(--red); }
|
||
|
||
/* 卡片主题色 */
|
||
.theme-audit { --card-accent:#00d4ff; --card-glow:rgba(0,212,255,0.3); --card-icon-bg:rgba(0,212,255,0.08); }
|
||
.theme-risk { --card-accent:#ff8c00; --card-glow:rgba(255,140,0,0.3); --card-icon-bg:rgba(255,140,0,0.08); }
|
||
.theme-knowledge { --card-accent:#d4af37; --card-glow:rgba(212,175,55,0.3); --card-icon-bg:rgba(212,175,55,0.08); }
|
||
.theme-contract { --card-accent:#a78bfa; --card-glow:rgba(167,139,250,0.3); --card-icon-bg:rgba(167,139,250,0.10); }
|
||
.nav-icon.knowledge { background:rgba(212,175,55,0.08); color:var(--gold); border-color:rgba(212,175,55,0.2); }
|
||
|
||
/* HUD 装饰线 */
|
||
.hud-corner {
|
||
position:absolute; width:12px; height:12px;
|
||
border:2px solid var(--card-accent);
|
||
opacity:0.5;
|
||
}
|
||
.hud-corner.tl { top:8px; left:8px; border-right:none; border-bottom:none; }
|
||
.hud-corner.tr { top:8px; right:8px; border-left:none; border-bottom:none; }
|
||
.hud-corner.bl { bottom:8px; left:8px; border-right:none; border-top:none; }
|
||
.hud-corner.br { bottom:8px; right:8px; border-left:none; border-top:none; }
|
||
|
||
/* 扫描线动画 */
|
||
.scan-line {
|
||
position:absolute; top:0; left:0; right:0; height:2px;
|
||
background:linear-gradient(90deg, transparent, var(--card-accent), transparent);
|
||
opacity:0; transition:opacity .3s;
|
||
}
|
||
.sys-card:hover .scan-line {
|
||
opacity:0.6;
|
||
animation: scan 1.5s ease-in-out infinite;
|
||
}
|
||
@keyframes scan {
|
||
0% { top:0; }
|
||
50% { top:calc(100% - 2px); }
|
||
100% { top:0; }
|
||
}
|
||
|
||
/* 响应式 */
|
||
@media (max-width: 900px) {
|
||
.sidebar { display:none; }
|
||
.main { padding:24px 20px; }
|
||
.dashboard-grid { grid-template-columns:1fr; }
|
||
}
|
||
</style>
|
||
<style>
|
||
|
||
/* ===== 登录页同款配色(2026-10-17) ===== */
|
||
:root {
|
||
--bg-deep:#0f2027; --bg-panel:rgba(255,255,255,.06); --bg-card:rgba(255,255,255,.06);
|
||
--bg-card-hover:rgba(255,255,255,.09);
|
||
--border:rgba(120,220,255,.18); --border-active:rgba(79,209,255,.55);
|
||
--text-primary:#e8f4ff; --text-secondary:#b9d3e2; --text-muted:#8fb0c2;
|
||
--cyan:#22d3ee; --cyan-glow:rgba(34,211,238,.25);
|
||
--amber:#f0b34a; --amber-glow:rgba(240,179,74,.2);
|
||
--magenta:#e26a9a; --magenta-glow:rgba(226,106,154,.18);
|
||
--green:#4ade80; --red:#f87171; --gold:#d9b04a;
|
||
}
|
||
html, body { min-height:100%; }
|
||
body { background:linear-gradient(135deg,#0f2027 0%,#203a43 45%,#2c5364 100%) !important;
|
||
background-attachment:fixed !important; color:var(--text-primary) !important; }
|
||
.bg-image, #bg-particles, .bg-scan, .bg-lines, body::before, body::after { display:none !important; }
|
||
.topbar { background:rgba(10,25,32,.55) !important; border-bottom:1px solid rgba(120,220,255,.14) !important;
|
||
backdrop-filter:blur(12px) !important; }
|
||
.platform-title { color:#9fe8ff !important; text-shadow:none !important;
|
||
font-family:'Noto Sans SC','Microsoft YaHei',sans-serif !important; letter-spacing:1px; }
|
||
.platform-sub, .clock { color:#8fb0c2 !important; font-family:'Noto Sans SC',sans-serif !important; letter-spacing:1px; }
|
||
.logo-mark { background:rgba(79,209,255,.08) !important; border-color:rgba(120,220,255,.35) !important; }
|
||
.logo-mark::before { border-color:rgba(120,220,255,.2) !important; }
|
||
.logo-mark span { color:#9fe8ff !important; text-shadow:none !important; }
|
||
.status-pill { background:rgba(74,222,128,.1) !important; border-color:rgba(74,222,128,.28) !important; color:#4ade80 !important; }
|
||
.user-avatar { background:linear-gradient(135deg,#0ea5e9,#22d3ee) !important; color:#03202c !important;
|
||
border-color:rgba(120,220,255,.4) !important; }
|
||
.back-btn { background:rgba(255,255,255,.06) !important; border-color:rgba(120,220,255,.22) !important; color:#b9d3e2 !important; }
|
||
.back-btn:hover { background:rgba(255,255,255,.1) !important; }
|
||
.sidebar { background:rgba(255,255,255,.04) !important; border-right:1px solid rgba(120,220,255,.14) !important;
|
||
backdrop-filter:blur(12px) !important; }
|
||
.sidebar-label { color:#8fb0c2 !important; border-bottom-color:rgba(120,220,255,.14) !important; }
|
||
.nav-item { border-color:transparent !important; }
|
||
.nav-item:hover { background:rgba(255,255,255,.06) !important; border-color:rgba(120,220,255,.16) !important; }
|
||
.nav-item.active { background:rgba(79,209,255,.12) !important; border-color:rgba(79,209,255,.42) !important; box-shadow:none !important; }
|
||
.nav-item.active::before { background:#4fd1ff !important; box-shadow:0 0 10px rgba(79,209,255,.5) !important; }
|
||
.nav-name { color:#e8f4ff !important; }
|
||
.nav-desc { color:#8fb0c2 !important; }
|
||
.sidebar-footer { border-top-color:rgba(120,220,255,.14) !important; }
|
||
.sys-info, .sys-info span { color:#8fb0c2 !important; }
|
||
.main { background:transparent !important; }
|
||
.breadcrumb, .breadcrumb .sep { color:#8fb0c2 !important; }
|
||
.breadcrumb .current { color:#4fd1ff !important; }
|
||
.module-title-block h1, .section-title { color:#e8f4ff !important;
|
||
font-family:'Noto Sans SC',sans-serif !important; letter-spacing:0 !important; }
|
||
.module-title-block h1 .accent, .section-title .accent { color:#4fd1ff !important; text-shadow:none !important; }
|
||
.module-title-block .tagline { color:#b9d3e2 !important; }
|
||
.btn-cyber, .btn { background:rgba(255,255,255,.05) !important; border-color:rgba(120,220,255,.28) !important;
|
||
color:#b9d3e2 !important; text-transform:none !important; font-family:'Noto Sans SC',sans-serif !important; letter-spacing:0 !important; }
|
||
.btn-cyber.primary, .btn.primary { background:linear-gradient(90deg,#0ea5e9,#22d3ee) !important;
|
||
color:#03202c !important; border:none !important; }
|
||
.btn.danger { color:#f87171 !important; border-color:rgba(248,113,113,.35) !important; background:rgba(248,113,113,.08) !important; }
|
||
.btn.amber { color:#f0b34a !important; border-color:rgba(240,179,74,.35) !important; background:rgba(240,179,74,.08) !important; }
|
||
.sys-card, .card, .panel, .space-list, .doc-item { background:rgba(255,255,255,.06) !important;
|
||
border:1px solid rgba(120,220,255,.22) !important; box-shadow:0 12px 40px rgba(0,0,0,.28) !important;
|
||
backdrop-filter:blur(10px) !important; }
|
||
.sys-card:hover { transform:none !important; border-color:rgba(79,209,255,.5) !important;
|
||
box-shadow:0 16px 46px rgba(0,0,0,.35) !important; }
|
||
.sys-card::before { box-shadow:none !important; }
|
||
.sys-card-title h3 { color:#e8f4ff !important; font-family:'Noto Sans SC',sans-serif !important; letter-spacing:0 !important; }
|
||
.sys-card-title .desc { color:#8fb0c2 !important; }
|
||
.stat-box { background:rgba(0,0,0,.18) !important; border-color:rgba(140,220,255,.18) !important; }
|
||
.sys-card:hover .stat-box { background:rgba(0,0,0,.24) !important; border-color:rgba(79,209,255,.3) !important; }
|
||
.stat-num { text-shadow:none !important; font-family:'Noto Sans SC',sans-serif !important; }
|
||
.stat-label { color:#8fb0c2 !important; }
|
||
.sys-card-footer { border-top-color:rgba(120,220,255,.14) !important; }
|
||
.sys-card-footer .status { color:#b9d3e2 !important; }
|
||
.sys-card-footer .status .dot { box-shadow:none !important; }
|
||
.enter-link { font-family:'Noto Sans SC',sans-serif !important; }
|
||
.detail-row { border-bottom-color:rgba(120,220,255,.12) !important; }
|
||
.detail-row .k { color:#8fb0c2 !important; }
|
||
.detail-row .v { color:#e8f4ff !important; }
|
||
.scan-line, .hud-corner { display:none !important; }
|
||
.space-item:hover { background:rgba(255,255,255,.06) !important; }
|
||
.space-item.active { background:rgba(79,209,255,.12) !important; border-color:rgba(79,209,255,.4) !important; }
|
||
input, select, textarea { background:rgba(0,0,0,.25) !important; color:#eaf7ff !important;
|
||
border-color:rgba(140,220,255,.28) !important; }
|
||
a[href="/logout"] { background:rgba(10,25,32,.6) !important; color:#9fe8ff !important;
|
||
border-color:rgba(120,220,255,.3) !important; box-shadow:none !important; backdrop-filter:blur(8px) !important; }
|
||
|
||
</style>
|
||
<style>
|
||
.logout-btn{display:inline-flex;align-items:center;padding:6px 14px;border-radius:20px;background:rgba(10,30,45,.6);border:1px solid rgba(80,200,255,.35);color:#9fe8ff;font-size:13px;text-decoration:none;backdrop-filter:blur(6px);white-space:nowrap;}
|
||
.logout-btn:hover{background:rgba(79,209,255,.14);}
|
||
.wb-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
|
||
.wb-card{background:rgba(255,255,255,.06);border:1px solid rgba(120,220,255,.22);border-radius:14px;padding:22px 24px;backdrop-filter:blur(10px);box-shadow:0 12px 40px rgba(0,0,0,.22)}
|
||
.wb-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
|
||
.wb-head h3{margin:0;font-size:16px;color:#9fe8ff}
|
||
.wb-updated,.wb-news-foot{font-size:11px;color:#7a8ea3}
|
||
.wb-todo{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;border:1px solid rgba(120,220,255,.14);border-radius:10px;margin-bottom:10px;cursor:pointer;background:rgba(255,255,255,.03);transition:all .2s}
|
||
.wb-todo:hover{border-color:rgba(79,209,255,.5);background:rgba(79,209,255,.08)}
|
||
.wb-todo-label{font-size:14px;color:#e8f4ff}
|
||
.wb-todo-hint{display:block;font-size:11px;color:#7a8ea3;margin-top:3px}
|
||
.wb-todo-count{font-size:20px;font-weight:700;color:#22d3ee;min-width:36px;text-align:right}
|
||
.wb-todo-count.hot{color:#f0b34a}
|
||
.wb-news-item{display:flex;gap:10px;align-items:flex-start;padding:9px 6px;border-bottom:1px dashed rgba(120,220,255,.12);text-decoration:none}
|
||
.wb-news-item:hover .wb-news-title{color:#22d3ee}
|
||
.wb-news-date{font-size:11px;color:#7a8ea3;white-space:nowrap;padding-top:2px}
|
||
.wb-news-title{font-size:13px;color:#d8ecf7;line-height:1.5}
|
||
.wb-news-src{font-size:10px;color:#6f8b9d;white-space:nowrap;padding-top:2px}
|
||
.wb-refresh{background:rgba(255,255,255,.06);border:1px solid rgba(120,220,255,.25);color:#9fe8ff;border-radius:8px;padding:4px 12px;font-size:12px;cursor:pointer;font-family:inherit}
|
||
.wb-refresh:hover{background:rgba(79,209,255,.14)}
|
||
.wb-modal-mask{position:fixed;inset:0;z-index:9999;display:none;align-items:center;justify-content:center;background:rgba(4,12,16,.6);backdrop-filter:blur(4px)}
|
||
.wb-modal-mask.show{display:flex}
|
||
.wb-modal{width:min(780px,92vw);max-height:82vh;display:flex;flex-direction:column;background:#16323c;border:1px solid rgba(120,220,255,.25);border-radius:14px;box-shadow:0 20px 50px rgba(0,0,0,.55)}
|
||
.wb-modal-head{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid rgba(120,220,255,.15)}
|
||
.wb-modal-head h3{margin:0;font-size:16px;color:#9fe8ff}
|
||
.wb-modal-body{padding:10px 20px;overflow-y:auto}
|
||
.wb-modal-item{padding:11px 4px;border-bottom:1px dashed rgba(120,220,255,.12)}
|
||
.wb-modal-item .t{font-size:14px;color:#e8f4ff;line-height:1.5}
|
||
.wb-modal-item .s{font-size:11px;color:#7a8ea3;margin-top:4px}
|
||
.wb-modal-foot{padding:12px 20px;border-top:1px solid rgba(120,220,255,.15);text-align:right}
|
||
.wb-detail-row{display:grid;grid-template-columns:120px 1fr;gap:12px;padding:9px 0;border-bottom:1px dashed rgba(120,220,255,.12);font-size:13px}
|
||
.wb-detail-row .k{color:#7a8ea3}
|
||
.wb-detail-row .v{color:#e8f4ff;word-break:break-all}
|
||
@media (max-width:900px){.wb-grid{grid-template-columns:1fr}}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
|
||
<!-- 背景层 -->
|
||
<div class="bg-image"></div>
|
||
<canvas id="bg-particles"></canvas>
|
||
<div class="bg-scan"></div>
|
||
<div class="bg-lines">
|
||
<div class="bg-line"></div>
|
||
<div class="bg-line"></div>
|
||
<div class="bg-line"></div>
|
||
<div class="bg-line"></div>
|
||
<div class="bg-line"></div>
|
||
</div>
|
||
|
||
<!-- 顶栏 -->
|
||
<div class="topbar">
|
||
<div class="topbar-left">
|
||
<div class="logo-mark"><span>C</span></div>
|
||
<div>
|
||
<div class="platform-title">XX大学附属医院审计科</div>
|
||
<div class="platform-sub">CYBER PLATFORM · 综合管理平台 v2.0</div>
|
||
</div>
|
||
</div>
|
||
<div class="topbar-right">
|
||
<div class="status-pill"><div class="status-dot"></div>系统在线</div>
|
||
<div class="clock" id="clock">--:--:--</div>
|
||
<div class="user-avatar" title="管理员">管</div>
|
||
<a href="/logout" class="logout-btn" title="退出登录">退出登录</a>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="app-body">
|
||
<!-- 侧边栏 -->
|
||
<div class="sidebar">
|
||
<div class="sidebar-label">// MODULES</div>
|
||
|
||
<a class="nav-item active" href="javascript:void(0)" id="navHome" onclick="showHome()" style="text-decoration:none;">
|
||
<div class="nav-icon" style="background:rgba(120,220,255,0.08);color:#9fe8ff;border-color:rgba(120,220,255,0.2);">🏠</div>
|
||
<div class="nav-text">
|
||
<div class="nav-name">工作台</div>
|
||
<div class="nav-desc">待办 · 政策动态</div>
|
||
</div>
|
||
</a>
|
||
|
||
<a class="nav-item" href="/digital-audit" style="text-decoration:none;">
|
||
<div class="nav-icon" style="background:rgba(94,230,168,0.12);color:#5ee6a8;border-color:rgba(94,230,168,0.3);">🧭</div>
|
||
<div class="nav-text">
|
||
<div class="nav-name">数字化审计</div>
|
||
<div class="nav-desc">驾驶舱 · 作业 · 整改 · 模型</div>
|
||
</div>
|
||
<span class="nav-badge badge-cyan" style="background:rgba(94,230,168,.12);color:#5ee6a8;border-color:rgba(94,230,168,.3);">NEW</span>
|
||
</a>
|
||
|
||
<div class="nav-item" data-nav-module="audit" onclick="selectModule('audit', this)">
|
||
<div class="nav-icon audit">📋</div>
|
||
<div class="nav-text">
|
||
<div class="nav-name">审计管理</div>
|
||
<div class="nav-desc">18个项目 · 13个进行中</div>
|
||
</div>
|
||
<span class="nav-badge badge-cyan">13</span>
|
||
</div>
|
||
|
||
<div class="nav-item" data-nav-module="risk" onclick="selectModule('risk', this)">
|
||
<div class="nav-icon risk">⚠️</div>
|
||
<div class="nav-text">
|
||
<div class="nav-name">风险管理</div>
|
||
<div class="nav-desc">2个版本 · 289个风险点</div>
|
||
</div>
|
||
<span class="nav-badge badge-amber">2</span>
|
||
</div>
|
||
|
||
<div class="nav-item" data-nav-module="knowledge" onclick="selectModule('knowledge', this)">
|
||
<div class="nav-icon knowledge">📚</div>
|
||
<div class="nav-text">
|
||
<div class="nav-name">知识库管理</div>
|
||
<div class="nav-desc">空间 · 文档 · 采集</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="nav-item" data-nav-module="contract" onclick="selectModule('contract', this)">
|
||
<div class="nav-icon knowledge" style="background:rgba(167,139,250,0.12);color:#a78bfa;border-color:rgba(167,139,250,0.25);">📋</div>
|
||
<div class="nav-text">
|
||
<div class="nav-name">合同审核</div>
|
||
<div class="nav-desc">上传 · AI审核 · 报告</div>
|
||
</div>
|
||
</div>
|
||
|
||
<a class="nav-item" href="/settings" style="text-decoration:none;">
|
||
<div class="nav-icon" style="background:rgba(120,220,255,0.08);color:#9fe8ff;border-color:rgba(120,220,255,0.2);">⚙️</div>
|
||
<div class="nav-text">
|
||
<div class="nav-name">系统设置</div>
|
||
<div class="nav-desc">大模型 · 权限 · 密码</div>
|
||
</div>
|
||
</a>
|
||
|
||
<div class="sidebar-footer">
|
||
<div class="sys-info">
|
||
<div><span>DB:</span> SQLite · LOCAL</div>
|
||
<div><span>ENGINE:</span> FastAPI</div>
|
||
<div><span>UPTIME:</span> 99.8%</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 主内容区 -->
|
||
<div class="main">
|
||
<div class="breadcrumb">
|
||
<span>PLATFORM</span>
|
||
<span class="sep">/</span>
|
||
<span class="current" id="bcCurrent">审计管理</span>
|
||
</div>
|
||
|
||
<div id="homeView">
|
||
<div class="module-header" style="display:flex;">
|
||
<div class="module-title-block">
|
||
<h1>工作台</h1>
|
||
<div class="tagline">待办事项 · 系统概览 · 审计政策动态</div>
|
||
</div>
|
||
</div>
|
||
<div class="wb-grid">
|
||
<div class="wb-card">
|
||
<div class="wb-head"><h3>📋 待办事项</h3><span class="wb-updated" id="wbUpdated"></span></div>
|
||
<div id="todoList" class="wb-todos">加载中...</div>
|
||
</div>
|
||
<div class="wb-card">
|
||
<div class="wb-head"><h3>📰 审计政策动态</h3><button class="wb-refresh" onclick="loadPolicyNews(true)">刷新</button></div>
|
||
<div id="policyNews" class="wb-news">加载中...</div>
|
||
<div class="wb-news-foot" id="newsUpdated"></div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
<div id="todoModal" class="wb-modal-mask">
|
||
<div class="wb-modal">
|
||
<div class="wb-modal-head">
|
||
<h3 id="todoModalTitle">待办明细</h3>
|
||
<button class="wb-refresh" onclick="closeTodoModal()">关闭</button>
|
||
</div>
|
||
<div id="todoModalBody" class="wb-modal-body">加载中...</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="module-header" id="moduleHeader">
|
||
<div class="module-title-block">
|
||
<h1 id="moduleTitle">审计<span class="accent">管理</span>系统</h1>
|
||
<div class="tagline" id="moduleTagline">医院内部审计项目管理 · 资料分析 · 报告生成</div>
|
||
</div>
|
||
<div class="module-action">
|
||
<button class="btn-cyber primary" onclick="enterFromButton()">进入系统</button>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 大卡片仪表盘 -->
|
||
<div class="dashboard-grid single" id="moduleGrid">
|
||
|
||
<!-- 审计管理系统卡片 -->
|
||
<div class="sys-card theme-audit is-active" id="card-audit" data-module="audit" onclick="enterSystem()">
|
||
<div class="scan-line"></div>
|
||
<div class="hud-corner tl"></div>
|
||
<div class="hud-corner tr"></div>
|
||
<div class="hud-corner bl"></div>
|
||
<div class="hud-corner br"></div>
|
||
<div class="sys-card-header">
|
||
<div class="sys-card-icon">📋</div>
|
||
<div class="sys-card-title">
|
||
<h3>审计管理</h3>
|
||
<div class="desc">医院内部审计项目管理 · 大模型分析 · 知识库检索</div>
|
||
</div>
|
||
</div>
|
||
<div class="sys-card-stats">
|
||
<div class="stat-box" style="cursor:pointer" onclick="event.stopPropagation(); openStatList('audit','projects','项目')"><div class="stat-num" id="audit-projects">-</div><div class="stat-label">项目</div></div>
|
||
<div class="stat-box" style="cursor:pointer" onclick="event.stopPropagation(); openStatList('audit','active','进行中')"><div class="stat-num" id="audit-active">-</div><div class="stat-label">进行中</div></div>
|
||
<div class="stat-box" style="cursor:pointer" onclick="event.stopPropagation(); openStatList('audit','docs','文档')"><div class="stat-num" id="audit-docs">-</div><div class="stat-label">文档</div></div>
|
||
</div>
|
||
<div class="sys-card-detail" id="detail-audit"></div>
|
||
<div class="sys-card-footer">
|
||
<div class="status"><div class="dot"></div><span id="audit-status-text">加载中...</span></div>
|
||
<div class="enter-link">进入 →</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 风险管理系统卡片 -->
|
||
<div class="sys-card theme-risk" id="card-risk" data-module="risk" onclick="enterSystem()">
|
||
<div class="scan-line"></div>
|
||
<div class="hud-corner tl"></div>
|
||
<div class="hud-corner tr"></div>
|
||
<div class="hud-corner bl"></div>
|
||
<div class="hud-corner br"></div>
|
||
<div class="sys-card-header">
|
||
<div class="sys-card-icon">⚠️</div>
|
||
<div class="sys-card-title">
|
||
<h3>风险管理</h3>
|
||
<div class="desc">单位风险评估 · 调查表管理 · 数据分析</div>
|
||
</div>
|
||
</div>
|
||
<div class="sys-card-stats">
|
||
<div class="stat-box" style="cursor:pointer" onclick="event.stopPropagation(); openStatList('risk','versions','版本')"><div class="stat-num" id="risk-versions">-</div><div class="stat-label">版本</div></div>
|
||
<div class="stat-box" style="cursor:pointer" onclick="event.stopPropagation(); openStatList('risk','risk_items','风险项')"><div class="stat-num" id="risk-items">-</div><div class="stat-label">风险项</div></div>
|
||
<div class="stat-box" style="cursor:pointer" onclick="event.stopPropagation(); openStatList('risk','surveys','问卷')"><div class="stat-num" id="risk-surveys">-</div><div class="stat-label">问卷</div></div>
|
||
</div>
|
||
<div class="sys-card-detail" id="detail-risk"></div>
|
||
<div class="sys-card-footer">
|
||
<div class="status"><div class="dot"></div><span id="risk-status-text">加载中...</span></div>
|
||
<div class="enter-link">进入 →</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 知识库管理系统卡片 -->
|
||
<div class="sys-card theme-knowledge" id="card-knowledge" data-module="knowledge" onclick="enterKnowledge()">
|
||
<div class="scan-line"></div>
|
||
<div class="hud-corner tl"></div>
|
||
<div class="hud-corner tr"></div>
|
||
<div class="hud-corner bl"></div>
|
||
<div class="hud-corner br"></div>
|
||
<div class="sys-card-header">
|
||
<div class="sys-card-icon">📚</div>
|
||
<div class="sys-card-title">
|
||
<h3>知识库管理</h3>
|
||
<div class="desc">知识空间管理 · 文档录入 · 链接采集归类</div>
|
||
</div>
|
||
</div>
|
||
<div class="sys-card-stats">
|
||
<div class="stat-box" style="cursor:pointer" onclick="event.stopPropagation(); openStatList('knowledge','spaces','空间')"><div class="stat-num" id="kb-spaces">-</div><div class="stat-label">空间</div></div>
|
||
<div class="stat-box" style="cursor:pointer" onclick="event.stopPropagation(); openStatList('knowledge','docs','文档')"><div class="stat-num" id="kb-docs">-</div><div class="stat-label">文档</div></div>
|
||
<div class="stat-box" style="cursor:pointer" onclick="event.stopPropagation(); openStatList('knowledge','collected','采集')"><div class="stat-num" id="kb-collected">-</div><div class="stat-label">采集</div></div>
|
||
</div>
|
||
<div class="sys-card-detail" id="detail-knowledge"></div>
|
||
<div class="sys-card-footer">
|
||
<div class="status"><div class="dot"></div><span id="kb-status-text">知识库在线</span></div>
|
||
<div class="enter-link">进入 →</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 合同审核系统卡片 -->
|
||
<div class="sys-card theme-contract" id="card-contract" data-module="contract" onclick="enterContract()">
|
||
<div class="scan-line"></div>
|
||
<div class="hud-corner tl"></div>
|
||
<div class="hud-corner tr"></div>
|
||
<div class="hud-corner bl"></div>
|
||
<div class="hud-corner br"></div>
|
||
<div class="sys-card-header">
|
||
<div class="sys-card-icon">📋</div>
|
||
<div class="sys-card-title">
|
||
<h3>合同审核</h3>
|
||
<div class="desc">合同上传 · AI智能审核 · 风险报告</div>
|
||
</div>
|
||
</div>
|
||
<div class="sys-card-stats">
|
||
<div class="stat-box" style="cursor:pointer" onclick="event.stopPropagation(); openStatList('contract','contracts','合同')"><div class="stat-num" id="ct-total">-</div><div class="stat-label">合同</div></div>
|
||
<div class="stat-box" style="cursor:pointer" onclick="event.stopPropagation(); openStatList('contract','issues','问题')"><div class="stat-num" id="ct-issues">-</div><div class="stat-label">问题</div></div>
|
||
<div class="stat-box" style="cursor:pointer" onclick="event.stopPropagation(); openStatList('contract','reviewed','已审核')"><div class="stat-num" id="ct-reviewed">-</div><div class="stat-label">已审核</div></div>
|
||
</div>
|
||
<div class="sys-card-detail" id="detail-contract"></div>
|
||
<div class="sys-card-footer">
|
||
<div class="status"><div class="dot"></div><span id="ct-status-text">加载中...</span></div>
|
||
<div class="enter-link">进入 →</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 详细信息条 -->
|
||
<div class="info-strip">
|
||
<div class="info-card">
|
||
<h4><span class="icon">📊</span> 审计概况</h4>
|
||
<div class="info-row"><span class="label">总项目数</span><span class="val cyan" id="info-audit-total">-</span></div>
|
||
<div class="info-row"><span class="label">进行中</span><span class="val cyan" id="info-audit-active">-</span></div>
|
||
<div class="info-row"><span class="label">已完成</span><span class="val green" id="info-audit-done">-</span></div>
|
||
<div class="info-row"><span class="label">未开始</span><span class="val amber" id="info-audit-pending">-</span></div>
|
||
</div>
|
||
<div class="info-card">
|
||
<h4><span class="icon">📁</span> 资料与分析</h4>
|
||
<div class="info-row"><span class="label">审计资料</span><span class="val cyan" id="info-audit-docs">-</span></div>
|
||
<div class="info-row"><span class="label">附件文件</span><span class="val" id="info-audit-att">-</span></div>
|
||
<div class="info-row"><span class="label">分析结果</span><span class="val green" id="info-audit-analysis">-</span></div>
|
||
<div class="info-row"><span class="label">知识库文档</span><span class="val" id="info-audit-knowledge">-</span></div>
|
||
</div>
|
||
<div class="info-card">
|
||
<h4><span class="icon">⚠️</span> 风险概况</h4>
|
||
<div class="info-row"><span class="label">评估版本</span><span class="val amber" id="info-risk-versions">-</span></div>
|
||
<div class="info-row"><span class="label">风险点总数</span><span class="val amber" id="info-risk-items">-</span></div>
|
||
<div class="info-row"><span class="label">调查任务</span><span class="val cyan" id="info-risk-surveys">-</span></div>
|
||
<div class="info-row"><span class="label">在线状态</span><span class="val" id="info-risk-status">-</span></div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
// 时钟
|
||
function updateClock() {
|
||
const d = new Date();
|
||
const h = String(d.getHours()).padStart(2,'0');
|
||
const m = String(d.getMinutes()).padStart(2,'0');
|
||
const s = String(d.getSeconds()).padStart(2,'0');
|
||
document.getElementById('clock').textContent = h+':'+m+':'+s;
|
||
}
|
||
setInterval(updateClock, 1000);
|
||
updateClock();
|
||
|
||
// 模块切换
|
||
const moduleData = {
|
||
audit: {
|
||
title: '审计<span class="accent">管理</span>系统',
|
||
tagline: '医院内部审计项目管理 · 资料分析 · 报告生成',
|
||
bc: '审计管理'
|
||
},
|
||
risk: {
|
||
title: '风险<span class="accent">管理</span>系统',
|
||
tagline: '单位风险评估 · 调查表管理 · 数据分析',
|
||
bc: '风险管理'
|
||
},
|
||
knowledge: {
|
||
title: '知识<span class="accent">库</span>管理',
|
||
tagline: '知识空间管理 · 文档录入 · 链接采集归类',
|
||
bc: '知识库管理'
|
||
},
|
||
contract: {
|
||
title: '合同<span class="accent">审核</span>管理',
|
||
tagline: '合同上传 · AI智能审核 · 风险报告',
|
||
bc: '合同审核'
|
||
}
|
||
};
|
||
|
||
let currentModule = 'audit';
|
||
|
||
// 子系统地址跟随当前访问的主机名:本机访问用 localhost,服务器部署用服务器 IP/域名
|
||
function svcUrl(port) {
|
||
return window.location.protocol + '//' + window.location.hostname + ':' + port;
|
||
}
|
||
|
||
function selectModule(mod, el) {
|
||
document.getElementById('homeView').style.display = 'none';
|
||
document.getElementById('moduleHeader').style.display = '';
|
||
document.getElementById('moduleGrid').style.display = '';
|
||
// 更新侧边栏选中态
|
||
document.querySelectorAll('.nav-item').forEach(n => n.classList.remove('active'));
|
||
const item = el || (window.event && window.event.currentTarget);
|
||
if (item) item.classList.add('active');
|
||
currentModule = mod;
|
||
|
||
// 更新标题
|
||
const data = moduleData[mod];
|
||
document.getElementById('moduleTitle').innerHTML = data.title;
|
||
document.getElementById('moduleTagline').textContent = data.tagline;
|
||
document.getElementById('bcCurrent').textContent = data.bc;
|
||
|
||
// 右侧只显示当前模块的卡片
|
||
document.querySelectorAll('.sys-card[data-module]').forEach(card => {
|
||
card.classList.toggle('is-active', card.dataset.module === mod);
|
||
});
|
||
}
|
||
|
||
// 首次进入:默认展示工作台(点模块才显示模块界面)
|
||
showHome();
|
||
|
||
function showHome() {
|
||
document.getElementById('homeView').style.display = 'block';
|
||
document.getElementById('moduleHeader').style.display = 'none';
|
||
document.getElementById('moduleGrid').style.display = 'none';
|
||
document.querySelectorAll('.nav-item').forEach(n => n.classList.remove('active'));
|
||
document.getElementById('navHome').classList.add('active');
|
||
document.getElementById('bcCurrent').textContent = '工作台';
|
||
loadWorkbench();
|
||
loadPolicyNews(false);
|
||
}
|
||
|
||
function goModule(mod) {
|
||
const el = document.querySelector('.nav-item[data-nav-module="' + mod + '"]');
|
||
if (el) selectModule(mod, el);
|
||
}
|
||
|
||
function escapeHtml(str) {
|
||
return String(str == null ? '' : str)
|
||
.replace(/&/g, '&').replace(/</g, '<')
|
||
.replace(/>/g, '>').replace(/"/g, '"');
|
||
}
|
||
|
||
async function loadWorkbench() {
|
||
try {
|
||
const r = await fetch('/api/workbench');
|
||
const d = await r.json();
|
||
const items = d.todos || [];
|
||
document.getElementById('todoList').innerHTML = items.map(t => {
|
||
const hot = t.count > 0 ? ' hot' : '';
|
||
return '<div class="wb-todo" data-key="' + t.key + '" data-label="' + escapeHtml(t.label) + '" onclick="showTodoItems(this.dataset.key, this.dataset.label)">' +
|
||
'<div><span class="wb-todo-label">' + escapeHtml(t.label) + '</span>' +
|
||
'<span class="wb-todo-hint">' + escapeHtml(t.hint || '') + '</span></div>' +
|
||
'<span class="wb-todo-count' + hot + '">' + t.count + '</span></div>';
|
||
}).join('') || '暂无待办';
|
||
document.getElementById('wbUpdated').textContent = d.updated ? '更新于 ' + d.updated : '';
|
||
} catch (e) {
|
||
document.getElementById('todoList').textContent = '待办加载失败:' + e.message;
|
||
}
|
||
}
|
||
|
||
const TODO_MODULE_PORT = { contract: '8090', audit: '8000', risk: '8001' };
|
||
|
||
function moduleUrlFor(key) {
|
||
if (key === 'kb' || key === 'knowledge') return 'http://' + location.hostname + ':8080/knowledge';
|
||
return 'http://' + location.hostname + ':' + (TODO_MODULE_PORT[key] || '8080') + '/';
|
||
}
|
||
|
||
const TODO_STAT_MAP = {
|
||
contract: ['contract', 'pending', '合同待审核'],
|
||
audit: ['audit', 'active', '审计项目进行中'],
|
||
kb: ['knowledge', 'collected', '知识库采集条目'],
|
||
risk: ['risk', 'risk_items', '检查风险数据'],
|
||
};
|
||
|
||
const STAT_ID_MAP = {
|
||
'audit-projects': ['audit', 'projects', '项目'],
|
||
'audit-active': ['audit', 'active', '进行中'],
|
||
'audit-docs': ['audit', 'docs', '文档'],
|
||
'risk-versions': ['risk', 'versions', '版本'],
|
||
'risk-items': ['risk', 'risk_items', '风险项'],
|
||
'risk-surveys': ['risk', 'surveys', '问卷'],
|
||
'kb-spaces': ['knowledge', 'spaces', '空间'],
|
||
'kb-docs': ['knowledge', 'docs', '文档'],
|
||
'kb-collected': ['knowledge', 'collected', '采集'],
|
||
'ct-total': ['contract', 'contracts', '合同'],
|
||
'ct-issues': ['contract', 'issues', '问题'],
|
||
'ct-reviewed': ['contract', 'reviewed', '已审核'],
|
||
};
|
||
|
||
const DETAIL_LABEL_MAP = {
|
||
'已完成项目': ['audit', 'completed'],
|
||
'未开始项目': ['audit', 'pending'],
|
||
'分析结果': ['audit', 'analysis'],
|
||
'附件文件': ['audit', 'attachments'],
|
||
'知识库文档': ['audit', 'knowledge'],
|
||
'审计人员': ['audit', 'persons'],
|
||
'评估部门': ['risk', 'departments'],
|
||
'风险评估记录': ['risk', 'assessments'],
|
||
'合并风险记录': ['risk', 'merged'],
|
||
'评估版本': ['risk', 'versions'],
|
||
'问卷数量': ['risk', 'surveys'],
|
||
'极高风险': ['contract', 'risk_extreme'],
|
||
'高风险': ['contract', 'risk_high'],
|
||
'待审核': ['contract', 'pending'],
|
||
'问题总数': ['contract', 'issues'],
|
||
};
|
||
|
||
let statItemsCache = [];
|
||
let lastStatCtx = null;
|
||
|
||
async function showTodoItems(key, label) {
|
||
const m = TODO_STAT_MAP[key] || ['audit', 'projects', '项目'];
|
||
await openStatList(m[0], m[1], label || m[2]);
|
||
}
|
||
|
||
async function openStatList(module, key, label) {
|
||
lastStatCtx = { module: module, key: key, label: label };
|
||
document.getElementById('todoModal').classList.add('show');
|
||
document.getElementById('todoModalTitle').textContent = label || '明细';
|
||
document.getElementById('todoModalBody').innerHTML = '加载中...';
|
||
try {
|
||
const r = await fetch('/api/stat-items?module=' + encodeURIComponent(module) + '&key=' + encodeURIComponent(key));
|
||
const d = await r.json();
|
||
statItemsCache = d.items || [];
|
||
renderStatList();
|
||
} catch (e) {
|
||
document.getElementById('todoModalBody').textContent = '加载失败:' + e.message;
|
||
}
|
||
}
|
||
|
||
function subtitleOf(item) {
|
||
const fields = item.fields || {};
|
||
return Object.keys(fields).filter(k => k !== '合同名称' && fields[k] !== item.title)
|
||
.slice(0, 2).map(k => k + ':' + fields[k]).join(' ');
|
||
}
|
||
|
||
function gotoStatItem(module, key, index) {
|
||
const item = statItemsCache[index] || {};
|
||
const id = item.id;
|
||
const host = location.hostname;
|
||
if (module === 'contract') {
|
||
window.location.href = 'http://' + host + ':8090/?tab=list' + (id ? '&id=' + id : '');
|
||
} else if (module === 'knowledge') {
|
||
window.location.href = 'http://' + host + ':8080/knowledge?tab=lc' + (id ? '&id=' + id : '');
|
||
} else if (module === 'risk') {
|
||
window.location.href = 'http://' + host + ':8001/?tab=inspection' + (item.report_id ? '&report=' + item.report_id : '');
|
||
} else {
|
||
window.location.href = 'http://' + host + ':8000/?expand=all' + (id ? '&project=' + id : '');
|
||
}
|
||
}
|
||
|
||
function renderStatList() {
|
||
const box = document.getElementById('todoModalBody');
|
||
const ctx = lastStatCtx || { label: '明细', module: 'audit', key: 'projects' };
|
||
document.getElementById('todoModalTitle').textContent = (ctx.label || '明细') + '(' + statItemsCache.length + ')';
|
||
if (!statItemsCache.length) { box.innerHTML = '暂无数据'; return; }
|
||
box.innerHTML = statItemsCache.map((it, i) =>
|
||
'<div class="wb-modal-item" onclick="gotoStatItem(\'' + ctx.module + '\',\'' + ctx.key + '\',' + i + ')">' +
|
||
'<div class="t">' + escapeHtml(it.title || '') + '</div>' +
|
||
'<div class="s">' + escapeHtml(subtitleOf(it)) + '</div>' +
|
||
'</div>').join('');
|
||
}
|
||
|
||
function showStatItemDetail(i) {
|
||
const it = statItemsCache[i];
|
||
if (!it) return;
|
||
const fields = it.fields || {};
|
||
const body = document.getElementById('todoModalBody');
|
||
document.getElementById('todoModalTitle').textContent = it.title || '详情';
|
||
body.innerHTML = '<button class="wb-refresh" style="margin-bottom:12px" onclick="backToStatList()">← 返回列表</button>' +
|
||
'<div class="wb-detail">' + Object.keys(fields).map(k =>
|
||
'<div class="wb-detail-row"><span class="k">' + escapeHtml(k) + '</span><span class="v">' +
|
||
escapeHtml(fields[k] || '') + '</span></div>').join('') + '</div>';
|
||
}
|
||
|
||
function backToStatList() {
|
||
renderStatList();
|
||
}
|
||
|
||
function closeTodoModal() {
|
||
document.getElementById('todoModal').classList.remove('show');
|
||
}
|
||
|
||
// 点击统计数字/详情行 → 打开明细(捕获阶段拦截,避免触发卡片进入系统)
|
||
document.addEventListener('click', function(e) {
|
||
const box = e.target.closest('.stat-box');
|
||
if (box) {
|
||
const num = box.querySelector('.stat-num');
|
||
if (num && STAT_ID_MAP[num.id]) {
|
||
e.preventDefault(); e.stopPropagation();
|
||
const s = STAT_ID_MAP[num.id];
|
||
openStatList(s[0], s[1], s[2]);
|
||
return;
|
||
}
|
||
}
|
||
const row = e.target.closest('.detail-row');
|
||
if (row) {
|
||
const k = row.querySelector('.k');
|
||
if (k) {
|
||
const label = k.textContent.trim();
|
||
if (DETAIL_LABEL_MAP[label]) {
|
||
e.preventDefault(); e.stopPropagation();
|
||
const s = DETAIL_LABEL_MAP[label];
|
||
openStatList(s[0], s[1], label);
|
||
}
|
||
}
|
||
}
|
||
}, true);
|
||
|
||
async function loadPolicyNews(force) {
|
||
const box = document.getElementById('policyNews');
|
||
box.textContent = '正在获取审计署最新动态...';
|
||
try {
|
||
const r = await fetch('/api/policy-news' + (force ? '?refresh=1' : ''));
|
||
const d = await r.json();
|
||
const items = d.items || [];
|
||
if (!items.length) { box.textContent = '暂无政策动态'; return; }
|
||
box.innerHTML = items.map(it =>
|
||
'<a class="wb-news-item" href="' + escapeHtml(it.url) + '" target="_blank" rel="noopener">' +
|
||
'<span class="wb-news-date">' + escapeHtml(it.date || '') + '</span>' +
|
||
'<span class="wb-news-title">' + escapeHtml(it.title) + '</span>' +
|
||
'<span class="wb-news-src">' + escapeHtml(it.source || '') + '</span>' +
|
||
'</a>'
|
||
).join('');
|
||
document.getElementById('newsUpdated').textContent = d.updated ? '数据更新于 ' + d.updated + '(来源:审计署官网)' : '来源:审计署官网';
|
||
} catch (e) {
|
||
box.textContent = '政策动态加载失败:' + e.message;
|
||
}
|
||
}
|
||
|
||
function enterFromButton() {
|
||
if (currentModule === 'risk') {
|
||
window.location.href = svcUrl(8001) + '/';
|
||
} else if (currentModule === 'knowledge') {
|
||
window.location.href = '/knowledge';
|
||
} else if (currentModule === 'contract') {
|
||
window.location.href = svcUrl(8090) + '/';
|
||
} else {
|
||
window.location.href = svcUrl(8000) + '/';
|
||
}
|
||
}
|
||
|
||
function enterKnowledge() {
|
||
window.location.href = '/knowledge';
|
||
}
|
||
|
||
function enterContract() {
|
||
window.location.href = svcUrl(8090) + '/';
|
||
}
|
||
|
||
function enterSystem() {
|
||
// 从卡片class判断目标系统
|
||
const card = event.currentTarget;
|
||
if (card.classList.contains('theme-risk')) {
|
||
window.location.href = svcUrl(8001) + '/';
|
||
} else {
|
||
window.location.href = svcUrl(8000) + '/';
|
||
}
|
||
}
|
||
|
||
// ===== 加载统计数据 =====
|
||
async function loadStats() {
|
||
try {
|
||
const resp = await fetch('/api/stats');
|
||
const data = await resp.json();
|
||
|
||
// 审计系统
|
||
const a = data.audit;
|
||
if (a.status === 'online') {
|
||
document.getElementById('audit-projects').textContent = a.projects;
|
||
document.getElementById('audit-active').textContent = a.active;
|
||
document.getElementById('audit-docs').textContent = a.docs;
|
||
document.getElementById('audit-status-text').textContent = a.active + '个项目进行中';
|
||
document.getElementById('info-audit-total').textContent = a.projects;
|
||
document.getElementById('info-audit-active').textContent = a.active;
|
||
document.getElementById('info-audit-done').textContent = a.completed;
|
||
document.getElementById('info-audit-pending').textContent = a.pending;
|
||
document.getElementById('info-audit-docs').textContent = a.docs;
|
||
document.getElementById('info-audit-att').textContent = a.attachments;
|
||
document.getElementById('info-audit-analysis').textContent = a.analysis;
|
||
document.getElementById('info-audit-knowledge').textContent = a.knowledge;
|
||
|
||
const auditDetail = document.getElementById('detail-audit');
|
||
if (auditDetail) {
|
||
auditDetail.innerHTML =
|
||
`<div class="detail-row"><span class="k">已完成项目</span><span class="v">${a.completed}</span></div>` +
|
||
`<div class="detail-row"><span class="k">未开始项目</span><span class="v">${a.pending}</span></div>` +
|
||
`<div class="detail-row"><span class="k">分析结果</span><span class="v">${a.analysis}</span></div>` +
|
||
`<div class="detail-row"><span class="k">附件文件</span><span class="v">${a.attachments}</span></div>` +
|
||
`<div class="detail-row"><span class="k">知识库文档</span><span class="v">${a.knowledge}</span></div>` +
|
||
`<div class="detail-row"><span class="k">审计人员</span><span class="v">${a.persons}</span></div>`;
|
||
}
|
||
} else {
|
||
document.getElementById('audit-status-text').textContent = '数据库离线';
|
||
}
|
||
|
||
// 风险系统
|
||
const r = data.risk;
|
||
if (r.status === 'online') {
|
||
document.getElementById('risk-versions').textContent = r.versions;
|
||
document.getElementById('risk-items').textContent = r.risk_items;
|
||
document.getElementById('risk-surveys').textContent = r.surveys;
|
||
document.getElementById('risk-status-text').textContent = '系统在线';
|
||
document.getElementById('info-risk-versions').textContent = r.versions;
|
||
document.getElementById('info-risk-items').textContent = r.risk_items;
|
||
document.getElementById('info-risk-surveys').textContent = r.surveys;
|
||
document.getElementById('info-risk-status').textContent = '在线';
|
||
document.getElementById('info-risk-status').className = 'val green';
|
||
} else {
|
||
document.getElementById('risk-status-text').textContent = '数据库离线';
|
||
document.getElementById('info-risk-status').textContent = '离线';
|
||
document.getElementById('info-risk-status').className = 'val red';
|
||
}
|
||
|
||
const riskDetail = document.getElementById('detail-risk');
|
||
if (riskDetail) {
|
||
riskDetail.innerHTML =
|
||
`<div class="detail-row"><span class="k">评估部门</span><span class="v">${r.departments ?? '-'}</span></div>` +
|
||
`<div class="detail-row"><span class="k">风险评估记录</span><span class="v">${r.assessments ?? '-'}</span></div>` +
|
||
`<div class="detail-row"><span class="k">合并风险记录</span><span class="v">${r.merged ?? '-'}</span></div>` +
|
||
`<div class="detail-row"><span class="k">系统状态</span><span class="v">${r.status === 'online' ? '在线' : '离线'}</span></div>` +
|
||
`<div class="detail-row"><span class="k">评估版本</span><span class="v">${r.versions ?? '-'}</span></div>` +
|
||
`<div class="detail-row"><span class="k">问卷数量</span><span class="v">${r.surveys ?? '-'}</span></div>`;
|
||
}
|
||
|
||
// 更新侧边栏徽标
|
||
if (a.status === 'online') {
|
||
const auditNav = document.querySelector('.nav-item .nav-name');
|
||
if (auditNav && auditNav.textContent === '审计管理') {
|
||
const desc = auditNav.nextElementSibling;
|
||
if (desc) desc.textContent = a.projects + '个项目 · ' + a.active + '个进行中';
|
||
const badge = auditNav.parentElement.nextElementSibling;
|
||
if (badge && badge.classList.contains('nav-badge')) badge.textContent = a.active;
|
||
}
|
||
}
|
||
|
||
// 知识库统计
|
||
try {
|
||
const kbResp = await fetch('/api/kb/spaces');
|
||
const kbData = await kbResp.json();
|
||
const spaces = kbData.spaces || [];
|
||
const totalDocs = spaces.reduce((s, r) => s + r.doc_count, 0);
|
||
document.getElementById('kb-spaces').textContent = spaces.length;
|
||
document.getElementById('kb-docs').textContent = totalDocs;
|
||
document.getElementById('kb-status-text').textContent = spaces.length + '个空间 · ' + totalDocs + '篇文档';
|
||
|
||
const kbDetail = document.getElementById('detail-knowledge');
|
||
if (kbDetail) {
|
||
const top = spaces.slice().sort((x, y) => y.doc_count - x.doc_count).slice(0, 6);
|
||
kbDetail.innerHTML = top.length
|
||
? top.map(s => `<div class="detail-row"><span class="k">${s.name}</span><span class="v">${s.doc_count} 篇</span></div>`).join('')
|
||
: '<div class="detail-row"><span class="k">暂无知识空间</span><span class="v">-</span></div>';
|
||
}
|
||
} catch(e) {}
|
||
|
||
// 合同审核统计
|
||
try {
|
||
const ctResp = await fetch('/api/contract-stats');
|
||
const ctData = await ctResp.json();
|
||
const ctList = ctData.contracts || [];
|
||
const reviewed = ctList.filter(c => c.status === 'reviewed');
|
||
const totalIssues = reviewed.reduce((sum, c) => sum + (c.issues ? c.issues.length : 0), 0);
|
||
const ctTotal = document.getElementById('ct-total');
|
||
const ctIssues = document.getElementById('ct-issues');
|
||
const ctReviewed = document.getElementById('ct-reviewed');
|
||
if (ctTotal) ctTotal.textContent = ctList.length;
|
||
if (ctIssues) ctIssues.textContent = totalIssues;
|
||
if (ctReviewed) ctReviewed.textContent = reviewed.length;
|
||
const ctStatus = document.getElementById('ct-status-text');
|
||
if (ctStatus) ctStatus.textContent = '系统在线 · ' + reviewed.length + '份已审核';
|
||
|
||
const ctDetail = document.getElementById('detail-contract');
|
||
if (ctDetail) {
|
||
const riskCount = lvl => ctList.filter(c => c.risk_level === lvl).length;
|
||
const totalIssuesAll = ctList.reduce((sum, c) => sum + (c.issues ? c.issues.length : 0), 0);
|
||
const avgIssues = ctList.length ? (totalIssuesAll / ctList.length).toFixed(1) : '0';
|
||
ctDetail.innerHTML =
|
||
`<div class="detail-row"><span class="k">极高风险</span><span class="v">${riskCount('极高')}</span></div>` +
|
||
`<div class="detail-row"><span class="k">高风险</span><span class="v">${riskCount('高')}</span></div>` +
|
||
`<div class="detail-row"><span class="k">待审核</span><span class="v">${ctList.filter(c => c.status !== 'reviewed').length}</span></div>` +
|
||
`<div class="detail-row"><span class="k">平均问题数</span><span class="v">${avgIssues}</span></div>` +
|
||
`<div class="detail-row"><span class="k">问题总数</span><span class="v">${totalIssuesAll}</span></div>` +
|
||
`<div class="detail-row"><span class="k">最近合同</span><span class="v">${ctList.length ? ctList[0].name : '-'}</span></div>`;
|
||
}
|
||
} catch(e) {
|
||
const ctStatus = document.getElementById('ct-status-text');
|
||
if (ctStatus) ctStatus.textContent = '服务离线';
|
||
}
|
||
} catch (e) {
|
||
console.error('加载统计失败:', e);
|
||
}
|
||
}
|
||
loadStats();
|
||
setInterval(loadStats, 30000);
|
||
|
||
// 根据系统设置隐藏被关闭的模块
|
||
async function applyModulePermissions() {
|
||
try {
|
||
const r = await fetch('/api/settings');
|
||
if (!r.ok) return;
|
||
const s = await r.json();
|
||
const mods = s.modules || {};
|
||
document.querySelectorAll('.nav-item[data-nav-module]').forEach(el => {
|
||
if (mods[el.dataset.navModule] === false) el.style.display = 'none';
|
||
});
|
||
document.querySelectorAll('.sys-card[data-module]').forEach(el => {
|
||
if (mods[el.dataset.module] === false) el.style.display = 'none';
|
||
});
|
||
} catch (e) {}
|
||
}
|
||
applyModulePermissions();
|
||
|
||
// ===== 背景粒子系统 =====
|
||
const canvas = document.getElementById('bg-particles');
|
||
const ctx = canvas.getContext('2d');
|
||
|
||
function resizeCanvas() {
|
||
canvas.width = window.innerWidth;
|
||
canvas.height = window.innerHeight;
|
||
}
|
||
resizeCanvas();
|
||
window.addEventListener('resize', resizeCanvas);
|
||
|
||
const particles = [];
|
||
const PARTICLE_COUNT = 60;
|
||
const colors = [
|
||
{ r: 0, g: 212, b: 255 }, // cyan
|
||
{ r: 255, g: 140, b: 0 }, // amber
|
||
{ r: 255, g: 0, b: 128 }, // magenta
|
||
{ r: 0, g: 255, b: 136 }, // green
|
||
];
|
||
|
||
for (let i = 0; i < PARTICLE_COUNT; i++) {
|
||
const c = colors[Math.floor(Math.random() * colors.length)];
|
||
particles.push({
|
||
x: Math.random() * canvas.width,
|
||
y: Math.random() * canvas.height,
|
||
vx: (Math.random() - 0.5) * 0.3,
|
||
vy: (Math.random() - 0.5) * 0.3,
|
||
size: Math.random() * 2 + 0.5,
|
||
color: c,
|
||
alpha: Math.random() * 0.4 + 0.1,
|
||
pulse: Math.random() * Math.PI * 2,
|
||
pulseSpeed: Math.random() * 0.02 + 0.005,
|
||
});
|
||
}
|
||
|
||
function drawParticles() {
|
||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||
|
||
// 粒子之间的连线
|
||
for (let i = 0; i < particles.length; i++) {
|
||
for (let j = i + 1; j < particles.length; j++) {
|
||
const dx = particles[i].x - particles[j].x;
|
||
const dy = particles[i].y - particles[j].y;
|
||
const dist = Math.sqrt(dx * dx + dy * dy);
|
||
if (dist < 140) {
|
||
const opacity = (1 - dist / 140) * 0.08;
|
||
ctx.strokeStyle = `rgba(0,212,255,${opacity})`;
|
||
ctx.lineWidth = 0.5;
|
||
ctx.beginPath();
|
||
ctx.moveTo(particles[i].x, particles[i].y);
|
||
ctx.lineTo(particles[j].x, particles[j].y);
|
||
ctx.stroke();
|
||
}
|
||
}
|
||
}
|
||
|
||
// 绘制粒子
|
||
for (const p of particles) {
|
||
p.x += p.vx;
|
||
p.y += p.vy;
|
||
p.pulse += p.pulseSpeed;
|
||
|
||
// 边界循环
|
||
if (p.x < 0) p.x = canvas.width;
|
||
if (p.x > canvas.width) p.x = 0;
|
||
if (p.y < 0) p.y = canvas.height;
|
||
if (p.y > canvas.height) p.y = 0;
|
||
|
||
const pulseAlpha = p.alpha * (0.6 + 0.4 * Math.sin(p.pulse));
|
||
const glowSize = p.size * 4;
|
||
|
||
// 光晕
|
||
const grad = ctx.createRadialGradient(p.x, p.y, 0, p.x, p.y, glowSize);
|
||
grad.addColorStop(0, `rgba(${p.color.r},${p.color.g},${p.color.b},${pulseAlpha * 0.4})`);
|
||
grad.addColorStop(1, `rgba(${p.color.r},${p.color.g},${p.color.b},0)`);
|
||
ctx.fillStyle = grad;
|
||
ctx.beginPath();
|
||
ctx.arc(p.x, p.y, glowSize, 0, Math.PI * 2);
|
||
ctx.fill();
|
||
|
||
// 粒子核心
|
||
ctx.fillStyle = `rgba(${p.color.r},${p.color.g},${p.color.b},${pulseAlpha})`;
|
||
ctx.beginPath();
|
||
ctx.arc(p.x, p.y, p.size, 0, Math.PI * 2);
|
||
ctx.fill();
|
||
}
|
||
|
||
requestAnimationFrame(drawParticles);
|
||
}
|
||
drawParticles();
|
||
</script>
|
||
|
||
</body>
|
||
</html>
|