初始化
This commit is contained in:
1 parent
34474bd5fc
commit
b638b541d0
3008 files changed
+837699
No files matched your search
+204
@@ -0,0 +1,204 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>美国涉华涉台政策权力网络专题平台</title>
|
||||
<style>
|
||||
:root {
|
||||
--bg1:#7a0d18; --bg2:#3d0710; --card:#fffaf7; --card2:#fff4ec; --ink:#241314; --muted:#6f5452;
|
||||
--line:#e8cfc9; --accent:#b21f2d; --accent2:#d88a5b; --deep:#520812; --good:#1f7a5b; --warn:#bd6b00; --danger:#a41422;
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
body { margin:0; font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, Segoe UI, sans-serif; color:var(--ink); background: radial-gradient(circle at 20% 0%, #a12b38 0, var(--bg1) 30%, var(--bg2) 100%); }
|
||||
header { padding: 34px 42px 22px; color:#fff; position:relative; overflow:hidden; }
|
||||
header:after { content:""; position:absolute; right:-130px; top:-120px; width:360px; height:360px; border:1px solid rgba(255,255,255,.16); border-radius:50%; }
|
||||
h1 { margin:0; font-size:32px; letter-spacing:.04em; }
|
||||
.subtitle { margin-top:10px; max-width:1120px; opacity:.88; line-height:1.7; font-size:14px; }
|
||||
.topbar { display:flex; gap:12px; margin-top:20px; align-items:center; flex-wrap:wrap; }
|
||||
.search { flex:1; min-width:280px; background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.38); color:#fff; border-radius:999px; padding:12px 18px; outline:none; }
|
||||
.search::placeholder { color:rgba(255,255,255,.72); }
|
||||
.btn { border:none; background:#fff; color:var(--deep); border-radius:999px; padding:10px 16px; cursor:pointer; font-weight:700; box-shadow:0 10px 24px rgba(0,0,0,.12); }
|
||||
.container { padding:0 28px 42px; }
|
||||
.shell { background:rgba(255,255,255,.92); border:1px solid rgba(255,255,255,.55); border-radius:28px; min-height:680px; box-shadow:0 28px 70px rgba(0,0,0,.25); overflow:hidden; }
|
||||
.tabs { display:flex; gap:8px; overflow:auto; padding:14px 18px; background:#fff8f4; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; }
|
||||
.tab { white-space:nowrap; padding:10px 15px; border:1px solid var(--line); background:white; color:var(--muted); border-radius:999px; cursor:pointer; font-weight:700; }
|
||||
.tab.active { background:var(--accent); color:#fff; border-color:var(--accent); }
|
||||
.panel { display:none; padding:24px; }
|
||||
.panel.active { display:block; }
|
||||
.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap:16px; }
|
||||
.card { background:var(--card); border:1px solid var(--line); border-radius:20px; padding:18px; box-shadow:0 10px 20px rgba(80,20,20,.06); cursor:pointer; transition:.18s; }
|
||||
.card:hover { transform:translateY(-2px); box-shadow:0 16px 30px rgba(80,20,20,.12); }
|
||||
.card h3 { margin:0 0 8px; font-size:18px; color:var(--deep); }
|
||||
.meta { color:var(--muted); font-size:13px; line-height:1.6; }
|
||||
.tags { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }
|
||||
.tag { border:1px solid #e0b8ad; color:#7a1a24; background:#fff; border-radius:999px; padding:4px 9px; font-size:12px; }
|
||||
.kpis { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px,1fr)); gap:14px; margin-bottom:18px; }
|
||||
.kpi { background:linear-gradient(135deg,#fff,#fff0e7); border:1px solid var(--line); border-radius:18px; padding:18px; }
|
||||
.kpi .num { font-size:32px; font-weight:800; color:var(--accent); }
|
||||
.kpi .label { color:var(--muted); margin-top:4px; }
|
||||
.section-title { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:0 0 14px; }
|
||||
.section-title h2 { margin:0; font-size:22px; color:var(--deep); }
|
||||
.filters { display:flex; gap:8px; flex-wrap:wrap; margin:12px 0 18px; }
|
||||
.filter { padding:8px 12px; border-radius:999px; border:1px solid var(--line); background:#fff; cursor:pointer; color:var(--muted); }
|
||||
.filter.active { background:var(--deep); color:#fff; }
|
||||
.table-wrap { overflow:auto; border:1px solid var(--line); border-radius:18px; background:#fff; }
|
||||
table { border-collapse:collapse; width:100%; min-width:900px; }
|
||||
th,td { padding:12px 13px; border-bottom:1px solid #f1ded9; text-align:left; vertical-align:top; font-size:13px; line-height:1.55; }
|
||||
th { background:#fff0e9; color:#5a1520; position:sticky; top:0; z-index:1; }
|
||||
tr:hover td { background:#fffaf7; }
|
||||
.chain { display:grid; gap:10px; }
|
||||
.step { display:flex; gap:12px; align-items:flex-start; background:#fff; border:1px solid var(--line); border-radius:16px; padding:12px; }
|
||||
.step .dot { width:26px; height:26px; border-radius:50%; background:var(--accent); color:#fff; display:grid; place-items:center; flex:0 0 auto; font-size:12px; font-weight:800; }
|
||||
.risk { display:grid; grid-template-columns:repeat(auto-fit, minmax(230px,1fr)); gap:12px; }
|
||||
.riskbox { border:1px solid var(--line); border-radius:16px; padding:14px; background:#fff; }
|
||||
.riskbox strong { color:var(--deep); }
|
||||
.badge { padding:3px 8px; border-radius:999px; font-size:12px; background:#fff0e9; color:#7a1a24; }
|
||||
.graphbar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
|
||||
.graph { background:#fff; border:1px solid var(--line); border-radius:20px; height:660px; overflow:hidden; position:relative; }
|
||||
svg { width:100%; height:100%; }
|
||||
.node-label { font-size:12px; fill:#3d0710; font-weight:700; pointer-events:none; }
|
||||
.edge { stroke:#a4786d; stroke-opacity:.35; }
|
||||
.edge.strong { stroke:#a41422; stroke-opacity:.75; }
|
||||
.node { cursor:pointer; }
|
||||
.legend { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; color:var(--muted); font-size:13px; }
|
||||
.legend span { background:#fff; border:1px solid var(--line); border-radius:999px; padding:5px 9px; }
|
||||
.modal { position:fixed; inset:0; background:rgba(0,0,0,.44); display:none; align-items:center; justify-content:center; z-index:20; padding:20px; }
|
||||
.modal.show { display:flex; }
|
||||
.modal-card { width:min(860px, 94vw); max-height:86vh; overflow:auto; background:#fff; border-radius:24px; padding:24px; box-shadow:0 30px 100px rgba(0,0,0,.4); }
|
||||
.modal-head { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; border-bottom:1px solid var(--line); padding-bottom:12px; margin-bottom:14px; }
|
||||
.close { border:none; border-radius:50%; width:36px; height:36px; background:#fff0e9; color:var(--deep); cursor:pointer; font-size:20px; }
|
||||
.detail-grid { display:grid; grid-template-columns:180px 1fr; gap:8px 14px; font-size:14px; line-height:1.7; }
|
||||
.detail-grid b { color:#6f242c; }
|
||||
.small { font-size:12px; color:var(--muted); }
|
||||
.source-link { color:var(--accent); text-decoration:none; }
|
||||
.empty { padding:24px; color:var(--muted); text-align:center; }
|
||||
@media (max-width:760px) { header { padding:24px 18px; } .container { padding:0 12px 28px; } .panel { padding:16px; } .detail-grid { grid-template-columns:1fr; } }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>美国涉华涉台政策权力网络专题平台</h1>
|
||||
<div class="subtitle">基于公开资料与 Skill 框架整理的结构化研究平台:覆盖白宫、行政部门、国会委员会、利益集团、智库媒体、摩擦事件、风险指标与关系图谱。研究边界:公开资料、结构性分析、风险预警;不包含私人信息或定向影响操作。</div>
|
||||
<div class="topbar"><input id="globalSearch" class="search" placeholder="搜索节点、人物、委员会、政策工具、事件、风险指标……"><button class="btn" onclick="downloadJSON()">下载当前 JSON</button><button class="btn" onclick="resetSearch()">重置搜索</button></div>
|
||||
</header>
|
||||
<div class="container">
|
||||
<div class="shell">
|
||||
<nav class="tabs" id="tabs"></nav>
|
||||
<section id="overview" class="panel active"></section>
|
||||
<section id="nodes" class="panel"></section>
|
||||
<section id="tools" class="panel"></section>
|
||||
<section id="congress" class="panel"></section>
|
||||
<section id="graph" class="panel"></section>
|
||||
<section id="chains" class="panel"></section>
|
||||
<section id="interest" class="panel"></section>
|
||||
<section id="thinktank" class="panel"></section>
|
||||
<section id="events" class="panel"></section>
|
||||
<section id="risks" class="panel"></section>
|
||||
<section id="sources" class="panel"></section>
|
||||
</div>
|
||||
</div>
|
||||
<div id="modal" class="modal"><div class="modal-card"><div class="modal-head"><div><h2 id="modalTitle" style="margin:0;color:var(--deep)"></h2><div id="modalSub" class="meta"></div></div><button class="close" onclick="closeModal()">×</button></div><div id="modalBody"></div></div></div>
|
||||
<script>
|
||||
const DATA = {"metadata": {"标题": "美国涉华涉台政策权力网络专题数据库", "英文标题": "US-China Policy Power Network Dataset", "版本": "v1.0", "生成日期": "2026-06-25", "时间口径": "截至2026年6月25日的公开资料与本专题已补充数据。", "研究边界": "仅使用公开资料进行结构性政策研究、风险预警和认知防护分析;不包含私人信息、定向影响操作或作战敏感细节。", "证据等级说明": {"A": "官方网页、国会官网、政府文件直接证明", "B": "权威媒体、主流智库、权威数据库支持", "C": "基于公开结构的合理推断,需后续核验"}}, "dashboard": {"栏目": ["总览仪表盘", "白宫与NSC", "行政工具系统", "国会网络", "利益集团", "智库媒体", "摩擦事件", "影响链条", "风险预警", "关系图谱", "来源审查"], "统计": {"节点数量": 79, "边数量": 101, "政策工具数量": 10, "事件数量": 6, "风险指标数量": 8, "影响链条数量": 5}, "五层结构": ["第一层:总统 / 白宫 / NSC", "第二层:行政部门工具系统", "第三层:国会监督与立法系统", "第四层:利益攸关群体", "第五层:舆论与认知场"], "核心判断": "白宫定调,NSC协调,行政部门掌握工具,国会负责立法和施压,利益集团提供资源、数据和游说,智库媒体塑造议题,民意决定政策成本。"}, "nodes": [{"id": "P001", "名称": "Donald J. Trump / 白宫", "英文名称": "Donald J. Trump / The White House", "节点类型": "人物/机构", "所属层级": "第一层:总统 / 白宫 / NSC", "政策领域": ["总体战略", "关税", "台湾", "峰会外交"], "权力来源": "总统正式决策权;行政令、峰会、关税与危机反应定调。", "政策工具": ["行政令", "峰会声明", "关税安排", "军售节奏"], "核心诉求": ["政策交易空间", "国内政治成本控制", "美国优先议程"], "涉华立场": "竞争性、交易型、工具化强。", "涉台立场": "维持美台关系工具性与危机控制并行。", "近期动作": ["白宫发布内阁与政策事实清单。"], "风险信号": ["总统直接点名台湾或关税;中美峰会取消;军售节奏异常。"], "证据等级": "A", "来源": ["S001"]}, {"id": "A001", "名称": "Marco Rubio", "英文名称": "Marco Rubio", "节点类型": "人物", "所属层级": "第二层:行政部门工具系统", "政策领域": ["外交", "台湾", "人权", "盟友协调"], "权力来源": "国务卿,掌握外交声明、国务院政策口径与盟友协调。", "政策工具": ["外交声明", "签证限制", "盟友联合声明", "台湾交往指南"], "核心诉求": ["强化美国外交优势", "价值观议题与安全议题联动"], "涉华立场": "强硬竞争与价值观议题结合。", "涉台立场": "支持台湾国际空间与非官方关系强化。", "近期动作": ["白宫列名其为国务卿。"], "风险信号": ["国务院升级台湾表述;联合盟友点名中国行动。"], "证据等级": "A", "来源": ["S001"]}, {"id": "A002", "名称": "Pete Hegseth", "英文名称": "Pete Hegseth", "节点类型": "人物", "所属层级": "第二层:行政部门工具系统", "政策领域": ["军事安全", "台海", "印太", "军售"], "权力来源": "白宫页面列为Secretary of War;负责军事工具、国防预算与威慑态势。", "政策工具": ["军售", "印太部署", "国防预算", "军事演训"], "核心诉求": ["提升战备", "威慑对手", "强化军工与前沿部署"], "涉华立场": "以军事威慑和战备为主。", "涉台立场": "支持强化台海威慑与区域协同。", "近期动作": ["白宫页面列其为Secretary of War。"], "风险信号": ["印太军力前推;NDAA台湾条款加码;军售加速。"], "证据等级": "A", "来源": ["S001"]}, {"id": "A003", "名称": "Scott Bessent", "英文名称": "Scott Bessent", "节点类型": "人物", "所属层级": "第二层:行政部门工具系统", "政策领域": ["金融", "制裁", "投资审查"], "权力来源": "财政部长,影响OFAC、CFIUS、对外投资限制和金融风险边界。", "政策工具": ["OFAC制裁", "CFIUS", "对外投资安全规则", "金融沟通"], "核心诉求": ["金融稳定", "资本安全", "敏感技术投资边界"], "涉华立场": "通过金融和资本工具塑造竞争边界。", "涉台立场": "可通过制裁或投资限制影响涉台军工与技术网络。", "近期动作": ["白宫列名其为财政部长。"], "风险信号": ["制裁大型机构;CFIUS扩张;对外投资规则加码。"], "证据等级": "A", "来源": ["S001", "S007"]}, {"id": "A004", "名称": "Howard Lutnick", "英文名称": "Howard Lutnick", "节点类型": "人物", "所属层级": "第二层:行政部门工具系统", "政策领域": ["出口管制", "半导体", "产业安全"], "权力来源": "商务部长,影响BIS、实体清单、许可证和产Line truncated
|
||||
const tabs = [
|
||||
["overview","总览仪表盘"],["nodes","权力节点"],["tools","行政工具"],["congress","国会网络"],["graph","关系图谱"],["chains","影响链条"],["interest","利益集团"],["thinktank","智库媒体"],["events","摩擦事件"],["risks","风险预警"],["sources","来源审查"]
|
||||
];
|
||||
let query = "";
|
||||
let graphFilter = "全部";
|
||||
const $ = id => document.getElementById(id);
|
||||
function esc(s) { return String(s ?? '').replace(/[&<>"]/g, m => ({'&':'&','<':'<','>':'>','"':'"'}[m])); }
|
||||
function arr(v) { return Array.isArray(v) ? v : (v ? [v] : []); }
|
||||
function tags(list) { return `<div class="tags">${arr(list).map(x=>`<span class="tag">${esc(x)}</span>`).join('')}</div>`; }
|
||||
function match(obj) { if(!query) return true; return JSON.stringify(obj).toLowerCase().includes(query.toLowerCase()); }
|
||||
function short(text, n=140) { text = String(text||''); return text.length>n ? text.slice(0,n)+'……' : text; }
|
||||
function initTabs() {
|
||||
$('tabs').innerHTML = tabs.map((t,i)=>`<button class="tab ${i==0?'active':''}" onclick="showTab('${t[0]}', this)">${t[1]}</button>`).join('');
|
||||
}
|
||||
function showTab(id, btn) { document.querySelectorAll('.panel').forEach(p=>p.classList.remove('active')); $(id).classList.add('active'); document.querySelectorAll('.tab').forEach(b=>b.classList.remove('active')); btn.classList.add('active'); if(id==='graph') renderGraph(); }
|
||||
function card(obj, title, sub, body, click=true) { return `<div class="card" ${click?`onclick='openDetail(${JSON.stringify(obj).replace(/'/g,"'")})'`:''}><h3>${esc(title)}</h3><div class="meta">${esc(sub||'')}</div>${body||''}</div>`; }
|
||||
function openDetail(obj) {
|
||||
$('modalTitle').textContent = obj.名称 || obj.工具名称 || obj.事件名称 || obj.指标名称 || obj.名称 || obj.edge_id || obj.id || '详情';
|
||||
$('modalSub').textContent = obj.英文名称 || obj.节点类型 || obj.类型 || obj.政策性质 || obj.时间 || '';
|
||||
let rows = Object.entries(obj).filter(([k])=>!['可视化样式'].includes(k)).map(([k,v])=>`<b>${esc(k)}</b><div>${Array.isArray(v)? v.map(esc).join('、') : typeof v === 'object' && v ? `<pre>${esc(JSON.stringify(v,null,2))}</pre>` : esc(v)}</div>`).join('');
|
||||
$('modalBody').innerHTML = `<div class="detail-grid">${rows}</div>`;
|
||||
$('modal').classList.add('show');
|
||||
}
|
||||
function closeModal() { $('modal').classList.remove('show'); }
|
||||
function resetSearch() { query=''; $('globalSearch').value=''; renderAll(); }
|
||||
$('globalSearch').addEventListener('input', e=>{ query=e.target.value.trim(); renderAll(); });
|
||||
function renderOverview() {
|
||||
const s=DATA.dashboard.统计;
|
||||
$('overview').innerHTML = `<div class="section-title"><h2>总览仪表盘</h2><span class="badge">${esc(DATA.metadata.版本)} · ${esc(DATA.metadata.生成日期)}</span></div>
|
||||
<div class="kpis">${Object.entries(s).map(([k,v])=>`<div class="kpi"><div class="num">${v}</div><div class="label">${k}</div></div>`).join('')}</div>
|
||||
<div class="grid">
|
||||
${card(DATA.dashboard, '五层权力结构', DATA.dashboard.核心判断, tags(DATA.dashboard.五层结构), false)}
|
||||
${card(DATA.metadata, '研究边界', DATA.metadata.时间口径, `<p class="meta">${esc(DATA.metadata.研究边界)}</p>`, false)}
|
||||
${card(DATA.metadata.证据等级说明, '证据等级', 'A/B/C 分级用于页面筛选和来源审查', `<div class="detail-grid"><b>A</b><div>${DATA.metadata.证据等级说明.A}</div><b>B</b><div>${DATA.metadata.证据等级说明.B}</div><b>C</b><div>${DATA.metadata.证据等级说明.C}</div></div>`, false)}
|
||||
</div>`;
|
||||
}
|
||||
const layers = ["全部","第一层:总统 / 白宫 / NSC","第二层:行政部门工具系统","第三层:国会监督与立法系统","第四层:利益攸关群体","第五层:舆论与认知场"];
|
||||
let nodeLayer='全部';
|
||||
function renderNodes() {
|
||||
const filtered = DATA.nodes.filter(x=>match(x) && (nodeLayer==='全部'||x.所属层级===nodeLayer));
|
||||
$('nodes').innerHTML = `<div class="section-title"><h2>权力节点库</h2><span class="badge">${filtered.length} / ${DATA.nodes.length}</span></div>
|
||||
<div class="filters">${layers.map(l=>`<button class="filter ${nodeLayer===l?'active':''}" onclick="nodeLayer='${l}';renderNodes()">${l.replace(':',':<br>')}</button>`).join('')}</div>
|
||||
<div class="grid">${filtered.map(x=>card(x,x.名称,x.所属层级,`${tags(x.政策领域)}<p class="meta">${esc(short(x.权力来源 || x.核心诉求?.[0]))}</p>`)).join('') || '<div class="empty">没有匹配结果</div>'}</div>`;
|
||||
}
|
||||
function renderTools() {
|
||||
const rows = DATA.policy_tools.filter(match).map(x=>`<tr onclick='openDetail(${JSON.stringify(x).replace(/'/g,"'")})'><td>${esc(x.工具名称)}</td><td>${esc(x.主责机构)}</td><td>${esc(x.政策性质)}</td><td>${arr(x.政策领域).map(esc).join('、')}</td><td>${esc(x.功能说明)}</td><td>${esc(x.建议字段)}</td></tr>`).join('');
|
||||
$('tools').innerHTML = `<div class="section-title"><h2>行政政策工具系统</h2><span class="badge">${DATA.policy_tools.filter(match).length} 项</span></div><div class="table-wrap"><table><thead><tr><th>工具名称</th><th>主责机构</th><th>政策性质</th><th>政策领域</th><th>功能说明</th><th>建议字段</th></tr></thead><tbody>${rows}</tbody></table></div>`;
|
||||
}
|
||||
function renderCongress() {
|
||||
const congress = DATA.nodes.filter(x=>match(x) && (x.所属层级||'').includes('国会'));
|
||||
const legs = DATA.legislation.filter(match);
|
||||
$('congress').innerHTML = `<div class="section-title"><h2>国会委员会、人物与法案库</h2><span class="badge">${congress.length} 个节点 · ${legs.length} 项法案/议题</span></div>
|
||||
<div class="grid">${congress.map(x=>card(x,x.名称,x.权力来源,tags(x.政策领域))).join('')}</div>
|
||||
<h2 style="margin-top:24px;color:var(--deep)">法案与立法议题</h2><div class="table-wrap"><table><thead><tr><th>名称</th><th>状态</th><th>牵引节点</th><th>意义</th><th>证据</th></tr></thead><tbody>${legs.map(x=>`<tr onclick='openDetail(${JSON.stringify(x).replace(/'/g,"'")})'><td>${esc(x.名称)}</td><td>${esc(x.状态)}</td><td>${arr(x.牵引节点).map(esc).join('、')}</td><td>${esc(x.涉华涉台意义)}</td><td>${esc(x.证据等级)}</td></tr>`).join('')}</tbody></table></div>`;
|
||||
}
|
||||
function renderInterest() {
|
||||
const list = DATA.nodes.filter(x=>match(x) && x.所属层级==='第四层:利益攸关群体');
|
||||
$('interest').innerHTML = `<div class="section-title"><h2>利益集团画像</h2><span class="badge">${list.length} 个节点</span></div><div class="grid">${list.map(x=>card(x,x.名称,x.节点类型,`${tags(x.政策领域)}<p class="meta">${esc(short(x.核心诉求?.[0],180))}</p>`)).join('')}</div>`;
|
||||
}
|
||||
function renderThinktank() {
|
||||
const list = DATA.nodes.filter(x=>match(x) && x.所属层级==='第五层:舆论与认知场');
|
||||
$('thinktank').innerHTML = `<div class="section-title"><h2>智库媒体与叙事生态</h2><span class="badge">${list.length} 个节点</span></div><div class="grid">${list.map(x=>card(x,x.名称,x.英文名称,`${tags(x.政策领域)}<p class="meta">${esc(short(x.核心诉求?.[0],180))}</p>`)).join('')}</div>`;
|
||||
}
|
||||
function renderEvents() {
|
||||
const list=DATA.friction_events.filter(match);
|
||||
$('events').innerHTML=`<div class="section-title"><h2>摩擦事件库</h2><span class="badge">${list.length} 件</span></div><div class="grid">${list.map(x=>card(x,x.事件名称,`${x.时间} · ${x.类型} · 风险:${x.风险等级}`,`${tags(x.涉及主体)}<p class="meta"><b>美国动作:</b>${esc(short(x.美国动作))}</p><p class="meta"><b>中方可能反应:</b>${esc(short(x.中方可能反应))}</p>`)).join('')}</div>`;
|
||||
}
|
||||
function renderRisks() {
|
||||
const list=DATA.risk_indicators.filter(match);
|
||||
$('risks').innerHTML=`<div class="section-title"><h2>风险预警指标体系</h2><span class="badge">${list.length} 个指标</span></div><div class="grid">${list.map(x=>`<div class="card" onclick='openDetail(${JSON.stringify(x).replace(/'/g,"'")})'><h3>${esc(x.指标名称)}</h3>${tags(x.关联领域)}<div class="risk"><div class="riskbox"><strong>低</strong><br>${esc(x.低风险)}</div><div class="riskbox"><strong>中</strong><br>${esc(x.中风险)}</div><div class="riskbox"><strong>高</strong><br>${esc(x.高风险)}</div><div class="riskbox"><strong>极高</strong><br>${esc(x.极高风险)}</div></div></div>`).join('')}</div>`;
|
||||
}
|
||||
function renderChains() {
|
||||
const list=DATA.influence_chains.filter(match);
|
||||
$('chains').innerHTML=`<div class="section-title"><h2>关键影响链条</h2><span class="badge">${list.length} 条</span></div><div class="grid">${list.map(c=>`<div class="card" onclick='openDetail(${JSON.stringify(c).replace(/'/g,"'")})'><h3>${esc(c.名称)}</h3><span class="badge">风险:${esc(c.风险)}</span><div class="chain" style="margin-top:12px">${c.路径.map((s,i)=>`<div class="step"><div class="dot">${i+1}</div><div>${esc(s)}</div></div>`).join('')}</div></div>`).join('')}</div>`;
|
||||
}
|
||||
function renderSources() {
|
||||
const list=DATA.sources.filter(match);
|
||||
$('sources').innerHTML=`<div class="section-title"><h2>来源审查</h2><span class="badge">${list.length} 个来源</span></div><div class="table-wrap"><table><thead><tr><th>ID</th><th>名称</th><th>类型</th><th>等级</th><th>说明</th><th>链接</th></tr></thead><tbody>${list.map(s=>`<tr><td>${s.id}</td><td>${esc(s.名称)}</td><td>${esc(s.类型)}</td><td>${esc(s.证据等级)}</td><td>${esc(s.说明)}</td><td><a class="source-link" href="${esc(s.url)}" target="_blank">打开来源</a></td></tr>`).join('')}</tbody></table></div>`;
|
||||
}
|
||||
function renderGraph() {
|
||||
const fields=["全部",...Array.from(new Set(DATA.edges.flatMap(e=>e.政策领域||[]))).slice(0,18)];
|
||||
const edges=DATA.edges.filter(e=>match(e) && (graphFilter==='全部'||(e.政策领域||[]).includes(graphFilter))).slice(0,120);
|
||||
const ids=new Set(edges.flatMap(e=>[e.source,e.target]));
|
||||
const nodes=DATA.nodes.filter(n=>ids.has(n.id) || ids.has(n.名称)).slice(0,80);
|
||||
const fallbackIds=[...ids].filter(id=>!nodes.some(n=>n.id===id||n.名称===id)).map(id=>({id,名称:id,所属层级:'外部概念',节点类型:'概念',政策领域:[]}));
|
||||
const all=[...nodes,...fallbackIds];
|
||||
const layersOrder=["第一层:总统 / 白宫 / NSC","第二层:行政部门工具系统","第三层:国会监督与立法系统","第四层:利益攸关群体","第五层:舆论与认知场","外部概念"];
|
||||
const width=1200, height=640, margin=70;
|
||||
const pos={};
|
||||
layersOrder.forEach((ly,li)=>{ const group=all.filter(n=>(n.所属层级||'外部概念')===ly); group.forEach((node,i)=>{ pos[node.id]=pos[node.名称]={x: margin + li*(width-2*margin)/(layersOrder.length-1), y: 55 + (i+1)*(height-110)/(group.length+1)}; }); });
|
||||
const color=(ly)=>({"第一层:总统 / 白宫 / NSC":"#a41422","第二层:行政部门工具系统":"#d45a35","第三层:国会监督与立法系统":"#7a1f77","第四层:利益攸关群体":"#276f55","第五层:舆论与认知场":"#2f68a8","外部概念":"#999"}[ly]||'#777');
|
||||
const lineSvg=edges.map(ed=>{ const a=pos[ed.source], b=pos[ed.target]; if(!a||!b) return ''; return `<line class="edge ${ed.强度>=5?'strong':''}" x1="${a.x}" y1="${a.y}" x2="${b.x}" y2="${b.y}" stroke-width="${Math.max(1,ed.强度/1.3)}"><title>${esc(ed.关系类型)}</title></line>`; }).join('');
|
||||
const nodeSvg=all.map(nd=>{ const p=pos[nd.id]||pos[nd.名称]; if(!p) return ''; const r = nd.节点类型==='人物'?12: nd.节点类型==='委员会'?15: 13; return `<g class="node" onclick='openDetail(${JSON.stringify(nd).replace(/'/g,"'")})'><circle cx="${p.x}" cy="${p.y}" r="${r}" fill="${color(nd.所属层级||'外部概念')}" stroke="#fff" stroke-width="2"><title>${esc(nd.名称)}</title></circle><text class="node-label" x="${p.x+16}" y="${p.y+4}">${esc(nd.名称).slice(0,18)}</text></g>`; }).join('');
|
||||
$('graph').innerHTML=`<div class="section-title"><h2>关系图谱</h2><span class="badge">${edges.length} 条边 · ${all.length} 个节点</span></div><div class="graphbar">${fields.map(f=>`<button class="filter ${graphFilter===f?'active':''}" onclick="graphFilter='${f}';renderGraph()">${esc(f)}</button>`).join('')}</div><div class="graph"><svg viewBox="0 0 ${width} ${height}">${lineSvg}${nodeSvg}</svg></div><div class="legend"><span>红:白宫</span><span>橙:行政部门/工具</span><span>紫:国会</span><span>绿:利益集团</span><span>蓝:智库媒体</span><span>线越粗关系越强</span></div>`;
|
||||
}
|
||||
function renderAll() { renderOverview(); renderNodes(); renderTools(); renderCongress(); renderGraph(); renderChains(); renderInterest(); renderThinktank(); renderEvents(); renderRisks(); renderSources(); }
|
||||
function downloadJSON() { const blob=new Blob([JSON.stringify(DATA,null,2)],{type:'application/json'}); const a=document.createElement('a'); a.href=URL.createObjectURL(blob); a.download='us_china_policy_power_network_data.json'; a.click(); URL.revokeObjectURL(a.href); }
|
||||
initTabs(); renderAll();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user