sync update from LAN repo (source master @ 6e3f02a2)
This commit is contained in:
1 parent
66a443e915
commit
6c25c89d93
431 files changed
+68511
-2240
No files matched your search
@@ -27,3 +27,4 @@ venv/
|
||||
|
||||
# Claude Code settings
|
||||
.claude/settings.local.json
|
||||
openapi.json
|
||||
@@ -1,5 +1,33 @@
|
||||
# CLAUDE.md
|
||||
|
||||
## GoView projects and templates (2026-11-10)
|
||||
|
||||
GoView stays a separate Vue app and talks to `/api/goview`. Projects are
|
||||
owned by the logged-in user (`owner_id`); with authentication disabled they
|
||||
share the single assumed user. `goview_projects` holds the card,
|
||||
`goview_project_contents` holds the ChartEditStorage JSON, and list queries
|
||||
do not load that JSON. `state` is `-1` or `1`. Publishing does not copy the
|
||||
canvas: `GET /api/goview/project/published/{id}` returns the same content
|
||||
only while `state` is `1`, and returns 404 after unpublish. That GET, plus
|
||||
`GET /api/goview/assets/{name}` and `GET /api/goview/map-tiles/{style}/{z}/{x}/{y}.png`,
|
||||
are the only anonymous GoView reads. `getData`, save, edit, delete, and
|
||||
publish stay owner-only.
|
||||
|
||||
Responses use GoView's `{code: 200, msg, data, count}` envelope. Save accepts
|
||||
form field `content` as a JSON string. Upload stores a sniffed PNG, JPEG,
|
||||
GIF, or WEBP under `{runtime_home}/goview-assets/` with a random name.
|
||||
Tiles resolve under `DEERFLOW_GOVIEW_TILE_ROOT` or
|
||||
`{runtime_home}/goview-map-tiles` and reject bad style, zoom, or `..`.
|
||||
|
||||
Market templates are read-only for ordinary users. Builtin seeds in
|
||||
`app/gateway/goview_template_seeds/` insert only when the id is missing.
|
||||
Creating a project from a template deep-copies `content_json`. Migration
|
||||
`20261110_02` creates the GoView tables and drops the unused visual-dashboard
|
||||
tables; `20261110_03` repeats that drop for a database already stamped at
|
||||
`20261110_02`. Tests:
|
||||
`tests/test_goview_projects.py`, `tests/test_goview_templates.py`,
|
||||
`tests/test_goview_assets.py`.
|
||||
|
||||
## Model-independent skill invocation attribution (2026-11-07)
|
||||
|
||||
Never derive skill-use UI or counters from model narration or the optional tool
|
||||
|
||||
@@ -2,7 +2,7 @@ install:
|
||||
uv sync
|
||||
|
||||
dev:
|
||||
PYTHONPATH=. uv run uvicorn app.gateway.app:app --host 0.0.0.0 --port 8001 --reload --reload-dir app --reload-dir packages --reload-exclude "$(CURDIR)/.deer-flow" --reload-exclude "$(CURDIR)/.runtime"
|
||||
PYTHONPATH=. uv run uvicorn app.gateway.app:app --host 0.0.0.0 --port 8001 --reload --reload-dir app --reload-dir packages --reload-exclude "*.deer-flow*" --reload-exclude "*.runtime*"
|
||||
|
||||
gateway:
|
||||
PYTHONPATH=. uv run uvicorn app.gateway.app:app --host 0.0.0.0 --port 8001
|
||||
|
||||
@@ -131,6 +131,10 @@ from app.gateway.routers import (
|
||||
uploads,
|
||||
user_preferences,
|
||||
user_prompts,
|
||||
goview_assets,
|
||||
goview_map_tiles,
|
||||
goview_projects,
|
||||
goview_templates,
|
||||
web_app_sites,
|
||||
workflow_data_sources,
|
||||
workflow_embed,
|
||||
@@ -2202,6 +2206,13 @@ This gateway provides custom endpoints for models, MCP configuration, skills, an
|
||||
# Force-situation task detail documents (new task type; free-form JSON).
|
||||
app.include_router(force_situation.router)
|
||||
|
||||
# GoView offline projects, templates, local images, and map tiles.
|
||||
app.include_router(goview_projects.router)
|
||||
app.include_router(goview_projects.system_router)
|
||||
app.include_router(goview_templates.router)
|
||||
app.include_router(goview_assets.router)
|
||||
app.include_router(goview_map_tiles.router)
|
||||
|
||||
# Standalone parallel multi-agent panel: fan-out streaming + saved tasks
|
||||
app.include_router(parallel_agents.router)
|
||||
app.include_router(parallel_agent_tasks.router)
|
||||
|
||||
@@ -133,6 +133,26 @@ def _is_force_situation_detail_external_request(method: str, path: str) -> bool:
|
||||
)
|
||||
|
||||
|
||||
# Published GoView previews, local thumbnails, and offline map tiles are read
|
||||
# without a login. Draft project APIs and template writes stay authenticated.
|
||||
_GOVIEW_PUBLISHED_RE = re.compile(r"^/api/goview/project/published/[^/]+$")
|
||||
_GOVIEW_ASSET_RE = re.compile(r"^/api/goview/assets/[a-f0-9]{32}\.(?:png|jpg|gif|webp)$")
|
||||
_GOVIEW_TILE_RE = re.compile(r"^/api/goview/map-tiles/[a-z0-9][a-z0-9-]{0,31}/\d+/\d+/\d+\.png$")
|
||||
_GOVIEW_OSS_INFO_PATH = "/api/goview/sys/getOssInfo"
|
||||
|
||||
|
||||
def _is_goview_public_read(method: str, path: str) -> bool:
|
||||
if method.upper() != "GET":
|
||||
return False
|
||||
normalized = path.rstrip("/")
|
||||
return bool(
|
||||
normalized == _GOVIEW_OSS_INFO_PATH
|
||||
or _GOVIEW_PUBLISHED_RE.fullmatch(normalized)
|
||||
or _GOVIEW_ASSET_RE.fullmatch(normalized)
|
||||
or _GOVIEW_TILE_RE.fullmatch(normalized)
|
||||
)
|
||||
|
||||
|
||||
def _authorize_task_deeplink_external_write(request: Request) -> JSONResponse | None:
|
||||
"""Mark the external b5-1 task-detail write; no credential is required.
|
||||
|
||||
@@ -219,6 +239,8 @@ class AuthMiddleware(BaseHTTPMiddleware):
|
||||
return await call_next(request)
|
||||
if _is_force_situation_detail_external_request(request.method, relative_path):
|
||||
return await call_next(request)
|
||||
if _is_goview_public_read(request.method, relative_path):
|
||||
return await call_next(request)
|
||||
if _is_public(relative_path):
|
||||
return await call_next(request)
|
||||
if _is_weknora_embed_proxy_request(request):
|
||||
|
||||
@@ -564,6 +564,24 @@ async def langgraph_runtime(app: FastAPI, *, background: bool = True) -> AsyncGe
|
||||
|
||||
app.state.force_situation_store = make_force_situation_store(sf)
|
||||
|
||||
from deerflow.persistence.goview import make_goview_project_store, make_goview_template_store
|
||||
|
||||
app.state.goview_project_store = make_goview_project_store(sf)
|
||||
app.state.goview_template_store = make_goview_template_store(sf)
|
||||
try:
|
||||
from app.gateway.goview_builtin_templates import ensure_builtin_templates
|
||||
|
||||
inserted = await ensure_builtin_templates(app.state.goview_template_store)
|
||||
if inserted:
|
||||
logger.info("GoView builtin templates inserted: %s", ", ".join(inserted))
|
||||
from app.gateway.goview_demo_projects import ensure_demo_projects
|
||||
|
||||
demo_ids = await ensure_demo_projects(app.state.goview_project_store)
|
||||
if demo_ids:
|
||||
logger.info("GoView demo projects inserted: %s", ", ".join(demo_ids))
|
||||
except Exception:
|
||||
logger.exception("GoView builtin template seed failed (non-fatal)")
|
||||
|
||||
from deerflow.persistence.roundtable_artifact_submissions import make_roundtable_artifact_submission_store
|
||||
|
||||
# Task-scoped artifact submission status: shared by task; actor is audit-only.
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
"""Versioned builtin GoView templates.
|
||||
|
||||
Missing ids are inserted. Builtin canvas JSON is refreshed in place so an
|
||||
administrator rename of the template name, description, or cover is kept.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from app.gateway.goview_demo_projects import COVER_URL
|
||||
|
||||
_SEED_DIR = Path(__file__).with_name("goview_template_seeds")
|
||||
|
||||
_SEEDS: tuple[dict[str, Any], ...] = (
|
||||
{
|
||||
"id": "builtin-dark-cockpit",
|
||||
"name": "深色通用数据驾驶舱",
|
||||
"description": "深色背景的通用指标驾驶舱,适合总览类大屏。",
|
||||
"sort_order": 10,
|
||||
"file": "dark-cockpit.json",
|
||||
},
|
||||
{
|
||||
"id": "builtin-map-overview",
|
||||
"name": "地图基础概览大屏",
|
||||
"description": "带离线瓦片地图背景的概览大屏。",
|
||||
"sort_order": 20,
|
||||
"file": "map-overview.json",
|
||||
},
|
||||
{
|
||||
"id": "builtin-metrics-trend",
|
||||
"name": "指标总览与趋势分析大屏",
|
||||
"description": "指标卡片与趋势分析的总览布局。",
|
||||
"sort_order": 30,
|
||||
"file": "metrics-trend.json",
|
||||
},
|
||||
{
|
||||
"id": "builtin-timeline-progress",
|
||||
"name": "时间轴与进度概览大屏",
|
||||
"description": "时间轴和进度概览布局。",
|
||||
"sort_order": 40,
|
||||
"file": "timeline-progress.json",
|
||||
},
|
||||
{
|
||||
"id": "builtin-ops-watch",
|
||||
"name": "运行监测总览",
|
||||
"description": "节点、告警与响应时长的监测大屏。",
|
||||
"sort_order": 50,
|
||||
"file": "ops-watch.json",
|
||||
},
|
||||
{
|
||||
"id": "builtin-command-brief",
|
||||
"name": "指挥研判简报",
|
||||
"description": "今日结论、关注方向与待办计数。",
|
||||
"sort_order": 60,
|
||||
"file": "command-brief.json",
|
||||
},
|
||||
{
|
||||
"id": "builtin-resource-board",
|
||||
"name": "资源态势看板",
|
||||
"description": "人员、装备、仓储与在途资源。",
|
||||
"sort_order": 70,
|
||||
"file": "resource-board.json",
|
||||
},
|
||||
{
|
||||
"id": "builtin-compare-analysis",
|
||||
"name": "对比分析大屏",
|
||||
"description": "本期与上期的分类对照和差值。",
|
||||
"sort_order": 80,
|
||||
"file": "compare-board.json",
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
def load_builtin_templates() -> list[dict[str, Any]]:
|
||||
items: list[dict[str, Any]] = []
|
||||
for seed in _SEEDS:
|
||||
content = (_SEED_DIR / seed["file"]).read_text(encoding="utf-8")
|
||||
json.loads(content)
|
||||
items.append(
|
||||
{
|
||||
"id": seed["id"],
|
||||
"name": seed["name"],
|
||||
"description": seed["description"],
|
||||
# The bundled local asset is the same high-fidelity dashboard
|
||||
# preview used by the sample projects. It works without any
|
||||
# external image service and is copied into the runtime asset
|
||||
# directory at startup.
|
||||
"cover_image": COVER_URL,
|
||||
"content": content,
|
||||
"owner_id": None,
|
||||
"scope": "market",
|
||||
"is_builtin": True,
|
||||
"sort_order": seed["sort_order"],
|
||||
}
|
||||
)
|
||||
return items
|
||||
|
||||
|
||||
async def ensure_builtin_templates(store) -> list[str]:
|
||||
"""Insert missing builtin templates and refresh their canvas JSON.
|
||||
|
||||
Returns only the newly inserted ids. A later seed does not rename a
|
||||
template an administrator has already edited.
|
||||
"""
|
||||
|
||||
inserted: list[str] = []
|
||||
for item in load_builtin_templates():
|
||||
if await store.insert_if_absent(item):
|
||||
inserted.append(item["id"])
|
||||
else:
|
||||
await store.refresh_builtin_content(item["id"], item["content"])
|
||||
return inserted
|
||||
@@ -0,0 +1,785 @@
|
||||
"""Shared demo projects shown at the front of every user's project list.
|
||||
|
||||
The canvases are inserted once. Later edits are kept, and the rows cannot be
|
||||
deleted, so the demonstration screens stay available.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from app.gateway.goview_template_seeds._build_canvases import (
|
||||
bar,
|
||||
border,
|
||||
canvas,
|
||||
chart,
|
||||
component,
|
||||
line,
|
||||
number,
|
||||
pie,
|
||||
public_config,
|
||||
text,
|
||||
)
|
||||
from app.gateway.routers.goview_assets import asset_root
|
||||
from deerflow.persistence.goview.project_store import DEMO_OWNER, PUBLISHED
|
||||
|
||||
_COVER_FILE = Path(__file__).with_name("goview_template_seeds") / "demo-cover.png"
|
||||
COVER_NAME = hashlib.md5(b"goview-demo-cover-v1").hexdigest() + ".png"
|
||||
COVER_URL = f"/api/goview/assets/{COVER_NAME}"
|
||||
|
||||
_POINTS = [
|
||||
{"name": "北京", "value": [116.40, 39.90, 860]},
|
||||
{"name": "上海", "value": [121.47, 31.23, 740]},
|
||||
{"name": "广州", "value": [113.26, 23.13, 620]},
|
||||
{"name": "成都", "value": [104.07, 30.57, 480]},
|
||||
{"name": "武汉", "value": [114.30, 30.59, 390]},
|
||||
{"name": "西安", "value": [108.94, 34.34, 310]},
|
||||
{"name": "沈阳", "value": [123.43, 41.80, 260]},
|
||||
{"name": "乌鲁木齐", "value": [87.62, 43.83, 140]},
|
||||
]
|
||||
_LINES = [
|
||||
{"coords": [[121.47, 31.23], [116.40, 39.90]]},
|
||||
{"coords": [[113.26, 23.13], [116.40, 39.90]]},
|
||||
{"coords": [[104.07, 30.57], [116.40, 39.90]]},
|
||||
{"coords": [[87.62, 43.83], [116.40, 39.90]]},
|
||||
]
|
||||
_REGIONS = [
|
||||
{"name": "北京市", "value": 860},
|
||||
{"name": "河北省", "value": 320},
|
||||
{"name": "上海市", "value": 740},
|
||||
{"name": "江苏省", "value": 510},
|
||||
{"name": "浙江省", "value": 460},
|
||||
{"name": "广东省", "value": 680},
|
||||
{"name": "四川省", "value": 390},
|
||||
{"name": "湖北省", "value": 280},
|
||||
{"name": "陕西省", "value": 240},
|
||||
{"name": "辽宁省", "value": 180},
|
||||
{"name": "新疆维吾尔自治区", "value": 90},
|
||||
]
|
||||
|
||||
|
||||
def _map(component_id: str, x: int, y: int, w: int, h: int) -> dict[str, Any]:
|
||||
dataset = {"point": _POINTS, "line": _LINES, "map": _REGIONS}
|
||||
return {
|
||||
"id": component_id,
|
||||
"key": "MapBase",
|
||||
"isGroup": False,
|
||||
"attr": {"x": x, "y": y, "w": w, "h": h, "offsetX": 0, "offsetY": 0, "zIndex": 1},
|
||||
"chartConfig": {
|
||||
"key": "MapBase",
|
||||
"chartKey": "VMapBase",
|
||||
"conKey": "VCMapBase",
|
||||
"title": "地图",
|
||||
"category": "Maps",
|
||||
"categoryName": "地图",
|
||||
"package": "Charts",
|
||||
"chartFrame": "common",
|
||||
"image": "map.png",
|
||||
},
|
||||
**public_config(),
|
||||
"option": {
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"dataset": dataset,
|
||||
"mapRegion": {
|
||||
"adcode": "china",
|
||||
"showHainanIsLands": True,
|
||||
"enter": False,
|
||||
"backSize": 20,
|
||||
"backColor": "#ffffff",
|
||||
},
|
||||
"tooltip": {"show": True, "trigger": "item"},
|
||||
"visualMap": {
|
||||
"show": False,
|
||||
"orient": "vertical",
|
||||
"pieces": [
|
||||
{"gte": 600, "label": "高"},
|
||||
{"gte": 200, "lte": 599, "label": "中"},
|
||||
{"lte": 199, "label": "低"},
|
||||
],
|
||||
"inRange": {"color": ["#0e3a5d", "#1d6f9c", "#7ee0ff"]},
|
||||
"textStyle": {"color": "#fff"},
|
||||
},
|
||||
"geo": {"show": False, "type": "map", "roam": False, "map": "china", "selectedMode": False, "zoom": 1.05},
|
||||
"series": [
|
||||
{
|
||||
"name": "重点",
|
||||
"type": "effectScatter",
|
||||
"coordinateSystem": "geo",
|
||||
"symbolSize": 8,
|
||||
"showEffectOn": "render",
|
||||
"rippleEffect": {"scale": 5, "brushType": "stroke"},
|
||||
"label": {"show": True, "formatter": "{b}", "color": "#ffffff", "fontSize": 11, "position": "bottom"},
|
||||
"itemStyle": {"color": "#7ee0ff", "shadowBlur": 10, "shadowColor": "#7ee0ff"},
|
||||
"data": [],
|
||||
"encode": {"value": 2},
|
||||
},
|
||||
{
|
||||
"name": "区域",
|
||||
"type": "map",
|
||||
"map": "china",
|
||||
"geoIndex": 1,
|
||||
"data": [],
|
||||
"selectedMode": False,
|
||||
"zoom": 1.05,
|
||||
"label": {"show": False, "color": "#ffffff"},
|
||||
"itemStyle": {
|
||||
"borderColor": "#4fd2dd",
|
||||
"borderWidth": 1,
|
||||
"areaColor": "#12304d",
|
||||
"shadowColor": "#4fd2dd",
|
||||
"shadowBlur": 12,
|
||||
},
|
||||
"emphasis": {"label": {"show": True, "color": "#ffffff"}, "itemStyle": {"areaColor": "#1d6f9c"}},
|
||||
},
|
||||
{
|
||||
"type": "lines",
|
||||
"zlevel": 2,
|
||||
"effect": {"show": True, "period": 4, "trailLength": 0.35, "symbol": "arrow", "symbolSize": 6},
|
||||
"lineStyle": {"normal": {"color": "#4fd2dd", "width": 1, "opacity": 0.45, "curveness": 0.25}},
|
||||
"data": [],
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def _kpis(prefix: str, items: list[tuple[str, int, str, str]]) -> list[dict[str, Any]]:
|
||||
components: list[dict[str, Any]] = []
|
||||
for index, (label, value, suffix, color) in enumerate(items):
|
||||
x = 40 + index * 470
|
||||
components.extend(
|
||||
[
|
||||
border(f"{prefix}-b{index}", x, 120, 450, 150),
|
||||
text(f"{prefix}-l{index}", x + 24, 136, 220, 32, label, 16, "#9fb3c8"),
|
||||
number(f"{prefix}-n{index}", x + 24, 176, 390, 70, value, "", suffix, color),
|
||||
]
|
||||
)
|
||||
return components
|
||||
|
||||
|
||||
def _legacy_screens() -> list[dict[str, Any]]:
|
||||
days = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
|
||||
regions = ["华北", "华东", "华南", "西南", "西北", "东北"]
|
||||
overview = canvas(
|
||||
"物料1-全国运行态势",
|
||||
"#071423",
|
||||
[
|
||||
text("m1-title", 40, 24, 760, 58, "全国运行态势", 34, "#f4f8ff", "left", "bold"),
|
||||
text("m1-sub", 40, 82, 760, 32, "采集、研判、处置与区域分布", 16, "#8ea4bd"),
|
||||
*_kpis("m1", [("今日采集", 1286, "条", "#7ee0ff"), ("研判完成", 864, "项", "#8dffc6"), ("待处置", 37, "件", "#ffd27a"), ("完成率", 92, "%", "#7ee0ff")]),
|
||||
border("m1-map-box", 30, 290, 1120, 750),
|
||||
text("m1-map-title", 54, 306, 240, 32, "区域分布", 18, "#f4f8ff", "left", "bold"),
|
||||
_map("m1-map", 50, 340, 1080, 680),
|
||||
border("m1-bar-box", 1170, 290, 710, 360),
|
||||
text("m1-bar-title", 1194, 306, 240, 32, "分区处置", 18, "#f4f8ff", "left", "bold"),
|
||||
bar("m1-bar", 1190, 348, 670, 280, regions, [("处置", [120, 98, 86, 64, 42, 38])]),
|
||||
border("m1-line-box", 1170, 670, 710, 370),
|
||||
text("m1-line-title", 1194, 686, 240, 32, "近七日采集", 18, "#f4f8ff", "left", "bold"),
|
||||
line("m1-line", 1190, 728, 670, 280, days, [("采集", [160, 188, 176, 210, 198, 142, 136])]),
|
||||
],
|
||||
)
|
||||
collect = canvas(
|
||||
"物料2-区域采集监测",
|
||||
"#071423",
|
||||
[
|
||||
text("m2-title", 40, 24, 760, 58, "区域采集监测", 34, "#f4f8ff", "left", "bold"),
|
||||
text("m2-sub", 40, 82, 760, 32, "各区域新增与七日波动", 16, "#8ea4bd"),
|
||||
*_kpis("m2", [("新增线索", 246, "条", "#7ee0ff"), ("已入库", 198, "条", "#8dffc6"), ("待复核", 31, "条", "#ffd27a"), ("覆盖区域", 18, "个", "#7ee0ff")]),
|
||||
border("m2-map-box", 30, 290, 980, 750),
|
||||
_map("m2-map", 50, 320, 940, 690),
|
||||
border("m2-line-box", 1030, 290, 850, 750),
|
||||
text("m2-line-title", 1054, 310, 280, 32, "七日新增", 18, "#f4f8ff", "left", "bold"),
|
||||
line("m2-line", 1054, 370, 790, 620, days, [("华北", [32, 28, 36, 30, 34, 18, 16]), ("华东", [40, 44, 38, 46, 42, 22, 20])]),
|
||||
],
|
||||
)
|
||||
alerts = canvas(
|
||||
"物料3-告警分布概览",
|
||||
"#071423",
|
||||
[
|
||||
text("m3-title", 40, 24, 760, 58, "告警分布概览", 34, "#f4f8ff", "left", "bold"),
|
||||
text("m3-sub", 40, 82, 760, 32, "告警类型、区域与响应", 16, "#8ea4bd"),
|
||||
*_kpis("m3", [("当前告警", 16, "条", "#ff8b8b"), ("处理中", 6, "条", "#ffd27a"), ("已恢复", 29, "条", "#8dffc6"), ("平均响应", 12, "分钟", "#7ee0ff")]),
|
||||
border("m3-pie-box", 30, 290, 620, 750),
|
||||
text("m3-pie-title", 54, 310, 240, 32, "类型分布", 18, "#f4f8ff", "left", "bold"),
|
||||
pie("m3-pie", 50, 360, 580, 620, ["链路", "接口", "任务", "存储", "其他"], [8, 6, 5, 4, 2]),
|
||||
border("m3-map-box", 670, 290, 1210, 750),
|
||||
_map("m3-map", 700, 330, 1140, 670),
|
||||
],
|
||||
)
|
||||
progress = canvas(
|
||||
"物料4-调度进度看板",
|
||||
"#071423",
|
||||
[
|
||||
text("m4-title", 40, 24, 760, 58, "调度进度看板", 34, "#f4f8ff", "left", "bold"),
|
||||
text("m4-sub", 40, 82, 760, 32, "六个阶段的当前进度", 16, "#8ea4bd"),
|
||||
*_kpis("m4", [("已完成", 2, "段", "#8dffc6"), ("进行中", 1, "段", "#ffd27a"), ("待开始", 3, "段", "#9fb3c8"), ("总体进度", 46, "%", "#7ee0ff")]),
|
||||
border("m4-bar-box", 30, 290, 900, 750),
|
||||
text("m4-bar-title", 54, 310, 240, 32, "阶段完成度", 18, "#f4f8ff", "left", "bold"),
|
||||
bar("m4-bar", 54, 370, 840, 620, ["立项", "采集", "研判", "会商", "处置", "复盘"], [("完成度", [100, 100, 62, 20, 8, 0])]),
|
||||
border("m4-map-box", 950, 290, 930, 750),
|
||||
_map("m4-map", 980, 330, 870, 670),
|
||||
],
|
||||
)
|
||||
compare = canvas(
|
||||
"物料5-指标趋势对照",
|
||||
"#071423",
|
||||
[
|
||||
text("m5-title", 40, 24, 760, 58, "指标趋势对照", 34, "#f4f8ff", "left", "bold"),
|
||||
text("m5-sub", 40, 82, 900, 32, "本期与上期的分区对照", 16, "#8ea4bd"),
|
||||
*_kpis("m5", [("本期", 1860, "", "#7ee0ff"), ("上期", 1640, "", "#9fb3c8"), ("差值", 220, "", "#8dffc6"), ("增幅", 13, "%", "#ffd27a")]),
|
||||
border("m5-bar-box", 30, 290, 980, 750),
|
||||
text("m5-bar-title", 54, 310, 280, 32, "本期 / 上期", 18, "#f4f8ff", "left", "bold"),
|
||||
bar("m5-bar", 54, 370, 920, 620, regions, [("本期", [320, 280, 240, 180, 120, 90]), ("上期", [290, 260, 210, 170, 110, 80])]),
|
||||
border("m5-map-box", 1030, 290, 850, 750),
|
||||
_map("m5-map", 1060, 330, 790, 670),
|
||||
],
|
||||
)
|
||||
return [
|
||||
{"id": "demo-material-1", "name": "物料1-全国运行态势", "state": PUBLISHED, "content": overview},
|
||||
{"id": "demo-material-2", "name": "物料2-区域采集监测", "state": -1, "content": collect},
|
||||
{"id": "demo-material-3", "name": "物料3-告警分布概览", "state": -1, "content": alerts},
|
||||
{"id": "demo-material-4", "name": "物料4-调度进度看板", "state": -1, "content": progress},
|
||||
{"id": "demo-material-5", "name": "物料5-指标趋势对照", "state": -1, "content": compare},
|
||||
]
|
||||
|
||||
|
||||
def _attr(x: int, y: int, w: int, h: int, z: int = 3) -> dict[str, int]:
|
||||
return {"x": x, "y": y, "w": w, "h": h, "offsetX": 0, "offsetY": 0, "zIndex": z}
|
||||
|
||||
|
||||
def _table(component_id: str, x: int, y: int, w: int, h: int) -> dict[str, Any]:
|
||||
rows = [
|
||||
["用户13", "2020-11-11 12:00", "离线"],
|
||||
["用户1", "2020-11-11 12:00", "在线"],
|
||||
["用户2", "2020-11-11 12:00", "离线"],
|
||||
["用户3", "2020-11-11 12:00", "在线"],
|
||||
["用户4", "2020-11-11 12:00", "在线"],
|
||||
["用户5", "2020-11-11 12:00", "在线"],
|
||||
["用户6", "2020-11-11 12:00", "离线"],
|
||||
["用户7", "2020-11-11 12:00", "在线"],
|
||||
["用户8", "2020-11-11 12:00", "在线"],
|
||||
["用户9", "2020-11-11 12:00", "离线"],
|
||||
]
|
||||
return component(
|
||||
component_id,
|
||||
"TableScrollBoard",
|
||||
_attr(x, y, w, h),
|
||||
{
|
||||
"header": ["用户", "时间", "状态"],
|
||||
"dataset": rows,
|
||||
"index": True,
|
||||
"columnWidth": [38, 70, 165],
|
||||
"align": ["center", "center", "center", "center"],
|
||||
"rowNum": 9,
|
||||
"waitTime": 4,
|
||||
"headerHeight": 34,
|
||||
"carousel": "single",
|
||||
"headerBGC": "#3d43c9",
|
||||
"oddRowBGC": "#0b1c4b",
|
||||
"evenRowBGC": "#0e285d",
|
||||
},
|
||||
chart("TableScrollBoard", "VTableScrollBoard", "用户数据状态", "Tables", "列表", "Tables", "common", "table_scrollboard.png"),
|
||||
)
|
||||
|
||||
|
||||
def _capsules(component_id: str, x: int, y: int, w: int, h: int) -> dict[str, Any]:
|
||||
return component(
|
||||
component_id,
|
||||
"CapsuleChart",
|
||||
_attr(x, y, w, h),
|
||||
{
|
||||
"dataset": {
|
||||
"dimensions": ["类别", "人数"],
|
||||
"source": [
|
||||
{"类别": "公务", "人数": 73},
|
||||
{"类别": "学生", "人数": 168},
|
||||
{"类别": "教师", "人数": 121},
|
||||
{"类别": "军区", "人数": 58},
|
||||
{"类别": "企业", "人数": 198},
|
||||
],
|
||||
},
|
||||
"colors": ["#6da9ff", "#6fd1ef", "#83e0ed", "#89d6dd", "#ffd66b"],
|
||||
"unit": "人",
|
||||
"itemHeight": 12,
|
||||
"valueFontSize": 13,
|
||||
"paddingRight": 52,
|
||||
"paddingLeft": 58,
|
||||
"showValue": False,
|
||||
},
|
||||
chart("CapsuleChart", "VCapsuleChart", "胶囊柱图", "Bars", "柱状图", "Charts", "common", "capsule.png"),
|
||||
)
|
||||
|
||||
|
||||
def _radar(component_id: str, x: int, y: int, w: int, h: int) -> dict[str, Any]:
|
||||
indicators = [
|
||||
{"name": "食物", "max": 100},
|
||||
{"name": "学习", "max": 100},
|
||||
{"name": "机械", "max": 100},
|
||||
{"name": "家居", "max": 100},
|
||||
{"name": "运动", "max": 100},
|
||||
{"name": "娱乐", "max": 100},
|
||||
]
|
||||
return component(
|
||||
component_id,
|
||||
"Radar",
|
||||
_attr(x, y, w, h),
|
||||
{
|
||||
"tooltip": {"show": False},
|
||||
"legend": {"show": False},
|
||||
"dataset": {
|
||||
"radarIndicator": indicators,
|
||||
"seriesData": [{"name": "关注", "value": [76, 64, 72, 58, 51, 67]}],
|
||||
},
|
||||
"radar": {
|
||||
"shape": "polygon",
|
||||
"radius": "62%",
|
||||
"center": ["50%", "53%"],
|
||||
"splitArea": {"show": True, "areaStyle": {"color": ["rgba(64,80,184,.12)", "rgba(64,80,184,.04)"]}},
|
||||
"splitLine": {"show": True, "lineStyle": {"color": "rgba(117,141,255,.28)"}},
|
||||
"axisName": {"show": True, "color": "#d9e8ff", "fontSize": 12},
|
||||
"axisLine": {"show": True, "lineStyle": {"color": "rgba(117,141,255,.35)"}},
|
||||
"axisTick": {"show": False},
|
||||
"indicator": indicators,
|
||||
},
|
||||
"series": [
|
||||
{
|
||||
"name": "关注",
|
||||
"type": "radar",
|
||||
"areaStyle": {"opacity": 0.32, "color": "#6679ff"},
|
||||
"lineStyle": {"color": "#8f9cff"},
|
||||
"itemStyle": {"color": "#aeb8ff"},
|
||||
"data": [{"name": "关注", "value": [76, 64, 72, 58, 51, 67]}],
|
||||
}
|
||||
],
|
||||
},
|
||||
chart("Radar", "VRadar", "关键数据类别分布", "Mores", "更多", "Charts", "echarts", "radar.png"),
|
||||
)
|
||||
|
||||
|
||||
def _globe(component_id: str, x: int, y: int, size: int) -> dict[str, Any]:
|
||||
return component(
|
||||
component_id,
|
||||
"Globe01",
|
||||
_attr(x, y, size, size),
|
||||
{
|
||||
"oceanColor": "#07142b",
|
||||
"landColor": "#4e73bf",
|
||||
"gridColor": "#78b9ff",
|
||||
"glowColor": "#5baeff",
|
||||
"rotateDuration": 14,
|
||||
},
|
||||
chart("Globe01", "VGlobe01", "数据地球", "Mores", "更多", "Decorates", "static", "threeEarth01.png"),
|
||||
)
|
||||
|
||||
|
||||
def _backdrop(component_id: str) -> dict[str, Any]:
|
||||
return component(
|
||||
component_id,
|
||||
"Backdrop01",
|
||||
_attr(0, 0, 1920, 1080, 0),
|
||||
{"baseColor": "#030815", "gridColor": "#3470a6", "glowColor": "#1f6fbb", "dotOpacity": 0.34},
|
||||
chart("Backdrop01", "VBackdrop01", "科技底纹", "Mores", "更多", "Decorates", "static", "background-image.png"),
|
||||
)
|
||||
|
||||
|
||||
def _tech_header(component_id: str) -> dict[str, Any]:
|
||||
return component(
|
||||
component_id,
|
||||
"HeaderTech01",
|
||||
_attr(0, 0, 1920, 112, 1),
|
||||
{"lineColor": "#69bfff", "glowColor": "#3279d7"},
|
||||
chart("HeaderTech01", "VHeaderTech01", "科技标题线", "Mores", "更多", "Decorates", "static", "border01.png"),
|
||||
)
|
||||
|
||||
|
||||
def _metric_card(component_id: str, x: int, y: int, title: str, value: int | float, unit: str, icon: str) -> dict[str, Any]:
|
||||
return component(
|
||||
component_id,
|
||||
"MetricCard01",
|
||||
_attr(x, y, 270, 108, 3),
|
||||
{
|
||||
"dataset": {"title": title, "value": value, "unit": unit, "icon": icon},
|
||||
"accentColor": "#79b8ff",
|
||||
"iconColor": "#75bdfd",
|
||||
"valueColor": "#d5e9ff",
|
||||
"titleColor": "#9fb5d4",
|
||||
},
|
||||
chart("MetricCard01", "VMetricCard01", "图标指标卡", "Mores", "更多", "Decorates", "common", "number.png"),
|
||||
)
|
||||
|
||||
|
||||
def _force_module(
|
||||
component_id: str,
|
||||
key: str,
|
||||
title: str,
|
||||
data_key: str,
|
||||
dataset: Any,
|
||||
x: int,
|
||||
y: int,
|
||||
w: int,
|
||||
h: int,
|
||||
default_view: str = "",
|
||||
) -> dict[str, Any]:
|
||||
return component(
|
||||
component_id,
|
||||
key,
|
||||
_attr(x, y, w, h, 4),
|
||||
{
|
||||
"title": title,
|
||||
"dataKey": data_key,
|
||||
"dataset": dataset,
|
||||
"accentColor": "#45c3f3",
|
||||
"panelColor": "rgba(3, 38, 80, .90)",
|
||||
"textColor": "#eef8ff",
|
||||
"mutedColor": "#8fb5d6",
|
||||
"defaultView": default_view,
|
||||
},
|
||||
chart(
|
||||
key,
|
||||
f"V{key}",
|
||||
f"力量态势·{title}",
|
||||
"ForceSituation",
|
||||
"力量态势",
|
||||
"Business",
|
||||
"common",
|
||||
"tables_list.png",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
def _tile_background(component_id: str) -> dict[str, Any]:
|
||||
return component(
|
||||
component_id,
|
||||
"LeafletTileBackground",
|
||||
_attr(0, 0, 1920, 1080, 1),
|
||||
{
|
||||
"style": "default",
|
||||
"centerLng": 116.4,
|
||||
"centerLat": 30.8,
|
||||
"zoom": 4,
|
||||
"minZoom": 3,
|
||||
"maxZoom": 12,
|
||||
"dragging": False,
|
||||
"scrollWheelZoom": False,
|
||||
"mask": "dark",
|
||||
"opacity": 0.72,
|
||||
"grayscale": 0,
|
||||
},
|
||||
chart(
|
||||
"LeafletTileBackground",
|
||||
"VLeafletTileBackground",
|
||||
"地图瓦片背景",
|
||||
"Maps",
|
||||
"地图",
|
||||
"Business",
|
||||
"common",
|
||||
"map.png",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
def _force_situation_dashboard() -> dict[str, Any]:
|
||||
task = {
|
||||
"taskName": "海上方向综合监测任务",
|
||||
"taskDirection": "东南方向",
|
||||
"taskType": "监测任务",
|
||||
"overview": "持续跟踪重点方向兵力活动、关键节点和公开信息变化,形成综合研判依据。",
|
||||
"sourceLabel": "上级下发",
|
||||
"createTime": "2026-11-11 09:30",
|
||||
}
|
||||
briefs = [
|
||||
{"id": "b1", "title": "对方动态", "text": "重点方向活动频次上升,多个节点出现协同行动迹象。", "tone": "risk"},
|
||||
{"id": "b2", "title": "我方态势", "text": "主要监测资源在线,重点区域覆盖保持稳定。", "tone": "opportunity"},
|
||||
{"id": "b3", "title": "环境影响", "text": "未来六小时气象条件可能影响海空域行动。", "tone": "watch"},
|
||||
]
|
||||
targets = [
|
||||
{"id": "t1", "name": "重点目标 A", "description": "近期多次出现在关键区域,关联度较高。"},
|
||||
{"id": "t2", "name": "重点目标 B", "description": "活动轨迹异常,需持续跟踪验证。"},
|
||||
{"id": "t3", "name": "重点目标 C", "description": "与多个事件节点存在时空关联。"},
|
||||
]
|
||||
insights = {
|
||||
"topics": [
|
||||
{"title": "重点海域活动热度持续上升", "heat": 92},
|
||||
{"title": "关键航线保障压力增加", "heat": 78},
|
||||
{"title": "区域联合演训进入活跃期", "heat": 66},
|
||||
],
|
||||
"risks": [
|
||||
{"description": "多方向活动叠加导致识别压力增加", "severity": "高", "urgency": "紧迫"},
|
||||
{"description": "恶劣天气可能形成监测盲区", "severity": "中", "urgency": "近期"},
|
||||
],
|
||||
"opportunities": [
|
||||
{"description": "关键窗口期可强化联合监测部署", "value": "高", "timing": "立即"},
|
||||
{"description": "利用公开信息补强目标关系图谱", "value": "中", "timing": "近期"},
|
||||
],
|
||||
}
|
||||
judgments = [
|
||||
{"id": "j1", "title": "活动强度判断", "content": "重点方向兵力活动较前期增强,短期仍将维持高位。", "conclusion": "风险上升", "confidence": 88, "tone": "risk"},
|
||||
{"id": "j2", "title": "行动目的判断", "content": "现有迹象更接近区域施压和能力展示。", "conclusion": "持续关注", "confidence": 76, "tone": "watch"},
|
||||
{"id": "j3", "title": "窗口判断", "content": "未来十二小时存在调整部署的有利窗口。", "conclusion": "存在战机", "confidence": 71, "tone": "opportunity"},
|
||||
{"id": "j4", "title": "趋势判断", "content": "关联事件数量仍在增加,需结合新数据滚动修正。", "conclusion": "持续关注", "confidence": 69, "tone": "watch"},
|
||||
]
|
||||
connections = [
|
||||
{"id": "c1", "name": "关键节点监测任务", "type": "打击", "direction": "东南", "status": "进行中", "content": "持续识别重点目标活动与关系变化。"},
|
||||
{"id": "c2", "name": "重点航线保障任务", "type": "打击", "direction": "南部", "status": "待开始", "content": "保障重点航线态势感知连续性。"},
|
||||
{"id": "c3", "name": "公开信息引导任务", "type": "塑势", "direction": "综合", "status": "进行中", "content": "强化公开信息归集与议题研判。"},
|
||||
{"id": "c4", "name": "区域协同支撑任务", "type": "塑势", "direction": "东部", "status": "已完成", "content": "建立多源数据协同处置机制。"},
|
||||
]
|
||||
nodes = [
|
||||
{"id": "n1", "date": "11-11 09:30", "title": "重点目标首次出现", "content": "监测系统识别到目标进入重点区域。", "topic": "目标活动"},
|
||||
{"id": "n2", "date": "11-11 11:20", "title": "活动强度明显上升", "content": "相关事件数量和关联目标同步增加。", "topic": "态势变化"},
|
||||
{"id": "n3", "date": "11-11 14:00", "title": "联合研判完成", "content": "完成多源信息交叉验证并更新判断。", "topic": "研判节点"},
|
||||
{"id": "n4", "date": "11-11 16:40", "title": "任务方案调整", "content": "依据最新态势调整后续任务衔接。", "topic": "任务调整"},
|
||||
]
|
||||
versions = [
|
||||
{"version": 1, "label": "09:00", "sublabel": "11/11"},
|
||||
{"version": 2, "label": "10:30", "sublabel": "11/11"},
|
||||
{"version": 3, "label": "12:00", "sublabel": "11/11"},
|
||||
{"version": 4, "label": "14:30", "sublabel": "11/11"},
|
||||
{"version": 5, "label": "16:40", "sublabel": "11/11", "isCurrent": True},
|
||||
]
|
||||
components = [
|
||||
_backdrop("fs-backdrop"),
|
||||
_tile_background("fs-map-background"),
|
||||
text("force-situation-layout-v1", 560, 18, 800, 54, "力量态势组件示例", 30, "#eef8ff", "center", "bold", 6),
|
||||
_force_module("fs-task", "FsTaskDetail", "任务详情", "taskDetail", task, 20, 82, 390, 226),
|
||||
_force_module("fs-briefs", "FsIntelligenceBriefs", "情报摘要", "situationBriefs", briefs, 20, 318, 390, 226),
|
||||
_force_module("fs-targets", "FsImportantTargets", "重要目标", "importantTargets", targets, 20, 554, 390, 236),
|
||||
_force_module("fs-insight", "FsSituationInsight", "态势研判", "insight", insights, 20, 800, 390, 260, "situation"),
|
||||
_force_module("fs-judgment", "FsCurrentJudgment", "当前判断", "currentJudgments", judgments, 430, 82, 720, 310),
|
||||
_force_module("fs-connections", "FsTaskConnection", "任务衔接", "taskConnections", connections, 430, 402, 720, 378, "table"),
|
||||
_force_module("fs-nodes", "FsImportantTimeNodes", "重要时间节点", "importantTimeNodes", nodes, 1170, 82, 730, 698),
|
||||
_force_module("fs-timeline", "FsVersionTimeline", "态势时间轴", "versions", versions, 430, 800, 1470, 260),
|
||||
]
|
||||
return canvas("力量态势组件示例", "#031124", components)
|
||||
|
||||
|
||||
def _ring(component_id: str, x: int, y: int, label: str, value: int) -> list[dict[str, Any]]:
|
||||
ratio = value / 100
|
||||
ring = component(
|
||||
component_id,
|
||||
"PieCircle",
|
||||
_attr(x, y, 118, 118),
|
||||
{
|
||||
"tooltip": {"show": False},
|
||||
"legend": {"show": False},
|
||||
"dataset": ratio,
|
||||
"title": {"text": f"{value}%", "x": "center", "y": "center", "textStyle": {"color": "#bfc7ff", "fontSize": 22}},
|
||||
"series": [
|
||||
{
|
||||
"type": "pie",
|
||||
"radius": ["68%", "78%"],
|
||||
"center": ["50%", "50%"],
|
||||
"hoverAnimation": False,
|
||||
"color": ["#242b5d", "transparent"],
|
||||
"label": {"show": False},
|
||||
"data": [
|
||||
{
|
||||
"value": [value],
|
||||
"itemStyle": {"color": "#6f67ff", "shadowBlur": 10, "shadowColor": "#8f87ff"},
|
||||
},
|
||||
{"value": [100 - value], "itemStyle": {"color": "rgba(91,104,190,.16)"}},
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
chart("PieCircle", "VPieCircle", label, "Pies", "饼图", "Charts", "echarts", "pie-circle.png"),
|
||||
)
|
||||
return [ring, text(f"{component_id}-label", x, y + 98, 118, 28, label, 14, "#d5ddf4", "center")]
|
||||
|
||||
|
||||
def _area_line(component_id: str, x: int, y: int, w: int, h: int, categories: list[str], series: list[tuple[str, list[int]]]) -> dict[str, Any]:
|
||||
chart_item = line(component_id, x, y, w, h, categories, series)
|
||||
option = chart_item["option"]
|
||||
option["legend"] = {"show": True, "top": 4, "textStyle": {"color": "#dbe7ff", "fontSize": 12}}
|
||||
option["grid"] = {"left": 42, "right": 18, "top": 42, "bottom": 28}
|
||||
option["xAxis"]["axisLine"] = {"lineStyle": {"color": "rgba(184,207,255,.35)"}}
|
||||
option["yAxis"]["axisLine"] = {"show": False}
|
||||
option["yAxis"]["splitLine"] = {"lineStyle": {"color": "rgba(184,207,255,.12)"}}
|
||||
for index, item in enumerate(option["series"]):
|
||||
item["smooth"] = True
|
||||
item["symbolSize"] = 4
|
||||
item["lineStyle"] = {"width": 3, "color": "#78caff" if index == 0 else "#9fd6c9"}
|
||||
item["areaStyle"] = {"opacity": 0.14, "color": "#2d9bd6" if index == 0 else "#4ca388"}
|
||||
return chart_item
|
||||
|
||||
|
||||
def _composed_reference_dashboard(name: str, prefix: str) -> dict[str, Any]:
|
||||
"""Native GoView reconstruction of the official material-one layout.
|
||||
|
||||
Every block below is an individual GoView component, keeping the example
|
||||
useful for editing, JSON data replacement and dynamic requests.
|
||||
"""
|
||||
|
||||
days = ["9:00", "12:00", "15:00", "18:00", "21:00", "00:00"]
|
||||
components: list[dict[str, Any]] = [
|
||||
_backdrop(f"{prefix}-backdrop"),
|
||||
_tech_header(f"{prefix}-header"),
|
||||
text(f"{prefix}-layout-v5", 690, 22, 540, 50, "大数据可视化平台", 32, "#eef5ff", "center", "bold", 5),
|
||||
text(f"{prefix}-layout-subtitle", 760, 70, 400, 22, "DATA VISUALIZATION PLATFORM", 11, "#74c6ff", "center", "normal", 5),
|
||||
text(f"{prefix}-time", 1518, 34, 350, 30, "2020-09-27 | 20:30:58 星期天", 16, "#b9c7ee", "right", "normal", 5),
|
||||
border(f"{prefix}-line-box", 36, 126, 402, 316),
|
||||
text(f"{prefix}-line-title", 58, 144, 260, 28, "▰ 今日流量趋势", 17, "#dceaff", "left", "bold", 5),
|
||||
text(f"{prefix}-line-meta", 58, 177, 350, 24, "平均接纳次数(小时):1500次 流量峰值:300M", 13, "#88a5cd", "left", "normal", 5),
|
||||
_area_line(f"{prefix}-line-chart", 58, 208, 354, 208, ["A", "B", "C", "D", "E", "F"], [("出口流量", [480, 210, 330, 240, 390, 250]), ("入口流量", [280, 360, 250, 190, 280, 340])]),
|
||||
border(f"{prefix}-table-box", 36, 462, 402, 574),
|
||||
text(f"{prefix}-table-title", 58, 480, 260, 28, "▣ 用户数据状态", 17, "#dceaff", "left", "bold", 5),
|
||||
_table(f"{prefix}-table", 54, 520, 366, 492),
|
||||
_map(f"{prefix}-map", 430, 132, 1000, 640),
|
||||
text(f"{prefix}-radar-title", 1438, 122, 300, 28, "◇ 关键数据类别分布", 17, "#dceaff", "left", "bold", 5),
|
||||
_radar(f"{prefix}-radar", 1464, 150, 270, 196),
|
||||
_globe(f"{prefix}-globe", 1718, 156, 132),
|
||||
text(f"{prefix}-capsule-title", 1438, 362, 300, 28, "▤ 平均用户类别排行", 17, "#dceaff", "left", "bold", 5),
|
||||
_capsules(f"{prefix}-capsules", 1435, 396, 405, 204),
|
||||
border(f"{prefix}-store-box", 1376, 586, 488, 450),
|
||||
text(f"{prefix}-store-title", 1400, 608, 300, 28, "⌁ 今日线下门店流量", 17, "#dceaff", "left", "bold", 5),
|
||||
*_ring(f"{prefix}-ring-service", 1402, 646, "服务质量", 90),
|
||||
*_ring(f"{prefix}-ring-experience", 1552, 646, "交互体验", 82),
|
||||
*_ring(f"{prefix}-ring-security", 1702, 646, "安全防护", 85),
|
||||
_area_line(f"{prefix}-store-line", 1404, 790, 420, 212, days, [("门店1", [86, 140, 182, 170, 206, 162]), ("门店2", [72, 128, 151, 101, 148, 116]), ("门店3", [96, 152, 122, 158, 184, 92]), ("门店4", [82, 118, 164, 135, 92, 138])]),
|
||||
]
|
||||
|
||||
traffic_cards = [
|
||||
("图像转化流量", 260, "点击/张", "image"),
|
||||
("视频转化流量", 330, "点击/个", "video"),
|
||||
("公众号流量", 62356, "点击/篇", "public"),
|
||||
("安全服务流量", 5453, "攻击/小时", "shield"),
|
||||
("金融流量", 4.65, "万/小时", "finance"),
|
||||
("通信流量", 1250, "M/分", "network"),
|
||||
]
|
||||
for index, (label, value, suffix, icon) in enumerate(traffic_cards):
|
||||
row, col = divmod(index, 3)
|
||||
x, y = 482 + col * 292, 762 + row * 126
|
||||
components.append(_metric_card(f"{prefix}-traffic-{index}", x, y, label, value, suffix, icon))
|
||||
return canvas(name, "#050b16", components)
|
||||
|
||||
|
||||
def _screens() -> list[dict[str, Any]]:
|
||||
"""The library entries are composed from editable native GoView blocks."""
|
||||
|
||||
names = (
|
||||
"物料1-全国运行态势",
|
||||
"物料2-区域采集监测",
|
||||
"物料3-告警分布概览",
|
||||
"物料4-调度进度看板",
|
||||
"物料5-指标趋势对照",
|
||||
)
|
||||
screens = [
|
||||
{
|
||||
"id": f"demo-material-{index}",
|
||||
"name": name,
|
||||
"state": PUBLISHED if index == 1 else -1,
|
||||
"content": _composed_reference_dashboard(name, f"m{index}"),
|
||||
}
|
||||
for index, name in enumerate(names, start=1)
|
||||
]
|
||||
screens.append(
|
||||
{
|
||||
"id": "demo-material-6",
|
||||
"name": "力量态势组件示例",
|
||||
"state": PUBLISHED,
|
||||
"content": _force_situation_dashboard(),
|
||||
}
|
||||
)
|
||||
return screens
|
||||
|
||||
|
||||
def ensure_demo_cover() -> str:
|
||||
root = asset_root()
|
||||
target = root / COVER_NAME
|
||||
if not target.is_file():
|
||||
target.write_bytes(_COVER_FILE.read_bytes())
|
||||
return COVER_URL
|
||||
|
||||
|
||||
def _component_list_is_usable(raw: str) -> bool:
|
||||
try:
|
||||
content = json.loads(raw or "")
|
||||
except json.JSONDecodeError:
|
||||
return False
|
||||
items = content.get("componentList") if isinstance(content, dict) else None
|
||||
if not isinstance(items, list) or not items:
|
||||
return False
|
||||
return all(
|
||||
isinstance(item, dict)
|
||||
and isinstance(item.get("key"), str)
|
||||
and isinstance(item.get("styles"), dict)
|
||||
and isinstance(item.get("request"), dict)
|
||||
and isinstance(item.get("events"), dict)
|
||||
for item in items
|
||||
)
|
||||
|
||||
|
||||
def _has_composed_dashboard(raw: str, project_id: str) -> bool:
|
||||
"""Whether the stored demo already uses the native component layout."""
|
||||
|
||||
try:
|
||||
content = json.loads(raw or "")
|
||||
except json.JSONDecodeError:
|
||||
return False
|
||||
items = content.get("componentList") if isinstance(content, dict) else None
|
||||
marker = "force-situation-layout-v1" if project_id == "demo-material-6" else f'{project_id.replace("demo-material-", "m")}-layout-v5'
|
||||
return isinstance(items, list) and any(
|
||||
isinstance(item, dict)
|
||||
and item.get("id") == marker
|
||||
and item.get("key") == "TextCommon"
|
||||
for item in items
|
||||
)
|
||||
|
||||
|
||||
def _is_legacy_generated_demo(raw: str, project_id: str) -> bool:
|
||||
"""Upgrade only the short-lived generated demo variant, never user work."""
|
||||
|
||||
try:
|
||||
content = json.loads(raw or "")
|
||||
except json.JSONDecodeError:
|
||||
return False
|
||||
items = content.get("componentList") if isinstance(content, dict) else None
|
||||
prefix = project_id.replace("demo-material-", "m")
|
||||
# ``*-layout-version`` was the first native-only attempt. It was still
|
||||
# our seeded content (rather than a user canvas), so promote it together
|
||||
# with the earlier generic/screenshot implementation.
|
||||
markers = {
|
||||
f"{prefix}-title",
|
||||
f"{prefix}-layout-version",
|
||||
f"{prefix}-layout-v2",
|
||||
f"{prefix}-layout-v3",
|
||||
f"{prefix}-layout-v4",
|
||||
"reference-dashboard-cover",
|
||||
}
|
||||
return isinstance(items, list) and any(
|
||||
isinstance(item, dict) and item.get("id") in markers for item in items
|
||||
)
|
||||
|
||||
|
||||
async def ensure_demo_projects(store) -> list[str]:
|
||||
"""Insert missing demo projects and repair a canvas that cannot be opened."""
|
||||
|
||||
cover = ensure_demo_cover()
|
||||
changed: list[str] = []
|
||||
for item in _screens():
|
||||
content = json.dumps(item["content"], ensure_ascii=False)
|
||||
existing = await store.get_owned(item["id"], DEMO_OWNER, with_content=True)
|
||||
if existing is None:
|
||||
await store.create_project(
|
||||
project_name=item["name"],
|
||||
remarks="可打开的演示大屏",
|
||||
index_image=cover,
|
||||
owner_id=DEMO_OWNER,
|
||||
content=content,
|
||||
project_id=item["id"],
|
||||
)
|
||||
if item["state"] == PUBLISHED:
|
||||
await store.set_state(item["id"], DEMO_OWNER, PUBLISHED)
|
||||
changed.append(item["id"])
|
||||
continue
|
||||
existing_content = existing.get("content") or ""
|
||||
if _has_composed_dashboard(existing_content, item["id"]):
|
||||
continue
|
||||
if _component_list_is_usable(existing_content) and not _is_legacy_generated_demo(existing_content, item["id"]):
|
||||
continue
|
||||
await store.save_content(item["id"], DEMO_OWNER, content)
|
||||
changed.append(item["id"])
|
||||
return changed
|
||||
@@ -0,0 +1,138 @@
|
||||
"""Shared GoView response and owner helpers.
|
||||
|
||||
GoView master-fetch treats ``code == 200`` as success and reads ``msg``.
|
||||
List ``count`` stays beside ``data``.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Any
|
||||
|
||||
from fastapi import Request
|
||||
from fastapi.responses import JSONResponse
|
||||
|
||||
from app.gateway.deps import get_optional_user_from_request
|
||||
|
||||
_ASSET_PREFIX = "/api/goview/assets/"
|
||||
|
||||
|
||||
def ok(data: Any = None, msg: str = "操作成功", count: int | None = None) -> dict[str, Any]:
|
||||
body: dict[str, Any] = {"code": 200, "msg": msg, "message": msg, "data": data}
|
||||
if count is not None:
|
||||
body["count"] = count
|
||||
return body
|
||||
|
||||
|
||||
def fail(status: int, msg: str) -> JSONResponse:
|
||||
return JSONResponse(status_code=status, content={"code": status, "msg": msg, "message": msg, "data": None})
|
||||
|
||||
|
||||
async def load_user(request: Request):
|
||||
user = getattr(request.state, "user", None)
|
||||
if user is not None:
|
||||
return user
|
||||
return await get_optional_user_from_request(request)
|
||||
|
||||
|
||||
def owner_id_of(user) -> str:
|
||||
"""Auth-disabled deployments share one management space."""
|
||||
|
||||
if user is None:
|
||||
return "default"
|
||||
return str(user.id)
|
||||
|
||||
|
||||
def user_is_admin(user) -> bool:
|
||||
if user is None:
|
||||
return True
|
||||
return getattr(user, "system_role", None) == "admin"
|
||||
|
||||
|
||||
def page_window(page: int, limit: int) -> tuple[int, int]:
|
||||
safe_page = page if page >= 1 else 1
|
||||
safe_limit = limit if limit >= 1 else 12
|
||||
if safe_limit > 100:
|
||||
safe_limit = 100
|
||||
return safe_page, safe_limit
|
||||
|
||||
|
||||
def clean_text(value: str, *, label: str, limit: int) -> str:
|
||||
text = value.strip()
|
||||
if not text:
|
||||
raise ValueError(f"{label}不能为空")
|
||||
if len(text) > limit:
|
||||
raise ValueError(f"{label}过长")
|
||||
return text
|
||||
|
||||
|
||||
def clean_optional_text(value: str | None, *, limit: int) -> str | None:
|
||||
if value is None:
|
||||
return None
|
||||
text = value.strip()
|
||||
if not text:
|
||||
return None
|
||||
if len(text) > limit:
|
||||
raise ValueError("说明过长")
|
||||
return text
|
||||
|
||||
|
||||
def clean_image_ref(value: str | None) -> str | None:
|
||||
if value is None or value.strip() == "":
|
||||
return None
|
||||
text = value.strip()
|
||||
if len(text) > 1024 or ".." in text or "\\" in text or "\n" in text or not text.startswith(_ASSET_PREFIX):
|
||||
raise ValueError("图片地址无效")
|
||||
return text
|
||||
|
||||
|
||||
def iso(value: datetime | None) -> str:
|
||||
if value is None:
|
||||
return ""
|
||||
return value.isoformat()
|
||||
|
||||
|
||||
def project_view(record: dict[str, Any], *, include_content: bool = False) -> dict[str, Any]:
|
||||
payload = {
|
||||
"id": record["id"],
|
||||
"projectName": record["project_name"],
|
||||
"state": record["state"],
|
||||
"createTime": iso(record["created_at"]),
|
||||
"indexImage": record.get("index_image") or "",
|
||||
"createUserId": record["owner_id"],
|
||||
"remarks": record.get("remarks") or "",
|
||||
}
|
||||
if include_content:
|
||||
payload["content"] = record.get("content") or ""
|
||||
return payload
|
||||
|
||||
|
||||
def template_view(record: dict[str, Any], *, include_content: bool = False) -> dict[str, Any]:
|
||||
payload = {
|
||||
"id": record["id"],
|
||||
"name": record["name"],
|
||||
"description": record.get("description") or "",
|
||||
"coverImage": record.get("cover_image") or "",
|
||||
"scope": record["scope"],
|
||||
"isBuiltin": bool(record.get("is_builtin")),
|
||||
"createUserId": record.get("owner_id") or "",
|
||||
"createTime": iso(record.get("created_at")),
|
||||
"sortOrder": record.get("sort_order") or 0,
|
||||
}
|
||||
if include_content:
|
||||
payload["content"] = record.get("content") or ""
|
||||
return payload
|
||||
|
||||
|
||||
def retitle_canvas(content: str, project_name: str) -> str:
|
||||
"""Deep-copy a ChartEditStorage document and set its canvas title."""
|
||||
|
||||
import json
|
||||
|
||||
data = json.loads(content)
|
||||
if not isinstance(data, dict):
|
||||
raise ValueError("项目内容必须是 JSON 对象")
|
||||
canvas = data.get("editCanvasConfig")
|
||||
if isinstance(canvas, dict):
|
||||
canvas["projectName"] = project_name
|
||||
return json.dumps(data, ensure_ascii=False)
|
||||
+507
@@ -0,0 +1,507 @@
|
||||
"""Write the builtin GoView canvas JSON files. Run from this directory."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
OUT = Path(__file__).resolve().parent
|
||||
|
||||
|
||||
def attr(x: int, y: int, w: int, h: int, z: int = 2) -> dict:
|
||||
return {"x": x, "y": y, "w": w, "h": h, "offsetX": 0, "offsetY": 0, "zIndex": z}
|
||||
|
||||
|
||||
def chart(key: str, chart_key: str, title: str, category: str, category_name: str, package: str, frame: str, image: str) -> dict:
|
||||
return {
|
||||
"key": key,
|
||||
"chartKey": chart_key,
|
||||
"conKey": f"VC{key}",
|
||||
"title": title,
|
||||
"category": category,
|
||||
"categoryName": category_name,
|
||||
"package": package,
|
||||
"chartFrame": frame,
|
||||
"image": image,
|
||||
}
|
||||
|
||||
|
||||
def public_config() -> dict:
|
||||
"""Fields GoView's preview renderer reads on every component."""
|
||||
|
||||
return {
|
||||
"styles": {
|
||||
"filterShow": False,
|
||||
"hueRotate": 0,
|
||||
"saturate": 1,
|
||||
"contrast": 1,
|
||||
"brightness": 1,
|
||||
"opacity": 1,
|
||||
"rotateZ": 0,
|
||||
"rotateX": 0,
|
||||
"rotateY": 0,
|
||||
"skewX": 0,
|
||||
"skewY": 0,
|
||||
"blendMode": "normal",
|
||||
"animations": [],
|
||||
},
|
||||
"preview": {"overFlowHidden": False},
|
||||
"status": {"lock": False, "hide": False},
|
||||
"filter": None,
|
||||
"request": {
|
||||
"requestDataType": 0,
|
||||
"requestHttpType": "get",
|
||||
"requestUrl": "",
|
||||
"requestInterval": None,
|
||||
"requestIntervalUnit": "second",
|
||||
"requestContentType": 0,
|
||||
"requestParamsBodyType": "none",
|
||||
"requestSQLContent": {"sql": "select * from where"},
|
||||
"requestParams": {"Body": {"form-data": {}, "x-www-form-urlencoded": {}, "json": "", "xml": ""}, "Header": {}, "Params": {}},
|
||||
},
|
||||
"events": {
|
||||
"baseEvent": {"click": None, "dblclick": None, "mouseenter": None, "mouseleave": None},
|
||||
"advancedEvents": {"vnodeMounted": None, "vnodeBeforeMount": None},
|
||||
"interactEvents": [],
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def component(component_id: str, key: str, box: dict, option: dict, config: dict) -> dict:
|
||||
return {
|
||||
"id": component_id,
|
||||
"key": key,
|
||||
"isGroup": False,
|
||||
"attr": box,
|
||||
"chartConfig": config,
|
||||
"option": option,
|
||||
**public_config(),
|
||||
}
|
||||
|
||||
|
||||
def text(component_id: str, x: int, y: int, w: int, h: int, content: str, size: int = 18, color: str = "#d7e6f7", align: str = "left", weight: str = "normal", z: int = 3) -> dict:
|
||||
return component(
|
||||
component_id,
|
||||
"TextCommon",
|
||||
attr(x, y, w, h, z),
|
||||
{
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": content,
|
||||
"fontSize": size,
|
||||
"fontColor": color,
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": align,
|
||||
"fontWeight": weight,
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000",
|
||||
},
|
||||
chart("TextCommon", "VTextCommon", "文字", "Texts", "文本", "Informations", "common", "text_static.png"),
|
||||
)
|
||||
|
||||
|
||||
def number(component_id: str, x: int, y: int, w: int, h: int, value: int, prefix: str, suffix: str, color: str = "#7ee0ff") -> dict:
|
||||
return component(
|
||||
component_id,
|
||||
"Number",
|
||||
attr(x, y, w, h, 3),
|
||||
{
|
||||
"dataset": value,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": True,
|
||||
"numberSize": 34,
|
||||
"numberColor": color,
|
||||
"prefixText": prefix,
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": suffix,
|
||||
"suffixColor": "#9fb3c8",
|
||||
},
|
||||
chart("Number", "VNumber", "数字计数", "Mores", "更多", "Decorates", "common", "number.png"),
|
||||
)
|
||||
|
||||
|
||||
def border(component_id: str, x: int, y: int, w: int, h: int) -> dict:
|
||||
return component(
|
||||
component_id,
|
||||
"Border01",
|
||||
attr(x, y, w, h, 1),
|
||||
{"dur": 0.5, "colors": ["#4fd2dd", "#235fa7"], "backgroundColor": "#00000000"},
|
||||
chart("Border01", "VBorder01", "边框-01", "Borders", "边框", "Decorates", "static", "border01.png"),
|
||||
)
|
||||
|
||||
|
||||
def dataset(categories: list[str], series: list[tuple[str, list[int]]]) -> dict:
|
||||
source = []
|
||||
for index, name in enumerate(categories):
|
||||
row = {"product": name}
|
||||
for series_name, values in series:
|
||||
row[series_name] = values[index]
|
||||
source.append(row)
|
||||
return {"dimensions": ["product", *[name for name, _ in series]], "source": source}
|
||||
|
||||
|
||||
def axis_option(categories: list[str], series: list[tuple[str, list[int]]], kind: str) -> dict:
|
||||
items = []
|
||||
for _name, _values in series:
|
||||
if kind == "bar":
|
||||
items.append(
|
||||
{
|
||||
"type": "bar",
|
||||
"barWidth": 16,
|
||||
"label": {"show": False, "position": "top", "color": "#fff", "fontSize": 12},
|
||||
"itemStyle": {"borderRadius": 2},
|
||||
}
|
||||
)
|
||||
else:
|
||||
items.append(
|
||||
{
|
||||
"type": "line",
|
||||
"smooth": True,
|
||||
"symbolSize": 6,
|
||||
"label": {"show": False, "position": "top", "color": "#fff", "fontSize": 12},
|
||||
"lineStyle": {"type": "solid", "width": 3},
|
||||
}
|
||||
)
|
||||
return {
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"tooltip": {"show": True, "trigger": "axis", "axisPointer": {"type": "shadow" if kind == "bar" else "line"}},
|
||||
"legend": {"show": True, "textStyle": {"color": "#d7e6f7"}},
|
||||
"grid": {"left": 48, "right": 24, "top": 40, "bottom": 32},
|
||||
"xAxis": {"show": True, "type": "category", "axisLabel": {"color": "#9fb3c8"}},
|
||||
"yAxis": {
|
||||
"show": True,
|
||||
"type": "value",
|
||||
"axisLabel": {"color": "#9fb3c8"},
|
||||
"splitLine": {"lineStyle": {"color": "rgba(255,255,255,0.08)"}},
|
||||
},
|
||||
"dataset": dataset(categories, series),
|
||||
"series": items,
|
||||
}
|
||||
|
||||
|
||||
def bar(component_id: str, x: int, y: int, w: int, h: int, categories: list[str], series: list[tuple[str, list[int]]]) -> dict:
|
||||
return component(
|
||||
component_id,
|
||||
"BarCommon",
|
||||
attr(x, y, w, h, 2),
|
||||
axis_option(categories, series, "bar"),
|
||||
chart("BarCommon", "VBarCommon", "柱状图", "Bars", "柱状图", "Charts", "echarts", "bar_x.png"),
|
||||
)
|
||||
|
||||
|
||||
def line(component_id: str, x: int, y: int, w: int, h: int, categories: list[str], series: list[tuple[str, list[int]]]) -> dict:
|
||||
return component(
|
||||
component_id,
|
||||
"LineCommon",
|
||||
attr(x, y, w, h, 2),
|
||||
axis_option(categories, series, "line"),
|
||||
chart("LineCommon", "VLineCommon", "折线图", "Lines", "折线图", "Charts", "echarts", "line.png"),
|
||||
)
|
||||
|
||||
|
||||
def pie(component_id: str, x: int, y: int, w: int, h: int, categories: list[str], values: list[int]) -> dict:
|
||||
return component(
|
||||
component_id,
|
||||
"PieCommon",
|
||||
attr(x, y, w, h, 2),
|
||||
{
|
||||
"isCarousel": False,
|
||||
"type": "ring",
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"tooltip": {"show": True, "trigger": "item"},
|
||||
"legend": {"show": True, "textStyle": {"color": "#d7e6f7"}},
|
||||
"dataset": dataset(categories, [("数量", values)]),
|
||||
"series": [
|
||||
{
|
||||
"type": "pie",
|
||||
"radius": ["42%", "68%"],
|
||||
"center": ["50%", "56%"],
|
||||
"roseType": False,
|
||||
"label": {"show": False, "color": "#d7e6f7"},
|
||||
"labelLine": {"show": False},
|
||||
}
|
||||
],
|
||||
},
|
||||
chart("PieCommon", "VPieCommon", "饼图", "Pies", "饼图", "Charts", "echarts", "pie.png"),
|
||||
)
|
||||
|
||||
|
||||
def leaflet(component_id: str = "leaflet-bg-1") -> dict:
|
||||
return component(
|
||||
component_id,
|
||||
"LeafletTileBackground",
|
||||
attr(0, 0, 1920, 1080, -1),
|
||||
{
|
||||
"style": "default",
|
||||
"centerLng": 116.4,
|
||||
"centerLat": 39.9,
|
||||
"zoom": 4,
|
||||
"minZoom": 3,
|
||||
"maxZoom": 12,
|
||||
"dragging": False,
|
||||
"scrollWheelZoom": False,
|
||||
"mask": "dark",
|
||||
"opacity": 1,
|
||||
"grayscale": 0,
|
||||
},
|
||||
chart("LeafletTileBackground", "VLeafletTileBackground", "地图瓦片背景", "Maps", "地图", "Business", "common", "map.png"),
|
||||
)
|
||||
|
||||
|
||||
DAYS = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
|
||||
|
||||
|
||||
def canvas(name: str, background: str, components: list[dict]) -> dict:
|
||||
return {
|
||||
"editCanvasConfig": {
|
||||
"projectName": name,
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"filterShow": False,
|
||||
"hueRotate": 0,
|
||||
"saturate": 1,
|
||||
"contrast": 1,
|
||||
"brightness": 1,
|
||||
"opacity": 1,
|
||||
"rotateZ": 0,
|
||||
"rotateX": 0,
|
||||
"rotateY": 0,
|
||||
"skewX": 0,
|
||||
"skewY": 0,
|
||||
"blendMode": "normal",
|
||||
"background": background,
|
||||
"backgroundImage": None,
|
||||
"selectColor": True,
|
||||
"chartThemeColor": "dark",
|
||||
"chartCustomThemeColorInfo": None,
|
||||
"chartThemeSetting": {},
|
||||
"vChartThemeName": "vScreenVolcanoBlue",
|
||||
"previewScaleType": "fit",
|
||||
},
|
||||
"componentList": components,
|
||||
"requestGlobalConfig": {
|
||||
"requestDataPond": [],
|
||||
"requestOriginUrl": "",
|
||||
"requestInterval": 30,
|
||||
"requestIntervalUnit": "second",
|
||||
"requestParams": {
|
||||
"Body": {"form-data": {}, "x-www-form-urlencoded": {}, "json": "", "xml": ""},
|
||||
"Header": {},
|
||||
"Params": {},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def title_block(prefix: str, title: str, subtitle: str) -> list[dict]:
|
||||
return [
|
||||
text(f"{prefix}-title", 48, 24, 900, 64, title, 34, "#f4f8ff", "left", "bold"),
|
||||
text(f"{prefix}-sub", 48, 88, 900, 36, subtitle, 16, "#8ea4bd", "left"),
|
||||
]
|
||||
|
||||
|
||||
SCREENS = {
|
||||
"dark-cockpit.json": canvas(
|
||||
"深色通用数据驾驶舱",
|
||||
"#0b1b33",
|
||||
[
|
||||
*title_block("cockpit", "运行总览", "采集、研判、处置与完成情况"),
|
||||
border("cockpit-b1", 40, 150, 440, 160),
|
||||
border("cockpit-b2", 500, 150, 440, 160),
|
||||
border("cockpit-b3", 960, 150, 440, 160),
|
||||
border("cockpit-b4", 1420, 150, 460, 160),
|
||||
text("cockpit-l1", 64, 168, 200, 36, "今日采集", 16, "#9fb3c8"),
|
||||
text("cockpit-l2", 524, 168, 200, 36, "研判完成", 16, "#9fb3c8"),
|
||||
text("cockpit-l3", 984, 168, 200, 36, "待处置", 16, "#9fb3c8"),
|
||||
text("cockpit-l4", 1444, 168, 200, 36, "完成率", 16, "#9fb3c8"),
|
||||
number("cockpit-n1", 64, 210, 380, 70, 1286, "", "条"),
|
||||
number("cockpit-n2", 524, 210, 380, 70, 864, "", "项", "#8dffc6"),
|
||||
number("cockpit-n3", 984, 210, 380, 70, 37, "", "件", "#ffd27a"),
|
||||
number("cockpit-n4", 1444, 210, 380, 70, 92, "", "%", "#7ee0ff"),
|
||||
border("cockpit-b5", 40, 340, 920, 680),
|
||||
border("cockpit-b6", 980, 340, 900, 680),
|
||||
text("cockpit-c1", 64, 360, 300, 36, "近七日处置量", 18, "#f4f8ff", "left", "bold"),
|
||||
text("cockpit-c2", 1004, 360, 300, 36, "近七日采集量", 18, "#f4f8ff", "left", "bold"),
|
||||
bar("cockpit-bar", 64, 410, 860, 560, DAYS, [("处置", [86, 92, 101, 97, 110, 74, 68]), ("复核", [40, 44, 51, 48, 55, 32, 29])]),
|
||||
line("cockpit-line", 1004, 410, 840, 560, DAYS, [("采集", [160, 188, 176, 210, 198, 142, 136])]),
|
||||
],
|
||||
),
|
||||
"map-overview.json": canvas(
|
||||
"地图基础概览大屏",
|
||||
"#061426",
|
||||
[
|
||||
leaflet(),
|
||||
*title_block("map", "区域概览", "离线瓦片底图与重点区域"),
|
||||
border("map-b1", 1360, 150, 520, 860),
|
||||
text("map-side", 1384, 174, 280, 40, "重点区域", 20, "#f4f8ff", "left", "bold"),
|
||||
text("map-r1", 1384, 230, 460, 80, "华北:关注度高,今日新增 18 条", 16, "#d7e6f7"),
|
||||
text("map-r2", 1384, 320, 460, 80, "华东:处置中 6 件,完成率 88%", 16, "#d7e6f7"),
|
||||
text("map-r3", 1384, 410, 460, 80, "华南:采集稳定,待复核 4 件", 16, "#d7e6f7"),
|
||||
text("map-r4", 1384, 500, 460, 80, "西南:新增线索 9 条", 16, "#d7e6f7"),
|
||||
number("map-n1", 1384, 640, 450, 80, 18, "新增 ", "条"),
|
||||
number("map-n2", 1384, 760, 450, 80, 6, "处置中 ", "件", "#ffd27a"),
|
||||
number("map-n3", 1384, 880, 450, 80, 88, "完成 ", "%", "#8dffc6"),
|
||||
],
|
||||
),
|
||||
"metrics-trend.json": canvas(
|
||||
"指标总览与趋势分析大屏",
|
||||
"#101820",
|
||||
[
|
||||
*title_block("trend", "指标趋势", "总量、完成与波动对照"),
|
||||
border("trend-b1", 40, 150, 1840, 140),
|
||||
number("trend-n1", 70, 180, 400, 80, 2460, "总量 ", ""),
|
||||
number("trend-n2", 520, 180, 400, 80, 1988, "完成 ", "", "#8dffc6"),
|
||||
number("trend-n3", 970, 180, 400, 80, 472, "进行中 ", "", "#ffd27a"),
|
||||
number("trend-n4", 1420, 180, 400, 80, 81, "环比 ", "%", "#7ee0ff"),
|
||||
border("trend-b2", 40, 320, 1200, 700),
|
||||
border("trend-b3", 1260, 320, 620, 700),
|
||||
text("trend-c1", 64, 340, 280, 36, "七日趋势", 18, "#f4f8ff", "left", "bold"),
|
||||
text("trend-c2", 1284, 340, 280, 36, "分类对比", 18, "#f4f8ff", "left", "bold"),
|
||||
line("trend-line", 64, 390, 1140, 580, DAYS, [("总量", [280, 310, 296, 340, 328, 260, 248]), ("完成", [210, 240, 228, 266, 250, 190, 176])]),
|
||||
bar("trend-bar", 1284, 390, 560, 580, ["采集", "研判", "会商", "处置", "复核"], [("本期", [420, 360, 180, 260, 140])]),
|
||||
],
|
||||
),
|
||||
"timeline-progress.json": canvas(
|
||||
"时间轴与进度概览大屏",
|
||||
"#12141c",
|
||||
[
|
||||
*title_block("time", "进度概览", "六个阶段的当前进度"),
|
||||
border("time-b1", 40, 150, 1840, 220),
|
||||
text("time-s1", 70, 180, 250, 40, "01 立项", 18, "#f4f8ff", "left", "bold"),
|
||||
text("time-s2", 360, 180, 250, 40, "02 采集", 18, "#f4f8ff", "left", "bold"),
|
||||
text("time-s3", 650, 180, 250, 40, "03 研判", 18, "#f4f8ff", "left", "bold"),
|
||||
text("time-s4", 940, 180, 250, 40, "04 会商", 18, "#f4f8ff", "left", "bold"),
|
||||
text("time-s5", 1230, 180, 250, 40, "05 处置", 18, "#f4f8ff", "left", "bold"),
|
||||
text("time-s6", 1520, 180, 250, 40, "06 复盘", 18, "#f4f8ff", "left", "bold"),
|
||||
text("time-d1", 70, 240, 250, 70, "已完成", 16, "#8dffc6"),
|
||||
text("time-d2", 360, 240, 250, 70, "已完成", 16, "#8dffc6"),
|
||||
text("time-d3", 650, 240, 250, 70, "进行中", 16, "#ffd27a"),
|
||||
text("time-d4", 940, 240, 250, 70, "待开始", 16, "#9fb3c8"),
|
||||
text("time-d5", 1230, 240, 250, 70, "待开始", 16, "#9fb3c8"),
|
||||
text("time-d6", 1520, 240, 250, 70, "待开始", 16, "#9fb3c8"),
|
||||
border("time-b2", 40, 400, 1840, 620),
|
||||
text("time-c1", 64, 424, 320, 36, "各阶段完成度", 18, "#f4f8ff", "left", "bold"),
|
||||
bar(
|
||||
"time-bar",
|
||||
64,
|
||||
480,
|
||||
1760,
|
||||
480,
|
||||
["立项", "采集", "研判", "会商", "处置", "复盘"],
|
||||
[("完成度", [100, 100, 62, 20, 8, 0])],
|
||||
),
|
||||
],
|
||||
),
|
||||
"ops-watch.json": canvas(
|
||||
"运行监测总览",
|
||||
"#0c1424",
|
||||
[
|
||||
*title_block("ops", "运行监测", "节点、告警与响应时长"),
|
||||
border("ops-b1", 40, 150, 440, 180),
|
||||
border("ops-b2", 500, 150, 440, 180),
|
||||
border("ops-b3", 960, 150, 440, 180),
|
||||
border("ops-b4", 1420, 150, 460, 180),
|
||||
text("ops-l1", 64, 170, 200, 32, "在线节点", 16, "#9fb3c8"),
|
||||
text("ops-l2", 524, 170, 200, 32, "当前告警", 16, "#9fb3c8"),
|
||||
text("ops-l3", 984, 170, 200, 32, "平均响应", 16, "#9fb3c8"),
|
||||
text("ops-l4", 1444, 170, 200, 32, "已恢复", 16, "#9fb3c8"),
|
||||
number("ops-n1", 64, 214, 380, 80, 48, "", "个", "#8dffc6"),
|
||||
number("ops-n2", 524, 214, 380, 80, 6, "", "条", "#ff8b8b"),
|
||||
number("ops-n3", 984, 214, 380, 80, 12, "", "分钟", "#ffd27a"),
|
||||
number("ops-n4", 1444, 214, 380, 80, 29, "", "条", "#7ee0ff"),
|
||||
border("ops-b5", 40, 360, 900, 660),
|
||||
border("ops-b6", 960, 360, 920, 660),
|
||||
text("ops-c1", 64, 384, 280, 36, "告警分布", 18, "#f4f8ff", "left", "bold"),
|
||||
text("ops-c2", 984, 384, 280, 36, "响应时长", 18, "#f4f8ff", "left", "bold"),
|
||||
pie("ops-pie", 64, 430, 840, 540, ["链路", "存储", "接口", "任务", "其他"], [8, 5, 6, 4, 2]),
|
||||
line("ops-line", 984, 430, 860, 540, DAYS, [("分钟", [18, 16, 14, 15, 11, 9, 12])]),
|
||||
],
|
||||
),
|
||||
"command-brief.json": canvas(
|
||||
"指挥研判简报",
|
||||
"#10151f",
|
||||
[
|
||||
*title_block("brief", "指挥研判简报", "今日关注、结论与下一步"),
|
||||
border("brief-b1", 40, 150, 1100, 860),
|
||||
border("brief-b2", 1160, 150, 720, 420),
|
||||
border("brief-b3", 1160, 590, 720, 420),
|
||||
text("brief-h1", 64, 174, 400, 40, "今日结论", 20, "#f4f8ff", "left", "bold"),
|
||||
text("brief-p1", 64, 230, 1020, 120, "采集量较昨日上升,研判队列仍可在当日完成。", 18, "#d7e6f7"),
|
||||
text("brief-p2", 64, 360, 1020, 120, "待处置事项集中在两个方向,建议优先复核高关注条目。", 18, "#d7e6f7"),
|
||||
text("brief-p3", 64, 490, 1020, 120, "会商材料已齐,可按现有口径进入处置。", 18, "#d7e6f7"),
|
||||
text("brief-p4", 64, 640, 1020, 140, "下一步:补齐西南方向线索,并在晚间复盘完成率。", 18, "#ffd27a"),
|
||||
text("brief-h2", 1184, 174, 300, 40, "关注方向", 20, "#f4f8ff", "left", "bold"),
|
||||
pie("brief-pie", 1184, 220, 660, 320, ["华北", "华东", "华南", "西南"], [32, 28, 22, 18]),
|
||||
text("brief-h3", 1184, 614, 300, 40, "当前计数", 20, "#f4f8ff", "left", "bold"),
|
||||
number("brief-n1", 1184, 680, 640, 80, 46, "待会商 ", "项", "#7ee0ff"),
|
||||
number("brief-n2", 1184, 800, 640, 80, 12, "优先复核 ", "件", "#ffd27a"),
|
||||
],
|
||||
),
|
||||
"resource-board.json": canvas(
|
||||
"资源态势看板",
|
||||
"#0e1a22",
|
||||
[
|
||||
*title_block("res", "资源态势", "人员、装备、仓储与在途"),
|
||||
border("res-b1", 40, 150, 440, 180),
|
||||
border("res-b2", 500, 150, 440, 180),
|
||||
border("res-b3", 960, 150, 440, 180),
|
||||
border("res-b4", 1420, 150, 460, 180),
|
||||
text("res-l1", 64, 170, 180, 32, "人员", 16, "#9fb3c8"),
|
||||
text("res-l2", 524, 170, 180, 32, "装备", 16, "#9fb3c8"),
|
||||
text("res-l3", 984, 170, 180, 32, "仓储", 16, "#9fb3c8"),
|
||||
text("res-l4", 1444, 170, 180, 32, "在途", 16, "#9fb3c8"),
|
||||
number("res-n1", 64, 214, 380, 80, 326, "", "人"),
|
||||
number("res-n2", 524, 214, 380, 80, 84, "", "套", "#8dffc6"),
|
||||
number("res-n3", 984, 214, 380, 80, 15, "", "处", "#ffd27a"),
|
||||
number("res-n4", 1444, 214, 380, 80, 9, "", "批", "#7ee0ff"),
|
||||
border("res-b5", 40, 360, 920, 660),
|
||||
border("res-b6", 980, 360, 900, 660),
|
||||
text("res-c1", 64, 384, 280, 36, "分类存量", 18, "#f4f8ff", "left", "bold"),
|
||||
text("res-c2", 1004, 384, 280, 36, "七日调用", 18, "#f4f8ff", "left", "bold"),
|
||||
bar("res-bar", 64, 430, 860, 540, ["人员", "装备", "仓储", "在途"], [("可用", [326, 84, 15, 9])]),
|
||||
line("res-line", 1004, 430, 840, 540, DAYS, [("调用", [20, 24, 22, 31, 28, 16, 18])]),
|
||||
],
|
||||
),
|
||||
"compare-board.json": canvas(
|
||||
"对比分析大屏",
|
||||
"#121826",
|
||||
[
|
||||
*title_block("cmp", "对比分析", "本期与上期的差值"),
|
||||
border("cmp-b1", 40, 150, 1840, 120),
|
||||
text("cmp-note", 64, 180, 1600, 60, "本期采集与处置均高于上期,会商数量基本持平。", 18, "#d7e6f7"),
|
||||
border("cmp-b2", 40, 300, 920, 720),
|
||||
border("cmp-b3", 980, 300, 900, 720),
|
||||
text("cmp-c1", 64, 324, 300, 36, "本期 / 上期", 18, "#f4f8ff", "left", "bold"),
|
||||
text("cmp-c2", 1004, 324, 300, 36, "差值走势", 18, "#f4f8ff", "left", "bold"),
|
||||
bar(
|
||||
"cmp-bar",
|
||||
64,
|
||||
380,
|
||||
860,
|
||||
580,
|
||||
["采集", "研判", "会商", "处置"],
|
||||
[("本期", [420, 360, 180, 260]), ("上期", [380, 340, 176, 210])],
|
||||
),
|
||||
line("cmp-line", 1004, 380, 840, 580, ["采集", "研判", "会商", "处置"], [("差值", [40, 20, 4, 50])]),
|
||||
],
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
def main() -> None:
|
||||
for name, payload in SCREENS.items():
|
||||
text_out = json.dumps(payload, ensure_ascii=False, indent=2)
|
||||
json.loads(text_out)
|
||||
(OUT / name).write_text(text_out + "\n", encoding="utf-8")
|
||||
print(name, len(payload["componentList"]))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+683
@@ -0,0 +1,683 @@
|
||||
{
|
||||
"editCanvasConfig": {
|
||||
"projectName": "指挥研判简报",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"filterShow": false,
|
||||
"hueRotate": 0,
|
||||
"saturate": 1,
|
||||
"contrast": 1,
|
||||
"brightness": 1,
|
||||
"opacity": 1,
|
||||
"rotateZ": 0,
|
||||
"rotateX": 0,
|
||||
"rotateY": 0,
|
||||
"skewX": 0,
|
||||
"skewY": 0,
|
||||
"blendMode": "normal",
|
||||
"background": "#10151f",
|
||||
"backgroundImage": null,
|
||||
"selectColor": true,
|
||||
"chartThemeColor": "dark",
|
||||
"chartCustomThemeColorInfo": null,
|
||||
"chartThemeSetting": {},
|
||||
"vChartThemeName": "vScreenVolcanoBlue",
|
||||
"previewScaleType": "fit"
|
||||
},
|
||||
"componentList": [
|
||||
{
|
||||
"id": "brief-title",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 24,
|
||||
"w": 900,
|
||||
"h": 64,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "指挥研判简报",
|
||||
"fontSize": 34,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "brief-sub",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 88,
|
||||
"w": 900,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "今日关注、结论与下一步",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#8ea4bd",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "brief-b1",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 40,
|
||||
"y": 150,
|
||||
"w": 1100,
|
||||
"h": 860,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "brief-b2",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1160,
|
||||
"y": 150,
|
||||
"w": 720,
|
||||
"h": 420,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "brief-b3",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1160,
|
||||
"y": 590,
|
||||
"w": 720,
|
||||
"h": 420,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "brief-h1",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 174,
|
||||
"w": 400,
|
||||
"h": 40,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "今日结论",
|
||||
"fontSize": 20,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "brief-p1",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 230,
|
||||
"w": 1020,
|
||||
"h": 120,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "采集量较昨日上升,研判队列仍可在当日完成。",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#d7e6f7",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "brief-p2",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 360,
|
||||
"w": 1020,
|
||||
"h": 120,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "待处置事项集中在两个方向,建议优先复核高关注条目。",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#d7e6f7",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "brief-p3",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 490,
|
||||
"w": 1020,
|
||||
"h": 120,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "会商材料已齐,可按现有口径进入处置。",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#d7e6f7",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "brief-p4",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 640,
|
||||
"w": 1020,
|
||||
"h": 140,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "下一步:补齐西南方向线索,并在晚间复盘完成率。",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#ffd27a",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "brief-h2",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1184,
|
||||
"y": 174,
|
||||
"w": 300,
|
||||
"h": 40,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "关注方向",
|
||||
"fontSize": 20,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "brief-pie",
|
||||
"key": "PieCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1184,
|
||||
"y": 220,
|
||||
"w": 660,
|
||||
"h": 320,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 2
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "PieCommon",
|
||||
"chartKey": "VPieCommon",
|
||||
"conKey": "VCPieCommon",
|
||||
"title": "饼图",
|
||||
"category": "Pies",
|
||||
"categoryName": "饼图",
|
||||
"package": "Charts",
|
||||
"chartFrame": "echarts",
|
||||
"image": "pie.png"
|
||||
},
|
||||
"option": {
|
||||
"isCarousel": false,
|
||||
"type": "ring",
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"trigger": "item"
|
||||
},
|
||||
"legend": {
|
||||
"show": true,
|
||||
"textStyle": {
|
||||
"color": "#d7e6f7"
|
||||
}
|
||||
},
|
||||
"dataset": {
|
||||
"dimensions": [
|
||||
"product",
|
||||
"数量"
|
||||
],
|
||||
"source": [
|
||||
{
|
||||
"product": "华北",
|
||||
"数量": 32
|
||||
},
|
||||
{
|
||||
"product": "华东",
|
||||
"数量": 28
|
||||
},
|
||||
{
|
||||
"product": "华南",
|
||||
"数量": 22
|
||||
},
|
||||
{
|
||||
"product": "西南",
|
||||
"数量": 18
|
||||
}
|
||||
]
|
||||
},
|
||||
"series": [
|
||||
{
|
||||
"type": "pie",
|
||||
"radius": [
|
||||
"42%",
|
||||
"68%"
|
||||
],
|
||||
"center": [
|
||||
"50%",
|
||||
"56%"
|
||||
],
|
||||
"roseType": false,
|
||||
"label": {
|
||||
"show": false,
|
||||
"color": "#d7e6f7"
|
||||
},
|
||||
"labelLine": {
|
||||
"show": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "brief-h3",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1184,
|
||||
"y": 614,
|
||||
"w": 300,
|
||||
"h": 40,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "当前计数",
|
||||
"fontSize": 20,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "brief-n1",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1184,
|
||||
"y": 680,
|
||||
"w": 640,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 46,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#7ee0ff",
|
||||
"prefixText": "待会商 ",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "项",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "brief-n2",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1184,
|
||||
"y": 800,
|
||||
"w": 640,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 12,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#ffd27a",
|
||||
"prefixText": "优先复核 ",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "件",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestGlobalConfig": {
|
||||
"requestDataPond": [],
|
||||
"requestOriginUrl": "",
|
||||
"requestInterval": 30,
|
||||
"requestIntervalUnit": "second",
|
||||
"requestParams": {
|
||||
"Body": {
|
||||
"form-data": {},
|
||||
"x-www-form-urlencoded": {},
|
||||
"json": "",
|
||||
"xml": ""
|
||||
},
|
||||
"Header": {},
|
||||
"Params": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
+584
@@ -0,0 +1,584 @@
|
||||
{
|
||||
"editCanvasConfig": {
|
||||
"projectName": "对比分析大屏",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"filterShow": false,
|
||||
"hueRotate": 0,
|
||||
"saturate": 1,
|
||||
"contrast": 1,
|
||||
"brightness": 1,
|
||||
"opacity": 1,
|
||||
"rotateZ": 0,
|
||||
"rotateX": 0,
|
||||
"rotateY": 0,
|
||||
"skewX": 0,
|
||||
"skewY": 0,
|
||||
"blendMode": "normal",
|
||||
"background": "#121826",
|
||||
"backgroundImage": null,
|
||||
"selectColor": true,
|
||||
"chartThemeColor": "dark",
|
||||
"chartCustomThemeColorInfo": null,
|
||||
"chartThemeSetting": {},
|
||||
"vChartThemeName": "vScreenVolcanoBlue",
|
||||
"previewScaleType": "fit"
|
||||
},
|
||||
"componentList": [
|
||||
{
|
||||
"id": "cmp-title",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 24,
|
||||
"w": 900,
|
||||
"h": 64,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "对比分析",
|
||||
"fontSize": 34,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cmp-sub",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 88,
|
||||
"w": 900,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "本期与上期的差值",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#8ea4bd",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cmp-b1",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 40,
|
||||
"y": 150,
|
||||
"w": 1840,
|
||||
"h": 120,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cmp-note",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 180,
|
||||
"w": 1600,
|
||||
"h": 60,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "本期采集与处置均高于上期,会商数量基本持平。",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#d7e6f7",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cmp-b2",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 40,
|
||||
"y": 300,
|
||||
"w": 920,
|
||||
"h": 720,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cmp-b3",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 980,
|
||||
"y": 300,
|
||||
"w": 900,
|
||||
"h": 720,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cmp-c1",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 324,
|
||||
"w": 300,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "本期 / 上期",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cmp-c2",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1004,
|
||||
"y": 324,
|
||||
"w": 300,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "差值走势",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cmp-bar",
|
||||
"key": "BarCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 380,
|
||||
"w": 860,
|
||||
"h": 580,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 2
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "BarCommon",
|
||||
"chartKey": "VBarCommon",
|
||||
"conKey": "VCBarCommon",
|
||||
"title": "柱状图",
|
||||
"category": "Bars",
|
||||
"categoryName": "柱状图",
|
||||
"package": "Charts",
|
||||
"chartFrame": "echarts",
|
||||
"image": "bar_x.png"
|
||||
},
|
||||
"option": {
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"trigger": "axis",
|
||||
"axisPointer": {
|
||||
"type": "shadow"
|
||||
}
|
||||
},
|
||||
"legend": {
|
||||
"show": true,
|
||||
"textStyle": {
|
||||
"color": "#d7e6f7"
|
||||
}
|
||||
},
|
||||
"grid": {
|
||||
"left": 48,
|
||||
"right": 24,
|
||||
"top": 40,
|
||||
"bottom": 32
|
||||
},
|
||||
"xAxis": {
|
||||
"show": true,
|
||||
"type": "category",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
"yAxis": {
|
||||
"show": true,
|
||||
"type": "value",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
},
|
||||
"splitLine": {
|
||||
"lineStyle": {
|
||||
"color": "rgba(255,255,255,0.08)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dataset": {
|
||||
"dimensions": [
|
||||
"product",
|
||||
"本期",
|
||||
"上期"
|
||||
],
|
||||
"source": [
|
||||
{
|
||||
"product": "采集",
|
||||
"本期": 420,
|
||||
"上期": 380
|
||||
},
|
||||
{
|
||||
"product": "研判",
|
||||
"本期": 360,
|
||||
"上期": 340
|
||||
},
|
||||
{
|
||||
"product": "会商",
|
||||
"本期": 180,
|
||||
"上期": 176
|
||||
},
|
||||
{
|
||||
"product": "处置",
|
||||
"本期": 260,
|
||||
"上期": 210
|
||||
}
|
||||
]
|
||||
},
|
||||
"series": [
|
||||
{
|
||||
"type": "bar",
|
||||
"barWidth": 16,
|
||||
"label": {
|
||||
"show": false,
|
||||
"position": "top",
|
||||
"color": "#fff",
|
||||
"fontSize": 12
|
||||
},
|
||||
"itemStyle": {
|
||||
"borderRadius": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "bar",
|
||||
"barWidth": 16,
|
||||
"label": {
|
||||
"show": false,
|
||||
"position": "top",
|
||||
"color": "#fff",
|
||||
"fontSize": 12
|
||||
},
|
||||
"itemStyle": {
|
||||
"borderRadius": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cmp-line",
|
||||
"key": "LineCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1004,
|
||||
"y": 380,
|
||||
"w": 840,
|
||||
"h": 580,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 2
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "LineCommon",
|
||||
"chartKey": "VLineCommon",
|
||||
"conKey": "VCLineCommon",
|
||||
"title": "折线图",
|
||||
"category": "Lines",
|
||||
"categoryName": "折线图",
|
||||
"package": "Charts",
|
||||
"chartFrame": "echarts",
|
||||
"image": "line.png"
|
||||
},
|
||||
"option": {
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"trigger": "axis",
|
||||
"axisPointer": {
|
||||
"type": "line"
|
||||
}
|
||||
},
|
||||
"legend": {
|
||||
"show": true,
|
||||
"textStyle": {
|
||||
"color": "#d7e6f7"
|
||||
}
|
||||
},
|
||||
"grid": {
|
||||
"left": 48,
|
||||
"right": 24,
|
||||
"top": 40,
|
||||
"bottom": 32
|
||||
},
|
||||
"xAxis": {
|
||||
"show": true,
|
||||
"type": "category",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
"yAxis": {
|
||||
"show": true,
|
||||
"type": "value",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
},
|
||||
"splitLine": {
|
||||
"lineStyle": {
|
||||
"color": "rgba(255,255,255,0.08)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dataset": {
|
||||
"dimensions": [
|
||||
"product",
|
||||
"差值"
|
||||
],
|
||||
"source": [
|
||||
{
|
||||
"product": "采集",
|
||||
"差值": 40
|
||||
},
|
||||
{
|
||||
"product": "研判",
|
||||
"差值": 20
|
||||
},
|
||||
{
|
||||
"product": "会商",
|
||||
"差值": 4
|
||||
},
|
||||
{
|
||||
"product": "处置",
|
||||
"差值": 50
|
||||
}
|
||||
]
|
||||
},
|
||||
"series": [
|
||||
{
|
||||
"type": "line",
|
||||
"smooth": true,
|
||||
"symbolSize": 6,
|
||||
"label": {
|
||||
"show": false,
|
||||
"position": "top",
|
||||
"color": "#fff",
|
||||
"fontSize": 12
|
||||
},
|
||||
"lineStyle": {
|
||||
"type": "solid",
|
||||
"width": 3
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestGlobalConfig": {
|
||||
"requestDataPond": [],
|
||||
"requestOriginUrl": "",
|
||||
"requestInterval": 30,
|
||||
"requestIntervalUnit": "second",
|
||||
"requestParams": {
|
||||
"Body": {
|
||||
"form-data": {},
|
||||
"x-www-form-urlencoded": {},
|
||||
"json": "",
|
||||
"xml": ""
|
||||
},
|
||||
"Header": {},
|
||||
"Params": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,988 @@
|
||||
{
|
||||
"editCanvasConfig": {
|
||||
"projectName": "深色通用数据驾驶舱",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"filterShow": false,
|
||||
"hueRotate": 0,
|
||||
"saturate": 1,
|
||||
"contrast": 1,
|
||||
"brightness": 1,
|
||||
"opacity": 1,
|
||||
"rotateZ": 0,
|
||||
"rotateX": 0,
|
||||
"rotateY": 0,
|
||||
"skewX": 0,
|
||||
"skewY": 0,
|
||||
"blendMode": "normal",
|
||||
"background": "#0b1b33",
|
||||
"backgroundImage": null,
|
||||
"selectColor": true,
|
||||
"chartThemeColor": "dark",
|
||||
"chartCustomThemeColorInfo": null,
|
||||
"chartThemeSetting": {},
|
||||
"vChartThemeName": "vScreenVolcanoBlue",
|
||||
"previewScaleType": "fit"
|
||||
},
|
||||
"componentList": [
|
||||
{
|
||||
"id": "cockpit-title",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 24,
|
||||
"w": 900,
|
||||
"h": 64,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "运行总览",
|
||||
"fontSize": 34,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-sub",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 88,
|
||||
"w": 900,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "采集、研判、处置与完成情况",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#8ea4bd",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-b1",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 40,
|
||||
"y": 150,
|
||||
"w": 440,
|
||||
"h": 160,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-b2",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 500,
|
||||
"y": 150,
|
||||
"w": 440,
|
||||
"h": 160,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-b3",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 960,
|
||||
"y": 150,
|
||||
"w": 440,
|
||||
"h": 160,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-b4",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1420,
|
||||
"y": 150,
|
||||
"w": 460,
|
||||
"h": 160,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-l1",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 168,
|
||||
"w": 200,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "今日采集",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-l2",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 524,
|
||||
"y": 168,
|
||||
"w": 200,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "研判完成",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-l3",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 984,
|
||||
"y": 168,
|
||||
"w": 200,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "待处置",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-l4",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1444,
|
||||
"y": 168,
|
||||
"w": 200,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "完成率",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-n1",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 210,
|
||||
"w": 380,
|
||||
"h": 70,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 1286,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#7ee0ff",
|
||||
"prefixText": "",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "条",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-n2",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 524,
|
||||
"y": 210,
|
||||
"w": 380,
|
||||
"h": 70,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 864,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#8dffc6",
|
||||
"prefixText": "",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "项",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-n3",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 984,
|
||||
"y": 210,
|
||||
"w": 380,
|
||||
"h": 70,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 37,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#ffd27a",
|
||||
"prefixText": "",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "件",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-n4",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1444,
|
||||
"y": 210,
|
||||
"w": 380,
|
||||
"h": 70,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 92,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#7ee0ff",
|
||||
"prefixText": "",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "%",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-b5",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 40,
|
||||
"y": 340,
|
||||
"w": 920,
|
||||
"h": 680,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-b6",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 980,
|
||||
"y": 340,
|
||||
"w": 900,
|
||||
"h": 680,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-c1",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 360,
|
||||
"w": 300,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "近七日处置量",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-c2",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1004,
|
||||
"y": 360,
|
||||
"w": 300,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "近七日采集量",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-bar",
|
||||
"key": "BarCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 410,
|
||||
"w": 860,
|
||||
"h": 560,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 2
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "BarCommon",
|
||||
"chartKey": "VBarCommon",
|
||||
"conKey": "VCBarCommon",
|
||||
"title": "柱状图",
|
||||
"category": "Bars",
|
||||
"categoryName": "柱状图",
|
||||
"package": "Charts",
|
||||
"chartFrame": "echarts",
|
||||
"image": "bar_x.png"
|
||||
},
|
||||
"option": {
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"trigger": "axis",
|
||||
"axisPointer": {
|
||||
"type": "shadow"
|
||||
}
|
||||
},
|
||||
"legend": {
|
||||
"show": true,
|
||||
"textStyle": {
|
||||
"color": "#d7e6f7"
|
||||
}
|
||||
},
|
||||
"grid": {
|
||||
"left": 48,
|
||||
"right": 24,
|
||||
"top": 40,
|
||||
"bottom": 32
|
||||
},
|
||||
"xAxis": {
|
||||
"show": true,
|
||||
"type": "category",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
"yAxis": {
|
||||
"show": true,
|
||||
"type": "value",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
},
|
||||
"splitLine": {
|
||||
"lineStyle": {
|
||||
"color": "rgba(255,255,255,0.08)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dataset": {
|
||||
"dimensions": [
|
||||
"product",
|
||||
"处置",
|
||||
"复核"
|
||||
],
|
||||
"source": [
|
||||
{
|
||||
"product": "周一",
|
||||
"处置": 86,
|
||||
"复核": 40
|
||||
},
|
||||
{
|
||||
"product": "周二",
|
||||
"处置": 92,
|
||||
"复核": 44
|
||||
},
|
||||
{
|
||||
"product": "周三",
|
||||
"处置": 101,
|
||||
"复核": 51
|
||||
},
|
||||
{
|
||||
"product": "周四",
|
||||
"处置": 97,
|
||||
"复核": 48
|
||||
},
|
||||
{
|
||||
"product": "周五",
|
||||
"处置": 110,
|
||||
"复核": 55
|
||||
},
|
||||
{
|
||||
"product": "周六",
|
||||
"处置": 74,
|
||||
"复核": 32
|
||||
},
|
||||
{
|
||||
"product": "周日",
|
||||
"处置": 68,
|
||||
"复核": 29
|
||||
}
|
||||
]
|
||||
},
|
||||
"series": [
|
||||
{
|
||||
"type": "bar",
|
||||
"barWidth": 16,
|
||||
"label": {
|
||||
"show": false,
|
||||
"position": "top",
|
||||
"color": "#fff",
|
||||
"fontSize": 12
|
||||
},
|
||||
"itemStyle": {
|
||||
"borderRadius": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "bar",
|
||||
"barWidth": 16,
|
||||
"label": {
|
||||
"show": false,
|
||||
"position": "top",
|
||||
"color": "#fff",
|
||||
"fontSize": 12
|
||||
},
|
||||
"itemStyle": {
|
||||
"borderRadius": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cockpit-line",
|
||||
"key": "LineCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1004,
|
||||
"y": 410,
|
||||
"w": 840,
|
||||
"h": 560,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 2
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "LineCommon",
|
||||
"chartKey": "VLineCommon",
|
||||
"conKey": "VCLineCommon",
|
||||
"title": "折线图",
|
||||
"category": "Lines",
|
||||
"categoryName": "折线图",
|
||||
"package": "Charts",
|
||||
"chartFrame": "echarts",
|
||||
"image": "line.png"
|
||||
},
|
||||
"option": {
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"trigger": "axis",
|
||||
"axisPointer": {
|
||||
"type": "line"
|
||||
}
|
||||
},
|
||||
"legend": {
|
||||
"show": true,
|
||||
"textStyle": {
|
||||
"color": "#d7e6f7"
|
||||
}
|
||||
},
|
||||
"grid": {
|
||||
"left": 48,
|
||||
"right": 24,
|
||||
"top": 40,
|
||||
"bottom": 32
|
||||
},
|
||||
"xAxis": {
|
||||
"show": true,
|
||||
"type": "category",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
"yAxis": {
|
||||
"show": true,
|
||||
"type": "value",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
},
|
||||
"splitLine": {
|
||||
"lineStyle": {
|
||||
"color": "rgba(255,255,255,0.08)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dataset": {
|
||||
"dimensions": [
|
||||
"product",
|
||||
"采集"
|
||||
],
|
||||
"source": [
|
||||
{
|
||||
"product": "周一",
|
||||
"采集": 160
|
||||
},
|
||||
{
|
||||
"product": "周二",
|
||||
"采集": 188
|
||||
},
|
||||
{
|
||||
"product": "周三",
|
||||
"采集": 176
|
||||
},
|
||||
{
|
||||
"product": "周四",
|
||||
"采集": 210
|
||||
},
|
||||
{
|
||||
"product": "周五",
|
||||
"采集": 198
|
||||
},
|
||||
{
|
||||
"product": "周六",
|
||||
"采集": 142
|
||||
},
|
||||
{
|
||||
"product": "周日",
|
||||
"采集": 136
|
||||
}
|
||||
]
|
||||
},
|
||||
"series": [
|
||||
{
|
||||
"type": "line",
|
||||
"smooth": true,
|
||||
"symbolSize": 6,
|
||||
"label": {
|
||||
"show": false,
|
||||
"position": "top",
|
||||
"color": "#fff",
|
||||
"fontSize": 12
|
||||
},
|
||||
"lineStyle": {
|
||||
"type": "solid",
|
||||
"width": 3
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestGlobalConfig": {
|
||||
"requestDataPond": [],
|
||||
"requestOriginUrl": "",
|
||||
"requestInterval": 30,
|
||||
"requestIntervalUnit": "second",
|
||||
"requestParams": {
|
||||
"Body": {
|
||||
"form-data": {},
|
||||
"x-www-form-urlencoded": {},
|
||||
"json": "",
|
||||
"xml": ""
|
||||
},
|
||||
"Header": {},
|
||||
"Params": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 475 KiB |
@@ -0,0 +1,524 @@
|
||||
{
|
||||
"editCanvasConfig": {
|
||||
"projectName": "地图基础概览大屏",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"filterShow": false,
|
||||
"hueRotate": 0,
|
||||
"saturate": 1,
|
||||
"contrast": 1,
|
||||
"brightness": 1,
|
||||
"opacity": 1,
|
||||
"rotateZ": 0,
|
||||
"rotateX": 0,
|
||||
"rotateY": 0,
|
||||
"skewX": 0,
|
||||
"skewY": 0,
|
||||
"blendMode": "normal",
|
||||
"background": "#061426",
|
||||
"backgroundImage": null,
|
||||
"selectColor": true,
|
||||
"chartThemeColor": "dark",
|
||||
"chartCustomThemeColorInfo": null,
|
||||
"chartThemeSetting": {},
|
||||
"vChartThemeName": "vScreenVolcanoBlue",
|
||||
"previewScaleType": "fit"
|
||||
},
|
||||
"componentList": [
|
||||
{
|
||||
"id": "leaflet-bg-1",
|
||||
"key": "LeafletTileBackground",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 1920,
|
||||
"h": 1080,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": -1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "LeafletTileBackground",
|
||||
"chartKey": "VLeafletTileBackground",
|
||||
"conKey": "VCLeafletTileBackground",
|
||||
"title": "地图瓦片背景",
|
||||
"category": "Maps",
|
||||
"categoryName": "地图",
|
||||
"package": "Business",
|
||||
"chartFrame": "common",
|
||||
"image": "map.png"
|
||||
},
|
||||
"option": {
|
||||
"style": "default",
|
||||
"centerLng": 116.4,
|
||||
"centerLat": 39.9,
|
||||
"zoom": 4,
|
||||
"minZoom": 3,
|
||||
"maxZoom": 12,
|
||||
"dragging": false,
|
||||
"scrollWheelZoom": false,
|
||||
"mask": "dark",
|
||||
"opacity": 1,
|
||||
"grayscale": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "map-title",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 24,
|
||||
"w": 900,
|
||||
"h": 64,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "区域概览",
|
||||
"fontSize": 34,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "map-sub",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 88,
|
||||
"w": 900,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "离线瓦片底图与重点区域",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#8ea4bd",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "map-b1",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1360,
|
||||
"y": 150,
|
||||
"w": 520,
|
||||
"h": 860,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "map-side",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1384,
|
||||
"y": 174,
|
||||
"w": 280,
|
||||
"h": 40,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "重点区域",
|
||||
"fontSize": 20,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "map-r1",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1384,
|
||||
"y": 230,
|
||||
"w": 460,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "华北:关注度高,今日新增 18 条",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#d7e6f7",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "map-r2",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1384,
|
||||
"y": 320,
|
||||
"w": 460,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "华东:处置中 6 件,完成率 88%",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#d7e6f7",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "map-r3",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1384,
|
||||
"y": 410,
|
||||
"w": 460,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "华南:采集稳定,待复核 4 件",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#d7e6f7",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "map-r4",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1384,
|
||||
"y": 500,
|
||||
"w": 460,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "西南:新增线索 9 条",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#d7e6f7",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "map-n1",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1384,
|
||||
"y": 640,
|
||||
"w": 450,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 18,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#7ee0ff",
|
||||
"prefixText": "新增 ",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "条",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "map-n2",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1384,
|
||||
"y": 760,
|
||||
"w": 450,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 6,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#ffd27a",
|
||||
"prefixText": "处置中 ",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "件",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "map-n3",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1384,
|
||||
"y": 880,
|
||||
"w": 450,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 88,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#8dffc6",
|
||||
"prefixText": "完成 ",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "%",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestGlobalConfig": {
|
||||
"requestDataPond": [],
|
||||
"requestOriginUrl": "",
|
||||
"requestInterval": 30,
|
||||
"requestIntervalUnit": "second",
|
||||
"requestParams": {
|
||||
"Body": {
|
||||
"form-data": {},
|
||||
"x-www-form-urlencoded": {},
|
||||
"json": "",
|
||||
"xml": ""
|
||||
},
|
||||
"Header": {},
|
||||
"Params": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
+715
@@ -0,0 +1,715 @@
|
||||
{
|
||||
"editCanvasConfig": {
|
||||
"projectName": "指标总览与趋势分析大屏",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"filterShow": false,
|
||||
"hueRotate": 0,
|
||||
"saturate": 1,
|
||||
"contrast": 1,
|
||||
"brightness": 1,
|
||||
"opacity": 1,
|
||||
"rotateZ": 0,
|
||||
"rotateX": 0,
|
||||
"rotateY": 0,
|
||||
"skewX": 0,
|
||||
"skewY": 0,
|
||||
"blendMode": "normal",
|
||||
"background": "#101820",
|
||||
"backgroundImage": null,
|
||||
"selectColor": true,
|
||||
"chartThemeColor": "dark",
|
||||
"chartCustomThemeColorInfo": null,
|
||||
"chartThemeSetting": {},
|
||||
"vChartThemeName": "vScreenVolcanoBlue",
|
||||
"previewScaleType": "fit"
|
||||
},
|
||||
"componentList": [
|
||||
{
|
||||
"id": "trend-title",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 24,
|
||||
"w": 900,
|
||||
"h": 64,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "指标趋势",
|
||||
"fontSize": 34,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-sub",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 88,
|
||||
"w": 900,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "总量、完成与波动对照",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#8ea4bd",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-b1",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 40,
|
||||
"y": 150,
|
||||
"w": 1840,
|
||||
"h": 140,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-n1",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 70,
|
||||
"y": 180,
|
||||
"w": 400,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 2460,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#7ee0ff",
|
||||
"prefixText": "总量 ",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-n2",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 520,
|
||||
"y": 180,
|
||||
"w": 400,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 1988,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#8dffc6",
|
||||
"prefixText": "完成 ",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-n3",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 970,
|
||||
"y": 180,
|
||||
"w": 400,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 472,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#ffd27a",
|
||||
"prefixText": "进行中 ",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-n4",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1420,
|
||||
"y": 180,
|
||||
"w": 400,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 81,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#7ee0ff",
|
||||
"prefixText": "环比 ",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "%",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-b2",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 40,
|
||||
"y": 320,
|
||||
"w": 1200,
|
||||
"h": 700,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-b3",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1260,
|
||||
"y": 320,
|
||||
"w": 620,
|
||||
"h": 700,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-c1",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 340,
|
||||
"w": 280,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "七日趋势",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-c2",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1284,
|
||||
"y": 340,
|
||||
"w": 280,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "分类对比",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-line",
|
||||
"key": "LineCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 390,
|
||||
"w": 1140,
|
||||
"h": 580,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 2
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "LineCommon",
|
||||
"chartKey": "VLineCommon",
|
||||
"conKey": "VCLineCommon",
|
||||
"title": "折线图",
|
||||
"category": "Lines",
|
||||
"categoryName": "折线图",
|
||||
"package": "Charts",
|
||||
"chartFrame": "echarts",
|
||||
"image": "line.png"
|
||||
},
|
||||
"option": {
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"trigger": "axis",
|
||||
"axisPointer": {
|
||||
"type": "line"
|
||||
}
|
||||
},
|
||||
"legend": {
|
||||
"show": true,
|
||||
"textStyle": {
|
||||
"color": "#d7e6f7"
|
||||
}
|
||||
},
|
||||
"grid": {
|
||||
"left": 48,
|
||||
"right": 24,
|
||||
"top": 40,
|
||||
"bottom": 32
|
||||
},
|
||||
"xAxis": {
|
||||
"show": true,
|
||||
"type": "category",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
"yAxis": {
|
||||
"show": true,
|
||||
"type": "value",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
},
|
||||
"splitLine": {
|
||||
"lineStyle": {
|
||||
"color": "rgba(255,255,255,0.08)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dataset": {
|
||||
"dimensions": [
|
||||
"product",
|
||||
"总量",
|
||||
"完成"
|
||||
],
|
||||
"source": [
|
||||
{
|
||||
"product": "周一",
|
||||
"总量": 280,
|
||||
"完成": 210
|
||||
},
|
||||
{
|
||||
"product": "周二",
|
||||
"总量": 310,
|
||||
"完成": 240
|
||||
},
|
||||
{
|
||||
"product": "周三",
|
||||
"总量": 296,
|
||||
"完成": 228
|
||||
},
|
||||
{
|
||||
"product": "周四",
|
||||
"总量": 340,
|
||||
"完成": 266
|
||||
},
|
||||
{
|
||||
"product": "周五",
|
||||
"总量": 328,
|
||||
"完成": 250
|
||||
},
|
||||
{
|
||||
"product": "周六",
|
||||
"总量": 260,
|
||||
"完成": 190
|
||||
},
|
||||
{
|
||||
"product": "周日",
|
||||
"总量": 248,
|
||||
"完成": 176
|
||||
}
|
||||
]
|
||||
},
|
||||
"series": [
|
||||
{
|
||||
"type": "line",
|
||||
"smooth": true,
|
||||
"symbolSize": 6,
|
||||
"label": {
|
||||
"show": false,
|
||||
"position": "top",
|
||||
"color": "#fff",
|
||||
"fontSize": 12
|
||||
},
|
||||
"lineStyle": {
|
||||
"type": "solid",
|
||||
"width": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "line",
|
||||
"smooth": true,
|
||||
"symbolSize": 6,
|
||||
"label": {
|
||||
"show": false,
|
||||
"position": "top",
|
||||
"color": "#fff",
|
||||
"fontSize": 12
|
||||
},
|
||||
"lineStyle": {
|
||||
"type": "solid",
|
||||
"width": 3
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-bar",
|
||||
"key": "BarCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1284,
|
||||
"y": 390,
|
||||
"w": 560,
|
||||
"h": 580,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 2
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "BarCommon",
|
||||
"chartKey": "VBarCommon",
|
||||
"conKey": "VCBarCommon",
|
||||
"title": "柱状图",
|
||||
"category": "Bars",
|
||||
"categoryName": "柱状图",
|
||||
"package": "Charts",
|
||||
"chartFrame": "echarts",
|
||||
"image": "bar_x.png"
|
||||
},
|
||||
"option": {
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"trigger": "axis",
|
||||
"axisPointer": {
|
||||
"type": "shadow"
|
||||
}
|
||||
},
|
||||
"legend": {
|
||||
"show": true,
|
||||
"textStyle": {
|
||||
"color": "#d7e6f7"
|
||||
}
|
||||
},
|
||||
"grid": {
|
||||
"left": 48,
|
||||
"right": 24,
|
||||
"top": 40,
|
||||
"bottom": 32
|
||||
},
|
||||
"xAxis": {
|
||||
"show": true,
|
||||
"type": "category",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
"yAxis": {
|
||||
"show": true,
|
||||
"type": "value",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
},
|
||||
"splitLine": {
|
||||
"lineStyle": {
|
||||
"color": "rgba(255,255,255,0.08)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dataset": {
|
||||
"dimensions": [
|
||||
"product",
|
||||
"本期"
|
||||
],
|
||||
"source": [
|
||||
{
|
||||
"product": "采集",
|
||||
"本期": 420
|
||||
},
|
||||
{
|
||||
"product": "研判",
|
||||
"本期": 360
|
||||
},
|
||||
{
|
||||
"product": "会商",
|
||||
"本期": 180
|
||||
},
|
||||
{
|
||||
"product": "处置",
|
||||
"本期": 260
|
||||
},
|
||||
{
|
||||
"product": "复核",
|
||||
"本期": 140
|
||||
}
|
||||
]
|
||||
},
|
||||
"series": [
|
||||
{
|
||||
"type": "bar",
|
||||
"barWidth": 16,
|
||||
"label": {
|
||||
"show": false,
|
||||
"position": "top",
|
||||
"color": "#fff",
|
||||
"fontSize": 12
|
||||
},
|
||||
"itemStyle": {
|
||||
"borderRadius": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestGlobalConfig": {
|
||||
"requestDataPond": [],
|
||||
"requestOriginUrl": "",
|
||||
"requestInterval": 30,
|
||||
"requestIntervalUnit": "second",
|
||||
"requestParams": {
|
||||
"Body": {
|
||||
"form-data": {},
|
||||
"x-www-form-urlencoded": {},
|
||||
"json": "",
|
||||
"xml": ""
|
||||
},
|
||||
"Header": {},
|
||||
"Params": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,939 @@
|
||||
{
|
||||
"editCanvasConfig": {
|
||||
"projectName": "运行监测总览",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"filterShow": false,
|
||||
"hueRotate": 0,
|
||||
"saturate": 1,
|
||||
"contrast": 1,
|
||||
"brightness": 1,
|
||||
"opacity": 1,
|
||||
"rotateZ": 0,
|
||||
"rotateX": 0,
|
||||
"rotateY": 0,
|
||||
"skewX": 0,
|
||||
"skewY": 0,
|
||||
"blendMode": "normal",
|
||||
"background": "#0c1424",
|
||||
"backgroundImage": null,
|
||||
"selectColor": true,
|
||||
"chartThemeColor": "dark",
|
||||
"chartCustomThemeColorInfo": null,
|
||||
"chartThemeSetting": {},
|
||||
"vChartThemeName": "vScreenVolcanoBlue",
|
||||
"previewScaleType": "fit"
|
||||
},
|
||||
"componentList": [
|
||||
{
|
||||
"id": "ops-title",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 24,
|
||||
"w": 900,
|
||||
"h": 64,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "运行监测",
|
||||
"fontSize": 34,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-sub",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 88,
|
||||
"w": 900,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "节点、告警与响应时长",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#8ea4bd",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-b1",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 40,
|
||||
"y": 150,
|
||||
"w": 440,
|
||||
"h": 180,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-b2",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 500,
|
||||
"y": 150,
|
||||
"w": 440,
|
||||
"h": 180,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-b3",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 960,
|
||||
"y": 150,
|
||||
"w": 440,
|
||||
"h": 180,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-b4",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1420,
|
||||
"y": 150,
|
||||
"w": 460,
|
||||
"h": 180,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-l1",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 170,
|
||||
"w": 200,
|
||||
"h": 32,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "在线节点",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-l2",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 524,
|
||||
"y": 170,
|
||||
"w": 200,
|
||||
"h": 32,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "当前告警",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-l3",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 984,
|
||||
"y": 170,
|
||||
"w": 200,
|
||||
"h": 32,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "平均响应",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-l4",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1444,
|
||||
"y": 170,
|
||||
"w": 200,
|
||||
"h": 32,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "已恢复",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-n1",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 214,
|
||||
"w": 380,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 48,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#8dffc6",
|
||||
"prefixText": "",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "个",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-n2",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 524,
|
||||
"y": 214,
|
||||
"w": 380,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 6,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#ff8b8b",
|
||||
"prefixText": "",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "条",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-n3",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 984,
|
||||
"y": 214,
|
||||
"w": 380,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 12,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#ffd27a",
|
||||
"prefixText": "",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "分钟",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-n4",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1444,
|
||||
"y": 214,
|
||||
"w": 380,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 29,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#7ee0ff",
|
||||
"prefixText": "",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "条",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-b5",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 40,
|
||||
"y": 360,
|
||||
"w": 900,
|
||||
"h": 660,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-b6",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 960,
|
||||
"y": 360,
|
||||
"w": 920,
|
||||
"h": 660,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-c1",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 384,
|
||||
"w": 280,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "告警分布",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-c2",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 984,
|
||||
"y": 384,
|
||||
"w": 280,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "响应时长",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-pie",
|
||||
"key": "PieCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 430,
|
||||
"w": 840,
|
||||
"h": 540,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 2
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "PieCommon",
|
||||
"chartKey": "VPieCommon",
|
||||
"conKey": "VCPieCommon",
|
||||
"title": "饼图",
|
||||
"category": "Pies",
|
||||
"categoryName": "饼图",
|
||||
"package": "Charts",
|
||||
"chartFrame": "echarts",
|
||||
"image": "pie.png"
|
||||
},
|
||||
"option": {
|
||||
"isCarousel": false,
|
||||
"type": "ring",
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"trigger": "item"
|
||||
},
|
||||
"legend": {
|
||||
"show": true,
|
||||
"textStyle": {
|
||||
"color": "#d7e6f7"
|
||||
}
|
||||
},
|
||||
"dataset": {
|
||||
"dimensions": [
|
||||
"product",
|
||||
"数量"
|
||||
],
|
||||
"source": [
|
||||
{
|
||||
"product": "链路",
|
||||
"数量": 8
|
||||
},
|
||||
{
|
||||
"product": "存储",
|
||||
"数量": 5
|
||||
},
|
||||
{
|
||||
"product": "接口",
|
||||
"数量": 6
|
||||
},
|
||||
{
|
||||
"product": "任务",
|
||||
"数量": 4
|
||||
},
|
||||
{
|
||||
"product": "其他",
|
||||
"数量": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"series": [
|
||||
{
|
||||
"type": "pie",
|
||||
"radius": [
|
||||
"42%",
|
||||
"68%"
|
||||
],
|
||||
"center": [
|
||||
"50%",
|
||||
"56%"
|
||||
],
|
||||
"roseType": false,
|
||||
"label": {
|
||||
"show": false,
|
||||
"color": "#d7e6f7"
|
||||
},
|
||||
"labelLine": {
|
||||
"show": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ops-line",
|
||||
"key": "LineCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 984,
|
||||
"y": 430,
|
||||
"w": 860,
|
||||
"h": 540,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 2
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "LineCommon",
|
||||
"chartKey": "VLineCommon",
|
||||
"conKey": "VCLineCommon",
|
||||
"title": "折线图",
|
||||
"category": "Lines",
|
||||
"categoryName": "折线图",
|
||||
"package": "Charts",
|
||||
"chartFrame": "echarts",
|
||||
"image": "line.png"
|
||||
},
|
||||
"option": {
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"trigger": "axis",
|
||||
"axisPointer": {
|
||||
"type": "line"
|
||||
}
|
||||
},
|
||||
"legend": {
|
||||
"show": true,
|
||||
"textStyle": {
|
||||
"color": "#d7e6f7"
|
||||
}
|
||||
},
|
||||
"grid": {
|
||||
"left": 48,
|
||||
"right": 24,
|
||||
"top": 40,
|
||||
"bottom": 32
|
||||
},
|
||||
"xAxis": {
|
||||
"show": true,
|
||||
"type": "category",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
"yAxis": {
|
||||
"show": true,
|
||||
"type": "value",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
},
|
||||
"splitLine": {
|
||||
"lineStyle": {
|
||||
"color": "rgba(255,255,255,0.08)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dataset": {
|
||||
"dimensions": [
|
||||
"product",
|
||||
"分钟"
|
||||
],
|
||||
"source": [
|
||||
{
|
||||
"product": "周一",
|
||||
"分钟": 18
|
||||
},
|
||||
{
|
||||
"product": "周二",
|
||||
"分钟": 16
|
||||
},
|
||||
{
|
||||
"product": "周三",
|
||||
"分钟": 14
|
||||
},
|
||||
{
|
||||
"product": "周四",
|
||||
"分钟": 15
|
||||
},
|
||||
{
|
||||
"product": "周五",
|
||||
"分钟": 11
|
||||
},
|
||||
{
|
||||
"product": "周六",
|
||||
"分钟": 9
|
||||
},
|
||||
{
|
||||
"product": "周日",
|
||||
"分钟": 12
|
||||
}
|
||||
]
|
||||
},
|
||||
"series": [
|
||||
{
|
||||
"type": "line",
|
||||
"smooth": true,
|
||||
"symbolSize": 6,
|
||||
"label": {
|
||||
"show": false,
|
||||
"position": "top",
|
||||
"color": "#fff",
|
||||
"fontSize": 12
|
||||
},
|
||||
"lineStyle": {
|
||||
"type": "solid",
|
||||
"width": 3
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestGlobalConfig": {
|
||||
"requestDataPond": [],
|
||||
"requestOriginUrl": "",
|
||||
"requestInterval": 30,
|
||||
"requestIntervalUnit": "second",
|
||||
"requestParams": {
|
||||
"Body": {
|
||||
"form-data": {},
|
||||
"x-www-form-urlencoded": {},
|
||||
"json": "",
|
||||
"xml": ""
|
||||
},
|
||||
"Header": {},
|
||||
"Params": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
+955
@@ -0,0 +1,955 @@
|
||||
{
|
||||
"editCanvasConfig": {
|
||||
"projectName": "资源态势看板",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"filterShow": false,
|
||||
"hueRotate": 0,
|
||||
"saturate": 1,
|
||||
"contrast": 1,
|
||||
"brightness": 1,
|
||||
"opacity": 1,
|
||||
"rotateZ": 0,
|
||||
"rotateX": 0,
|
||||
"rotateY": 0,
|
||||
"skewX": 0,
|
||||
"skewY": 0,
|
||||
"blendMode": "normal",
|
||||
"background": "#0e1a22",
|
||||
"backgroundImage": null,
|
||||
"selectColor": true,
|
||||
"chartThemeColor": "dark",
|
||||
"chartCustomThemeColorInfo": null,
|
||||
"chartThemeSetting": {},
|
||||
"vChartThemeName": "vScreenVolcanoBlue",
|
||||
"previewScaleType": "fit"
|
||||
},
|
||||
"componentList": [
|
||||
{
|
||||
"id": "res-title",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 24,
|
||||
"w": 900,
|
||||
"h": 64,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "资源态势",
|
||||
"fontSize": 34,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-sub",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 88,
|
||||
"w": 900,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "人员、装备、仓储与在途",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#8ea4bd",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-b1",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 40,
|
||||
"y": 150,
|
||||
"w": 440,
|
||||
"h": 180,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-b2",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 500,
|
||||
"y": 150,
|
||||
"w": 440,
|
||||
"h": 180,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-b3",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 960,
|
||||
"y": 150,
|
||||
"w": 440,
|
||||
"h": 180,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-b4",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1420,
|
||||
"y": 150,
|
||||
"w": 460,
|
||||
"h": 180,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-l1",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 170,
|
||||
"w": 180,
|
||||
"h": 32,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "人员",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-l2",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 524,
|
||||
"y": 170,
|
||||
"w": 180,
|
||||
"h": 32,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "装备",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-l3",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 984,
|
||||
"y": 170,
|
||||
"w": 180,
|
||||
"h": 32,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "仓储",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-l4",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1444,
|
||||
"y": 170,
|
||||
"w": 180,
|
||||
"h": 32,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "在途",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-n1",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 214,
|
||||
"w": 380,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 326,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#7ee0ff",
|
||||
"prefixText": "",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "人",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-n2",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 524,
|
||||
"y": 214,
|
||||
"w": 380,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 84,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#8dffc6",
|
||||
"prefixText": "",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "套",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-n3",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 984,
|
||||
"y": 214,
|
||||
"w": 380,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 15,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#ffd27a",
|
||||
"prefixText": "",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "处",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-n4",
|
||||
"key": "Number",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1444,
|
||||
"y": 214,
|
||||
"w": 380,
|
||||
"h": 80,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Number",
|
||||
"chartKey": "VNumber",
|
||||
"conKey": "VCNumber",
|
||||
"title": "数字计数",
|
||||
"category": "Mores",
|
||||
"categoryName": "更多",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "common",
|
||||
"image": "number.png"
|
||||
},
|
||||
"option": {
|
||||
"dataset": 9,
|
||||
"from": 0,
|
||||
"dur": 2,
|
||||
"precision": 0,
|
||||
"showSeparator": true,
|
||||
"numberSize": 34,
|
||||
"numberColor": "#7ee0ff",
|
||||
"prefixText": "",
|
||||
"prefixColor": "#9fb3c8",
|
||||
"suffixText": "批",
|
||||
"suffixColor": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-b5",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 40,
|
||||
"y": 360,
|
||||
"w": 920,
|
||||
"h": 660,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-b6",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 980,
|
||||
"y": 360,
|
||||
"w": 900,
|
||||
"h": 660,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-c1",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 384,
|
||||
"w": 280,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "分类存量",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-c2",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1004,
|
||||
"y": 384,
|
||||
"w": 280,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "七日调用",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-bar",
|
||||
"key": "BarCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 430,
|
||||
"w": 860,
|
||||
"h": 540,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 2
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "BarCommon",
|
||||
"chartKey": "VBarCommon",
|
||||
"conKey": "VCBarCommon",
|
||||
"title": "柱状图",
|
||||
"category": "Bars",
|
||||
"categoryName": "柱状图",
|
||||
"package": "Charts",
|
||||
"chartFrame": "echarts",
|
||||
"image": "bar_x.png"
|
||||
},
|
||||
"option": {
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"trigger": "axis",
|
||||
"axisPointer": {
|
||||
"type": "shadow"
|
||||
}
|
||||
},
|
||||
"legend": {
|
||||
"show": true,
|
||||
"textStyle": {
|
||||
"color": "#d7e6f7"
|
||||
}
|
||||
},
|
||||
"grid": {
|
||||
"left": 48,
|
||||
"right": 24,
|
||||
"top": 40,
|
||||
"bottom": 32
|
||||
},
|
||||
"xAxis": {
|
||||
"show": true,
|
||||
"type": "category",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
"yAxis": {
|
||||
"show": true,
|
||||
"type": "value",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
},
|
||||
"splitLine": {
|
||||
"lineStyle": {
|
||||
"color": "rgba(255,255,255,0.08)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dataset": {
|
||||
"dimensions": [
|
||||
"product",
|
||||
"可用"
|
||||
],
|
||||
"source": [
|
||||
{
|
||||
"product": "人员",
|
||||
"可用": 326
|
||||
},
|
||||
{
|
||||
"product": "装备",
|
||||
"可用": 84
|
||||
},
|
||||
{
|
||||
"product": "仓储",
|
||||
"可用": 15
|
||||
},
|
||||
{
|
||||
"product": "在途",
|
||||
"可用": 9
|
||||
}
|
||||
]
|
||||
},
|
||||
"series": [
|
||||
{
|
||||
"type": "bar",
|
||||
"barWidth": 16,
|
||||
"label": {
|
||||
"show": false,
|
||||
"position": "top",
|
||||
"color": "#fff",
|
||||
"fontSize": 12
|
||||
},
|
||||
"itemStyle": {
|
||||
"borderRadius": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "res-line",
|
||||
"key": "LineCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1004,
|
||||
"y": 430,
|
||||
"w": 840,
|
||||
"h": 540,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 2
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "LineCommon",
|
||||
"chartKey": "VLineCommon",
|
||||
"conKey": "VCLineCommon",
|
||||
"title": "折线图",
|
||||
"category": "Lines",
|
||||
"categoryName": "折线图",
|
||||
"package": "Charts",
|
||||
"chartFrame": "echarts",
|
||||
"image": "line.png"
|
||||
},
|
||||
"option": {
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"trigger": "axis",
|
||||
"axisPointer": {
|
||||
"type": "line"
|
||||
}
|
||||
},
|
||||
"legend": {
|
||||
"show": true,
|
||||
"textStyle": {
|
||||
"color": "#d7e6f7"
|
||||
}
|
||||
},
|
||||
"grid": {
|
||||
"left": 48,
|
||||
"right": 24,
|
||||
"top": 40,
|
||||
"bottom": 32
|
||||
},
|
||||
"xAxis": {
|
||||
"show": true,
|
||||
"type": "category",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
"yAxis": {
|
||||
"show": true,
|
||||
"type": "value",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
},
|
||||
"splitLine": {
|
||||
"lineStyle": {
|
||||
"color": "rgba(255,255,255,0.08)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dataset": {
|
||||
"dimensions": [
|
||||
"product",
|
||||
"调用"
|
||||
],
|
||||
"source": [
|
||||
{
|
||||
"product": "周一",
|
||||
"调用": 20
|
||||
},
|
||||
{
|
||||
"product": "周二",
|
||||
"调用": 24
|
||||
},
|
||||
{
|
||||
"product": "周三",
|
||||
"调用": 22
|
||||
},
|
||||
{
|
||||
"product": "周四",
|
||||
"调用": 31
|
||||
},
|
||||
{
|
||||
"product": "周五",
|
||||
"调用": 28
|
||||
},
|
||||
{
|
||||
"product": "周六",
|
||||
"调用": 16
|
||||
},
|
||||
{
|
||||
"product": "周日",
|
||||
"调用": 18
|
||||
}
|
||||
]
|
||||
},
|
||||
"series": [
|
||||
{
|
||||
"type": "line",
|
||||
"smooth": true,
|
||||
"symbolSize": 6,
|
||||
"label": {
|
||||
"show": false,
|
||||
"position": "top",
|
||||
"color": "#fff",
|
||||
"fontSize": 12
|
||||
},
|
||||
"lineStyle": {
|
||||
"type": "solid",
|
||||
"width": 3
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestGlobalConfig": {
|
||||
"requestDataPond": [],
|
||||
"requestOriginUrl": "",
|
||||
"requestInterval": 30,
|
||||
"requestIntervalUnit": "second",
|
||||
"requestParams": {
|
||||
"Body": {
|
||||
"form-data": {},
|
||||
"x-www-form-urlencoded": {},
|
||||
"json": "",
|
||||
"xml": ""
|
||||
},
|
||||
"Header": {},
|
||||
"Params": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
+854
@@ -0,0 +1,854 @@
|
||||
{
|
||||
"editCanvasConfig": {
|
||||
"projectName": "时间轴与进度概览大屏",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"filterShow": false,
|
||||
"hueRotate": 0,
|
||||
"saturate": 1,
|
||||
"contrast": 1,
|
||||
"brightness": 1,
|
||||
"opacity": 1,
|
||||
"rotateZ": 0,
|
||||
"rotateX": 0,
|
||||
"rotateY": 0,
|
||||
"skewX": 0,
|
||||
"skewY": 0,
|
||||
"blendMode": "normal",
|
||||
"background": "#12141c",
|
||||
"backgroundImage": null,
|
||||
"selectColor": true,
|
||||
"chartThemeColor": "dark",
|
||||
"chartCustomThemeColorInfo": null,
|
||||
"chartThemeSetting": {},
|
||||
"vChartThemeName": "vScreenVolcanoBlue",
|
||||
"previewScaleType": "fit"
|
||||
},
|
||||
"componentList": [
|
||||
{
|
||||
"id": "time-title",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 24,
|
||||
"w": 900,
|
||||
"h": 64,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "进度概览",
|
||||
"fontSize": 34,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-sub",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 48,
|
||||
"y": 88,
|
||||
"w": 900,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "六个阶段的当前进度",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#8ea4bd",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-b1",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 40,
|
||||
"y": 150,
|
||||
"w": 1840,
|
||||
"h": 220,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-s1",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 70,
|
||||
"y": 180,
|
||||
"w": 250,
|
||||
"h": 40,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "01 立项",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-s2",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 360,
|
||||
"y": 180,
|
||||
"w": 250,
|
||||
"h": 40,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "02 采集",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-s3",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 650,
|
||||
"y": 180,
|
||||
"w": 250,
|
||||
"h": 40,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "03 研判",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-s4",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 940,
|
||||
"y": 180,
|
||||
"w": 250,
|
||||
"h": 40,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "04 会商",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-s5",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1230,
|
||||
"y": 180,
|
||||
"w": 250,
|
||||
"h": 40,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "05 处置",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-s6",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1520,
|
||||
"y": 180,
|
||||
"w": 250,
|
||||
"h": 40,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "06 复盘",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-d1",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 70,
|
||||
"y": 240,
|
||||
"w": 250,
|
||||
"h": 70,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "已完成",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#8dffc6",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-d2",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 360,
|
||||
"y": 240,
|
||||
"w": 250,
|
||||
"h": 70,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "已完成",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#8dffc6",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-d3",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 650,
|
||||
"y": 240,
|
||||
"w": 250,
|
||||
"h": 70,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "进行中",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#ffd27a",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-d4",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 940,
|
||||
"y": 240,
|
||||
"w": 250,
|
||||
"h": 70,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "待开始",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-d5",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1230,
|
||||
"y": 240,
|
||||
"w": 250,
|
||||
"h": 70,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "待开始",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-d6",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 1520,
|
||||
"y": 240,
|
||||
"w": 250,
|
||||
"h": 70,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "待开始",
|
||||
"fontSize": 16,
|
||||
"fontColor": "#9fb3c8",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "normal",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-b2",
|
||||
"key": "Border01",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 40,
|
||||
"y": 400,
|
||||
"w": 1840,
|
||||
"h": 620,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 1
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "Border01",
|
||||
"chartKey": "VBorder01",
|
||||
"conKey": "VCBorder01",
|
||||
"title": "边框-01",
|
||||
"category": "Borders",
|
||||
"categoryName": "边框",
|
||||
"package": "Decorates",
|
||||
"chartFrame": "static",
|
||||
"image": "border01.png"
|
||||
},
|
||||
"option": {
|
||||
"dur": 0.5,
|
||||
"colors": [
|
||||
"#4fd2dd",
|
||||
"#235fa7"
|
||||
],
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-c1",
|
||||
"key": "TextCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 424,
|
||||
"w": 320,
|
||||
"h": 36,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 3
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "TextCommon",
|
||||
"chartKey": "VTextCommon",
|
||||
"conKey": "VCTextCommon",
|
||||
"title": "文字",
|
||||
"category": "Texts",
|
||||
"categoryName": "文本",
|
||||
"package": "Informations",
|
||||
"chartFrame": "common",
|
||||
"image": "text_static.png"
|
||||
},
|
||||
"option": {
|
||||
"link": "",
|
||||
"linkHead": "http://",
|
||||
"dataset": "各阶段完成度",
|
||||
"fontSize": 18,
|
||||
"fontColor": "#f4f8ff",
|
||||
"paddingX": 8,
|
||||
"paddingY": 6,
|
||||
"textAlign": "left",
|
||||
"fontWeight": "bold",
|
||||
"borderWidth": 0,
|
||||
"borderColor": "#ffffff",
|
||||
"borderRadius": 4,
|
||||
"letterSpacing": 1,
|
||||
"writingMode": "horizontal-tb",
|
||||
"backgroundColor": "#00000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "time-bar",
|
||||
"key": "BarCommon",
|
||||
"isGroup": false,
|
||||
"attr": {
|
||||
"x": 64,
|
||||
"y": 480,
|
||||
"w": 1760,
|
||||
"h": 480,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"zIndex": 2
|
||||
},
|
||||
"chartConfig": {
|
||||
"key": "BarCommon",
|
||||
"chartKey": "VBarCommon",
|
||||
"conKey": "VCBarCommon",
|
||||
"title": "柱状图",
|
||||
"category": "Bars",
|
||||
"categoryName": "柱状图",
|
||||
"package": "Charts",
|
||||
"chartFrame": "echarts",
|
||||
"image": "bar_x.png"
|
||||
},
|
||||
"option": {
|
||||
"backgroundColor": "rgba(0,0,0,0)",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"trigger": "axis",
|
||||
"axisPointer": {
|
||||
"type": "shadow"
|
||||
}
|
||||
},
|
||||
"legend": {
|
||||
"show": true,
|
||||
"textStyle": {
|
||||
"color": "#d7e6f7"
|
||||
}
|
||||
},
|
||||
"grid": {
|
||||
"left": 48,
|
||||
"right": 24,
|
||||
"top": 40,
|
||||
"bottom": 32
|
||||
},
|
||||
"xAxis": {
|
||||
"show": true,
|
||||
"type": "category",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
}
|
||||
},
|
||||
"yAxis": {
|
||||
"show": true,
|
||||
"type": "value",
|
||||
"axisLabel": {
|
||||
"color": "#9fb3c8"
|
||||
},
|
||||
"splitLine": {
|
||||
"lineStyle": {
|
||||
"color": "rgba(255,255,255,0.08)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dataset": {
|
||||
"dimensions": [
|
||||
"product",
|
||||
"完成度"
|
||||
],
|
||||
"source": [
|
||||
{
|
||||
"product": "立项",
|
||||
"完成度": 100
|
||||
},
|
||||
{
|
||||
"product": "采集",
|
||||
"完成度": 100
|
||||
},
|
||||
{
|
||||
"product": "研判",
|
||||
"完成度": 62
|
||||
},
|
||||
{
|
||||
"product": "会商",
|
||||
"完成度": 20
|
||||
},
|
||||
{
|
||||
"product": "处置",
|
||||
"完成度": 8
|
||||
},
|
||||
{
|
||||
"product": "复盘",
|
||||
"完成度": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"series": [
|
||||
{
|
||||
"type": "bar",
|
||||
"barWidth": 16,
|
||||
"label": {
|
||||
"show": false,
|
||||
"position": "top",
|
||||
"color": "#fff",
|
||||
"fontSize": 12
|
||||
},
|
||||
"itemStyle": {
|
||||
"borderRadius": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestGlobalConfig": {
|
||||
"requestDataPond": [],
|
||||
"requestOriginUrl": "",
|
||||
"requestInterval": 30,
|
||||
"requestIntervalUnit": "second",
|
||||
"requestParams": {
|
||||
"Body": {
|
||||
"form-data": {},
|
||||
"x-www-form-urlencoded": {},
|
||||
"json": "",
|
||||
"xml": ""
|
||||
},
|
||||
"Header": {},
|
||||
"Params": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,11 @@ from fastapi import FastAPI
|
||||
from deerflow.config import get_app_config
|
||||
from deerflow.config.app_config import AppConfig
|
||||
from deerflow.config.llmwiki_config import LocalWikiIndexConfig
|
||||
from deerflow.config.system_settings import LocalWikiEncoderSettings, load_system_settings
|
||||
from deerflow.config.system_settings import (
|
||||
LocalWikiAutoSyncSettings,
|
||||
LocalWikiEncoderSettings,
|
||||
load_system_settings,
|
||||
)
|
||||
from deerflow.integrations.weknora.runtime import build_weknora_client, get_resolved_llmwiki_runtime
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -31,8 +35,9 @@ _EMBEDDING_RETIREMENT_GRACE_SECONDS = 600.0
|
||||
def resolve_effective_local_wiki_index_config(
|
||||
config: AppConfig,
|
||||
encoder_settings: LocalWikiEncoderSettings,
|
||||
auto_sync_settings: LocalWikiAutoSyncSettings | None = None,
|
||||
) -> LocalWikiIndexConfig:
|
||||
"""Apply the persisted encoder mode to a copy of the file configuration."""
|
||||
"""Apply persisted encoder and automatic-sync settings to file config."""
|
||||
|
||||
local_index = config.llmwiki.local_wiki_index
|
||||
configured_embedding = local_index.embedding
|
||||
@@ -64,7 +69,16 @@ def resolve_effective_local_wiki_index_config(
|
||||
)
|
||||
else:
|
||||
embedding = configured_embedding
|
||||
return local_index.model_copy(update={"embedding": embedding})
|
||||
updates: dict[str, Any] = {"embedding": embedding}
|
||||
if auto_sync_settings is not None:
|
||||
updates.update(
|
||||
{
|
||||
"auto_sync": auto_sync_settings.enabled,
|
||||
"auto_sync_schedule": auto_sync_settings.schedule,
|
||||
"auto_sync_hour": auto_sync_settings.hour,
|
||||
}
|
||||
)
|
||||
return local_index.model_copy(update=updates)
|
||||
|
||||
|
||||
def _resolved_local_model_path(config: LocalWikiIndexConfig) -> Path | None:
|
||||
@@ -171,6 +185,7 @@ async def rebuild_local_wiki_index_runtime(
|
||||
effective_config = resolve_effective_local_wiki_index_config(
|
||||
source_config,
|
||||
settings.local_wiki_encoder,
|
||||
settings.local_wiki_auto_sync,
|
||||
)
|
||||
resolved_llmwiki = get_resolved_llmwiki_runtime(source_config)
|
||||
signature = _runtime_signature(
|
||||
|
||||
@@ -742,6 +742,29 @@ def _auto_sync_ready(app: FastAPI, config: Any) -> bool:
|
||||
)
|
||||
|
||||
|
||||
def _scheduled_auto_sync_slot(config: Any, now: datetime | None = None) -> str | None:
|
||||
"""Return the current configured schedule slot, if it is due.
|
||||
|
||||
The settings screen expresses times in the Gateway server's local time.
|
||||
Keeping this as a minute-sized slot also makes a ten-second scheduler poll
|
||||
idempotent: each worker starts at most one scan for the same slot.
|
||||
``None`` retains the previous interval-based behavior for hand-built
|
||||
legacy config objects used by extensions and older tests.
|
||||
"""
|
||||
|
||||
schedule = getattr(config, "auto_sync_schedule", None)
|
||||
if schedule not in {"hourly", "daily"}:
|
||||
return None
|
||||
current = now or datetime.now().astimezone()
|
||||
if current.minute != 0:
|
||||
return None
|
||||
if schedule == "daily" and current.hour != int(
|
||||
getattr(config, "auto_sync_hour", 0)
|
||||
):
|
||||
return None
|
||||
return f"{schedule}:{current:%Y-%m-%dT%H}:00"
|
||||
|
||||
|
||||
async def _sync_once(
|
||||
app: FastAPI,
|
||||
*,
|
||||
@@ -857,6 +880,7 @@ async def local_wiki_index_scheduler_loop(app: FastAPI) -> None:
|
||||
last_synced_runtime_signature: str | None = None
|
||||
last_full_scan_started_at: float | None = None
|
||||
last_prompt_schema_upgrade_started_at: float | None = None
|
||||
last_scheduled_slot: str | None = None
|
||||
while True:
|
||||
try:
|
||||
# Rebuild checks both config.yaml mtime and persisted runtime
|
||||
@@ -872,43 +896,65 @@ async def local_wiki_index_scheduler_loop(app: FastAPI) -> None:
|
||||
# for remote refreshes.
|
||||
last_sync_started_at = None
|
||||
last_synced_runtime_signature = None
|
||||
last_scheduled_slot = None
|
||||
else:
|
||||
if (
|
||||
last_prompt_schema_upgrade_started_at is None
|
||||
or now - last_prompt_schema_upgrade_started_at
|
||||
>= _WIKI_CONFIG_UPGRADE_RETRY_SECONDS
|
||||
):
|
||||
last_prompt_schema_upgrade_started_at = now
|
||||
await _upgrade_wiki_generation_configs_once(app)
|
||||
interval = float(config.sync_interval_seconds)
|
||||
runtime_signature = getattr(
|
||||
app.state,
|
||||
"llmwiki_runtime_signature",
|
||||
None,
|
||||
)
|
||||
if (
|
||||
last_sync_started_at is None
|
||||
or runtime_signature != last_synced_runtime_signature
|
||||
or now - last_sync_started_at >= interval
|
||||
):
|
||||
sync_started_at = now
|
||||
force_scan = bool(
|
||||
last_full_scan_started_at is None
|
||||
or runtime_signature != last_synced_runtime_signature
|
||||
or now - last_full_scan_started_at >= max(
|
||||
_FULL_SCAN_FALLBACK_SECONDS,
|
||||
interval,
|
||||
)
|
||||
scheduled_slot = _scheduled_auto_sync_slot(config)
|
||||
if scheduled_slot is not None:
|
||||
if scheduled_slot != last_scheduled_slot:
|
||||
now = monotonic()
|
||||
if (
|
||||
last_prompt_schema_upgrade_started_at is None
|
||||
or now - last_prompt_schema_upgrade_started_at
|
||||
>= _WIKI_CONFIG_UPGRADE_RETRY_SECONDS
|
||||
):
|
||||
last_prompt_schema_upgrade_started_at = now
|
||||
await _upgrade_wiki_generation_configs_once(app)
|
||||
app.state.llmwiki_force_full_scan_once = True
|
||||
try:
|
||||
await _sync_once(app, config=config, force_scan=True)
|
||||
finally:
|
||||
app.state.llmwiki_force_full_scan_once = False
|
||||
last_scheduled_slot = scheduled_slot
|
||||
else:
|
||||
# Compatibility for integrations that construct a config
|
||||
# object without the new calendar-schedule fields. Normal
|
||||
# Gateway runtime config always uses the setting above.
|
||||
if (
|
||||
last_prompt_schema_upgrade_started_at is None
|
||||
or now - last_prompt_schema_upgrade_started_at
|
||||
>= _WIKI_CONFIG_UPGRADE_RETRY_SECONDS
|
||||
):
|
||||
last_prompt_schema_upgrade_started_at = now
|
||||
await _upgrade_wiki_generation_configs_once(app)
|
||||
interval = float(config.sync_interval_seconds)
|
||||
runtime_signature = getattr(
|
||||
app.state,
|
||||
"llmwiki_runtime_signature",
|
||||
None,
|
||||
)
|
||||
app.state.llmwiki_force_full_scan_once = force_scan
|
||||
try:
|
||||
await _sync_once(app, config=config)
|
||||
finally:
|
||||
app.state.llmwiki_force_full_scan_once = False
|
||||
last_sync_started_at = sync_started_at
|
||||
last_synced_runtime_signature = runtime_signature
|
||||
if force_scan:
|
||||
last_full_scan_started_at = sync_started_at
|
||||
if (
|
||||
last_sync_started_at is None
|
||||
or runtime_signature != last_synced_runtime_signature
|
||||
or now - last_sync_started_at >= interval
|
||||
):
|
||||
sync_started_at = now
|
||||
force_scan = bool(
|
||||
last_full_scan_started_at is None
|
||||
or runtime_signature != last_synced_runtime_signature
|
||||
or now - last_full_scan_started_at >= max(
|
||||
_FULL_SCAN_FALLBACK_SECONDS,
|
||||
interval,
|
||||
)
|
||||
)
|
||||
app.state.llmwiki_force_full_scan_once = force_scan
|
||||
try:
|
||||
await _sync_once(app, config=config)
|
||||
finally:
|
||||
app.state.llmwiki_force_full_scan_once = False
|
||||
last_sync_started_at = sync_started_at
|
||||
last_synced_runtime_signature = runtime_signature
|
||||
if force_scan:
|
||||
last_full_scan_started_at = sync_started_at
|
||||
except asyncio.CancelledError:
|
||||
raise
|
||||
except Exception:
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
"""Local image storage and the controlled GoView asset URL."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
import uuid
|
||||
from pathlib import Path
|
||||
|
||||
from fastapi import APIRouter, UploadFile
|
||||
from fastapi.responses import FileResponse
|
||||
|
||||
from deerflow.config.runtime_paths import runtime_home
|
||||
|
||||
router = APIRouter(prefix="/api/goview", tags=["goview-assets"])
|
||||
|
||||
MAX_IMAGE_BYTES = 10 * 1024 * 1024
|
||||
_NAME_RE = re.compile(r"^[a-f0-9]{32}\.(png|jpg|gif|webp)$")
|
||||
_TYPES = {"png": "image/png", "jpg": "image/jpeg", "gif": "image/gif", "webp": "image/webp"}
|
||||
|
||||
|
||||
class AssetRejected(ValueError):
|
||||
"""The upload is not a bounded local image."""
|
||||
|
||||
|
||||
def asset_root() -> Path:
|
||||
root = runtime_home() / "goview-assets"
|
||||
root.mkdir(parents=True, exist_ok=True)
|
||||
return root
|
||||
|
||||
|
||||
def sniff_image(data: bytes) -> str | None:
|
||||
if data.startswith(b"\x89PNG\r\n\x1a\n"):
|
||||
return "png"
|
||||
if data.startswith(b"\xff\xd8\xff"):
|
||||
return "jpg"
|
||||
if data.startswith((b"GIF87a", b"GIF89a")):
|
||||
return "gif"
|
||||
if len(data) >= 12 and data.startswith(b"RIFF") and data[8:12] == b"WEBP":
|
||||
return "webp"
|
||||
return None
|
||||
|
||||
|
||||
def save_image_bytes(data: bytes) -> tuple[str, str]:
|
||||
if len(data) > MAX_IMAGE_BYTES:
|
||||
raise AssetRejected("图片超过大小限制")
|
||||
kind = sniff_image(data)
|
||||
if kind is None:
|
||||
raise AssetRejected("只接受 PNG、JPEG、GIF 或 WEBP 图片")
|
||||
name = f"{uuid.uuid4().hex}.{kind}"
|
||||
if not _NAME_RE.fullmatch(name):
|
||||
raise AssetRejected("文件名无效")
|
||||
root = asset_root().resolve()
|
||||
path = (root / name).resolve()
|
||||
if not path.is_relative_to(root):
|
||||
raise AssetRejected("文件名无效")
|
||||
path.write_bytes(data)
|
||||
return name, f"/api/goview/assets/{name}"
|
||||
|
||||
|
||||
def resolve_asset(name: str) -> Path:
|
||||
if not _NAME_RE.fullmatch(name):
|
||||
raise AssetRejected("文件名无效")
|
||||
root = asset_root().resolve()
|
||||
path = (root / name).resolve()
|
||||
if not path.is_relative_to(root) or not path.is_file():
|
||||
raise AssetRejected("文件不存在")
|
||||
return path
|
||||
|
||||
|
||||
async def read_upload(upload: UploadFile) -> bytes:
|
||||
filename = upload.filename or ""
|
||||
if "/" in filename or "\\" in filename or ".." in filename:
|
||||
raise AssetRejected("文件名无效")
|
||||
return await upload.read(MAX_IMAGE_BYTES + 1)
|
||||
|
||||
|
||||
@router.get("/assets/{name}")
|
||||
async def read_goview_asset(name: str):
|
||||
try:
|
||||
path = resolve_asset(name)
|
||||
except AssetRejected:
|
||||
from app.gateway.goview_http import fail
|
||||
|
||||
return fail(404, "图片不存在")
|
||||
media = _TYPES.get(path.suffix.lstrip("."), "application/octet-stream")
|
||||
return FileResponse(path, media_type=media)
|
||||
@@ -0,0 +1,55 @@
|
||||
"""Controlled XYZ tiles for the offline Leaflet background."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
from fastapi import APIRouter
|
||||
from fastapi.responses import FileResponse
|
||||
|
||||
from app.gateway.goview_http import fail
|
||||
from deerflow.config.runtime_paths import runtime_home
|
||||
|
||||
router = APIRouter(prefix="/api/goview/map-tiles", tags=["goview-map-tiles"])
|
||||
|
||||
_STYLE_RE = re.compile(r"^[a-z0-9][a-z0-9-]{0,31}$")
|
||||
_MAX_ZOOM = 22
|
||||
|
||||
|
||||
class TilePathRejected(ValueError):
|
||||
"""style, zoom, or the resolved path is outside the mounted tile tree."""
|
||||
|
||||
|
||||
def tile_root() -> Path:
|
||||
override = os.environ.get("DEERFLOW_GOVIEW_TILE_ROOT", "").strip()
|
||||
if override:
|
||||
return Path(override).resolve()
|
||||
return (runtime_home() / "goview-map-tiles").resolve()
|
||||
|
||||
|
||||
def resolve_tile_file(style: str, z: int, x: int, y: int) -> Path:
|
||||
if not _STYLE_RE.fullmatch(style) or style == "." or ".." in style:
|
||||
raise TilePathRejected("底图样式无效")
|
||||
if z < 0 or z > _MAX_ZOOM:
|
||||
raise TilePathRejected("缩放层级无效")
|
||||
max_index = (1 << z) - 1
|
||||
if x < 0 or y < 0 or x > max_index or y > max_index:
|
||||
raise TilePathRejected("瓦片坐标无效")
|
||||
root = tile_root()
|
||||
path = (root / style / str(z) / str(x) / f"{y}.png").resolve()
|
||||
if not path.is_relative_to(root):
|
||||
raise TilePathRejected("瓦片路径无效")
|
||||
return path
|
||||
|
||||
|
||||
@router.get("/{style}/{z}/{x}/{y}.png")
|
||||
async def read_map_tile(style: str, z: int, x: int, y: int):
|
||||
try:
|
||||
path = resolve_tile_file(style, z, x, y)
|
||||
except TilePathRejected as exc:
|
||||
return fail(400, str(exc))
|
||||
if not path.is_file():
|
||||
return fail(404, "瓦片不存在")
|
||||
return FileResponse(path, media_type="image/png")
|
||||
@@ -0,0 +1,280 @@
|
||||
"""GoView-compatible project APIs under ``/api/goview/project``."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
|
||||
from fastapi import APIRouter, File, Query, Request, UploadFile
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
from starlette.formparsers import MultiPartException
|
||||
|
||||
from app.gateway import goview_http
|
||||
from app.gateway.routers.goview_assets import AssetRejected, read_upload, save_image_bytes
|
||||
from deerflow.persistence.goview import GoviewRejected
|
||||
|
||||
router = APIRouter(prefix="/api/goview/project", tags=["goview-projects"])
|
||||
system_router = APIRouter(prefix="/api/goview/sys", tags=["goview-system"])
|
||||
|
||||
|
||||
@system_router.get("/getOssInfo")
|
||||
async def get_oss_info():
|
||||
"""Return the local asset base expected by the upstream GoView editor.
|
||||
|
||||
Offline deployments serve uploaded assets from their own backend, so no
|
||||
external OSS bucket prefix is required. Keeping this compatibility route
|
||||
prevents the editor bootstrap request from failing with a 404.
|
||||
"""
|
||||
|
||||
return goview_http.ok({"bucketURL": ""}, msg="获取成功")
|
||||
|
||||
|
||||
class CreateBody(BaseModel):
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
|
||||
projectName: str | None = None
|
||||
remarks: str | None = None
|
||||
indexImage: str | None = None
|
||||
|
||||
|
||||
class EditBody(BaseModel):
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
|
||||
id: str
|
||||
projectName: str | None = None
|
||||
remarks: str | None = None
|
||||
indexImage: str | None = None
|
||||
|
||||
|
||||
class RenameBody(BaseModel):
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
|
||||
id: str
|
||||
projectName: str
|
||||
|
||||
|
||||
class PublishBody(BaseModel):
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
|
||||
id: str
|
||||
state: int
|
||||
|
||||
|
||||
def _store(request: Request):
|
||||
store = getattr(request.app.state, "goview_project_store", None)
|
||||
if store is None:
|
||||
return None
|
||||
return store
|
||||
|
||||
|
||||
def _invalid(exc: ValueError):
|
||||
return goview_http.fail(422, str(exc) or "请求无效")
|
||||
|
||||
|
||||
def _parse_content(raw: str) -> str:
|
||||
if len(raw) > 8_000_000:
|
||||
raise ValueError("项目内容过大")
|
||||
try:
|
||||
parsed = json.loads(raw)
|
||||
except json.JSONDecodeError as exc:
|
||||
raise ValueError("项目内容不是合法 JSON") from exc
|
||||
if not isinstance(parsed, dict):
|
||||
raise ValueError("项目内容必须是 JSON 对象")
|
||||
return raw
|
||||
|
||||
|
||||
@router.get("/list")
|
||||
async def list_projects(request: Request, page: int = Query(default=1), limit: int = Query(default=12)):
|
||||
store = _store(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "项目存储未初始化")
|
||||
owner = goview_http.owner_id_of(await goview_http.load_user(request))
|
||||
safe_page, safe_limit = goview_http.page_window(page, limit)
|
||||
rows, total = await store.list_projects(owner, page=safe_page, limit=safe_limit)
|
||||
return goview_http.ok(
|
||||
[goview_http.project_view(row) for row in rows],
|
||||
msg="获取成功",
|
||||
count=total,
|
||||
)
|
||||
|
||||
|
||||
@router.post("/create")
|
||||
async def create_project(body: CreateBody, request: Request):
|
||||
store = _store(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "项目存储未初始化")
|
||||
try:
|
||||
name = goview_http.clean_text(body.projectName or "", label="项目名称", limit=255)
|
||||
remarks = goview_http.clean_optional_text(body.remarks, limit=512)
|
||||
image = goview_http.clean_image_ref(body.indexImage)
|
||||
except ValueError as exc:
|
||||
return _invalid(exc)
|
||||
owner = goview_http.owner_id_of(await goview_http.load_user(request))
|
||||
created = await store.create_project(project_name=name, remarks=remarks, index_image=image, owner_id=owner)
|
||||
return goview_http.ok({"id": created["id"]}, msg="创建成功")
|
||||
|
||||
|
||||
@router.get("/getData")
|
||||
async def get_project_data(request: Request, projectId: str = Query(...)):
|
||||
store = _store(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "项目存储未初始化")
|
||||
owner = goview_http.owner_id_of(await goview_http.load_user(request))
|
||||
record = await store.get_owned(projectId, owner, with_content=True)
|
||||
if record is None:
|
||||
return goview_http.fail(404, "项目不存在")
|
||||
return goview_http.ok(goview_http.project_view(record, include_content=True), msg="获取成功")
|
||||
|
||||
|
||||
@router.post("/save/data")
|
||||
async def save_project_data(request: Request):
|
||||
"""Accept urlencoded or multipart ``projectId`` and ``content``.
|
||||
|
||||
Starlette's default form field cap is 1MB, which clips a real canvas.
|
||||
"""
|
||||
|
||||
store = _store(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "项目存储未初始化")
|
||||
try:
|
||||
form = await request.form(max_part_size=16 * 1024 * 1024)
|
||||
except MultiPartException as exc:
|
||||
return _invalid(ValueError(str(exc)))
|
||||
project_id = form.get("projectId")
|
||||
content = form.get("content")
|
||||
if not isinstance(project_id, str) or not project_id.strip():
|
||||
return goview_http.fail(422, "缺少项目 id")
|
||||
if hasattr(content, "read"):
|
||||
raw_bytes = await content.read()
|
||||
content = raw_bytes.decode("utf-8")
|
||||
if not isinstance(content, str):
|
||||
return goview_http.fail(422, "项目内容不是合法 JSON")
|
||||
try:
|
||||
payload = _parse_content(content)
|
||||
except ValueError as exc:
|
||||
return _invalid(exc)
|
||||
owner = goview_http.owner_id_of(await goview_http.load_user(request))
|
||||
try:
|
||||
saved = await store.save_content(project_id, owner, payload)
|
||||
except GoviewRejected as exc:
|
||||
return _invalid(exc)
|
||||
if saved is None:
|
||||
return goview_http.fail(404, "项目不存在")
|
||||
return goview_http.ok({"id": project_id}, msg="保存成功")
|
||||
|
||||
|
||||
@router.post("/edit")
|
||||
async def edit_project(body: EditBody, request: Request):
|
||||
store = _store(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "项目存储未初始化")
|
||||
fields: set[str] = set()
|
||||
name = None
|
||||
remarks = None
|
||||
image = None
|
||||
try:
|
||||
if "projectName" in body.model_fields_set:
|
||||
name = goview_http.clean_text(body.projectName or "", label="项目名称", limit=255)
|
||||
fields.add("project_name")
|
||||
if "remarks" in body.model_fields_set:
|
||||
remarks = goview_http.clean_optional_text(body.remarks, limit=512)
|
||||
fields.add("remarks")
|
||||
if "indexImage" in body.model_fields_set:
|
||||
image = goview_http.clean_image_ref(body.indexImage)
|
||||
fields.add("index_image")
|
||||
except ValueError as exc:
|
||||
return _invalid(exc)
|
||||
owner = goview_http.owner_id_of(await goview_http.load_user(request))
|
||||
updated = await store.update_meta(
|
||||
body.id,
|
||||
owner,
|
||||
project_name=name,
|
||||
remarks=remarks,
|
||||
index_image=image,
|
||||
fields=fields,
|
||||
)
|
||||
if updated is None:
|
||||
return goview_http.fail(404, "项目不存在")
|
||||
return goview_http.ok(goview_http.project_view(updated), msg="保存成功")
|
||||
|
||||
|
||||
@router.post("/rename")
|
||||
async def rename_project(body: RenameBody, request: Request):
|
||||
store = _store(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "项目存储未初始化")
|
||||
try:
|
||||
name = goview_http.clean_text(body.projectName, label="项目名称", limit=255)
|
||||
except ValueError as exc:
|
||||
return _invalid(exc)
|
||||
owner = goview_http.owner_id_of(await goview_http.load_user(request))
|
||||
updated = await store.update_meta(body.id, owner, project_name=name, fields={"project_name"})
|
||||
if updated is None:
|
||||
return goview_http.fail(404, "项目不存在")
|
||||
return goview_http.ok(goview_http.project_view(updated), msg="保存成功")
|
||||
|
||||
|
||||
@router.delete("/delete")
|
||||
async def delete_projects(request: Request, ids: str = Query(...)):
|
||||
store = _store(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "项目存储未初始化")
|
||||
owner = goview_http.owner_id_of(await goview_http.load_user(request))
|
||||
deleted = 0
|
||||
protected = False
|
||||
for project_id in [item.strip() for item in ids.split(",") if item.strip()][:50]:
|
||||
if project_id.startswith("demo-material-"):
|
||||
protected = True
|
||||
continue
|
||||
if await store.delete_owned(project_id, owner):
|
||||
deleted += 1
|
||||
if deleted == 0 and protected:
|
||||
return goview_http.fail(403, "演示项目不能删除")
|
||||
if deleted == 0:
|
||||
return goview_http.fail(404, "项目不存在")
|
||||
return goview_http.ok({"deleted": deleted}, msg="删除成功")
|
||||
|
||||
|
||||
@router.put("/publish")
|
||||
async def publish_project(body: PublishBody, request: Request):
|
||||
store = _store(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "项目存储未初始化")
|
||||
owner = goview_http.owner_id_of(await goview_http.load_user(request))
|
||||
try:
|
||||
updated = await store.set_state(body.id, owner, body.state)
|
||||
except GoviewRejected as exc:
|
||||
return _invalid(exc)
|
||||
if updated is None:
|
||||
return goview_http.fail(404, "项目不存在")
|
||||
return goview_http.ok(
|
||||
{
|
||||
"id": updated["id"],
|
||||
"state": updated["state"],
|
||||
"relative_view_url": f"/#/chart/preview/{updated['id']}",
|
||||
},
|
||||
msg="操作成功",
|
||||
)
|
||||
|
||||
|
||||
@router.post("/upload")
|
||||
async def upload_project_image(request: Request, object: UploadFile = File(...)): # noqa: A002
|
||||
if _store(request) is None:
|
||||
return goview_http.fail(503, "项目存储未初始化")
|
||||
await goview_http.load_user(request)
|
||||
try:
|
||||
data = await read_upload(object)
|
||||
file_name, file_url = save_image_bytes(data)
|
||||
except AssetRejected as exc:
|
||||
return _invalid(exc)
|
||||
return goview_http.ok({"fileName": file_name, "fileurl": file_url}, msg="上传成功")
|
||||
|
||||
|
||||
@router.get("/published/{project_id}")
|
||||
async def read_published_project(project_id: str, request: Request):
|
||||
store = _store(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "项目存储未初始化")
|
||||
record = await store.get_published(project_id)
|
||||
if record is None:
|
||||
return goview_http.fail(404, "项目未发布或不存在")
|
||||
return goview_http.ok(goview_http.project_view(record, include_content=True), msg="获取成功")
|
||||
@@ -0,0 +1,229 @@
|
||||
"""Personal templates and the builtin template market."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from fastapi import APIRouter, Query, Request
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from app.gateway import goview_http
|
||||
from app.gateway.goview_builtin_templates import ensure_builtin_templates
|
||||
from app.gateway.goview_demo_projects import COVER_URL
|
||||
from deerflow.persistence.goview import GoviewRejected
|
||||
from deerflow.persistence.goview.template_store import MARKET, PERSONAL
|
||||
|
||||
router = APIRouter(prefix="/api/goview/templates", tags=["goview-templates"])
|
||||
|
||||
|
||||
class FromProjectBody(BaseModel):
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
|
||||
projectId: str
|
||||
name: str | None = None
|
||||
description: str | None = None
|
||||
coverImage: str | None = None
|
||||
|
||||
|
||||
class TemplateEditBody(BaseModel):
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
|
||||
name: str | None = None
|
||||
description: str | None = None
|
||||
coverImage: str | None = None
|
||||
|
||||
|
||||
class CreateProjectBody(BaseModel):
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
|
||||
projectName: str | None = None
|
||||
remarks: str | None = None
|
||||
|
||||
|
||||
def _templates(request: Request):
|
||||
return getattr(request.app.state, "goview_template_store", None)
|
||||
|
||||
|
||||
def _projects(request: Request):
|
||||
return getattr(request.app.state, "goview_project_store", None)
|
||||
|
||||
|
||||
def _invalid(exc: ValueError):
|
||||
return goview_http.fail(422, str(exc) or "请求无效")
|
||||
|
||||
|
||||
def _can_read(record: dict, owner: str) -> bool:
|
||||
if record["scope"] == MARKET:
|
||||
return True
|
||||
return record.get("owner_id") == owner and record["scope"] == PERSONAL
|
||||
|
||||
|
||||
@router.get("/mine")
|
||||
async def list_my_templates(request: Request, page: int = Query(default=1), limit: int = Query(default=12)):
|
||||
store = _templates(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "模板存储未初始化")
|
||||
owner = goview_http.owner_id_of(await goview_http.load_user(request))
|
||||
safe_page, safe_limit = goview_http.page_window(page, limit)
|
||||
rows, total = await store.list_personal(owner, page=safe_page, limit=safe_limit)
|
||||
return goview_http.ok([goview_http.template_view(row) for row in rows], msg="获取成功", count=total)
|
||||
|
||||
|
||||
@router.get("/market")
|
||||
async def list_market_templates(request: Request, page: int = Query(default=1), limit: int = Query(default=12)):
|
||||
store = _templates(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "模板存储未初始化")
|
||||
await goview_http.load_user(request)
|
||||
safe_page, safe_limit = goview_http.page_window(page, limit)
|
||||
rows, total = await store.list_market(page=safe_page, limit=safe_limit)
|
||||
return goview_http.ok([goview_http.template_view(row) for row in rows], msg="获取成功", count=total)
|
||||
|
||||
|
||||
@router.post("/from-project")
|
||||
async def create_template_from_project(body: FromProjectBody, request: Request):
|
||||
templates = _templates(request)
|
||||
projects = _projects(request)
|
||||
if templates is None or projects is None:
|
||||
return goview_http.fail(503, "模板存储未初始化")
|
||||
owner = goview_http.owner_id_of(await goview_http.load_user(request))
|
||||
project = await projects.get_owned(body.projectId, owner, with_content=True)
|
||||
if project is None:
|
||||
return goview_http.fail(404, "项目不存在")
|
||||
try:
|
||||
name = goview_http.clean_text(body.name or project["project_name"], label="模板名称", limit=255)
|
||||
description = goview_http.clean_optional_text(body.description if body.description is not None else project.get("remarks"), limit=512)
|
||||
cover = goview_http.clean_image_ref(body.coverImage if body.coverImage is not None else project.get("index_image"))
|
||||
content = goview_http.retitle_canvas(project.get("content") or "{}", name)
|
||||
except ValueError as exc:
|
||||
return _invalid(exc)
|
||||
try:
|
||||
created = await templates.create_personal(
|
||||
name=name,
|
||||
description=description,
|
||||
cover_image=cover,
|
||||
content=content,
|
||||
owner_id=owner,
|
||||
)
|
||||
except GoviewRejected as exc:
|
||||
return _invalid(exc)
|
||||
return goview_http.ok(goview_http.template_view(created), msg="创建成功")
|
||||
|
||||
|
||||
@router.post("/admin/seed")
|
||||
async def seed_builtin_templates(request: Request):
|
||||
store = _templates(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "模板存储未初始化")
|
||||
user = await goview_http.load_user(request)
|
||||
if not goview_http.user_is_admin(user):
|
||||
return goview_http.fail(403, "仅管理员可维护市场模板")
|
||||
inserted = await ensure_builtin_templates(store)
|
||||
return goview_http.ok({"inserted": inserted}, msg="操作成功")
|
||||
|
||||
|
||||
@router.get("/{template_id}")
|
||||
async def get_template(template_id: str, request: Request):
|
||||
store = _templates(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "模板存储未初始化")
|
||||
owner = goview_http.owner_id_of(await goview_http.load_user(request))
|
||||
record = await store.get(template_id)
|
||||
if record is None or not _can_read(record, owner):
|
||||
return goview_http.fail(404, "模板不存在")
|
||||
return goview_http.ok(goview_http.template_view(record, include_content=True), msg="获取成功")
|
||||
|
||||
|
||||
@router.put("/{template_id}")
|
||||
async def edit_template(template_id: str, body: TemplateEditBody, request: Request):
|
||||
store = _templates(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "模板存储未初始化")
|
||||
user = await goview_http.load_user(request)
|
||||
owner = goview_http.owner_id_of(user)
|
||||
record = await store.get(template_id)
|
||||
if record is None:
|
||||
return goview_http.fail(404, "模板不存在")
|
||||
if record["scope"] == MARKET:
|
||||
if not goview_http.user_is_admin(user):
|
||||
return goview_http.fail(403, "市场模板不能直接编辑")
|
||||
elif record.get("owner_id") != owner:
|
||||
return goview_http.fail(404, "模板不存在")
|
||||
fields: set[str] = set()
|
||||
name = None
|
||||
description = None
|
||||
cover = None
|
||||
try:
|
||||
if "name" in body.model_fields_set:
|
||||
name = goview_http.clean_text(body.name or "", label="模板名称", limit=255)
|
||||
fields.add("name")
|
||||
if "description" in body.model_fields_set:
|
||||
description = goview_http.clean_optional_text(body.description, limit=512)
|
||||
fields.add("description")
|
||||
if "coverImage" in body.model_fields_set:
|
||||
cover = goview_http.clean_image_ref(body.coverImage)
|
||||
fields.add("cover_image")
|
||||
except ValueError as exc:
|
||||
return _invalid(exc)
|
||||
updated = await store.update_meta(
|
||||
template_id,
|
||||
name=name,
|
||||
description=description,
|
||||
cover_image=cover,
|
||||
fields=fields,
|
||||
)
|
||||
if updated is None:
|
||||
return goview_http.fail(404, "模板不存在")
|
||||
return goview_http.ok(goview_http.template_view(updated), msg="保存成功")
|
||||
|
||||
|
||||
@router.delete("/{template_id}")
|
||||
async def delete_template(template_id: str, request: Request):
|
||||
store = _templates(request)
|
||||
if store is None:
|
||||
return goview_http.fail(503, "模板存储未初始化")
|
||||
user = await goview_http.load_user(request)
|
||||
owner = goview_http.owner_id_of(user)
|
||||
record = await store.get(template_id)
|
||||
if record is None:
|
||||
return goview_http.fail(404, "模板不存在")
|
||||
if record.get("is_builtin"):
|
||||
return goview_http.fail(403, "内置模板不可删除")
|
||||
if record["scope"] == MARKET:
|
||||
if not goview_http.user_is_admin(user):
|
||||
return goview_http.fail(403, "市场模板不能直接编辑")
|
||||
elif record.get("owner_id") != owner:
|
||||
return goview_http.fail(404, "模板不存在")
|
||||
await store.delete(template_id)
|
||||
return goview_http.ok({"id": template_id}, msg="删除成功")
|
||||
|
||||
|
||||
@router.post("/{template_id}/create-project")
|
||||
async def create_project_from_template(template_id: str, request: Request, body: CreateProjectBody | None = None):
|
||||
templates = _templates(request)
|
||||
projects = _projects(request)
|
||||
if templates is None or projects is None:
|
||||
return goview_http.fail(503, "模板存储未初始化")
|
||||
owner = goview_http.owner_id_of(await goview_http.load_user(request))
|
||||
record = await templates.get(template_id)
|
||||
if record is None or not _can_read(record, owner):
|
||||
return goview_http.fail(404, "模板不存在")
|
||||
requested = body.projectName if body is not None and body.projectName else record["name"]
|
||||
remarks = body.remarks if body is not None else record.get("description")
|
||||
try:
|
||||
name = goview_http.clean_text(requested, label="项目名称", limit=255)
|
||||
remarks = goview_http.clean_optional_text(remarks, limit=512)
|
||||
content = goview_http.retitle_canvas(record.get("content") or "{}", name)
|
||||
except ValueError as exc:
|
||||
return _invalid(exc)
|
||||
try:
|
||||
created = await projects.create_project(
|
||||
project_name=name,
|
||||
remarks=remarks,
|
||||
# Let the project gallery show the template's real dashboard
|
||||
# preview before the first canvas save generates its own thumbnail.
|
||||
index_image=record.get("cover_image") or COVER_URL,
|
||||
owner_id=owner,
|
||||
content=content,
|
||||
)
|
||||
except GoviewRejected as exc:
|
||||
return _invalid(exc)
|
||||
return goview_http.ok({"id": created["id"]}, msg="创建成功")
|
||||
@@ -74,6 +74,21 @@ class CustomModuleListUpdateRequest(BaseModel):
|
||||
modules: list[dict[str, Any]] = Field(..., description="自定义模块全量列表(整体替换)")
|
||||
|
||||
|
||||
class PagesUpdateRequest(BaseModel):
|
||||
pages: list[dict[str, Any]] = Field(..., description="页面清单(编号集合不可增删;可改名称/隐藏)")
|
||||
|
||||
|
||||
class FieldAddRequest(BaseModel):
|
||||
label: str = Field(..., min_length=1, description="字段显示名(同名拒绝)")
|
||||
branch: str = Field(..., description="所属数据分支(分类对应的 DATA 顶层键)")
|
||||
description: str = Field(default="", description="字段说明(可选)")
|
||||
default_value: str = Field(default="待补充", description="写入各条目的初始值")
|
||||
|
||||
|
||||
class FieldRemoveRequest(BaseModel):
|
||||
label: str = Field(..., min_length=1, description="要删除的自定义字段显示名")
|
||||
|
||||
|
||||
class CustomModuleGenerateRequest(BaseModel):
|
||||
page: str = Field(..., description="挂载的页面编号(manifest.页面 的 编号)")
|
||||
title: str = Field(default="", description="模块标题(留空由模型起名)")
|
||||
@@ -195,11 +210,16 @@ async def get_html_template_fields(template_id: str, request: Request) -> dict[s
|
||||
# 是否接受定时任务抽取数据更新(默认 True);布局分区无独立数据键,恒为 True 且前端禁用开关。
|
||||
"extract": locks.get(str(f.get("label"))) is not True,
|
||||
"has_key": bool(f.get("keys")),
|
||||
"custom": bool(f.get("custom")),
|
||||
}
|
||||
for f in catalog
|
||||
]
|
||||
pages = [
|
||||
{"key": str(p.get("编号") or ""), "label": str(p.get("名称") or p.get("编号") or "")}
|
||||
{
|
||||
"key": str(p.get("编号") or ""),
|
||||
"label": str(p.get("名称") or p.get("编号") or ""),
|
||||
"hidden": p.get("隐藏") is True,
|
||||
}
|
||||
for p in manifest.get("页面") or []
|
||||
if isinstance(p, dict)
|
||||
]
|
||||
@@ -231,6 +251,57 @@ async def update_html_template_fields(
|
||||
return meta
|
||||
|
||||
|
||||
@router.post("/{template_id}/fields/add")
|
||||
async def add_html_template_field(
|
||||
template_id: str, body: FieldAddRequest, request: Request
|
||||
) -> dict[str, Any]:
|
||||
"""向分类(数据分支)添加自定义字段:fields.json 目录 + data.json 各条目同步补键(仅管理员)。"""
|
||||
await _require_admin(request)
|
||||
try:
|
||||
meta = template_store.add_template_field(
|
||||
template_id,
|
||||
label=body.label,
|
||||
branch=body.branch,
|
||||
description=body.description,
|
||||
default_value=body.default_value,
|
||||
)
|
||||
except template_store.TemplateStoreError as exc:
|
||||
status = 404 if "不存在" in str(exc) else 400
|
||||
raise HTTPException(status_code=status, detail=str(exc))
|
||||
await invalidate_catalog(request, "html_templates")
|
||||
return meta
|
||||
|
||||
|
||||
@router.post("/{template_id}/fields/remove")
|
||||
async def remove_html_template_field(
|
||||
template_id: str, body: FieldRemoveRequest, request: Request
|
||||
) -> dict[str, Any]:
|
||||
"""删除自定义字段:目录项与 data.json 各条目的键一并移除(仅管理员;内置字段拒绝)。"""
|
||||
await _require_admin(request)
|
||||
try:
|
||||
meta = template_store.remove_template_field(template_id, body.label)
|
||||
except template_store.TemplateStoreError as exc:
|
||||
status = 404 if "不存在" in str(exc) else 400
|
||||
raise HTTPException(status_code=status, detail=str(exc))
|
||||
await invalidate_catalog(request, "html_templates")
|
||||
return meta
|
||||
|
||||
|
||||
@router.put("/{template_id}/pages")
|
||||
async def update_html_template_pages(
|
||||
template_id: str, body: PagesUpdateRequest, request: Request
|
||||
) -> dict[str, Any]:
|
||||
"""更新页面清单(名称/隐藏标记;编号集合不可增删;仅管理员)。隐藏页面在产物导航整体下线。"""
|
||||
await _require_admin(request)
|
||||
try:
|
||||
meta = template_store.write_template_pages(template_id, body.pages)
|
||||
except template_store.TemplateStoreError as exc:
|
||||
status = 404 if "不存在" in str(exc) else 400
|
||||
raise HTTPException(status_code=status, detail=str(exc))
|
||||
await invalidate_catalog(request, "html_templates")
|
||||
return meta
|
||||
|
||||
|
||||
@router.put("/{template_id}/custom-modules")
|
||||
async def update_html_template_custom_modules(
|
||||
template_id: str, body: CustomModuleListUpdateRequest, request: Request
|
||||
|
||||
@@ -77,7 +77,11 @@ from app.gateway.wiki_generation_config import (
|
||||
from deerflow.assistant_knowledge.package_io import looks_like_knowledge_package
|
||||
from deerflow.config.agents_config import load_agent_config
|
||||
from deerflow.config.llmwiki_config import LlmWikiRuntimeOverride, normalize_service_url
|
||||
from deerflow.config.system_settings import load_system_settings, save_system_settings
|
||||
from deerflow.config.system_settings import (
|
||||
LocalWikiAutoSyncSettings,
|
||||
load_system_settings,
|
||||
save_system_settings,
|
||||
)
|
||||
from deerflow.integrations.weknora.client import WeKnoraClient, WeKnoraError
|
||||
from deerflow.integrations.weknora.knowledge_profile import (
|
||||
DEFAULT_RETRIEVAL_SETTINGS,
|
||||
@@ -252,6 +256,12 @@ class LlmWikiConnectionTest(BaseModel):
|
||||
api_base_url: str | None = None
|
||||
|
||||
|
||||
class LocalWikiAutoSyncSettingsUpdate(BaseModel):
|
||||
enabled: bool
|
||||
schedule: Literal["hourly", "daily"] = "hourly"
|
||||
hour: int = Field(default=2, ge=0, le=23)
|
||||
|
||||
|
||||
class WikiGenerationInstructions(BaseModel):
|
||||
"""User-owned guidance for WeKnora's stable Wiki ingest prompts."""
|
||||
|
||||
@@ -3097,6 +3107,41 @@ async def get_llmwiki_settings(request: Request) -> dict[str, Any]:
|
||||
}
|
||||
|
||||
|
||||
@router.get(
|
||||
"/api/system-settings/llmwiki/auto-sync",
|
||||
response_model=LocalWikiAutoSyncSettings,
|
||||
)
|
||||
async def get_local_wiki_auto_sync_settings(
|
||||
request: Request,
|
||||
) -> LocalWikiAutoSyncSettings:
|
||||
await _require_admin(request)
|
||||
return load_system_settings().local_wiki_auto_sync
|
||||
|
||||
|
||||
@router.put(
|
||||
"/api/system-settings/llmwiki/auto-sync",
|
||||
response_model=LocalWikiAutoSyncSettings,
|
||||
)
|
||||
async def update_local_wiki_auto_sync_settings(
|
||||
request: Request,
|
||||
body: LocalWikiAutoSyncSettingsUpdate,
|
||||
) -> LocalWikiAutoSyncSettings:
|
||||
await _require_admin(request)
|
||||
updated = LocalWikiAutoSyncSettings(
|
||||
enabled=body.enabled,
|
||||
schedule=body.schedule,
|
||||
hour=body.hour,
|
||||
)
|
||||
current = load_system_settings()
|
||||
saved = save_system_settings(
|
||||
current.model_copy(update={"local_wiki_auto_sync": updated})
|
||||
)
|
||||
from app.gateway.llmwiki_index_runtime import rebuild_local_wiki_index_runtime
|
||||
|
||||
await rebuild_local_wiki_index_runtime(request.app, force=True)
|
||||
return saved.local_wiki_auto_sync
|
||||
|
||||
|
||||
@router.put("/api/system-settings/llmwiki")
|
||||
async def update_llmwiki_settings(request: Request, body: LlmWikiSettingsUpdate) -> dict[str, Any]:
|
||||
await _require_admin(request)
|
||||
|
||||
@@ -1413,6 +1413,8 @@ class AppearanceResponse(BaseModel):
|
||||
default_theme: str = Field(..., description="System default theme — built-in id or enabled custom-theme-* id")
|
||||
default_skill_view: Literal["card", "list"] = Field(..., description="System default skill list display mode — card or list")
|
||||
default_agent_view: Literal["card", "list"] = Field(..., description="System default agent list display mode — card or list")
|
||||
default_agent_grid_adaptive: bool = Field(default=True, description="System default agent-card grid strategy — adaptive width-based columns (true) or fixed count (false)")
|
||||
default_agent_grid_columns: int = Field(default=4, description="System default fixed column count for the agent-card grid (1-8)")
|
||||
default_layout_mode: Literal["full", "compact"] = Field(..., description="System default interface layout — full (sidebar + header) or compact (hidden)")
|
||||
default_composer_width_full: int = Field(..., description="System default composer width percent for full layout. 100 keeps the built-in width.")
|
||||
default_composer_width_compact: int = Field(..., description="System default composer width percent for compact layout. 100 keeps the built-in width.")
|
||||
@@ -1428,6 +1430,8 @@ class AppearanceUpdateRequest(BaseModel):
|
||||
default_theme: str | None = Field(default=None)
|
||||
default_skill_view: Literal["card", "list"] | None = Field(default=None)
|
||||
default_agent_view: Literal["card", "list"] | None = Field(default=None)
|
||||
default_agent_grid_adaptive: bool | None = Field(default=None)
|
||||
default_agent_grid_columns: int | None = Field(default=None)
|
||||
default_layout_mode: Literal["full", "compact"] | None = Field(default=None)
|
||||
default_composer_width_full: int | None = Field(default=None)
|
||||
default_composer_width_compact: int | None = Field(default=None)
|
||||
@@ -1507,6 +1511,8 @@ def _appearance_response(appearance) -> AppearanceResponse:
|
||||
default_theme=appearance.default_theme,
|
||||
default_skill_view=appearance.default_skill_view,
|
||||
default_agent_view=appearance.default_agent_view,
|
||||
default_agent_grid_adaptive=appearance.default_agent_grid_adaptive,
|
||||
default_agent_grid_columns=appearance.default_agent_grid_columns,
|
||||
default_layout_mode=appearance.default_layout_mode,
|
||||
default_composer_width_full=appearance.default_composer_width_full,
|
||||
default_composer_width_compact=appearance.default_composer_width_compact,
|
||||
@@ -1575,6 +1581,8 @@ async def update_appearance_settings(body: AppearanceUpdateRequest, request: Req
|
||||
for key in (
|
||||
"default_skill_view",
|
||||
"default_agent_view",
|
||||
"default_agent_grid_adaptive",
|
||||
"default_agent_grid_columns",
|
||||
"default_layout_mode",
|
||||
"default_composer_width_full",
|
||||
"default_composer_width_compact",
|
||||
|
||||
@@ -68,7 +68,8 @@ models:
|
||||
model: MiniMax-M2.5
|
||||
api_key: sk-cp-mXNcPkl81WAERsVaVOCj5r-F3LQv8kdtMWzx_U4RNAJejJKtK_JB2mHLFqBkBYvVDb8OPZmxJgiuctDHhDImvkHvJqGj_RvvlTaCzFvhwIvuHT8jm46niBY
|
||||
base_url: https://api.minimaxi.com/v1
|
||||
max_tokens: 4096
|
||||
# 模板 JSON 转换等结构化输出较大(think+完整 DATA),4096 会截断导致不可解析
|
||||
max_tokens: 32768
|
||||
temperature: 1.0
|
||||
supports_vision: true
|
||||
supports_thinking: true
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
"intent-clarification-policy-copy": {
|
||||
"enabled": true
|
||||
},
|
||||
"sandbox-shell-file-edit-pitfalls": {
|
||||
"enabled": false
|
||||
},
|
||||
"multi-seat-delivery-gating": {
|
||||
"enabled": true
|
||||
},
|
||||
@@ -51,6 +54,12 @@
|
||||
},
|
||||
"leaflet-tile-zoom-guard": {
|
||||
"enabled": true
|
||||
},
|
||||
"skill-iteration-demo": {
|
||||
"enabled": true
|
||||
},
|
||||
"multi-seat-collaboration-delivery": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ deployment files. An effective non-empty API URL is the sole provider switch.
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import Literal
|
||||
from urllib.parse import urlsplit, urlunsplit
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
|
||||
@@ -145,6 +146,11 @@ class LocalWikiIndexConfig(BaseModel):
|
||||
description="Allowed local dev frontend origins; wiki_url uses the request Origin when it matches.",
|
||||
)
|
||||
auto_sync: bool = False
|
||||
# The administrator-facing schedule is persisted in system_settings.json.
|
||||
# These fields live on the effective runtime config so the scheduler never
|
||||
# needs to read the settings file separately from the runtime rebuild.
|
||||
auto_sync_schedule: Literal["hourly", "daily"] = "hourly"
|
||||
auto_sync_hour: int = Field(default=2, ge=0, le=23)
|
||||
sync_interval_seconds: int = Field(default=30, ge=10, le=86400)
|
||||
sync_page_size: int = Field(default=100, ge=1, le=500)
|
||||
sync_concurrency: int = Field(default=3, ge=1, le=32)
|
||||
|
||||
@@ -193,6 +193,20 @@ class SkillKnowledgeAutoSyncSettings(BaseModel):
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
|
||||
|
||||
class LocalWikiAutoSyncSettings(BaseModel):
|
||||
"""Administrator-controlled schedule for the local Wiki mirror scan.
|
||||
|
||||
This is deliberately separate from the WeKnora connection override: it
|
||||
controls background work only, while single-knowledge-base manual syncs
|
||||
remain available regardless of this switch.
|
||||
"""
|
||||
|
||||
enabled: bool = False
|
||||
schedule: Literal["hourly", "daily"] = "hourly"
|
||||
hour: int = Field(default=2, ge=0, le=23)
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
|
||||
|
||||
class AppearanceRouteParam(BaseModel):
|
||||
"""Runtime query-param descriptor for top-bar shortcut buttons.
|
||||
|
||||
@@ -268,6 +282,22 @@ class AppearanceSettings(BaseModel):
|
||||
default="card",
|
||||
description="Default agent list display mode for users who haven't picked their own (card / list)",
|
||||
)
|
||||
default_agent_grid_adaptive: bool = Field(
|
||||
default=True,
|
||||
description="Default agent-card grid column strategy for users without a personal choice: adaptive width-based columns (true) or fixed count (false)",
|
||||
)
|
||||
default_agent_grid_columns: int = Field(
|
||||
default=4,
|
||||
description="Default fixed column count for the agent-card grid when adaptive is off (1-8)",
|
||||
)
|
||||
|
||||
@field_validator("default_agent_grid_columns", mode="before")
|
||||
@classmethod
|
||||
def _clamp_default_agent_grid_columns(cls, value: object) -> int:
|
||||
try:
|
||||
return min(8, max(1, int(value)))
|
||||
except (TypeError, ValueError):
|
||||
return 4
|
||||
default_layout_mode: Literal["full", "compact"] = Field(
|
||||
default="compact",
|
||||
description="Default interface layout for users who haven't picked their own — compact (hidden) / full (sidebar + header)",
|
||||
@@ -1135,6 +1165,9 @@ class SystemSettings(BaseModel):
|
||||
html_runtime: HtmlRuntimeSettings = Field(default_factory=HtmlRuntimeSettings)
|
||||
app_identity: AppIdentitySettings = Field(default_factory=AppIdentitySettings)
|
||||
llmwiki: LlmWikiRuntimeOverride = Field(default_factory=LlmWikiRuntimeOverride)
|
||||
local_wiki_auto_sync: LocalWikiAutoSyncSettings = Field(
|
||||
default_factory=LocalWikiAutoSyncSettings
|
||||
)
|
||||
skill_knowledge_auto_sync: SkillKnowledgeAutoSyncSettings = Field(default_factory=SkillKnowledgeAutoSyncSettings)
|
||||
knowledge_base_product_version: Literal["v1", "v2"] = Field(
|
||||
default="v1",
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
"""GoView project and template persistence."""
|
||||
|
||||
from deerflow.persistence.goview.models import (
|
||||
GoviewProjectContentRow,
|
||||
GoviewProjectRow,
|
||||
GoviewTemplateRow,
|
||||
)
|
||||
from deerflow.persistence.goview.project_store import (
|
||||
GoviewProjectStore,
|
||||
GoviewRejected,
|
||||
MemoryGoviewProjectStore,
|
||||
SqlGoviewProjectStore,
|
||||
make_goview_project_store,
|
||||
)
|
||||
from deerflow.persistence.goview.template_store import (
|
||||
GoviewTemplateStore,
|
||||
MemoryGoviewTemplateStore,
|
||||
SqlGoviewTemplateStore,
|
||||
make_goview_template_store,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"GoviewProjectContentRow",
|
||||
"GoviewProjectRow",
|
||||
"GoviewProjectStore",
|
||||
"GoviewRejected",
|
||||
"GoviewTemplateRow",
|
||||
"GoviewTemplateStore",
|
||||
"MemoryGoviewProjectStore",
|
||||
"MemoryGoviewTemplateStore",
|
||||
"SqlGoviewProjectStore",
|
||||
"SqlGoviewTemplateStore",
|
||||
"make_goview_project_store",
|
||||
"make_goview_template_store",
|
||||
]
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
"""ORM models for GoView projects, canvas content, and templates."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import UTC, datetime
|
||||
|
||||
from sqlalchemy import Integer, String
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from deerflow.persistence.base import Base
|
||||
from deerflow.persistence.types import BeijingDateTime, PortableLongText
|
||||
|
||||
|
||||
class GoviewProjectRow(Base):
|
||||
"""One GoView project card. Canvas JSON lives in ``goview_project_contents``."""
|
||||
|
||||
__tablename__ = "goview_projects"
|
||||
|
||||
id: Mapped[str] = mapped_column(String(64), primary_key=True)
|
||||
project_name: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
remarks: Mapped[str | None] = mapped_column(String(512), nullable=True)
|
||||
state: Mapped[int] = mapped_column(Integer, nullable=False, default=-1)
|
||||
index_image: Mapped[str | None] = mapped_column(String(1024), nullable=True)
|
||||
owner_id: Mapped[str] = mapped_column(String(64), nullable=False, index=True)
|
||||
created_at: Mapped[datetime] = mapped_column(BeijingDateTime(), nullable=False, default=lambda: datetime.now(UTC))
|
||||
updated_at: Mapped[datetime] = mapped_column(
|
||||
BeijingDateTime(),
|
||||
nullable=False,
|
||||
default=lambda: datetime.now(UTC),
|
||||
onupdate=lambda: datetime.now(UTC),
|
||||
)
|
||||
|
||||
|
||||
class GoviewProjectContentRow(Base):
|
||||
"""The ChartEditStorage document for one project. Listed projects do not load this row."""
|
||||
|
||||
__tablename__ = "goview_project_contents"
|
||||
|
||||
project_id: Mapped[str] = mapped_column(String(64), primary_key=True)
|
||||
content_json: Mapped[str] = mapped_column(PortableLongText, nullable=False)
|
||||
updated_at: Mapped[datetime] = mapped_column(BeijingDateTime(), nullable=False, default=lambda: datetime.now(UTC))
|
||||
|
||||
|
||||
class GoviewTemplateRow(Base):
|
||||
"""A personal template or a market template. Builtin rows are inserted only when missing."""
|
||||
|
||||
__tablename__ = "goview_templates"
|
||||
|
||||
id: Mapped[str] = mapped_column(String(64), primary_key=True)
|
||||
name: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
description: Mapped[str | None] = mapped_column(String(512), nullable=True)
|
||||
cover_image: Mapped[str | None] = mapped_column(String(1024), nullable=True)
|
||||
content_json: Mapped[str] = mapped_column(PortableLongText, nullable=False)
|
||||
owner_id: Mapped[str | None] = mapped_column(String(64), nullable=True, index=True)
|
||||
scope: Mapped[str] = mapped_column(String(16), nullable=False, default="personal")
|
||||
is_builtin: Mapped[bool] = mapped_column(nullable=False, default=False)
|
||||
sort_order: Mapped[int] = mapped_column(Integer, nullable=False, default=0)
|
||||
created_at: Mapped[datetime] = mapped_column(BeijingDateTime(), nullable=False, default=lambda: datetime.now(UTC))
|
||||
updated_at: Mapped[datetime] = mapped_column(
|
||||
BeijingDateTime(),
|
||||
nullable=False,
|
||||
default=lambda: datetime.now(UTC),
|
||||
onupdate=lambda: datetime.now(UTC),
|
||||
)
|
||||
+426
@@ -0,0 +1,426 @@
|
||||
"""Project and canvas-content persistence for the GoView editor."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import uuid
|
||||
from abc import ABC, abstractmethod
|
||||
from datetime import UTC, datetime
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy import select
|
||||
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker
|
||||
|
||||
from deerflow.persistence.goview.models import GoviewProjectContentRow, GoviewProjectRow
|
||||
|
||||
MAX_CONTENT_CHARS = 8_000_000
|
||||
UNPUBLISHED = -1
|
||||
PUBLISHED = 1
|
||||
DEMO_OWNER = "goview-demo"
|
||||
|
||||
|
||||
class GoviewRejected(ValueError):
|
||||
"""A project write violated a size or state rule."""
|
||||
|
||||
|
||||
def new_project_id() -> str:
|
||||
return "id_" + uuid.uuid4().hex[:16]
|
||||
|
||||
|
||||
def empty_canvas(project_name: str) -> str:
|
||||
"""A ChartEditStorage document the editor can open before the first save."""
|
||||
|
||||
return json.dumps(
|
||||
{
|
||||
"editCanvasConfig": {
|
||||
"projectName": project_name,
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"filterShow": False,
|
||||
"hueRotate": 0,
|
||||
"saturate": 1,
|
||||
"contrast": 1,
|
||||
"brightness": 1,
|
||||
"opacity": 1,
|
||||
"rotateZ": 0,
|
||||
"rotateX": 0,
|
||||
"rotateY": 0,
|
||||
"skewX": 0,
|
||||
"skewY": 0,
|
||||
"blendMode": "normal",
|
||||
"background": None,
|
||||
"backgroundImage": None,
|
||||
"selectColor": True,
|
||||
"chartThemeColor": "dark",
|
||||
"chartCustomThemeColorInfo": None,
|
||||
"chartThemeSetting": {},
|
||||
"vChartThemeName": "vScreenVolcanoBlue",
|
||||
"previewScaleType": "fit",
|
||||
},
|
||||
"componentList": [],
|
||||
"requestGlobalConfig": {
|
||||
"requestDataPond": [],
|
||||
"requestOriginUrl": "",
|
||||
"requestInterval": 30,
|
||||
"requestIntervalUnit": "second",
|
||||
"requestParams": {
|
||||
"Body": {"form-data": {}, "x-www-form-urlencoded": {}, "json": "", "xml": ""},
|
||||
"Header": {},
|
||||
"Params": {},
|
||||
},
|
||||
},
|
||||
},
|
||||
ensure_ascii=False,
|
||||
)
|
||||
|
||||
|
||||
def _check_content(content: str) -> str:
|
||||
if not isinstance(content, str) or len(content) > MAX_CONTENT_CHARS:
|
||||
raise GoviewRejected("项目内容过大或无效")
|
||||
return content
|
||||
|
||||
|
||||
def _check_state(state: int) -> int:
|
||||
if state not in (UNPUBLISHED, PUBLISHED):
|
||||
raise GoviewRejected("发布状态只能是 1 或 -1")
|
||||
return state
|
||||
|
||||
|
||||
def _shared_or_owner(record_owner: str, caller: str) -> bool:
|
||||
"""Shared demo canvases stay readable and editable for every logged-in user."""
|
||||
|
||||
return record_owner == caller or record_owner == DEMO_OWNER
|
||||
|
||||
|
||||
def _meta(row: dict[str, Any] | GoviewProjectRow) -> dict[str, Any]:
|
||||
if isinstance(row, dict):
|
||||
return {
|
||||
"id": row["id"],
|
||||
"project_name": row["project_name"],
|
||||
"remarks": row["remarks"],
|
||||
"state": row["state"],
|
||||
"index_image": row["index_image"],
|
||||
"owner_id": row["owner_id"],
|
||||
"created_at": row["created_at"],
|
||||
"updated_at": row["updated_at"],
|
||||
}
|
||||
return {
|
||||
"id": row.id,
|
||||
"project_name": row.project_name,
|
||||
"remarks": row.remarks,
|
||||
"state": row.state,
|
||||
"index_image": row.index_image,
|
||||
"owner_id": row.owner_id,
|
||||
"created_at": row.created_at,
|
||||
"updated_at": row.updated_at,
|
||||
}
|
||||
|
||||
|
||||
class GoviewProjectStore(ABC):
|
||||
@abstractmethod
|
||||
async def list_projects(self, owner_id: str, *, page: int, limit: int) -> tuple[list[dict[str, Any]], int]:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def create_project(
|
||||
self,
|
||||
*,
|
||||
project_name: str,
|
||||
remarks: str | None,
|
||||
index_image: str | None,
|
||||
owner_id: str,
|
||||
content: str | None = None,
|
||||
project_id: str | None = None,
|
||||
) -> dict[str, Any]:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def get_owned(self, project_id: str, owner_id: str, *, with_content: bool = True) -> dict[str, Any] | None:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def get_published(self, project_id: str) -> dict[str, Any] | None:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def save_content(self, project_id: str, owner_id: str, content: str) -> dict[str, Any] | None:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def update_meta(
|
||||
self,
|
||||
project_id: str,
|
||||
owner_id: str,
|
||||
*,
|
||||
project_name: str | None = None,
|
||||
remarks: str | None = None,
|
||||
index_image: str | None = None,
|
||||
fields: set[str],
|
||||
) -> dict[str, Any] | None:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def set_state(self, project_id: str, owner_id: str, state: int) -> dict[str, Any] | None:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def delete_owned(self, project_id: str, owner_id: str) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class MemoryGoviewProjectStore(GoviewProjectStore):
|
||||
def __init__(self) -> None:
|
||||
self._projects: dict[str, dict[str, Any]] = {}
|
||||
self._contents: dict[str, str] = {}
|
||||
|
||||
async def list_projects(self, owner_id: str, *, page: int, limit: int) -> tuple[list[dict[str, Any]], int]:
|
||||
demos = [item for item in self._projects.values() if item["owner_id"] == DEMO_OWNER and owner_id != DEMO_OWNER]
|
||||
demos.sort(key=lambda item: item["id"])
|
||||
mine = [item for item in self._projects.values() if item["owner_id"] == owner_id]
|
||||
mine.sort(key=lambda item: (item["updated_at"], item["id"]), reverse=True)
|
||||
rows = [*demos, *mine]
|
||||
start = (page - 1) * limit
|
||||
return [_meta(item) for item in rows[start : start + limit]], len(rows)
|
||||
|
||||
async def create_project(
|
||||
self,
|
||||
*,
|
||||
project_name: str,
|
||||
remarks: str | None,
|
||||
index_image: str | None,
|
||||
owner_id: str,
|
||||
content: str | None = None,
|
||||
project_id: str | None = None,
|
||||
) -> dict[str, Any]:
|
||||
now = datetime.now(UTC)
|
||||
project_id = project_id or new_project_id()
|
||||
payload = _check_content(content if content is not None else empty_canvas(project_name))
|
||||
record = {
|
||||
"id": project_id,
|
||||
"project_name": project_name,
|
||||
"remarks": remarks,
|
||||
"state": UNPUBLISHED,
|
||||
"index_image": index_image,
|
||||
"owner_id": owner_id,
|
||||
"created_at": now,
|
||||
"updated_at": now,
|
||||
}
|
||||
self._projects[project_id] = record
|
||||
self._contents[project_id] = payload
|
||||
data = _meta(record)
|
||||
data["content"] = payload
|
||||
return data
|
||||
|
||||
async def get_owned(self, project_id: str, owner_id: str, *, with_content: bool = True) -> dict[str, Any] | None:
|
||||
record = self._projects.get(project_id)
|
||||
if record is None or not _shared_or_owner(record["owner_id"], owner_id):
|
||||
return None
|
||||
data = _meta(record)
|
||||
if with_content:
|
||||
data["content"] = self._contents.get(project_id, "")
|
||||
return data
|
||||
|
||||
async def get_published(self, project_id: str) -> dict[str, Any] | None:
|
||||
record = self._projects.get(project_id)
|
||||
if record is None or record["state"] != PUBLISHED:
|
||||
return None
|
||||
data = _meta(record)
|
||||
data["content"] = self._contents.get(project_id, "")
|
||||
return data
|
||||
|
||||
async def save_content(self, project_id: str, owner_id: str, content: str) -> dict[str, Any] | None:
|
||||
record = self._projects.get(project_id)
|
||||
if record is None or not _shared_or_owner(record["owner_id"], owner_id):
|
||||
return None
|
||||
self._contents[project_id] = _check_content(content)
|
||||
record["updated_at"] = datetime.now(UTC)
|
||||
return _meta(record)
|
||||
|
||||
async def update_meta(
|
||||
self,
|
||||
project_id: str,
|
||||
owner_id: str,
|
||||
*,
|
||||
project_name: str | None = None,
|
||||
remarks: str | None = None,
|
||||
index_image: str | None = None,
|
||||
fields: set[str],
|
||||
) -> dict[str, Any] | None:
|
||||
record = self._projects.get(project_id)
|
||||
if record is None or not _shared_or_owner(record["owner_id"], owner_id):
|
||||
return None
|
||||
if "project_name" in fields and project_name is not None:
|
||||
record["project_name"] = project_name
|
||||
if "remarks" in fields:
|
||||
record["remarks"] = remarks
|
||||
if "index_image" in fields:
|
||||
record["index_image"] = index_image
|
||||
record["updated_at"] = datetime.now(UTC)
|
||||
return _meta(record)
|
||||
|
||||
async def set_state(self, project_id: str, owner_id: str, state: int) -> dict[str, Any] | None:
|
||||
record = self._projects.get(project_id)
|
||||
if record is None or not _shared_or_owner(record["owner_id"], owner_id):
|
||||
return None
|
||||
record["state"] = _check_state(state)
|
||||
record["updated_at"] = datetime.now(UTC)
|
||||
return _meta(record)
|
||||
|
||||
async def delete_owned(self, project_id: str, owner_id: str) -> bool:
|
||||
record = self._projects.get(project_id)
|
||||
if record is None or record["owner_id"] != owner_id or record["owner_id"] == DEMO_OWNER:
|
||||
return False
|
||||
self._projects.pop(project_id, None)
|
||||
self._contents.pop(project_id, None)
|
||||
return True
|
||||
|
||||
|
||||
class SqlGoviewProjectStore(GoviewProjectStore):
|
||||
def __init__(self, session_factory: async_sessionmaker[AsyncSession]) -> None:
|
||||
self._session_factory = session_factory
|
||||
|
||||
async def list_projects(self, owner_id: str, *, page: int, limit: int) -> tuple[list[dict[str, Any]], int]:
|
||||
async with self._session_factory() as session:
|
||||
mine_stmt = (
|
||||
select(GoviewProjectRow)
|
||||
.where(GoviewProjectRow.owner_id == owner_id)
|
||||
.order_by(GoviewProjectRow.updated_at.desc(), GoviewProjectRow.id.desc())
|
||||
)
|
||||
mine = list((await session.execute(mine_stmt)).scalars().all())
|
||||
if owner_id == DEMO_OWNER:
|
||||
rows = mine
|
||||
else:
|
||||
demo_stmt = (
|
||||
select(GoviewProjectRow)
|
||||
.where(GoviewProjectRow.owner_id == DEMO_OWNER)
|
||||
.order_by(GoviewProjectRow.id.asc())
|
||||
)
|
||||
demos = list((await session.execute(demo_stmt)).scalars().all())
|
||||
rows = [*demos, *mine]
|
||||
start = (page - 1) * limit
|
||||
return [_meta(row) for row in rows[start : start + limit]], len(rows)
|
||||
|
||||
async def create_project(
|
||||
self,
|
||||
*,
|
||||
project_name: str,
|
||||
remarks: str | None,
|
||||
index_image: str | None,
|
||||
owner_id: str,
|
||||
content: str | None = None,
|
||||
project_id: str | None = None,
|
||||
) -> dict[str, Any]:
|
||||
now = datetime.now(UTC)
|
||||
project_id = project_id or new_project_id()
|
||||
payload = _check_content(content if content is not None else empty_canvas(project_name))
|
||||
async with self._session_factory() as session:
|
||||
row = GoviewProjectRow(
|
||||
id=project_id,
|
||||
project_name=project_name,
|
||||
remarks=remarks,
|
||||
state=UNPUBLISHED,
|
||||
index_image=index_image,
|
||||
owner_id=owner_id,
|
||||
created_at=now,
|
||||
updated_at=now,
|
||||
)
|
||||
session.add(row)
|
||||
session.add(GoviewProjectContentRow(project_id=project_id, content_json=payload, updated_at=now))
|
||||
data = _meta(row)
|
||||
data["content"] = payload
|
||||
await session.commit()
|
||||
return data
|
||||
|
||||
async def get_owned(self, project_id: str, owner_id: str, *, with_content: bool = True) -> dict[str, Any] | None:
|
||||
async with self._session_factory() as session:
|
||||
row = await session.get(GoviewProjectRow, project_id)
|
||||
if row is None or not _shared_or_owner(row.owner_id, owner_id):
|
||||
return None
|
||||
data = _meta(row)
|
||||
if with_content:
|
||||
content_row = await session.get(GoviewProjectContentRow, project_id)
|
||||
data["content"] = content_row.content_json if content_row is not None else ""
|
||||
return data
|
||||
|
||||
async def get_published(self, project_id: str) -> dict[str, Any] | None:
|
||||
async with self._session_factory() as session:
|
||||
row = await session.get(GoviewProjectRow, project_id)
|
||||
if row is None or row.state != PUBLISHED:
|
||||
return None
|
||||
content_row = await session.get(GoviewProjectContentRow, project_id)
|
||||
data = _meta(row)
|
||||
data["content"] = content_row.content_json if content_row is not None else ""
|
||||
return data
|
||||
|
||||
async def save_content(self, project_id: str, owner_id: str, content: str) -> dict[str, Any] | None:
|
||||
payload = _check_content(content)
|
||||
async with self._session_factory() as session:
|
||||
row = await session.get(GoviewProjectRow, project_id)
|
||||
if row is None or not _shared_or_owner(row.owner_id, owner_id):
|
||||
return None
|
||||
now = datetime.now(UTC)
|
||||
content_row = await session.get(GoviewProjectContentRow, project_id)
|
||||
if content_row is None:
|
||||
session.add(GoviewProjectContentRow(project_id=project_id, content_json=payload, updated_at=now))
|
||||
else:
|
||||
content_row.content_json = payload
|
||||
content_row.updated_at = now
|
||||
row.updated_at = now
|
||||
data = _meta(row)
|
||||
await session.commit()
|
||||
return data
|
||||
|
||||
async def update_meta(
|
||||
self,
|
||||
project_id: str,
|
||||
owner_id: str,
|
||||
*,
|
||||
project_name: str | None = None,
|
||||
remarks: str | None = None,
|
||||
index_image: str | None = None,
|
||||
fields: set[str],
|
||||
) -> dict[str, Any] | None:
|
||||
async with self._session_factory() as session:
|
||||
row = await session.get(GoviewProjectRow, project_id)
|
||||
if row is None or not _shared_or_owner(row.owner_id, owner_id):
|
||||
return None
|
||||
if "project_name" in fields and project_name is not None:
|
||||
row.project_name = project_name
|
||||
if "remarks" in fields:
|
||||
row.remarks = remarks
|
||||
if "index_image" in fields:
|
||||
row.index_image = index_image
|
||||
row.updated_at = datetime.now(UTC)
|
||||
data = _meta(row)
|
||||
await session.commit()
|
||||
return data
|
||||
|
||||
async def set_state(self, project_id: str, owner_id: str, state: int) -> dict[str, Any] | None:
|
||||
checked = _check_state(state)
|
||||
async with self._session_factory() as session:
|
||||
row = await session.get(GoviewProjectRow, project_id)
|
||||
if row is None or not _shared_or_owner(row.owner_id, owner_id):
|
||||
return None
|
||||
row.state = checked
|
||||
row.updated_at = datetime.now(UTC)
|
||||
data = _meta(row)
|
||||
await session.commit()
|
||||
return data
|
||||
|
||||
async def delete_owned(self, project_id: str, owner_id: str) -> bool:
|
||||
async with self._session_factory() as session:
|
||||
row = await session.get(GoviewProjectRow, project_id)
|
||||
if row is None or row.owner_id != owner_id or row.owner_id == DEMO_OWNER:
|
||||
return False
|
||||
content_row = await session.get(GoviewProjectContentRow, project_id)
|
||||
if content_row is not None:
|
||||
await session.delete(content_row)
|
||||
await session.delete(row)
|
||||
await session.commit()
|
||||
return True
|
||||
|
||||
|
||||
def make_goview_project_store(session_factory: async_sessionmaker[AsyncSession] | None) -> GoviewProjectStore:
|
||||
if session_factory is None:
|
||||
return MemoryGoviewProjectStore()
|
||||
return SqlGoviewProjectStore(session_factory)
|
||||
+372
@@ -0,0 +1,372 @@
|
||||
"""Personal and market template persistence for GoView."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import uuid
|
||||
from abc import ABC, abstractmethod
|
||||
from datetime import UTC, datetime
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy import func, select
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker
|
||||
|
||||
from deerflow.persistence.goview.models import GoviewTemplateRow
|
||||
from deerflow.persistence.goview.project_store import MAX_CONTENT_CHARS, GoviewRejected
|
||||
|
||||
PERSONAL = "personal"
|
||||
MARKET = "market"
|
||||
|
||||
|
||||
def new_template_id() -> str:
|
||||
return "tpl_" + uuid.uuid4().hex[:16]
|
||||
|
||||
|
||||
def _check_content(content: str) -> str:
|
||||
if not isinstance(content, str) or len(content) > MAX_CONTENT_CHARS:
|
||||
raise GoviewRejected("模板内容过大或无效")
|
||||
return content
|
||||
|
||||
|
||||
def _meta_from_mapping(row: Any) -> dict[str, Any]:
|
||||
return {
|
||||
"id": row.id,
|
||||
"name": row.name,
|
||||
"description": row.description,
|
||||
"cover_image": row.cover_image,
|
||||
"owner_id": row.owner_id,
|
||||
"scope": row.scope,
|
||||
"is_builtin": bool(row.is_builtin),
|
||||
"sort_order": row.sort_order,
|
||||
"created_at": row.created_at,
|
||||
"updated_at": row.updated_at,
|
||||
}
|
||||
|
||||
|
||||
_LIST_COLUMNS = (
|
||||
GoviewTemplateRow.id,
|
||||
GoviewTemplateRow.name,
|
||||
GoviewTemplateRow.description,
|
||||
GoviewTemplateRow.cover_image,
|
||||
GoviewTemplateRow.owner_id,
|
||||
GoviewTemplateRow.scope,
|
||||
GoviewTemplateRow.is_builtin,
|
||||
GoviewTemplateRow.sort_order,
|
||||
GoviewTemplateRow.created_at,
|
||||
GoviewTemplateRow.updated_at,
|
||||
)
|
||||
|
||||
|
||||
class GoviewTemplateStore(ABC):
|
||||
@abstractmethod
|
||||
async def list_personal(self, owner_id: str, *, page: int, limit: int) -> tuple[list[dict[str, Any]], int]:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def list_market(self, *, page: int, limit: int) -> tuple[list[dict[str, Any]], int]:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def get(self, template_id: str) -> dict[str, Any] | None:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def create_personal(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
description: str | None,
|
||||
cover_image: str | None,
|
||||
content: str,
|
||||
owner_id: str,
|
||||
) -> dict[str, Any]:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def update_meta(
|
||||
self,
|
||||
template_id: str,
|
||||
*,
|
||||
name: str | None = None,
|
||||
description: str | None = None,
|
||||
cover_image: str | None = None,
|
||||
fields: set[str],
|
||||
) -> dict[str, Any] | None:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def delete(self, template_id: str) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def insert_if_absent(self, item: dict[str, Any]) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def refresh_builtin_content(self, template_id: str, content: str) -> bool:
|
||||
"""Replace a builtin template canvas. Names and covers stay as stored."""
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class MemoryGoviewTemplateStore(GoviewTemplateStore):
|
||||
def __init__(self) -> None:
|
||||
self._rows: dict[str, dict[str, Any]] = {}
|
||||
|
||||
def _visible(self, record: dict[str, Any]) -> dict[str, Any]:
|
||||
data = dict(record)
|
||||
data.pop("content", None)
|
||||
return data
|
||||
|
||||
async def list_personal(self, owner_id: str, *, page: int, limit: int) -> tuple[list[dict[str, Any]], int]:
|
||||
rows = [
|
||||
item
|
||||
for item in self._rows.values()
|
||||
if item["owner_id"] == owner_id and item["scope"] == PERSONAL
|
||||
]
|
||||
rows.sort(key=lambda item: (item["updated_at"], item["id"]), reverse=True)
|
||||
start = (page - 1) * limit
|
||||
return [self._visible(item) for item in rows[start : start + limit]], len(rows)
|
||||
|
||||
async def list_market(self, *, page: int, limit: int) -> tuple[list[dict[str, Any]], int]:
|
||||
rows = [item for item in self._rows.values() if item["scope"] == MARKET]
|
||||
rows.sort(key=lambda item: (item["sort_order"], item["id"]))
|
||||
start = (page - 1) * limit
|
||||
return [self._visible(item) for item in rows[start : start + limit]], len(rows)
|
||||
|
||||
async def get(self, template_id: str) -> dict[str, Any] | None:
|
||||
record = self._rows.get(template_id)
|
||||
return dict(record) if record is not None else None
|
||||
|
||||
async def create_personal(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
description: str | None,
|
||||
cover_image: str | None,
|
||||
content: str,
|
||||
owner_id: str,
|
||||
) -> dict[str, Any]:
|
||||
now = datetime.now(UTC)
|
||||
template_id = new_template_id()
|
||||
record = {
|
||||
"id": template_id,
|
||||
"name": name,
|
||||
"description": description,
|
||||
"cover_image": cover_image,
|
||||
"content": _check_content(content),
|
||||
"owner_id": owner_id,
|
||||
"scope": PERSONAL,
|
||||
"is_builtin": False,
|
||||
"sort_order": 0,
|
||||
"created_at": now,
|
||||
"updated_at": now,
|
||||
}
|
||||
self._rows[template_id] = record
|
||||
return dict(record)
|
||||
|
||||
async def update_meta(
|
||||
self,
|
||||
template_id: str,
|
||||
*,
|
||||
name: str | None = None,
|
||||
description: str | None = None,
|
||||
cover_image: str | None = None,
|
||||
fields: set[str],
|
||||
) -> dict[str, Any] | None:
|
||||
record = self._rows.get(template_id)
|
||||
if record is None:
|
||||
return None
|
||||
if "name" in fields and name is not None:
|
||||
record["name"] = name
|
||||
if "description" in fields:
|
||||
record["description"] = description
|
||||
if "cover_image" in fields:
|
||||
record["cover_image"] = cover_image
|
||||
record["updated_at"] = datetime.now(UTC)
|
||||
return dict(record)
|
||||
|
||||
async def delete(self, template_id: str) -> bool:
|
||||
return self._rows.pop(template_id, None) is not None
|
||||
|
||||
async def insert_if_absent(self, item: dict[str, Any]) -> bool:
|
||||
template_id = item["id"]
|
||||
if template_id in self._rows:
|
||||
return False
|
||||
now = datetime.now(UTC)
|
||||
self._rows[template_id] = {
|
||||
"id": template_id,
|
||||
"name": item["name"],
|
||||
"description": item.get("description"),
|
||||
"cover_image": item.get("cover_image"),
|
||||
"content": _check_content(item["content"]),
|
||||
"owner_id": item.get("owner_id"),
|
||||
"scope": item.get("scope") or MARKET,
|
||||
"is_builtin": bool(item.get("is_builtin", True)),
|
||||
"sort_order": int(item.get("sort_order") or 0),
|
||||
"created_at": now,
|
||||
"updated_at": now,
|
||||
}
|
||||
return True
|
||||
|
||||
async def refresh_builtin_content(self, template_id: str, content: str) -> bool:
|
||||
record = self._rows.get(template_id)
|
||||
if record is None or not record.get("is_builtin"):
|
||||
return False
|
||||
checked = _check_content(content)
|
||||
if record.get("content") == checked:
|
||||
return False
|
||||
record["content"] = checked
|
||||
return True
|
||||
|
||||
|
||||
class SqlGoviewTemplateStore(GoviewTemplateStore):
|
||||
def __init__(self, session_factory: async_sessionmaker[AsyncSession]) -> None:
|
||||
self._session_factory = session_factory
|
||||
|
||||
async def list_personal(self, owner_id: str, *, page: int, limit: int) -> tuple[list[dict[str, Any]], int]:
|
||||
async with self._session_factory() as session:
|
||||
where = (GoviewTemplateRow.owner_id == owner_id) & (GoviewTemplateRow.scope == PERSONAL)
|
||||
total = await session.scalar(select(func.count()).select_from(GoviewTemplateRow).where(where))
|
||||
stmt = (
|
||||
select(*_LIST_COLUMNS)
|
||||
.where(where)
|
||||
.order_by(GoviewTemplateRow.updated_at.desc(), GoviewTemplateRow.id.desc())
|
||||
.offset((page - 1) * limit)
|
||||
.limit(limit)
|
||||
)
|
||||
rows = (await session.execute(stmt)).all()
|
||||
return [_meta_from_mapping(row) for row in rows], int(total or 0)
|
||||
|
||||
async def list_market(self, *, page: int, limit: int) -> tuple[list[dict[str, Any]], int]:
|
||||
async with self._session_factory() as session:
|
||||
where = GoviewTemplateRow.scope == MARKET
|
||||
total = await session.scalar(select(func.count()).select_from(GoviewTemplateRow).where(where))
|
||||
stmt = (
|
||||
select(*_LIST_COLUMNS)
|
||||
.where(where)
|
||||
.order_by(GoviewTemplateRow.sort_order.asc(), GoviewTemplateRow.id.asc())
|
||||
.offset((page - 1) * limit)
|
||||
.limit(limit)
|
||||
)
|
||||
rows = (await session.execute(stmt)).all()
|
||||
return [_meta_from_mapping(row) for row in rows], int(total or 0)
|
||||
|
||||
async def get(self, template_id: str) -> dict[str, Any] | None:
|
||||
async with self._session_factory() as session:
|
||||
row = await session.get(GoviewTemplateRow, template_id)
|
||||
if row is None:
|
||||
return None
|
||||
data = _meta_from_mapping(row)
|
||||
data["content"] = row.content_json
|
||||
return data
|
||||
|
||||
async def create_personal(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
description: str | None,
|
||||
cover_image: str | None,
|
||||
content: str,
|
||||
owner_id: str,
|
||||
) -> dict[str, Any]:
|
||||
now = datetime.now(UTC)
|
||||
row = GoviewTemplateRow(
|
||||
id=new_template_id(),
|
||||
name=name,
|
||||
description=description,
|
||||
cover_image=cover_image,
|
||||
content_json=_check_content(content),
|
||||
owner_id=owner_id,
|
||||
scope=PERSONAL,
|
||||
is_builtin=False,
|
||||
sort_order=0,
|
||||
created_at=now,
|
||||
updated_at=now,
|
||||
)
|
||||
async with self._session_factory() as session:
|
||||
session.add(row)
|
||||
data = _meta_from_mapping(row)
|
||||
data["content"] = row.content_json
|
||||
await session.commit()
|
||||
return data
|
||||
|
||||
async def update_meta(
|
||||
self,
|
||||
template_id: str,
|
||||
*,
|
||||
name: str | None = None,
|
||||
description: str | None = None,
|
||||
cover_image: str | None = None,
|
||||
fields: set[str],
|
||||
) -> dict[str, Any] | None:
|
||||
async with self._session_factory() as session:
|
||||
row = await session.get(GoviewTemplateRow, template_id)
|
||||
if row is None:
|
||||
return None
|
||||
if "name" in fields and name is not None:
|
||||
row.name = name
|
||||
if "description" in fields:
|
||||
row.description = description
|
||||
if "cover_image" in fields:
|
||||
row.cover_image = cover_image
|
||||
row.updated_at = datetime.now(UTC)
|
||||
data = _meta_from_mapping(row)
|
||||
data["content"] = row.content_json
|
||||
await session.commit()
|
||||
return data
|
||||
|
||||
async def delete(self, template_id: str) -> bool:
|
||||
async with self._session_factory() as session:
|
||||
row = await session.get(GoviewTemplateRow, template_id)
|
||||
if row is None:
|
||||
return False
|
||||
await session.delete(row)
|
||||
await session.commit()
|
||||
return True
|
||||
|
||||
async def insert_if_absent(self, item: dict[str, Any]) -> bool:
|
||||
async with self._session_factory() as session:
|
||||
existing = await session.get(GoviewTemplateRow, item["id"])
|
||||
if existing is not None:
|
||||
return False
|
||||
now = datetime.now(UTC)
|
||||
session.add(
|
||||
GoviewTemplateRow(
|
||||
id=item["id"],
|
||||
name=item["name"],
|
||||
description=item.get("description"),
|
||||
cover_image=item.get("cover_image"),
|
||||
content_json=_check_content(item["content"]),
|
||||
owner_id=item.get("owner_id"),
|
||||
scope=item.get("scope") or MARKET,
|
||||
is_builtin=bool(item.get("is_builtin", True)),
|
||||
sort_order=int(item.get("sort_order") or 0),
|
||||
created_at=now,
|
||||
updated_at=now,
|
||||
)
|
||||
)
|
||||
try:
|
||||
await session.commit()
|
||||
except IntegrityError:
|
||||
await session.rollback()
|
||||
return False
|
||||
return True
|
||||
|
||||
async def refresh_builtin_content(self, template_id: str, content: str) -> bool:
|
||||
checked = _check_content(content)
|
||||
async with self._session_factory() as session:
|
||||
row = await session.get(GoviewTemplateRow, template_id)
|
||||
if row is None or not row.is_builtin:
|
||||
return False
|
||||
if row.content_json == checked:
|
||||
return False
|
||||
row.content_json = checked
|
||||
await session.commit()
|
||||
return True
|
||||
|
||||
|
||||
def make_goview_template_store(session_factory: async_sessionmaker[AsyncSession] | None) -> GoviewTemplateStore:
|
||||
if session_factory is None:
|
||||
return MemoryGoviewTemplateStore()
|
||||
return SqlGoviewTemplateStore(session_factory)
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
"""Add configurable visual-dashboard projects and data snapshots.
|
||||
|
||||
Revision ID: 20261110_01
|
||||
Revises: 20261102_02
|
||||
Create Date: 2026-11-10
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
from deerflow.persistence.types import PortableLongText
|
||||
|
||||
revision = "20261110_01"
|
||||
down_revision = "20261102_02"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
_PROJECTS = "visual_dashboard_projects"
|
||||
_SNAPSHOTS = "visual_dashboard_snapshots"
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
inspector = sa.inspect(op.get_bind())
|
||||
if not inspector.has_table(_PROJECTS):
|
||||
op.create_table(
|
||||
_PROJECTS,
|
||||
sa.Column("id", sa.String(length=64), primary_key=True),
|
||||
sa.Column("slug", sa.String(length=64), nullable=False),
|
||||
sa.Column("name", sa.String(length=191), nullable=False),
|
||||
sa.Column("remarks", sa.String(length=512), nullable=True),
|
||||
sa.Column("draft_canvas_json", PortableLongText(), nullable=False),
|
||||
sa.Column("draft_bindings_json", PortableLongText(), nullable=False),
|
||||
sa.Column("published_canvas_json", PortableLongText(), nullable=True),
|
||||
sa.Column("published_bindings_json", PortableLongText(), nullable=True),
|
||||
sa.Column("agent_id", sa.String(length=64), nullable=True),
|
||||
sa.Column("chain_id", sa.String(length=64), nullable=True),
|
||||
sa.Column("draft_revision", sa.Integer(), nullable=False),
|
||||
sa.Column("published_revision", sa.Integer(), nullable=True),
|
||||
sa.Column("created_by", sa.String(length=64), nullable=True),
|
||||
sa.Column("updated_by", sa.String(length=64), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False),
|
||||
sa.Column("updated_at", sa.DateTime(timezone=True), nullable=False),
|
||||
sa.UniqueConstraint("slug", name="uq_visual_dashboard_projects_slug"),
|
||||
)
|
||||
if not inspector.has_table(_SNAPSHOTS):
|
||||
op.create_table(
|
||||
_SNAPSHOTS,
|
||||
sa.Column("id", sa.String(length=64), primary_key=True),
|
||||
sa.Column("dashboard_id", sa.String(length=64), nullable=False),
|
||||
sa.Column("task_id", sa.String(length=128), nullable=False),
|
||||
sa.Column("data_key", sa.String(length=96), nullable=False),
|
||||
sa.Column("payload_json", PortableLongText(), nullable=False),
|
||||
sa.Column("schema_version", sa.String(length=32), nullable=False),
|
||||
sa.Column("source_type", sa.String(length=32), nullable=False),
|
||||
sa.Column("source_ref", sa.String(length=128), nullable=True),
|
||||
sa.Column("refresh_status", sa.String(length=24), nullable=False),
|
||||
sa.Column("error_message", PortableLongText(), nullable=True),
|
||||
sa.Column("updated_by", sa.String(length=64), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False),
|
||||
sa.Column("updated_at", sa.DateTime(timezone=True), nullable=False),
|
||||
sa.UniqueConstraint(
|
||||
"dashboard_id",
|
||||
"task_id",
|
||||
"data_key",
|
||||
name="uq_visual_dashboard_snapshots_key",
|
||||
),
|
||||
)
|
||||
op.create_index(
|
||||
"ix_visual_dashboard_snapshots_dashboard_id",
|
||||
_SNAPSHOTS,
|
||||
["dashboard_id"],
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
inspector = sa.inspect(op.get_bind())
|
||||
if inspector.has_table(_SNAPSHOTS):
|
||||
op.drop_table(_SNAPSHOTS)
|
||||
if inspector.has_table(_PROJECTS):
|
||||
op.drop_table(_PROJECTS)
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
"""Replace the unused visual-dashboard tables with GoView projects and templates.
|
||||
|
||||
Revision ID: 20261110_02
|
||||
Revises: 20261110_01
|
||||
Create Date: 2026-11-10
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
from deerflow.persistence.types import PortableLongText
|
||||
|
||||
revision = "20261110_02"
|
||||
down_revision = "20261110_01"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
_OLD_SNAPSHOTS = "visual_dashboard_snapshots"
|
||||
_OLD_PROJECTS = "visual_dashboard_projects"
|
||||
_PROJECTS = "goview_projects"
|
||||
_CONTENTS = "goview_project_contents"
|
||||
_TEMPLATES = "goview_templates"
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
inspector = sa.inspect(op.get_bind())
|
||||
if inspector.has_table(_OLD_SNAPSHOTS):
|
||||
op.drop_table(_OLD_SNAPSHOTS)
|
||||
if inspector.has_table(_OLD_PROJECTS):
|
||||
op.drop_table(_OLD_PROJECTS)
|
||||
inspector = sa.inspect(op.get_bind())
|
||||
if not inspector.has_table(_PROJECTS):
|
||||
op.create_table(
|
||||
_PROJECTS,
|
||||
sa.Column("id", sa.String(length=64), primary_key=True),
|
||||
sa.Column("project_name", sa.String(length=255), nullable=False),
|
||||
sa.Column("remarks", sa.String(length=512), nullable=True),
|
||||
sa.Column("state", sa.Integer(), nullable=False),
|
||||
sa.Column("index_image", sa.String(length=1024), nullable=True),
|
||||
sa.Column("owner_id", sa.String(length=64), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False),
|
||||
sa.Column("updated_at", sa.DateTime(timezone=True), nullable=False),
|
||||
)
|
||||
op.create_index("ix_goview_projects_owner_id", _PROJECTS, ["owner_id"])
|
||||
if not inspector.has_table(_CONTENTS):
|
||||
op.create_table(
|
||||
_CONTENTS,
|
||||
sa.Column("project_id", sa.String(length=64), primary_key=True),
|
||||
sa.Column("content_json", PortableLongText(), nullable=False),
|
||||
sa.Column("updated_at", sa.DateTime(timezone=True), nullable=False),
|
||||
)
|
||||
if not inspector.has_table(_TEMPLATES):
|
||||
op.create_table(
|
||||
_TEMPLATES,
|
||||
sa.Column("id", sa.String(length=64), primary_key=True),
|
||||
sa.Column("name", sa.String(length=255), nullable=False),
|
||||
sa.Column("description", sa.String(length=512), nullable=True),
|
||||
sa.Column("cover_image", sa.String(length=1024), nullable=True),
|
||||
sa.Column("content_json", PortableLongText(), nullable=False),
|
||||
sa.Column("owner_id", sa.String(length=64), nullable=True),
|
||||
sa.Column("scope", sa.String(length=16), nullable=False),
|
||||
sa.Column("is_builtin", sa.Boolean(), nullable=False),
|
||||
sa.Column("sort_order", sa.Integer(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False),
|
||||
sa.Column("updated_at", sa.DateTime(timezone=True), nullable=False),
|
||||
)
|
||||
op.create_index("ix_goview_templates_owner_id", _TEMPLATES, ["owner_id"])
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
inspector = sa.inspect(op.get_bind())
|
||||
if inspector.has_table(_TEMPLATES):
|
||||
op.drop_table(_TEMPLATES)
|
||||
if inspector.has_table(_CONTENTS):
|
||||
op.drop_table(_CONTENTS)
|
||||
if inspector.has_table(_PROJECTS):
|
||||
op.drop_table(_PROJECTS)
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
"""Drop the unused visual-dashboard tables left behind by 20261110_02.
|
||||
|
||||
Revision ID: 20261110_03
|
||||
Revises: 20261110_02
|
||||
Create Date: 2026-11-10
|
||||
|
||||
``20261110_02`` already drops these tables. This revision repeats the drop so a
|
||||
database that reached ``20261110_02`` while the tables were still registered on
|
||||
``Base.metadata`` does not keep them after ``create_all``.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision = "20261110_03"
|
||||
down_revision = "20261110_02"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
bind = op.get_bind()
|
||||
inspector = sa.inspect(bind)
|
||||
if inspector.has_table("visual_dashboard_snapshots"):
|
||||
op.drop_table("visual_dashboard_snapshots")
|
||||
if inspector.has_table("visual_dashboard_projects"):
|
||||
op.drop_table("visual_dashboard_projects")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
return None
|
||||
+8
@@ -185,6 +185,11 @@ from deerflow.persistence.upload_policy.model import UploadPolicyRow
|
||||
from deerflow.persistence.user.model import UserRow
|
||||
from deerflow.persistence.user_preferences.model import UserPreferencesRow
|
||||
from deerflow.persistence.user_prompts.model import UserCustomPromptRow
|
||||
from deerflow.persistence.goview.models import (
|
||||
GoviewProjectContentRow,
|
||||
GoviewProjectRow,
|
||||
GoviewTemplateRow,
|
||||
)
|
||||
from deerflow.persistence.workflow_data_sources.model import WorkflowDataSourceRow
|
||||
from deerflow.persistence.workflow_events.model import WorkflowRunEventRow
|
||||
from deerflow.persistence.workflow_planning.model import (
|
||||
@@ -359,4 +364,7 @@ __all__ = [
|
||||
"UserMemoryConfigRow",
|
||||
"UserPreferencesRow",
|
||||
"UserRow",
|
||||
"GoviewProjectContentRow",
|
||||
"GoviewProjectRow",
|
||||
"GoviewTemplateRow",
|
||||
]
|
||||
+27
-14
@@ -88,6 +88,10 @@ def extract_json_object(text: str | None) -> dict[str, Any] | None:
|
||||
return None
|
||||
candidate = text.strip()
|
||||
|
||||
# Strip reasoning blocks some models prepend (<think>…</think>).
|
||||
candidate = re.sub(r"<think>.*?</think>", "", candidate, flags=re.DOTALL | re.IGNORECASE)
|
||||
candidate = re.sub(r"</?think>", "", candidate).strip()
|
||||
|
||||
# Strip a single ```json ... ``` (or ``` ... ```) fence if present.
|
||||
fence = re.search(r"```(?:json)?\s*(.*?)```", candidate, flags=re.DOTALL | re.IGNORECASE)
|
||||
if fence:
|
||||
@@ -100,15 +104,24 @@ def extract_json_object(text: str | None) -> dict[str, Any] | None:
|
||||
except (ValueError, TypeError):
|
||||
pass
|
||||
|
||||
# Fallback: scan for the first balanced ``{ ... }`` and parse that.
|
||||
start = candidate.find("{")
|
||||
if start == -1:
|
||||
def _loads_lenient(blob: str) -> dict[str, Any] | None:
|
||||
# Tolerate trailing commas the model sometimes leaves before } or ].
|
||||
cleaned = re.sub(r",\s*([\]}])", chr(92) + chr(49), blob)
|
||||
for attempt in (blob, cleaned):
|
||||
try:
|
||||
parsed = json.loads(attempt)
|
||||
except (ValueError, TypeError):
|
||||
continue
|
||||
return parsed if isinstance(parsed, dict) else None
|
||||
return None
|
||||
|
||||
# Fallback: scan balanced ``{ ... }`` blocks; keep going when a block fails
|
||||
# (prose may contain stray braces before the real JSON payload).
|
||||
depth = 0
|
||||
in_string = False
|
||||
escape = False
|
||||
for index in range(start, len(candidate)):
|
||||
char = candidate[index]
|
||||
start = -1
|
||||
for index, char in enumerate(candidate):
|
||||
if in_string:
|
||||
if escape:
|
||||
escape = False
|
||||
@@ -120,16 +133,16 @@ def extract_json_object(text: str | None) -> dict[str, Any] | None:
|
||||
if char == '"':
|
||||
in_string = True
|
||||
elif char == "{":
|
||||
depth += 1
|
||||
elif char == "}":
|
||||
depth -= 1
|
||||
if depth == 0:
|
||||
blob = candidate[start : index + 1]
|
||||
try:
|
||||
parsed = json.loads(blob)
|
||||
except (ValueError, TypeError):
|
||||
return None
|
||||
return parsed if isinstance(parsed, dict) else None
|
||||
start = index
|
||||
depth += 1
|
||||
elif char == "}" and depth:
|
||||
depth -= 1
|
||||
if depth == 0 and start != -1:
|
||||
parsed = _loads_lenient(candidate[start : index + 1])
|
||||
if parsed is not None:
|
||||
return parsed
|
||||
start = -1
|
||||
return None
|
||||
|
||||
|
||||
|
||||
+16
@@ -1519,6 +1519,9 @@ class ScheduledTaskService:
|
||||
parsed = html_page_utils.extract_json_object(raw)
|
||||
if parsed is None:
|
||||
last_problems = ["模型未返回可解析的 JSON 对象"]
|
||||
# 记录原始输出预览,便于诊断模型行为(截断到 600 字符)。
|
||||
preview = repr(raw[:600]) if isinstance(raw, str) else repr(raw)
|
||||
logger.info("模板填充[run=%s]模型原始输出预览: %s", run_id, preview)
|
||||
else:
|
||||
candidate = parsed # 记住最后一个可解析结果,供重试耗尽时尽力返回
|
||||
errors = [f"结构错误:{e}" for e in template_fill.validate_data(template_id, candidate)]
|
||||
@@ -1706,9 +1709,22 @@ class ScheduledTaskService:
|
||||
page_title, page_subtitle = template_fill.pop_page_titles(converted)
|
||||
# 子页面没抽到有效内容的,回退模板原有数据,避免子页面空白。
|
||||
data_obj = template_fill.merge_with_reference(tpl_id, converted)
|
||||
# 分支级诊断:记录哪些顶层分支被回退(空内容/字段错位)。
|
||||
_branch_lines = []
|
||||
for _k, _v in converted.items():
|
||||
_n_new = len(_v) if isinstance(_v, list) else "-"
|
||||
_n_final = len(data_obj.get(_k) or []) if isinstance(data_obj.get(_k), list) else "-"
|
||||
if _n_new != "-" and _n_final == "-":
|
||||
_branch_lines.append(f"{_k}: 转换{_n_new}条→回退原数据")
|
||||
elif _n_new != "-" and _n_new != _n_final:
|
||||
_branch_lines.append(f"{_k}: 转换{_n_new}条→合并{_n_final}条")
|
||||
if _branch_lines:
|
||||
logger.info("模板参考[run=%s]分支合并情况: %s", run_id, ";".join(_branch_lines))
|
||||
# 字段管理里「接受抽取更新」被关闭(锁定)的字段,恢复模板现有值,
|
||||
# 抽取结果不覆盖——对本次产物与(开启时的)数据写回同时生效。
|
||||
data_obj = template_store.restore_locked_fields(tpl_id, data_obj)
|
||||
# 隐藏字段为值级:抽取合并后清空其值,防止任务把隐藏字段重新填回页面。
|
||||
template_store.clear_hidden_field_values(tpl_id, data_obj)
|
||||
content = f"已检索数据并套用模板「{spec.name}」(空子页面回退原数据,含全部子页面)"
|
||||
used_default = False
|
||||
if writeback:
|
||||
|
||||
+181
-77
@@ -118,8 +118,20 @@ DATA_MARKER = "__PAGE_DATA__"
|
||||
MANIFEST_MARKER = "__PAGE_MANIFEST__"
|
||||
RUNTIME_MARKER = "__PAGE_RUNTIME__"
|
||||
STRUCTURED_MARKERS: tuple[str, ...] = (DATA_MARKER, MANIFEST_MARKER, RUNTIME_MARKER)
|
||||
# 结构化模板目录里的组成文件(manifest.json 可选,其余必备)。
|
||||
STRUCTURED_PARTS: tuple[str, ...] = ("template.html", "runtime.js", "data.json", "manifest.json")
|
||||
_MARKER_RE = re.compile(r"__PAGE_[A-Z0-9_]+__")
|
||||
# 结构化模板目录里的必备件。
|
||||
STRUCTURED_PARTS: tuple[str, ...] = ("template.html", "runtime.js", "data.json")
|
||||
# 可选件:seed/reset 按存在复制;骨架里可写 __PAGE_<NAME>__ 扩展标记引用同名件
|
||||
# (NAME 小写、下划线转连字符,如 KNOWLEDGE→knowledge.json、SOURCE_LOCAL→source-local.json)。
|
||||
STRUCTURED_OPTIONAL_PARTS: tuple[str, ...] = (
|
||||
"manifest.json", "fields.json", "knowledge.json", "source-local.json",
|
||||
)
|
||||
|
||||
|
||||
def _marker_part_name(marker: str) -> str:
|
||||
"""扩展标记 → 可选件文件名(``__PAGE_SOURCE_LOCAL__`` → ``source-local.json``)。"""
|
||||
inner = marker[len("__PAGE_") : -len("__")]
|
||||
return inner.lower().replace("_", "-") + ".json"
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -180,199 +192,259 @@ TEMPLATES: tuple[TemplateSpec, ...] = (
|
||||
id="no2",
|
||||
name="no.2",
|
||||
description="",
|
||||
file="no2/taiwan_air_force_v3_2.html",
|
||||
# 暂只展示已有数据,不做 JSON 转换/填充(后续接入转换后再开)。
|
||||
convertible=False,
|
||||
file="no2/template.html",
|
||||
# 结构化模板:骨架+runtime+data/knowledge/source-local/manifest/fields,
|
||||
# KNOWLEDGE/SOURCE_LOCAL 经 __PAGE_KNOWLEDGE__/__PAGE_SOURCE_LOCAL__ 扩展标记注入。
|
||||
kind="structured",
|
||||
legacy_file="no2/taiwan_air_force_v3_2.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no3",
|
||||
name="no.3",
|
||||
description="",
|
||||
file="no3/no3.html",
|
||||
# 无 const DATA= 注入点,暂只展示已有数据(后续接入转换后再开)。
|
||||
convertible=False,
|
||||
file="no3/template.html",
|
||||
# 结构化模板:骨架+runtime+data/manifest/fields,页面隐藏/字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no3/no3.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no4",
|
||||
name="no.4",
|
||||
description="",
|
||||
file="no4/no4.html",
|
||||
# 数据存于 <script id="app-data" type="application/json"> 元素(非 const DATA= 行),
|
||||
# 当前引擎只支持 const VAR= 行注入,故暂注册为只展示;接转换需扩展元素注入。
|
||||
convertible=False,
|
||||
file="no4/template.html",
|
||||
# 结构化模板:骨架+runtime+data(8 顶层键,40 数据集)/manifest(6 页面)/fields
|
||||
# (267 字段),页面隐藏/字段值级隐藏/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no4/no4.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no5",
|
||||
name="no.5",
|
||||
description="",
|
||||
file="no5/no5.html",
|
||||
# 数据用 `let DATA = {…}`(let + 空格,非 const DATA= 行),当前引擎不匹配,
|
||||
# 故暂注册为只展示;接转换需扩展行注入正则。
|
||||
convertible=False,
|
||||
file="no5/template.html",
|
||||
# 结构化模板:骨架+runtime+data(8 顶层键,含 navigation.tabs/ui.field_labels)
|
||||
# /manifest(5 页面)/fields(68 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no5/no5.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no6",
|
||||
name="no.6",
|
||||
description="",
|
||||
file="no6/no6.html",
|
||||
# 数据用 `const DATA = {…}`(= 前有空格,当前引擎正则要求 const DATA=),不匹配,
|
||||
# 故暂注册为只展示;接转换需放宽行注入正则。
|
||||
convertible=False,
|
||||
file="no6/template.html",
|
||||
# 结构化模板:骨架+runtime+data(14 顶层分支,11 页面)/manifest/fields
|
||||
# (108 中文字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no6/no6.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no7",
|
||||
name="no.7",
|
||||
description="",
|
||||
file="no7/no7.html",
|
||||
# 数据存于 <script id="PAGE_DATA" type="application/json"> 元素(同 no.4 类元素注入),
|
||||
# 当前引擎只支持 const VAR= 行注入,故暂注册为只展示;接转换需扩展元素注入。
|
||||
convertible=False,
|
||||
file="no7/template.html",
|
||||
# 结构化模板:骨架+runtime+data(9 顶层键,6 页面)/manifest/fields
|
||||
# (149 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no7/no7.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
# 显示 no.8;id 用 no8b(no8 已被显示名 no.12 的模板占用)。
|
||||
id="no8b",
|
||||
name="no.8",
|
||||
description="",
|
||||
file="no8b/no8b.html",
|
||||
convertible=False,
|
||||
# 结构化模板:骨架 + runtime + 数据 + 页面/字段配置。保留旧单文件,
|
||||
# 以便运行时存储只在用户未修改旧稿时自动升级。
|
||||
file="no8b/template.html",
|
||||
kind="structured",
|
||||
legacy_file="no8b/no8b.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
# 显示 no.9;id 用 no9b(no9 已被显示名 no.13 的模板占用)。
|
||||
id="no9b",
|
||||
name="no.9",
|
||||
description="",
|
||||
file="no9b/no9b.html",
|
||||
convertible=False,
|
||||
# 结构化模板:骨架 + runtime + 数据 + 页面/字段配置。保留旧单文件,
|
||||
# 以便运行时存储只在用户未修改旧稿时自动升级。
|
||||
file="no9b/template.html",
|
||||
kind="structured",
|
||||
legacy_file="no9b/no9b.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no10",
|
||||
name="no.10",
|
||||
description="",
|
||||
file="no10/no10.html",
|
||||
convertible=False,
|
||||
file="no10/template.html",
|
||||
# 结构化模板:骨架+runtime+data(6 顶层键,10 分类页面)/manifest/fields
|
||||
# (110 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no10/no10.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no11",
|
||||
name="no.11",
|
||||
description="",
|
||||
file="no11/no11.html",
|
||||
convertible=False,
|
||||
file="no11/template.html",
|
||||
# 结构化模板:骨架+runtime+data(15 顶层键,10 分类页面)/manifest/fields
|
||||
# (71 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no11/no11.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no8",
|
||||
name="no.12",
|
||||
description="",
|
||||
file="no8/no8.html",
|
||||
# 数据存于 <script id="DATA" type="application/json"> 元素(同 no.4/no.7 元素注入),
|
||||
# 当前引擎只支持 const VAR= 行注入,故暂注册为只展示;接转换需扩展元素注入。
|
||||
convertible=False,
|
||||
file="no8/template.html",
|
||||
# 结构化模板:骨架+runtime+data(11 顶层键,8 分类 tab)/manifest/fields
|
||||
# (73 中文字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no8/no8.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no9",
|
||||
name="no.13",
|
||||
description="",
|
||||
file="no9/no9.html",
|
||||
# 数据用 `const DATA = {…}`(= 前有空格,同 no.6),当前引擎正则要求 const DATA=,不匹配,
|
||||
# 故暂注册为只展示;接转换需放宽行注入正则。
|
||||
convertible=False,
|
||||
file="no9/template.html",
|
||||
# 结构化模板:骨架+runtime+data(18 顶层键,12 页面)/manifest/fields
|
||||
# (110 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no9/no9.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no14",
|
||||
name="no.14",
|
||||
description="",
|
||||
file="no14/no14.html",
|
||||
convertible=False,
|
||||
file="no14/template.html",
|
||||
# 结构化模板:骨架+runtime+data(10 顶层键,11 静态 panel 页面)/manifest/fields
|
||||
# (53 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no14/no14.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no15",
|
||||
name="no.15",
|
||||
description="",
|
||||
file="no15/no15.html",
|
||||
convertible=False,
|
||||
file="no15/template.html",
|
||||
# 结构化模板:骨架+runtime+data(9 顶层键,12 动态 tab 页面)/manifest/fields
|
||||
# (130 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no15/no15.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no16",
|
||||
name="no.16",
|
||||
description="",
|
||||
file="no16/no16.html",
|
||||
convertible=False,
|
||||
file="no16/template.html",
|
||||
# 结构化模板:骨架+runtime+data(16 顶层键,11 动态 tab 页面)/manifest/fields
|
||||
# (123 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no16/no16.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no17",
|
||||
name="no.17",
|
||||
description="",
|
||||
file="no17/no17.html",
|
||||
convertible=False,
|
||||
# 结构化模板:保留原始数据集和全部页签交互,支持页面/字段配置与旧稿升级。
|
||||
file="no17/template.html",
|
||||
kind="structured",
|
||||
legacy_file="no17/no17.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no18",
|
||||
name="no.18",
|
||||
description="",
|
||||
file="no18/no18.html",
|
||||
convertible=False,
|
||||
# 原始静态页面模块被保存为结构化 pages 数据,保留旧单文件用于自动升级。
|
||||
file="no18/template.html",
|
||||
kind="structured",
|
||||
legacy_file="no18/no18.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no19",
|
||||
name="no.19",
|
||||
description="",
|
||||
file="no19/no.19.html",
|
||||
convertible=False,
|
||||
file="no19/template.html",
|
||||
# 结构化模板:骨架+runtime+data(6 个数据集,10 个静态分页)/manifest/fields
|
||||
# (29 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no19/no.19.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no20",
|
||||
name="no.20",
|
||||
description="",
|
||||
file="no20/no.20.html",
|
||||
convertible=False,
|
||||
file="no20/template.html",
|
||||
# 结构化模板:骨架+runtime+data(12 顶层键,11 个动态 tab)/manifest/fields
|
||||
# (65 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no20/no.20.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no21",
|
||||
name="no.21",
|
||||
description="",
|
||||
file="no21/no.21.html",
|
||||
convertible=False,
|
||||
file="no21/template.html",
|
||||
# 结构化模板:骨架+runtime+data(4 顶层键,12 个动态 tab)/manifest/fields
|
||||
# (108 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no21/no.21.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no22",
|
||||
name="no.22",
|
||||
description="",
|
||||
file="no22/no.22.html",
|
||||
convertible=False,
|
||||
file="no22/template.html",
|
||||
# 结构化模板:骨架+runtime+data(19 顶层键,10 个动态 tab)/manifest/fields
|
||||
# (76 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no22/no.22.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no23",
|
||||
name="no.23",
|
||||
description="",
|
||||
file="no23/no.23.html",
|
||||
convertible=False,
|
||||
file="no23/template.html",
|
||||
# 结构化模板:骨架+runtime+data(13 顶层键,10 个分页)/manifest/fields
|
||||
# (39 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no23/no.23.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no24",
|
||||
name="no.24",
|
||||
description="",
|
||||
file="no24/no.24.html",
|
||||
convertible=False,
|
||||
file="no24/template.html",
|
||||
# 结构化模板:骨架+runtime+data(7 顶层键,12 个动态 tab)/manifest/fields
|
||||
# (29 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no24/no.24.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no25",
|
||||
name="no.25",
|
||||
description="",
|
||||
file="no25/no.25.html",
|
||||
convertible=False,
|
||||
# 结构化模板:保留原始动态数据模型、搜索/筛选/详情交互和旧稿升级能力。
|
||||
file="no25/template.html",
|
||||
kind="structured",
|
||||
legacy_file="no25/no.25.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no26",
|
||||
name="no.26",
|
||||
description="",
|
||||
file="no26/no.26.html",
|
||||
convertible=False,
|
||||
file="no26/template.html",
|
||||
# 结构化模板:骨架+runtime+data(2 顶层键,11 个分页)/manifest/fields
|
||||
# (3 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no26/no.26.html",
|
||||
),
|
||||
TemplateSpec(
|
||||
id="no27",
|
||||
name="no.27",
|
||||
description="",
|
||||
file="no27/no.27.html",
|
||||
convertible=False,
|
||||
file="no27/template.html",
|
||||
# 结构化模板:骨架+runtime+data(2 顶层键,11 个分页)/manifest/fields
|
||||
# (8 字段),页面隐藏/值级字段管理/写回全量能力。
|
||||
kind="structured",
|
||||
legacy_file="no27/no.27.html",
|
||||
),
|
||||
)
|
||||
|
||||
@@ -518,7 +590,7 @@ def structured_module_labels(template_id: str) -> list[dict[str, str]]:
|
||||
ref = reference_data(template_id)
|
||||
manifest = _read_default_manifest(template_id)
|
||||
labels: dict[str, str] = {}
|
||||
split_index: dict[str, str] = {}
|
||||
page_seg: dict[str, str] = {}
|
||||
pages = manifest.get("页面")
|
||||
if isinstance(pages, list):
|
||||
for page in pages:
|
||||
@@ -537,14 +609,21 @@ def structured_module_labels(template_id: str) -> list[dict[str, str]]:
|
||||
candidates.append(key)
|
||||
for key in candidates:
|
||||
labels[key] = name
|
||||
first = candidates[0] if candidates else ""
|
||||
if first and "_" in first:
|
||||
for part in first.split("_"):
|
||||
page_seg[key] = name
|
||||
for part in key.split("_"):
|
||||
if part:
|
||||
split_index[part] = name
|
||||
page_seg.setdefault(part, name)
|
||||
out: list[dict[str, str]] = []
|
||||
for key in ref:
|
||||
out.append({"key": key, "label": labels.get(key) or split_index.get(key) or key})
|
||||
label = labels.get(key)
|
||||
if not label:
|
||||
# 双向段匹配:分支键与页面候选键互为子段(如 capability_pressure_matrix
|
||||
# ↔ 页面编号 matrix)时按页面名显示。
|
||||
for part in key.split("_"):
|
||||
if part and part in page_seg:
|
||||
label = page_seg[part]
|
||||
break
|
||||
out.append({"key": key, "label": label or key})
|
||||
return out
|
||||
|
||||
|
||||
@@ -554,6 +633,7 @@ def compose_structured(
|
||||
runtime: str,
|
||||
data: Any,
|
||||
manifest: dict[str, Any] | None = None,
|
||||
extra_parts: dict[str, str] | None = None,
|
||||
) -> str:
|
||||
"""把数据/运行时按标记组合进骨架,产出自包含单文件 HTML。
|
||||
|
||||
@@ -571,22 +651,45 @@ def compose_structured(
|
||||
)
|
||||
out = out.replace(MANIFEST_MARKER, serialized_manifest)
|
||||
out = out.replace(RUNTIME_MARKER, runtime.replace("</script", "<\\/script"))
|
||||
residual = [m for m in STRUCTURED_MARKERS if m in out]
|
||||
for marker, payload in (extra_parts or {}).items():
|
||||
if marker in out:
|
||||
out = out.replace(marker, payload.replace("</", "<" + chr(92) + "/"))
|
||||
residual = _MARKER_RE.findall(out)
|
||||
if residual:
|
||||
raise TemplateError(f"结构化模板组合后仍残留标记:{'、'.join(residual)}")
|
||||
raise TemplateError(f"结构化模板组合后仍残留标记:{','.join(sorted(set(residual)))}")
|
||||
return out
|
||||
|
||||
|
||||
def structured_extra_parts(template_id: str, skeleton: str) -> dict[str, str]:
|
||||
"""解析骨架里的扩展标记,从模板目录读对应可选数据件并序列化。
|
||||
|
||||
标准 DATA/MANIFEST 标记不走这里(它们由 compose 参数注入)。文件缺失的扩展
|
||||
标记跳过——组合后的残留断言会兜底报错。
|
||||
"""
|
||||
parts: dict[str, str] = {}
|
||||
for marker in set(_MARKER_RE.findall(skeleton)):
|
||||
if marker in STRUCTURED_MARKERS:
|
||||
continue
|
||||
path = _structured_part(template_id, _marker_part_name(marker))
|
||||
if path is not None:
|
||||
parts[marker] = json.dumps(
|
||||
json.loads(path.read_text(encoding="utf-8")), ensure_ascii=False
|
||||
)
|
||||
return parts
|
||||
|
||||
|
||||
def read_template_text(template_id: str) -> str:
|
||||
spec = _require(template_id)
|
||||
if spec.structured:
|
||||
# 结构化模板对外始终呈现「组合后的完整文档」(预览/只展示/参考展示共用);
|
||||
# 骨架原文(编辑用)由 template_store.read_template_html 直接读文件。
|
||||
tpl_skeleton = _structured_text(template_id, "template.html")
|
||||
return compose_structured(
|
||||
skeleton=_structured_text(template_id, "template.html"),
|
||||
skeleton=tpl_skeleton,
|
||||
runtime=_structured_text(template_id, "runtime.js"),
|
||||
data=reference_data(template_id),
|
||||
manifest=_read_default_manifest(template_id),
|
||||
extra_parts=structured_extra_parts(template_id, tpl_skeleton),
|
||||
)
|
||||
path = _template_path(spec)
|
||||
if not path.is_file():
|
||||
@@ -998,6 +1101,7 @@ def _fill_structured(
|
||||
runtime=_structured_text(template_id, "runtime.js"),
|
||||
data=data_obj,
|
||||
manifest=manifest,
|
||||
extra_parts=structured_extra_parts(template_id, skeleton),
|
||||
)
|
||||
|
||||
|
||||
|
||||
+202
-3
@@ -157,7 +157,7 @@ def _seed_spec_dir(spec: Any, tpl_dir: Path) -> None:
|
||||
(tpl_dir / name).write_text(
|
||||
(src_root / name).read_text(encoding="utf-8"), encoding="utf-8"
|
||||
)
|
||||
for name in ("manifest.json", "fields.json"):
|
||||
for name in template_fill.STRUCTURED_OPTIONAL_PARTS:
|
||||
optional = src_root / name
|
||||
if optional.is_file():
|
||||
(tpl_dir / name).write_text(
|
||||
@@ -418,13 +418,212 @@ def write_template_field_visibility(
|
||||
"""字段显示/隐藏配置:manifest 的「字段显示」记 {label: false}(未记录=显示)。
|
||||
|
||||
标签须来自字段目录(fields.json),防止把「系统设置」里的同名键写坏。
|
||||
隐藏为**值级**:新隐藏的字段,其数据键在 data.json 各条目中清空——卡片/详情
|
||||
等一切渲染路径立即不再显示该字段内容;恢复显示后值为空,需重新抽取或填写。
|
||||
"""
|
||||
catalog = {f["label"] for f in read_template_fields(template_id)}
|
||||
unknown = [x for x in hidden_labels if x not in catalog]
|
||||
if unknown:
|
||||
raise TemplateStoreError("未知字段:" + "、".join(unknown[:5]))
|
||||
hidden = {label: False for label in hidden_labels}
|
||||
return _write_manifest_section(template_id, "字段显示", hidden)
|
||||
meta = _write_manifest_section(template_id, "字段显示", hidden)
|
||||
clear_hidden_field_values(template_id)
|
||||
return meta
|
||||
|
||||
|
||||
def clear_hidden_field_values(
|
||||
template_id: str, data_obj: dict[str, Any] | None = None
|
||||
) -> None:
|
||||
"""把当前隐藏字段的值清空。
|
||||
|
||||
``data_obj`` 给出时就地清空该对象(供调度器在抽取合并后调用,防止任务把
|
||||
隐藏字段的值重新填回页面);否则直接清存储的 data.json 并清引擎缓存。
|
||||
"""
|
||||
manifest = read_template_manifest(template_id)
|
||||
hidden = manifest.get("字段显示")
|
||||
hidden = hidden if isinstance(hidden, dict) else {}
|
||||
if not any(v is False for v in hidden.values()):
|
||||
return
|
||||
keys = {
|
||||
str(k)
|
||||
for f in read_template_fields(template_id)
|
||||
if hidden.get(f["label"]) is False
|
||||
for k in (f.get("keys") or [])
|
||||
}
|
||||
if not keys:
|
||||
return
|
||||
|
||||
def _clean(value: Any) -> None:
|
||||
if isinstance(value, list):
|
||||
for item in value:
|
||||
_clean(item)
|
||||
elif isinstance(value, dict):
|
||||
for key in list(value.keys()):
|
||||
if key in keys:
|
||||
value[key] = ""
|
||||
else:
|
||||
_clean(value[key])
|
||||
|
||||
if data_obj is not None:
|
||||
_clean(data_obj)
|
||||
return
|
||||
data = read_template_data(template_id)
|
||||
_clean(data)
|
||||
(store_root() / template_id / "data.json").write_text(
|
||||
_dump_json_checked(data, "数据"), encoding="utf-8"
|
||||
)
|
||||
template_fill.invalidate_cache()
|
||||
|
||||
|
||||
def _read_fields_doc(template_id: str) -> dict[str, Any]:
|
||||
"""读 fields.json 完整文档(含说明头);缺失时创建骨架。"""
|
||||
path = store_root() / template_id / "fields.json"
|
||||
if path.is_file():
|
||||
try:
|
||||
obj = json.loads(path.read_text(encoding="utf-8"))
|
||||
except (OSError, ValueError) as exc:
|
||||
raise TemplateStoreError(f"读取 fields.json 失败:{exc}") from exc
|
||||
if isinstance(obj, dict) and isinstance(obj.get("fields"), list):
|
||||
return obj
|
||||
return {"说明": "字段显示目录:控制详情字段渲染 + 是否接受抽取更新。", "fields": []}
|
||||
|
||||
|
||||
def write_template_pages(template_id: str, pages: list[dict[str, Any]]) -> dict[str, Any]:
|
||||
"""更新模板页面清单(manifest「页面」):编号集合不可增删,可改名称/隐藏标记。
|
||||
|
||||
「隐藏」: true 的页面在产物导航中整体下线(runtime 渲染 tab 时跳过,路由守卫
|
||||
拒绝进入);缺省视为显示。
|
||||
"""
|
||||
_require_structured(template_id)
|
||||
manifest = read_template_manifest(template_id)
|
||||
current = manifest.get("页面")
|
||||
if not isinstance(current, list) or not current:
|
||||
raise TemplateStoreError("模板缺少页面定义,无法更新")
|
||||
current_keys = [str(p.get("编号") or "") for p in current if isinstance(p, dict)]
|
||||
# 页面数据源是模板定义的只读映射,用于让结构化数据编辑器显示用户可读的
|
||||
# 页面名称。配置接口只允许改名称和隐藏状态,保存时必须保留该映射。
|
||||
current_pages = {
|
||||
str(item.get("编号") or "").strip(): item
|
||||
for item in current
|
||||
if isinstance(item, dict)
|
||||
}
|
||||
if not isinstance(pages, list):
|
||||
raise TemplateStoreError("页面清单必须是数组")
|
||||
new_keys = [str(p.get("编号") or "").strip() for p in pages if isinstance(p, dict)]
|
||||
if sorted(filter(None, new_keys)) != sorted(filter(None, current_keys)):
|
||||
raise TemplateStoreError("页面编号不可增删(只能修改名称与隐藏标记)")
|
||||
cleaned: list[dict[str, Any]] = []
|
||||
seen = set()
|
||||
for item in pages:
|
||||
if not isinstance(item, dict):
|
||||
raise TemplateStoreError("页面项必须是对象")
|
||||
key = str(item.get("编号") or "").strip()
|
||||
if not key or key in seen:
|
||||
raise TemplateStoreError(f"页面编号缺失或重复:{key or '(空)'}")
|
||||
seen.add(key)
|
||||
name = str(item.get("名称") or "").strip()
|
||||
if not name:
|
||||
raise TemplateStoreError(f"页面「{key}」名称不能为空")
|
||||
page = {"编号": key, "名称": name, "隐藏": bool(item.get("隐藏"))}
|
||||
for mapping_key in ("数据源", "架构数据"):
|
||||
if mapping_key in current_pages.get(key, {}):
|
||||
page[mapping_key] = current_pages[key][mapping_key]
|
||||
cleaned.append(page)
|
||||
manifest["页面"] = cleaned
|
||||
(store_root() / template_id / "manifest.json").write_text(
|
||||
_dump_json_checked(manifest, "MANIFEST"), encoding="utf-8"
|
||||
)
|
||||
_write_meta(template_id, _load_meta(store_root() / template_id), keep_created=True)
|
||||
template_fill.invalidate_cache()
|
||||
return get_template_meta(template_id) # type: ignore[return-value]
|
||||
|
||||
|
||||
def add_template_field(
|
||||
template_id: str,
|
||||
*,
|
||||
label: str,
|
||||
branch: str,
|
||||
description: str = "",
|
||||
default_value: Any = "",
|
||||
) -> dict[str, Any]:
|
||||
"""向分类(数据分支)添加一个自定义字段,并同步 data.json 与 fields.json。
|
||||
|
||||
- fields.json 追加 {label, pages, description, keys:[key], custom:true}
|
||||
(key 自动生成 custom_<时间戳>,同名 label 拒绝);
|
||||
- data.json 该分支的每个条目补上该键(默认值,默认「待补充」);
|
||||
- 页面端经 __PAGE_FIELDS__ 注入的字段目录会渲染自定义字段。
|
||||
"""
|
||||
_require_structured(template_id)
|
||||
label = (label or "").strip()
|
||||
if not label:
|
||||
raise TemplateStoreError("字段名称不能为空")
|
||||
if branch not in template_fill.reference_data(template_id):
|
||||
raise TemplateStoreError(f"未知数据分支:{branch}")
|
||||
doc = _read_fields_doc(template_id)
|
||||
if any(f.get("label") == label for f in doc["fields"]):
|
||||
raise TemplateStoreError(f"字段「{label}」已存在")
|
||||
ref = template_fill.reference_data(template_id)[branch]
|
||||
if not isinstance(ref, list):
|
||||
raise TemplateStoreError("该分类不是条目列表,无法添加字段")
|
||||
key = f"custom_{datetime.now(UTC).strftime('%Y%m%d%H%M%S%f')[:-3]}"
|
||||
|
||||
# data.json 同步:分支全部条目补键。
|
||||
data = read_template_data(template_id)
|
||||
for item in data.get(branch) or []:
|
||||
if isinstance(item, dict):
|
||||
item[key] = default_value
|
||||
(store_root() / template_id / "data.json").write_text(
|
||||
_dump_json_checked(data, "数据"), encoding="utf-8"
|
||||
)
|
||||
|
||||
doc["fields"].append(
|
||||
{
|
||||
"label": label,
|
||||
"pages": [branch],
|
||||
"description": (description or "").strip() or "自定义字段",
|
||||
"keys": [key],
|
||||
"custom": True,
|
||||
}
|
||||
)
|
||||
(store_root() / template_id / "fields.json").write_text(
|
||||
json.dumps(doc, ensure_ascii=False), encoding="utf-8"
|
||||
)
|
||||
_write_meta(template_id, _load_meta(store_root() / template_id), keep_created=True)
|
||||
template_fill.invalidate_cache()
|
||||
return get_template_meta(template_id) # type: ignore[return-value]
|
||||
|
||||
|
||||
def remove_template_field(template_id: str, label: str) -> dict[str, Any]:
|
||||
"""删除一个自定义字段:fields.json 移除目录项,data.json 各条目移除对应键。
|
||||
|
||||
仅允许删除 custom 标记的字段(模板内置字段不可删,它们的键是转换契约一部分)。
|
||||
"""
|
||||
_require_structured(template_id)
|
||||
doc = _read_fields_doc(template_id)
|
||||
hit = next((f for f in doc["fields"] if f.get("label") == label), None)
|
||||
if hit is None:
|
||||
raise TemplateStoreError(f"字段不存在:{label}")
|
||||
if not hit.get("custom"):
|
||||
raise TemplateStoreError("模板内置字段不可删除")
|
||||
keys = [str(k) for k in (hit.get("keys") or []) if k]
|
||||
|
||||
data = read_template_data(template_id)
|
||||
branch = (hit.get("pages") or [""])[0]
|
||||
for item in data.get(branch) or []:
|
||||
if isinstance(item, dict):
|
||||
for key in keys:
|
||||
item.pop(key, None)
|
||||
(store_root() / template_id / "data.json").write_text(
|
||||
_dump_json_checked(data, "数据"), encoding="utf-8"
|
||||
)
|
||||
|
||||
doc["fields"] = [f for f in doc["fields"] if f.get("label") != label]
|
||||
(store_root() / template_id / "fields.json").write_text(
|
||||
json.dumps(doc, ensure_ascii=False), encoding="utf-8"
|
||||
)
|
||||
_write_meta(template_id, _load_meta(store_root() / template_id), keep_created=True)
|
||||
template_fill.invalidate_cache()
|
||||
return get_template_meta(template_id) # type: ignore[return-value]
|
||||
|
||||
|
||||
def write_template_field_locks(template_id: str, locked_labels: list[str]) -> dict[str, Any]:
|
||||
@@ -677,7 +876,7 @@ def reset_template(template_id: str) -> dict[str, Any]:
|
||||
(store_root() / template_id / name).write_text(
|
||||
(src_root / name).read_text(encoding="utf-8"), encoding="utf-8"
|
||||
)
|
||||
for name in ("manifest.json", "fields.json"):
|
||||
for name in template_fill.STRUCTURED_OPTIONAL_PARTS:
|
||||
optional = src_root / name
|
||||
if optional.is_file():
|
||||
(store_root() / template_id / name).write_text(
|
||||
|
||||
+13
-4
@@ -6,6 +6,7 @@
|
||||
* 渲染逻辑与单文件版一致(全局函数 + inline onclick),末尾附页面 JSON 编辑器。 */
|
||||
const DATA=JSON.parse(document.getElementById("page-data").textContent);
|
||||
const MANIFEST=JSON.parse(document.getElementById("page-manifest").textContent);
|
||||
const FIELDS=(function(){try{var v=JSON.parse((document.getElementById("page-fields")||{textContent:"[]"}).textContent);return Array.isArray(v)?v:((v&&v.fields)||[])}catch(x){return []}})();
|
||||
|
||||
const QUERY_SCHEMA={"版本": "2.0", "说明": "前端以中文条件构造器生成内部查询对象,不设置独立全库检索页面。", "查询域": {"沿岸区域": {"数据源": "regions", "字段": [{"字段": "名称", "显示名": "区域名称", "操作": ["包含", "等于"]}, {"字段": "沿海县市", "显示名": "沿海县市", "操作": ["包含"]}, {"字段": "海岸形态", "显示名": "海岸形态", "操作": ["包含"]}]}, "组织与单位": {"数据源": "org_units", "字段": [{"字段": "名称", "显示名": "名称", "操作": ["包含", "等于"]}, {"字段": "记录类别", "显示名": "记录类别", "操作": ["等于"]}, {"字段": "体系", "显示名": "体系", "操作": ["等于", "属于"]}, {"字段": "架构层级", "显示名": "架构层级", "操作": ["等于"]}, {"字段": "区域关联", "显示名": "区域关联", "操作": ["包含"]}, {"字段": "当前状态", "显示名": "当前状态", "操作": ["等于"]}]}, "武器装备": {"数据源": "equipment", "字段": [{"字段": "名称", "显示名": "装备名称", "操作": ["包含"]}, {"字段": "类别中文", "显示名": "装备类别", "操作": ["等于"]}, {"字段": "使用体系中文", "显示名": "使用体系", "操作": ["包含"]}, {"字段": "状态中文", "显示名": "公开状态", "操作": ["等于"]}]}, "关键节点": {"数据源": "key_nodes", "字段": [{"字段": "名称", "显示名": "节点名称", "操作": ["包含"]}, {"字段": "类别中文", "显示名": "节点类别", "操作": ["等于"]}, {"字段": "区域中文", "显示名": "所属区域", "操作": ["包含"]}, {"字段": "状态中文", "显示名": "运行状态", "操作": ["等于"]}]}, "演习与项目": {"数据源": "events_projects", "字段": [{"字段": "名称", "显示名": "名称", "操作": ["包含"]}, {"字段": "类型中文", "显示名": "事件类型", "操作": ["等于"]}, {"字段": "类别中文", "显示名": "项目类别", "操作": ["等于"]}, {"字段": "状态中文", "显示名": "状态", "操作": ["等于"]}]}}, "内部查询对象": {"数据域": "页面数据源编号", "关键词": "可选", "条件": [{"字段": "中文字段名", "操作": "包含或等于", "值": "查询值"}], "分页": {"页码": 1, "每页": 18}}};
|
||||
const state={tab:"overview",mode:"chart",chart:"national_defense",q:"",filters:{},conditions:[],page:1,pageSize:18};
|
||||
@@ -16,9 +17,10 @@ function text(v){return Array.isArray(v)?v.join(" "):typeof v==="object"&&v?JSON
|
||||
function chips(v,red=false,max=8){const x=a(v);return x.slice(0,max).map(y=>`<span class="chip ${red?"chip-red":""}">${e(y)}</span>`).join("")+(x.length>max?`<span class="chip">另${x.length-max}项</span>`:"")}
|
||||
function statusChip(v){const green=/运行|列装|官方|确认|通过/.test(v||"");const orange=/规划|测试|建设|扩建|核验|有限/.test(v||"");return `<span class="chip ${green?"chip-green":orange?"chip-orange":"chip-red"}">${e(v||"未标注")}</span>`}
|
||||
function unique(data,field){const s=new Set();data.forEach(x=>a(x[field]).forEach(v=>v&&s.add(v)));return [...s].sort()}
|
||||
function setTab(tab){state.tab=tab;state.q="";state.filters={};state.conditions=[];state.page=1;location.hash="#/"+tab;render()}
|
||||
function setTab(tab){if(!pageVisible(tab))return;state.tab=tab;state.q="";state.filters={};state.conditions=[];state.page=1;location.hash="#/"+tab;render()}
|
||||
function pageVisible(key){var p=MANIFEST.页面.find(x=>x.编号===key);return !(p&&p.隐藏===true)}
|
||||
function nav(){
|
||||
document.getElementById("tabs").innerHTML=MANIFEST.页面.map(x=>`<button class="tab ${state.tab===x.编号?"active":""}" onclick="setTab('${x.编号}')">${x.名称}</button>`).join("")
|
||||
document.getElementById("tabs").innerHTML=MANIFEST.页面.filter(x=>x.隐藏!==true).map(x=>`<button class="tab ${state.tab===x.编号?"active":""}" onclick="setTab('${x.编号}')">${x.名称}</button>`).join("")
|
||||
}
|
||||
function hero(title,desc,actions=""){return `<div class="hero"><div><h2>${title}</h2><p>${desc}</p><div style="margin-top:14px">${actions}</div></div><div class="hero-mark"></div></div>`}
|
||||
function renderCustomModules(){
|
||||
@@ -146,6 +148,12 @@ function findItem(domain,id){
|
||||
if(domain==="events")return DATA.events.find(x=>x.id===id);
|
||||
if(domain==="projects")return DATA.projects.find(x=>x.id===id);
|
||||
}
|
||||
function customFieldsHtml(x){
|
||||
var list=(FIELDS||[]).filter(function(f){return f.custom&&f.keys&&f.keys.length});
|
||||
var rows=list.filter(function(f){var v=x[f.keys[0]];return v!==undefined&&v!==null&&v!==''});
|
||||
if(!rows.length)return '';
|
||||
return '<section class="detail-section"><h3>自定义字段</h3><div class="info-grid">'+rows.map(function(f){return info(f.label,e(x[f.keys[0]]))}).join('')+'</div></section>'
|
||||
}
|
||||
function openDetail(domain,id){
|
||||
const x=findItem(domain,id);if(!x)return;
|
||||
document.getElementById("page").style.display="none";
|
||||
@@ -155,6 +163,7 @@ function openDetail(domain,id){
|
||||
else if(domain==="equipment")d.innerHTML=detailEquipment(x);
|
||||
else if(domain==="key_nodes")d.innerHTML=detailNode(x);
|
||||
else d.innerHTML=detailEventProject(x,domain);
|
||||
d.innerHTML+=customFieldsHtml(x);
|
||||
location.hash=`#/detail/${domain}/${encodeURIComponent(id)}`;
|
||||
window.scrollTo({top:0});
|
||||
}
|
||||
@@ -286,7 +295,7 @@ document.getElementById("drawerOverlay").onclick=x=>{if(x.target.id==="drawerOve
|
||||
replaceInPlace(DATA,draftsToData(drafts));
|
||||
replaceInPlace(MANIFEST,drafts.__manifest__);
|
||||
// 重置交互状态后整体重渲染(tab 回到第一个页面)。
|
||||
state.tab=(MANIFEST.页面&&MANIFEST.页面[0]&&MANIFEST.页面[0].编号)||"overview";
|
||||
state.tab=((MANIFEST.页面||[]).find(x=>x.隐藏!==true)||{}).编号||"overview";
|
||||
state.mode="chart";state.chart="national_defense";state.q="";state.filters={};state.conditions=[];state.page=1;
|
||||
closeEditor();render();syncHeader();
|
||||
writeLS(storageKey,JSON.stringify({data:DATA,manifest:MANIFEST}))
|
||||
@@ -333,4 +342,4 @@ function syncHeader(){
|
||||
if(hs){var ver=sys.知识库版本,upd=sys.更新时间;if(ver||upd)hs.innerHTML="知识库版本 "+e(ver||"")+"<br>更新日期 "+e(upd||"")}
|
||||
}
|
||||
syncHeader();
|
||||
const hash=location.hash.match(/^#\/([^/]+)/);if(hash&&MANIFEST.页面.some(x=>x.编号===hash[1]))state.tab=hash[1];render();
|
||||
const hash=location.hash.match(/^#\/([^/]+)/);if(hash&&pageVisible(hash[1]))state.tab=hash[1];if(!pageVisible(state.tab))state.tab=(MANIFEST.页面.find(x=>x.隐藏!==true)||{}).编号||state.tab;render();
|
||||
+1
@@ -93,6 +93,7 @@ button,input,select{font:inherit}.header{position:sticky;top:0;z-index:30;backgr
|
||||
</div>
|
||||
<script type="application/json" id="page-data">__PAGE_DATA__</script>
|
||||
<script type="application/json" id="page-manifest">__PAGE_MANIFEST__</script>
|
||||
<script type="application/json" id="page-fields">__PAGE_FIELDS__</script>
|
||||
<script>__PAGE_RUNTIME__</script>
|
||||
</body>
|
||||
</html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"metadata": {"title": "台方向“解放军无法战胜”叙事专题数据库", "subtitle": "围绕“台湾难以抗衡 / 抵抗代价过高 / 外援不确定”的安全叙事,展示事件、口径、党派转译、平台链路、受众画像、青年兵役与疑美叙事。", "version": "1.0.0", "language": "zh-CN", "created_at": "2026-06-25T11:56:25", "data_date": "2026-06-25", "scope": "公开资料研究、叙事结构分析、平台链路与受众心理研究", "ethics_boundary": "仅用于透明、非操纵、非煽动的研究型分析;不用于隐蔽影响、恐吓传播、群体污名化或虚假信息设计。", "display_version": "Rich UI v3.1", "ui_note": "横向Tab、中文卡片、字段网格、时间线、链条图、详情面板、来源说明。"}, "stats": {"tab_count": 10, "record_count": 86, "source_count": 16, "last_updated": "2026-06-25", "current_timezone": "Asia/Tokyo", "data_status": {"framework": "complete", "event_cards": "initial_completed", "official_raw_quotes": "needs_more_original_text", "platform_samples": "schema_ready_needs_collection", "poll_data": "partial", "front_end": "single_page_offline"}}, "tabs": [{"id": "overview", "name": "专题总览", "description": "定义研究对象、时间范围、边界、资料来源和系统结构。", "records": [{"id": "OV001", "title": "专题定义", "summary": "研究台湾方向围绕“解放军无法战胜 / 台湾难以抗衡 / 抵抗代价过高”的安全叙事体系。", "category": "专题总览", "tags": ["研究对象", "范围"], "level": "研究条目", "fields": {"研究对象": "台湾舆论场中的安全叙事、党派转译、平台传播、受众心理与社会反应", "时间范围": "1995—1996;2022—2026为重点", "研究边界": "公开资料研究,不做隐蔽影响、定向操控、恐吓传播或虚假信息设计"}, "detail_sections": [{"title": "核心问题", "bullets": ["该叙事如何由军演、军售、领导人讲话等事件激活?", "它如何被台湾内部政党、媒体、政论节目和社群平台转译?", "它如何与兵役焦虑、疑美论、棋子论、乌克兰化和避战论结合?", "哪些受众更易将其转化为政治态度、家庭风险或个人规划问题?"]}, {"title": "入库原则", "bullets": ["事实、观点、推测分开记录。", "官方来源、民调、智库、媒体、社群样本分级标注。", "平台语料只做公开研究与机制分析,不制作操控性传播内容。"]}], "source_refs": [], "display_type": "overview", "中文展示摘要": "专题定义:研究台湾方向围绕“解放军无法战胜 / 台湾难以抗衡 / 抵抗代价过高”的安全叙事体系。"}, {"id": "OV002", "title": "数据层说明", "summary": "本库包括10个栏目、12类核心叙事、6条叙事链、12个事件/战术动作条目、9类平台链路和10类受众画像。", "category": "专题总览", "tags": ["数据结构", "知识库"], "level": "研究条目", "fields": {"栏目数量": 10, "核心叙事": 12, "叙事链": 6, "事件条目": 12, "平台类型": 9, "受众类型": 10}, "detail_sections": [{"title": "可前端展示功能", "bullets": ["Tab切换", "全库检索", "栏目内筛选", "详情弹框", "来源查看", "结构化详情查看", "导出当前栏目表格"]}], "source_refs": [], "display_type": "overview", "中文展示摘要": "数据层说明:本库包括10个栏目、12类核心叙事、6条叙事链、12个事件/战术动作条目、9类平台链路和10类受众画像。"}, {"id": "OV003", "title": "安全与伦理边界", "summary": "本系统定位为研究型工具,输出为公开舆情研究、风险沟通和信息韧性分析。", "category": "专题总览", "tags": ["安全边界", "研究用途"], "level": "研究条目", "fields": {"允许方向": "公开舆情研究、平台机制分析、风险沟通、政策研究", "禁止方向": "隐蔽投放、心理操控、恐吓传播、谣言制造、群体污名化、军事攻击细节"}, "detail_sections": [{"title": "研究注意事项", "bullets": ["不得把单一平台声量直接等同于台湾社会整体民意。", "不得把青年对兵役不满直接等同于没有防卫意志。", "不得把政党表态当成群体共识。", "涉及社群样本时应保留来源、时间和上下文。"]}], "source_refs": [], "display_type": "overview", "中文展示摘要": "安全与伦理边界:本系统定位为研究型工具,输出为公开舆情研究、风险沟通和信息韧性分析。"}, {"id": "OV004", "title": "数字与平台环境基线", "summary": "台湾互联网和社群普及率很高,YouTube、Facebook、Instagram、Dcard、Threads、PTT 等平台承担不同传播功能。", "category": "专题总览", "tags": ["平台环境", "基线数据"], "level": "研究条目", "fields": {"2025社群用户身份": "约1840万,占总人口约79.4%", "2025年底互联网用户": "约2230万,普及率约96.7%", "主要社群Line truncated
|
||||
+1215
File diff suppressed because it is too large.
Load diff
+52
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"系统": {
|
||||
"名称": "台方向“解放军无法战胜”叙事专题数据库",
|
||||
"副标题": "围绕“台湾难以抗衡 / 抵抗代价过高 / 外援不确定”的安全叙事,展示事件、口径、党派转译、平台链路、受众画像、青年兵役与疑美叙事。",
|
||||
"版本": "1.0.0"
|
||||
},
|
||||
"页面": [
|
||||
{
|
||||
"编号": "overview",
|
||||
"名称": "专题总览"
|
||||
},
|
||||
{
|
||||
"编号": "core_narratives",
|
||||
"名称": "核心叙事库"
|
||||
},
|
||||
{
|
||||
"编号": "narrative_chains",
|
||||
"名称": "叙事链条拆解"
|
||||
},
|
||||
{
|
||||
"编号": "timeline",
|
||||
"名称": "事件时间线"
|
||||
},
|
||||
{
|
||||
"编号": "official_positions",
|
||||
"名称": "官方口径对照"
|
||||
},
|
||||
{
|
||||
"编号": "party_translation",
|
||||
"名称": "台湾党派转译"
|
||||
},
|
||||
{
|
||||
"编号": "platform_chains",
|
||||
"名称": "平台传播链路"
|
||||
},
|
||||
{
|
||||
"编号": "audience_profiles",
|
||||
"名称": "受众群体画像"
|
||||
},
|
||||
{
|
||||
"编号": "youth_conscription",
|
||||
"名称": "青年与兵役专题"
|
||||
},
|
||||
{
|
||||
"编号": "us_skepticism",
|
||||
"名称": "疑美叙事专题"
|
||||
}
|
||||
],
|
||||
"交互规则": {
|
||||
"默认展示": "overview"
|
||||
}
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
/* no.10 页面运行时(结构化模板)。
|
||||
* 由 template_fill.compose_structured 内联进骨架的运行时注入点。
|
||||
* DATA 从骨架 JSON 元素读取;MANIFEST/FIELDS 供页面隐藏/自定义模块。 */
|
||||
const MANIFEST=JSON.parse((document.getElementById("structured-manifest")||{textContent:"{}"}).textContent);
|
||||
const FIELDS=(function(){try{var v=JSON.parse((document.getElementById("structured-fields")||{textContent:"[]"}).textContent);return Array.isArray(v)?v:((v&&v.fields)||[])}catch(x){return []}})();
|
||||
'use strict';
|
||||
const DATA = JSON.parse(document.getElementById('structured-data').textContent);
|
||||
const $ = s => document.querySelector(s);
|
||||
const arr = x => Array.isArray(x) ? x : (x ? [x] : []);
|
||||
const state = { tab: DATA.tabs?.[0]?.id || '', q: '', tag: '', view: 'rich' };
|
||||
function esc(v) { return String(v ?? '').replace(/[&<>"']/g, m => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[m])); }
|
||||
function textOf(v) { if (v === null || v === undefined) return ''; if (Array.isArray(v)) return v.map(textOf).join('、'); if (typeof v === 'object') return Object.entries(v).map(([k,val]) => k + ':' + textOf(val)).join(';'); return String(v); }
|
||||
function allText(obj) { return textOf(obj).toLowerCase(); }
|
||||
function pageHidden(key){
|
||||
const pg=(MANIFEST['页面']||[]).find(p=>p['编号']===key);
|
||||
return !!(pg&&pg['隐藏']===true);
|
||||
}
|
||||
function getTab(){
|
||||
const found=DATA.tabs.find(t=>t.id===state.tab);
|
||||
if(found&&!pageHidden(found.id)) return found;
|
||||
return DATA.tabs.find(t=>!pageHidden(t.id))||DATA.tabs[0];
|
||||
}
|
||||
function getTab() { return DATA.tabs.find(t => t.id === state.tab) || DATA.tabs[0]; }
|
||||
function getSource(id) { return (DATA.sources || []).find(s => s.id === id); }
|
||||
function tagHtml(tags) { return arr(tags).map(t => `<span class="tag">${esc(t)}</span>`).join(''); }
|
||||
function sourceHtml(ids) { return arr(ids).map(id => `<span class="source-pill">来源 ${esc(id)}</span>`).join(''); }
|
||||
function list(items) { return arr(items).map(x => `<li>${esc(x)}</li>`).join(''); }
|
||||
function sourceDetail(ids) { const sources = arr(ids).map(getSource).filter(Boolean); if (!sources.length) return ''; return `<section class="detail-section"><h3>来源说明</h3><div class="source-list">${sources.map(s => `<div class="source-line"><b>${esc(s.id)} · ${esc(s.title)}</b><p>${esc(s.publisher)}|${esc(s.date)}|可信度:${esc(s.reliability)}</p><p>${esc(s.note || '')}</p><p><a href="${esc(s.url)}" target="_blank" rel="noopener">打开来源</a></p></div>`).join('')}</div></section>`; }
|
||||
function renderIntro(tab) { const p = tab.profile || {}; return `<section class="section-intro"><div class="intro-head"><div><h2>${esc(tab.name)}</h2><p>${esc(tab.description || tab.richness_note || '')}</p><p class="result-note">本页将底层数据转为中文卡片、时间线、链条图、表格和详情面板,不显示 JSON 原文。</p></div><div class="stats"><div class="stat"><b>${tab.records.length}</b><span>条目</span></div><div class="stat"><b>${tab.tag_count || 0}</b><span>标签</span></div><div class="stat"><b>${tab.source_ref_count || 0}</b><span>来源引用</span></div></div></div><div class="profile-grid"><div class="profile-card"><b>研究重点</b><p>${esc(p['研究重点'] || '本栏目提供可结构化入库的数据条目。')}</p></div><div class="profile-card"><b>展示方式</b><p>${esc(p['展示方式'] || '中文字段、详情面板、来源说明。')}</p></div><div class="profile-card"><b>适合回答</b><ul>${list(p['适合回答'] || [])}</ul></div><div class="profile-card"><b>核心字段</b><ul>${list(p['核心字段'] || [])}</ul></div></div></section>`; }
|
||||
function fieldRows(r, max=4) { const entries = Object.entries(r.fields || {}).slice(0, max); return entries.length ? entries.map(([k,v]) => `<div class="mini-kv"><b>${esc(k)}</b><span>${esc(textOf(v))}</span></div>`).join('') : '<div class="mini-kv"><b>说明</b><span>该条目暂无额外字段,完整信息见详情面板。</span></div>'; }
|
||||
function cardHtml(r) { return `<article class="record-card"><div><span class="badge">${esc(r.id)} · ${esc(r.category || r.level || '条目')}</span></div><h3>${esc(r.title)}</h3><p>${esc(r.summary || '')}</p><div class="field-list">${fieldRows(r,4)}</div><div class="tags">${tagHtml(r.tags)}${sourceHtml(r.source_refs)}</div><div class="card-actions"><button class="open-btn primary" data-open="${esc(r.id)}">查看完整详情</button></div></article>`; }
|
||||
function renderCards(records) { return records.length ? `<div class="card-grid">${records.map(cardHtml).join('')}</div>` : '<div class="empty">没有匹配的记录。请调整搜索词或标签。</div>'; }
|
||||
function renderTimeline(records) { return records.length ? `<div class="timeline">${records.map(r => `<div class="timeline-item">${cardHtml(r)}</div>`).join('')}</div>` : '<div class="empty">没有匹配的时间线记录。</div>'; }
|
||||
function renderChains(records) { if (!records.length) return '<div class="empty">没有匹配的叙事链条。</div>'; return `<div class="chain-grid">${records.map(r => { const chain = (r.fields && r.fields['叙事链条']) ? String(r.fields['叙事链条']).split('→').map(s => s.trim()).filter(Boolean) : []; return `<article class="chain-card"><span class="badge">${esc(r.id)}</span><h3>${esc(r.title)}</h3><p>${esc(r.summary || '')}</p><div class="chain-steps">${chain.map((s,i) => `<span class="step">${esc(s)}</span>${i < chain.length - 1 ? '<span class="arrow">→</span>' : ''}`).join('')}</div><div class="field-list">${fieldRows(r,4)}</div><div class="tags">${tagHtml(r.tags)}${sourceHtml(r.source_refs)}</div><div class="card-actions"><button class="open-btn primary" data-open="${esc(r.id)}">查看完整详情</button></div></article>`; }).join('')}</div>`; }
|
||||
function renderTable(records) { if (!records.length) return '<div class="empty">没有匹配记录。</div>'; return `<div class="table-wrap"><table><thead><tr><th>ID</th><th>标题</th><th>摘要</th><th>主要字段</th><th>标签/来源</th><th>操作</th></tr></thead><tbody>${records.map(r => `<tr><td><span class="badge">${esc(r.id)}</span></td><td class="cell-title">${esc(r.title)}</td><td>${esc(r.summary || '')}</td><td>${Object.entries(r.fields || {}).slice(0,6).map(([k,v]) => `<b>${esc(k)}:</b>${esc(textOf(v))}`).join('<br>')}</td><td>${tagHtml(r.tags)}<br>${sourceHtml(r.source_refs)}</td><td><button class="open-btn primary" data-open="${esc(r.id)}">详情</button></td></tr>`).join('')}</tbody></table></div>`; }
|
||||
function renderModels() { if (state.tab !== 'overview') return ''; const m = DATA.models || {}; return `<section class="panel"><h3>叙事 → 心理 → 行为模型</h3><div class="model-grid"><div class="model-card"><b>叙事到心理</b><ul>${arr(m.narrative_to_psychology).map(x => `<li>${esc(x.narrative)} → ${esc(x.psychology)}</li>`).join('')}</ul></div><div class="model-card"><b>心理到行为</b><ul>${arr(m.psychology_to_behavior).map(x => `<li>${esc(x.psychology)} → ${esc(x.behavior)}</li>`).join('')}</ul></div><div class="model-card"><b>可观测行为指标</b><ul>${arr(m.observable_behavior_indicators).map(x => `<li>${esc(x)}</li>`).join('')}</ul></div></div></section>`; }
|
||||
function renderSourcesPanel(tab) { const ids = [...new Set(tab.records.flatMap(r => arr(r.source_refs)))]; const sources = (ids.length ? ids.map(getSource).filter(Boolean) : (DATA.sources || []).slice(0,8)); if (!sources.length) return ''; return `<section class="panel"><h3>来源索引</h3><div class="source-grid">${sources.map(s => `<div class="source-card"><b>${esc(s.id)} · ${esc(s.title)}</b><span>${esc(s.publisher)}|${esc(s.date)}|可信度:${esc(s.reliability)}</span><p>${esc(s.note || '')}</p><p><a href="${esc(s.url)}" target="_blank" rel="noopener">打开来源</a></p></div>`).join('')}</div></section>`; }
|
||||
function filterRecords(tab) { return tab.records.filter(r => (!state.q || allText(r).includes(state.q)) && (!state.tag || arr(r.tags).includes(state.tag))); }
|
||||
function buildTagOptions(tab) { const tags = [...new Set(tab.records.flatMap(r => arr(r.tags)))].sort(); $('#tagSelect').innerHTML = '<option value="">全部标签</option>' + tags.map(t => `<option value="${esc(t)}">${esc(t)}</option>`).join(''); }
|
||||
function renderChips(tab) { const tags = [...new Set(tab.records.flatMap(r => arr(r.tags)))].slice(0, 24); $('#chips').innerHTML = `<button class="chip ${state.tag === '' ? 'active' : ''}" data-tag="">全部</button>` + tags.map(t => `<button class="chip ${state.tag === t ? 'active' : ''}" data-tag="${esc(t)}">${esc(t)}</button>`).join(''); }
|
||||
function renderRecordsOnly() { const tab = getTab(); const records = filterRecords(tab); let body = ''; if (state.view === 'table') body = renderTable(records); else if (tab.id === 'timeline') body = renderTimeline(records); else if (tab.id === 'narrative_chains') body = renderChains(records); else body = renderCards(records); $('#recordsHost').innerHTML = `<div class="result-note">当前显示 <b>${records.length}</b> / ${tab.records.length} 条记录。点击“查看完整详情”可打开中文详情面板。</div>` + body + renderModels() + renderSourcesPanel(tab) + `<div class="footer-note">后续可继续补充:${esc(arr(DATA.schema_note?.recommended_next_collection).slice(0,7).join(';'))}</div>`; }
|
||||
function render() { const tab = getTab(); document.querySelectorAll('.tab-btn').forEach(b => b.classList.toggle('active', b.dataset.tab === state.tab)); buildTagOptions(tab); $('#tagSelect').value = state.tag; $('#content').innerHTML = renderIntro(tab) + '<div class="chipbar" id="chips"></div><div id="recordsHost"></div>'; renderChips(tab); renderRecordsOnly(); }
|
||||
function findRecord(id) { for (const t of DATA.tabs) for (const r of t.records) if (r.id === id) return r; }
|
||||
function sectionHtml(sec) { let h = `<section class="detail-section"><h3>${esc(sec.title || '详情')}</h3>`; if (sec.text) h += `<p>${esc(sec.text)}</p>`; if (sec.bullets) h += `<ul>${arr(sec.bullets).map(b => `<li>${esc(b)}</li>`).join('')}</ul>`; if (sec.table) { const rows = arr(sec.table); const keys = [...new Set(rows.flatMap(o => Object.keys(o)))]; h += `<div class="table-wrap"><table><thead><tr>${keys.map(k => `<th>${esc(k)}</th>`).join('')}</tr></thead><tbody>${rows.map(row => `<tr>${keys.map(k => `<td>${esc(textOf(row[k]))}</td>`).join('')}</tr>`).join('')}</tbody></table></div>`; } return h + '</section>'; }
|
||||
function openModal(id) { const r = findRecord(id); if (!r) return; $('#modalTitle').textContent = `${r.id} · ${r.title}`; $('#modalSummary').textContent = r.summary || ''; const fields = Object.entries(r.fields || {}).map(([k,v]) => `<div class="kv"><b>${esc(k)}</b><span>${esc(textOf(v))}</span></div>`).join(''); const sections = arr(r.detail_sections).map(sectionHtml).join(''); $('#modalBody').innerHTML = `<div class="tags">${tagHtml(r.tags)}${sourceHtml(r.source_refs)}</div><div class="detail-grid">${fields || '<div class="kv"><b>说明</b><span>该条目暂无额外字段,主要内容已在摘要和下方说明中展示。</span></div>'}</div>${sections || '<section class="detail-section"><h3>说明</h3><p>该条目暂无二级详情,已展示全部可读字段。</p></section>'}${sourceDetail(r.source_refs)}`; $('#modalBackdrop').style.display = 'flex'; }
|
||||
function closeModal() { $('#modalBackdrop').style.display = 'none'; }
|
||||
function csvEscape(v) { return '"' + textOf(v).replace(/"/g, '""') + '"'; }
|
||||
function exportCurrentTabCsv() { const tab = getTab(); const rows = filterRecords(tab); const baseCols = ['id','title','summary','category','tags','source_refs']; const dyn = [...new Set(rows.flatMap(r => Object.keys(r.fields || {})))]; const header = baseCols.concat(dyn); const lines = [header.map(csvEscape).join(',')]; rows.forEach(r => { lines.push(header.map(c => csvEscape(c in r ? (Array.isArray(r[c]) ? r[c].join('、') : r[c]) : (r.fields || {})[c])).join(',')); }); const blob = new Blob(['' + lines.join('\n')], {type:'text/csv;charset=utf-8'}); const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = tab.id + '_records.csv'; a.click(); URL.revokeObjectURL(a.href); }
|
||||
function init() { $('#tabs').innerHTML = DATA.tabs.filter(t => !pageHidden(t.id)).map(t => `<button class="tab-btn" data-tab="${esc(t.id)}">${esc(t.name)} <small>(${t.records.length})</small></button>`).join(''); $('#tabs').addEventListener('click', e => { const btn = e.target.closest('.tab-btn'); if (!btn) return; state.tab = btn.dataset.tab; state.tag = ''; state.q = $('#searchInput').value.trim().toLowerCase(); render(); window.scrollTo({top:0,behavior:'smooth'}); }); $('#searchInput').addEventListener('input', e => { state.q = e.target.value.trim().toLowerCase(); renderRecordsOnly(); }); $('#tagSelect').addEventListener('change', e => { state.tag = e.target.value; renderChips(getTab()); renderRecordsOnly(); }); $('#viewSelect').addEventListener('change', e => { state.view = e.target.value; renderRecordsOnly(); }); $('#content').addEventListener('click', e => { const btn = e.target.closest('[data-open]'); if (btn) openModal(btn.dataset.open); const chip = e.target.closest('[data-tag]'); if (chip) { state.tag = chip.dataset.tag; $('#tagSelect').value = state.tag; renderChips(getTab()); renderRecordsOnly(); } }); $('#exportBtn').addEventListener('click', exportCurrentTabCsv); $('#closeBtn').addEventListener('click', closeModal); $('#modalBackdrop').addEventListener('click', e => { if (e.target.id === 'modalBackdrop') closeModal(); }); window.addEventListener('keydown', e => { if (e.key === 'Escape') closeModal(); }); render(); }
|
||||
try { init(); } catch (err) { console.error(err); $('#content').innerHTML = `<div class="empty">页面加载出错:${esc(err.message)}。请使用新版 v5 文件或更换 Chrome / Edge 打开。</div>`; }syncHeader();
|
||||
applyPageVisibility();
|
||||
renderCustomModules();
|
||||
init();
|
||||
|
||||
/* ── 页头同步(MANIFEST.系统 → title/h1) ── */
|
||||
function syncHeader(){
|
||||
const sys=(MANIFEST['系统']||{});
|
||||
if(sys['名称']){document.title=String(sys['名称']);const h1=document.querySelector('.hero h1,h1');if(h1)h1.textContent=String(sys['名称'])}
|
||||
}
|
||||
/* ── 页面可见性(隐藏分类:对应 tab 按钮下线) ── */
|
||||
function applyPageVisibility(){
|
||||
(MANIFEST['页面']||[]).forEach(p=>{
|
||||
if(p&&p['隐藏']===true&&p['编号']){
|
||||
const b=document.querySelector('.tab-btn[data-tab="'+p['编号']+'"]');if(b)b.style.display='none';
|
||||
}
|
||||
});
|
||||
}
|
||||
/* ── 自定义模块(挂当前页面底部) ── */
|
||||
function renderCustomModules(){
|
||||
const host=document.getElementById('recordsHost');
|
||||
if(!host)return;
|
||||
host.querySelectorAll('.custom-module').forEach(x=>x.remove());
|
||||
const list=((MANIFEST||{})['自定义模块']||[]).filter(m=>m&&m['页面']===state.tab&&m.html);
|
||||
list.forEach(m=>{
|
||||
const sec=document.createElement('section');sec.className='custom-module';sec.style.margin='18px 0';
|
||||
sec.innerHTML='<h2 class="section-title">'+esc(m['标题']||'自定义模块')+'</h2>'+m.html;
|
||||
host.appendChild(sec);
|
||||
});
|
||||
}
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
(function(){
|
||||
"use strict";
|
||||
function clone(v){return JSON.parse(JSON.stringify(v))}
|
||||
function draftsToData(d){var o={};Object.keys(d).forEach(function(k){if(k!=='__manifest__')o[k]=d[k]});return o}
|
||||
function replaceInPlace(t,s){Object.keys(t).forEach(function(k){delete t[k]});Object.keys(s).forEach(function(k){t[k]=s[k]})}
|
||||
function buildDrafts(data,manifest){var o={__manifest__:clone(manifest)};Object.keys(data).forEach(function(k){o[k]=clone(data[k])});return o}
|
||||
const initialData=clone(DATA),initialManifest=clone(MANIFEST);
|
||||
const overlay=document.getElementById('editorOverlay');
|
||||
if(!overlay)return;
|
||||
const fingerprint=(function(){let h=2166136261;const s=JSON.stringify(initialData)+'|'+JSON.stringify(initialManifest);for(let i=0;i<s.length;i++){h^=s.charCodeAt(i);h=Math.imul(h,16777619)}return (h>>>0).toString(36)})();
|
||||
const storageKey='structured-page-data-v1:'+fingerprint;
|
||||
function readLS(k){try{return window.localStorage?window.localStorage.getItem(k):null}catch(x){return null}}
|
||||
function writeLS(k,v){try{if(window.localStorage)window.localStorage.setItem(k,v)}catch(x){}}
|
||||
function removeLS(k){try{if(window.localStorage)window.localStorage.removeItem(k)}catch(x){}}
|
||||
(function(){const cached=readLS(storageKey);if(!cached)return;try{const parsed=JSON.parse(cached);if(parsed&&typeof parsed==='object'&&parsed.data&&typeof parsed.data==='object'){replaceInPlace(DATA,parsed.data);if(parsed.manifest&&typeof parsed.manifest==='object')replaceInPlace(MANIFEST,parsed.manifest)}}catch(x){}})();
|
||||
const labels={};(MANIFEST['页面']||[]).forEach(p=>{if(p&&p['编号'])labels[p['编号']]=p['名称']||p['编号']});
|
||||
const modules=Object.keys(DATA).concat(['__manifest__']);
|
||||
let active=modules[0]||'__manifest__';
|
||||
let drafts=buildDrafts(DATA,MANIFEST);
|
||||
function moduleTitle(k){return k==='__manifest__'?'系统设置(MANIFEST)':(labels[k]||k)}
|
||||
const tabsEl=document.getElementById('editorTabs'),editor=document.getElementById('jsonEditor'),statusEl=document.getElementById('jsonStatus'),titleEl=document.getElementById('editorModuleTitle');
|
||||
function setStatus(ok,msg){statusEl.textContent=msg;statusEl.className='json-status '+(ok?'valid':'invalid')}
|
||||
function readEditor(){try{const p=JSON.parse(editor.value);if(!p||typeof p!=='object')throw new Error('模块必须是 JSON 对象或数组');setStatus(true,'JSON 有效');return p}catch(x){setStatus(false,'JSON 无效:'+x.message);return null}}
|
||||
function saveActiveDraft(){const p=readEditor();if(!p)return false;drafts[active]=p;return true}
|
||||
function loadEditor(){titleEl.textContent=moduleTitle(active);editor.value=JSON.stringify(drafts[active],null,2);setStatus(true,'JSON 有效')}
|
||||
function renderEditorTabs(){tabsEl.innerHTML='';modules.forEach(function(key){const b=document.createElement('button');b.type='button';b.className='editor-tab'+(key===active?' active':'');b.innerHTML='<b>'+esc(moduleTitle(key))+'</b><small>'+(key==='__manifest__'?'manifest.json':key)+'</small>';b.onclick=function(){if(key===active||!saveActiveDraft())return;active=key;renderEditorTabs();loadEditor()};tabsEl.appendChild(b)})}
|
||||
function closeEditor(){overlay.style.display='none'}
|
||||
function applyToPage(){if(!saveActiveDraft()){setStatus(false,'存在无效模块');return}replaceInPlace(DATA,draftsToData(drafts));replaceInPlace(MANIFEST,drafts.__manifest__);closeEditor();syncHeader();applyPageVisibility();render();renderCustomModules();writeLS(storageKey,JSON.stringify({data:DATA,manifest:MANIFEST}))}
|
||||
function legacyCopy(text){const t=document.createElement('textarea');t.value=text;document.body.appendChild(t);t.select();try{document.execCommand('copy')}catch(x){}t.remove()}
|
||||
document.getElementById('openEditor').onclick=function(){drafts=buildDrafts(DATA,MANIFEST);active=modules[0]||'__manifest__';renderEditorTabs();loadEditor();overlay.style.display='';setTimeout(function(){editor.focus()},40)};
|
||||
document.getElementById('closeEditor').onclick=closeEditor;
|
||||
document.addEventListener('keydown',function(ev){if(ev.key==='Escape'&&overlay.style.display!=='none')closeEditor()});
|
||||
document.getElementById('applyJson').onclick=applyToPage;
|
||||
document.getElementById('resetJson').onclick=function(){drafts=buildDrafts(initialData,initialManifest);active=modules[0]||'__manifest__';removeLS(storageKey);renderEditorTabs();loadEditor();setStatus(true,'已恢复默认数据,点击「应用到页面」生效')};
|
||||
document.getElementById('copyJson').onclick=function(){if(!saveActiveDraft())return;const text=JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2);if(navigator.clipboard&&navigator.clipboard.writeText)navigator.clipboard.writeText(text).catch(function(){legacyCopy(text)});else legacyCopy(text)};
|
||||
document.getElementById('downloadJson').onclick=function(){if(!saveActiveDraft())return;const blob=new Blob([JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2)],{type:'application/json;charset=utf-8'});const link=document.createElement('a');link.href=URL.createObjectURL(blob);link.download='page-data.json';link.click();setTimeout(function(){URL.revokeObjectURL(link.href)},1000)};
|
||||
})();
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>台方向“解放军无法战胜”叙事专题数据库</title><style>
|
||||
:root{
|
||||
--bg:#fbf3ef;--paper:#fffdfb;--paper2:#fff7f2;--ink:#271312;--muted:#7b6760;
|
||||
--red:#b92e27;--red2:#8e211c;--red3:#d35142;--line:#ecd6cc;--soft:#f6e6df;
|
||||
--shadow:0 14px 35px rgba(78,30,18,.12);--radius:22px;
|
||||
}
|
||||
*{box-sizing:border-box}html,body{margin:0;padding:0}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;background:linear-gradient(180deg,#fff 0,#fbf1ec 240px,#fffaf7 100%);color:var(--ink);}
|
||||
.hero{background:linear-gradient(135deg,var(--red2),var(--red3));color:#fff;padding:30px 40px 34px;box-shadow:0 8px 30px rgba(104,23,17,.22)}
|
||||
.hero h1{margin:0 0 14px;font-size:34px;line-height:1.22;letter-spacing:.5px}.hero p{margin:0;max-width:1280px;font-size:18px;line-height:1.75;opacity:.96}.meta-row{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}.meta-pill{border:1px solid rgba(255,255,255,.42);background:rgba(255,255,255,.12);padding:8px 14px;border-radius:999px;font-weight:700}
|
||||
main{max-width:1520px;margin:0 auto;padding:22px 24px 50px}.tabs-wrap{position:sticky;top:0;z-index:20;background:rgba(251,243,239,.94);border-bottom:1px solid var(--line);backdrop-filter:blur(10px);margin:0 -24px 20px;padding:14px 24px 12px;overflow:auto}.tabs{display:flex;gap:10px;min-width:max-content}.tab-btn{appearance:none;border:1px solid var(--line);background:white;color:var(--red2);border-radius:999px;padding:11px 16px;font-weight:900;cursor:pointer;box-shadow:0 6px 14px rgba(102,38,26,.06);white-space:nowrap}.tab-btn small{color:inherit;opacity:.72;margin-left:5px}.tab-btn.active{background:var(--red2);color:#fff;border-color:var(--red2)}
|
||||
.toolbar{display:grid;grid-template-columns:1fr 220px 210px 170px;gap:14px;align-items:center;background:rgba(255,255,255,.88);border:1px solid var(--line);border-radius:20px;padding:14px;margin-bottom:22px;box-shadow:var(--shadow)}.searchbox{height:54px;border:1px solid var(--line);border-radius:16px;background:white;display:flex;align-items:center;overflow:hidden}.searchbox span{width:78px;text-align:center;color:var(--red);font-weight:900;font-size:22px;letter-spacing:4px}.searchbox input{border:0;outline:0;flex:1;font-size:17px;padding:0 18px;background:transparent;color:var(--ink)}select,.btn{height:54px;border:1px solid var(--line);border-radius:16px;background:white;padding:0 16px;font-size:16px;color:var(--ink)}.btn{font-weight:900;cursor:pointer}.btn.primary{background:var(--red);color:#fff;border-color:var(--red)}
|
||||
.section-intro,.panel{background:rgba(255,255,255,.9);border:1px solid var(--line);border-radius:var(--radius);padding:22px;margin-bottom:20px;box-shadow:var(--shadow)}.intro-head{display:flex;gap:22px;justify-content:space-between}.intro-head h2{margin:0 0 8px;color:var(--red2);font-size:26px}.intro-head p{margin:0 0 8px;color:var(--muted);line-height:1.7}.stats{display:flex;gap:10px;min-width:270px}.stat{flex:1;background:var(--paper2);border:1px solid var(--line);border-radius:16px;padding:12px;text-align:center}.stat b{display:block;font-size:26px;color:var(--red)}.stat span{font-size:13px;color:var(--muted)}.profile-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:18px}.profile-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px}.profile-card b{display:block;color:var(--red2);margin-bottom:8px}.profile-card p,.profile-card li{color:var(--muted);line-height:1.65;margin:0}.profile-card ul{margin:0;padding-left:18px}.chipbar{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}.chip{border:1px solid var(--line);background:white;border-radius:999px;padding:7px 12px;cursor:pointer;color:var(--red2);font-weight:800}.chip.active{background:var(--red2);color:white;border-color:var(--red2)}.result-note,.footer-note{background:#fff8f4;border:1px solid var(--line);border-radius:16px;padding:12px 16px;color:var(--muted);line-height:1.7;margin-bottom:18px}.footer-note{margin-top:20px}
|
||||
.card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.record-card,.chain-card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:18px;box-shadow:0 10px 25px rgba(78,30,18,.09);display:flex;flex-direction:column;gap:12px}.record-card h3,.chain-card h3{margin:0;color:var(--red2);font-size:21px}.record-card p,.chain-card p{margin:0;color:var(--muted);line-height:1.7}.badge{display:inline-block;background:#f8e4dc;color:var(--red2);border:1px solid var(--line);border-radius:999px;padding:5px 10px;font-weight:900;font-size:13px}.field-list{display:grid;gap:8px}.mini-kv{border-left:4px solid var(--red3);background:#fff8f4;border-radius:10px;padding:9px 10px}.mini-kv b{display:block;color:var(--red2);margin-bottom:4px}.mini-kv span{color:var(--muted);line-height:1.55}.tags{display:flex;gap:7px;flex-wrap:wrap}.tag,.source-pill{font-size:12px;border-radius:999px;padding:5px 9px;background:#f5eee9;color:#61423b;border:1px solid var(--line)}.source-pill{background:#fff2e8;color:#9a3a2f}.card-actions{margin-top:auto;display:flex;justify-content:flex-end}.open-btn{border:0;background:var(--red);color:white;border-radius:12px;padding:10px 14px;font-weight:900;cursor:pointer}.empty{padding:40px;text-align:center;background:#fff;border:1px dashed var(--line);border-radius:20px;color:var(--muted)}
|
||||
.timeline{position:relative;margin-left:16px}.timeline:before{content:"";position:absolute;left:14px;top:0;bottom:0;width:3px;background:var(--line)}.timeline-item{position:relative;margin:0 0 16px 42px}.timeline-item:before{content:"";position:absolute;left:-34px;top:26px;width:15px;height:15px;border-radius:50%;background:var(--red);box-shadow:0 0 0 6px #f9e7df}.chain-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}.chain-steps{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.step{background:#fff5ef;border:1px solid var(--line);border-radius:12px;padding:9px 10px;color:var(--red2);font-weight:800}.arrow{color:var(--red);font-weight:900}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:18px;background:#fff}table{width:100%;border-collapse:collapse;min-width:900px}th,td{padding:13px 14px;border-bottom:1px solid var(--line);vertical-align:top;text-align:left;line-height:1.55}th{background:#fff1eb;color:var(--red2);position:sticky;top:0;z-index:1}tr:hover td{background:#fffaf7}.cell-title{font-weight:900;color:var(--red2)}
|
||||
.model-grid,.source-grid,.detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.model-card,.source-card,.kv{background:#fff;border:1px solid var(--line);border-radius:16px;padding:15px}.model-card b,.source-card b,.kv b{display:block;color:var(--red2);margin-bottom:7px}.model-card li,.source-card p,.source-card span,.kv span{color:var(--muted);line-height:1.65}.source-card a,.source-line a{color:var(--red);font-weight:900;text-decoration:none}.modal-backdrop{display:none;position:fixed;inset:0;background:rgba(30,15,13,.52);z-index:99;align-items:center;justify-content:center;padding:24px}.modal{width:min(1120px,96vw);max-height:90vh;overflow:hidden;background:var(--paper);border-radius:26px;box-shadow:0 20px 70px rgba(0,0,0,.32);border:1px solid var(--line);display:flex;flex-direction:column}.modal-head{background:linear-gradient(135deg,var(--red2),var(--red3));color:#fff;padding:22px 26px;display:flex;justify-content:space-between;gap:18px}.modal-head h2{margin:0 0 8px;font-size:24px}.modal-head p{margin:0;line-height:1.65;opacity:.95}.close{width:42px;height:42px;border-radius:50%;border:1px solid rgba(255,255,255,.4);background:rgba(255,255,255,.16);color:#fff;font-size:28px;cursor:pointer}.modal-body{overflow:auto;padding:22px}.detail-grid{grid-template-columns:repeat(2,1fr);margin:16px 0}.detail-section{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px;margin:14px 0}.detail-section h3{margin:0 0 10px;color:var(--red2)}.detail-section p,.detail-section li{line-height:1.75;color:var(--muted)}.source-list{display:grid;gap:10px}.source-line{background:#fff8f4;border:1px solid var(--line);border-radius:14px;padding:13px}.source-line p{margin:4px 0;color:var(--muted)}
|
||||
@media(max-width:1180px){.toolbar{grid-template-columns:1fr 1fr}.card-grid,.profile-grid,.model-grid,.source-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.hero{padding:24px 18px}.hero h1{font-size:24px}main{padding:14px}.tabs-wrap{margin:0 -14px 14px;padding:12px 14px}.toolbar,.card-grid,.profile-grid,.chain-grid,.model-grid,.source-grid,.detail-grid{grid-template-columns:1fr}.intro-head{flex-direction:column}.stats{min-width:0}.modal-backdrop{padding:8px}}
|
||||
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
.editor-fab{position:fixed;right:18px;bottom:26px;z-index:60;background:#7c1d24;color:#fff;border:0;border-radius:50%;width:46px;height:46px;display:grid;place-items:center;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.3)}.editor-fab:hover{transform:rotate(30deg)}.editor-fab svg{width:22px;height:22px;display:block}
|
||||
.editor-overlay{z-index:80}
|
||||
.editor-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(1080px,94vw);height:min(680px,88vh);background:#fff;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.35)}
|
||||
.editor-head{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid #e5e7eb}.editor-head h2{margin:0;font-size:16px;flex:1}.editor-head .editor-note{font-size:12px;color:#667085;margin-right:8px}
|
||||
.editor-body{display:flex;flex:1;min-height:0}
|
||||
.editor-tabs{width:210px;border-right:1px solid #e5e7eb;overflow:auto;padding:10px 8px;display:flex;flex-direction:column;gap:4px}
|
||||
.editor-tab{border:0;background:transparent;text-align:left;padding:9px 11px;border-radius:8px;cursor:pointer;color:#667085}.editor-tab b{display:block;font-size:13px;color:#1e2329}.editor-tab small{font-size:10px;opacity:.75}.editor-tab:hover{background:#f4f6f8}.editor-tab.active{background:#f7ecec}.editor-tab.active b{color:#7c1d24}
|
||||
.editor-pane{flex:1;display:flex;flex-direction:column;min-width:0;padding:14px 16px;gap:10px}
|
||||
.editor-title-row{display:flex;align-items:center;justify-content:space-between}.editor-title-row b{font-size:14px}
|
||||
.json-status{font-size:12px;padding:3px 10px;border-radius:999px}.json-status.valid{background:#e8f5ef;color:#14804a}.json-status.invalid{background:#fdecec;color:#b4232d}
|
||||
.json-editor{flex:1;width:100%;resize:none;border:1px solid #e5e7eb;border-radius:10px;padding:13px;font:13px/1.6 ui-monospace,Consolas,monospace;color:#1e2329;background:#f8fafc;outline:0;tab-size:2}
|
||||
.editor-actions{display:flex;gap:8px;flex-wrap:wrap}
|
||||
.editor-hint{margin:0;font-size:11px;color:#8a94a3}
|
||||
</style></head><body>
|
||||
<header class="hero"><h1>台方向“解放军无法战胜”叙事专题数据库</h1><p>围绕“台湾难以抗衡 / 抵抗代价过高 / 外援不确定”的安全叙事,展示事件、口径、党派转译、平台链路、受众画像、青年兵役与疑美叙事。</p><div class="meta-row"><span class="meta-pill">版本:纯中文展示版 v5.0</span><span class="meta-pill">横向 Tab 导航</span><span class="meta-pill">无可见 JSON 区块</span><span class="meta-pill">本地单文件可运行</span></div></header>
|
||||
<main><div class="tabs-wrap"><nav class="tabs" id="tabs"><button class="tab-btn active" data-tab="overview">专题总览 <small>(4)</small></button><button class="tab-btn " data-tab="core_narratives">核心叙事库 <small>(12)</small></button><button class="tab-btn " data-tab="narrative_chains">叙事链条拆解 <small>(6)</small></button><button class="tab-btn " data-tab="timeline">事件时间线 <small>(12)</small></button><button class="tab-btn " data-tab="official_positions">官方口径对照 <small>(9)</small></button><button class="tab-btn " data-tab="party_translation">台湾党派转译 <small>(8)</small></button><button class="tab-btn " data-tab="platform_chains">平台传播链路 <small>(9)</small></button><button class="tab-btn " data-tab="audience_profiles">受众群体画像 <small>(10)</small></button><button class="tab-btn " data-tab="youth_conscription">青年与兵役专题 <small>(9)</small></button><button class="tab-btn " data-tab="us_skepticism">疑美叙事专题 <small>(7)</small></button></nav></div><section class="toolbar"><label class="searchbox"><span>搜索</span><input id="searchInput" placeholder="输入关键词:军演、兵役、疑美、Dcard、封锁、青年……"></label><select id="tagSelect"><option value="">全部标签</option></select><select id="viewSelect"><option value="rich">丰富卡片</option><option value="table">表格视图</option></select><button class="btn primary" id="exportBtn">导出当前表格</button></section><section id="content"><section class="section-intro"><div class="intro-head"><div><h2>专题总览</h2><p>定义研究对象、时间范围、边界、资料来源和系统结构。</p><p class="result-note">本页将底层数据转为中文卡片、时间线、链条图、表格和详情面板,不显示 JSON 原文。</p></div><div class="stats"><div class="stat"><b>4</b><span>条目</span></div><div class="stat"><b>8</b><span>标签</span></div><div class="stat"><b>3</b><span>来源引用</span></div></div></div><div class="profile-grid"><div class="profile-card"><b>研究重点</b><p>给出专题边界、研究对象、数据层构成、平台环境基线与安全边界。</p></div><div class="profile-card"><b>展示方式</b><p>总览卡片、统计面板、叙事—心理—行为模型、来源索引。</p></div><div class="profile-card"><b>适合回答</b><ul><li>这个专题研究什么?</li><li>数据有哪些层次?</li><li>哪些内容可以直接入库?</li><li>有哪些伦理边界?</li></ul></div><div class="profile-card"><b>核心字段</b><ul><li>研究对象</li><li>时间范围</li><li>研究边界</li><li>主要社群平台</li><li>数据结构</li></ul></div></div></section><div class="result-note">当前显示 <b>4</b> / 4 条记录。点击“查看完整详情”可打开中文详情面板。</div><div class="card-grid"><article class="record-card"><div><span class="badge">OV001 · 专题总览</span></div><h3>专题定义</h3><p>研究台湾方向围绕“解放军无法战胜 / 台湾难以抗衡 / 抵抗代价过高”的安全叙事体系。</p><div class="field-list"><div class="mini-kv"><b>研究对象</b><span>台湾舆论场中的安全叙事、党派转译、平台传播、受众心理与社会反应</span></div><div class="mini-kv"><b>时间范围</b><span>1995—1996;2022—2026为重点</span></div><div class="mini-kv"><b>研究边界</b><span>公开资料研究,不做隐蔽影响、定向操控、恐吓传播或虚假信息设计</span></div></div><div class="tags"><span class="tag">研究对象</span><span class="tag">范围</span></div><div class="card-actions"><button class="open-btn primary" data-open="OV001">查看完整详情</button></div></article><article class="record-card"><div><span class="badge">OV002 · 专题总览</span></div><h3>数据层说明</h3><p>本库包括10个栏目、12类核心叙事、6条叙事链、12个事件/战术动作条目、9类平台链路和10类受众画像。</p><div class="field-list"><div class="mini-kv"><b>栏目数量</b><span>10</span></div><div class="mini-kv"><b>核心叙事</b><span>12</span></div><div class="mini-kv"><b>叙事链</b><span>6</span></div><div class="mini-kv"><b>事件条目</b><span>12</span></div></div><div class="tags"><span class="tag">数据结构</span><span class="tag">知识库</span></div><div class="card-actions"><button class="open-btn primary" data-open="OV002">查看完整详情</button></div></article><article class="record-card"><div><span class="badge">OV003 · 专题总览</span></div><h3>安全与伦理边界</h3><p>本系统定位为研究型工具,输出为公开舆情研究、风险沟通和信息韧性分析。</p><div class="field-list"><div class="mini-kv"><b>允许方向</b><span>公开舆情研究、平台机制分析、风险沟通、政策研究</span></div><div class="mini-kv"><b>禁止方向</b><span>隐蔽投放、心理操控、恐吓传播、谣言制造、群体污名化、军事攻击Line truncated
|
||||
<div class="modal-backdrop" id="modalBackdrop"><div class="modal"><div class="modal-head"><div><h2 id="modalTitle"></h2><p id="modalSummary"></p></div><button class="close" id="closeBtn">×</button></div><div class="modal-body" id="modalBody"></div></div></div>
|
||||
<button type="button" id="openEditor" class="editor-fab" aria-label="JSON 编辑器" title="页面 JSON 编辑器"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg></button>
|
||||
<div id="editorOverlay" class="editor-overlay" style="display:none"><div class="editor-modal">
|
||||
<header class="editor-head"><h2>页面 JSON 编辑器</h2><span class="editor-note">按模块编辑,应用后即时重渲染;修改保存在浏览器本地,不回写服务器</span><button type="button" id="closeEditor" style="border:0;background:none;font-size:14px;cursor:pointer">关闭</button></header>
|
||||
<div class="editor-body">
|
||||
<nav id="editorTabs" class="editor-tabs"></nav>
|
||||
<div class="editor-pane">
|
||||
<div class="editor-title-row"><b id="editorModuleTitle"></b><span id="jsonStatus" class="json-status valid">JSON 有效</span></div>
|
||||
<textarea id="jsonEditor" class="json-editor" spellcheck="false" aria-label="当前模块 JSON"></textarea>
|
||||
<div class="editor-actions"><button type="button" id="applyJson" style="background:#7c1d24;color:#fff;border:0;border-radius:6px;padding:7px 14px;cursor:pointer">应用到页面</button><button type="button" id="resetJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">恢复默认数据</button><button type="button" id="copyJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">复制完整 JSON</button><button type="button" id="downloadJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">下载 JSON</button></div>
|
||||
<p class="editor-hint">模块 = 页面数据(DATA)的顶层键,另附「系统设置」编辑 MANIFEST;沙箱预览无法使用本地缓存时,修改仅当次会话有效。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
<script type="application/json" id="structured-data">__PAGE_DATA__</script>
|
||||
<script type="application/json" id="structured-manifest">__PAGE_MANIFEST__</script>
|
||||
<script type="application/json" id="structured-fields">__PAGE_FIELDS__</script>
|
||||
<script>__PAGE_RUNTIME__</script>
|
||||
</body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"metadata": {"title": "驻印太美国军事群体专题数据库", "version": "V1.2", "language": "zh-CN", "generated_at": "2026-06-25", "scope": "公开资料研究型专题,覆盖驻日本、韩国、关岛等印太地区美国军事群体、基地社区、地方舆情、法律制度、环境健康、NEO与信息安全风险。", "safety_note": "本数据库只用于公开资料研究与专题展示,不包含非公开部署细节、敏感坐标、警备路线、具体集合点或可操作化攻击信息。", "primary_modules": ["基地档案", "地方舆情与民调", "历史事件", "人群画像", "SOFA与预算", "环境健康", "NEO与信息安全", "涉华涉台立场"]}, "overview_metrics": [{"label": "印太司令部全区军事人员", "value": "约36万", "note": "skill速查口径,需按DMDC或DoD最新口径周期更新"}, {"label": "驻日美军", "value": "约53,500", "note": "日本全境现役规模概数"}, {"label": "驻韩美军", "value": "约23,600—28,500", "note": "不同统计口径包括实际现役与政策上限口径"}, {"label": "关岛美军", "value": "约7,000+", "note": "不含全部家属、文职和承包商扩展口径"}, {"label": "驻日美军家属", "value": "约35,000", "note": "USFJ公开口径"}, {"label": "日本当地雇员", "value": "约25,000", "note": "驻日基地经济与同盟分担重要变量"}, {"label": "DoDEA太平洋学校", "value": "46所", "note": "服务太平洋美军与合格DoD文职子女"}, {"label": "核心矛盾", "value": "威慑 / 负担 / 法律 / 环境", "note": "专题分析四条主线"}], "tabs": [{"id": "overview", "name": "总览"}, {"id": "bases", "name": "基地档案"}, {"id": "opinion", "name": "地方舆情"}, {"id": "events", "name": "事件时间线"}, {"id": "groups", "name": "人群画像"}, {"id": "legal_budget", "name": "SOFA与预算"}, {"id": "environment", "name": "环境健康"}, {"id": "neo_opsec", "name": "NEO与信息安全"}, {"id": "geopolitics", "name": "涉华涉台"}, {"id": "schemas", "name": "数据字段"}], "bases": [{"id": "JP-YOKOTA-001", "name_cn": "横田空军基地", "name_en": "Yokota Air Base", "country_area": "日本", "region": "日本本土", "location": "东京都多摩地区,东京西北方向", "service": "空军/太空军/联合指挥", "command": "USFJ、第五空军、374th Airlift Wing", "core_position": "驻日美军司令部所在地;印太方向空运、后勤、联络和危机协调枢纽", "units": ["374th Airlift Wing", "第五空军相关机构", "USFJ总部", "多个任务伙伴"], "missions": ["战区空运", "人员与物资输送", "危机支援", "日美联合协调", "首都圈军事联络"], "population": "374th Airlift Wing支撑约11,500人的基地人口;USFJ整体包含约60,000名军人、35,000名家属、7,000名DoD文职/承包商与约25,000名日本雇员。", "community": "首都圈型基地,家属、文职、日方雇员、任务伙伴较多,具有总部—后勤—家庭社区复合属性。", "facilities": ["空运设施", "指挥办公设施", "住房", "学校", "家庭支援", "医疗与生活服务"], "controversies": ["噪音", "空域管制", "首都圈军事存在", "基地开放与周边秩序"], "opinion_tags": ["首都圈基地", "指挥中枢", "空运枢纽", "噪音", "空域"], "visual_hint": "作为驻日美军总部节点展示,并与横须贺、嘉手纳、岩国形成指挥—海军—空军—陆战队网络。", "risk_level": "中", "source_note": "USFJ与Yokota官方公开资料"}, {"id": "JP-YOKOSUKA-002", "name_cn": "横须贺海军基地", "name_en": "Commander Fleet Activities Yokosuka", "country_area": "日本", "region": "日本本土", "location": "神奈川县横须贺市", "service": "海军", "command": "Commander, Navy Region Japan;第七舰队支撑体系", "core_position": "第七舰队前沿部署核心母港之一,支撑航母打击群及前沿部署海军力量。", "units": ["第七舰队相关前沿部署单位", "舰艇维修与后勤单位", "港口保障单位"], "missions": ["舰艇母港", "舰队后勤", "维修", "家庭支援", "港口保障", "同盟联络"], "population": "港口城市型基地,军人、家属、文职、承包商与当地商业区互动频繁。", "community": "基地与横须贺城市经济、旅游、港口身份高度绑定,同时舰艇可见性强。", "facilities": ["港口", "舰艇支援设施", "家庭服务", "宗教服务", "住房", "生活配套", "紧急管理设施"], "controversies": ["核动力舰艇停靠", "港口安全", "夜间秩序", "地方商业依赖", "军人外出行为"], "opinion_tags": ["第七舰队", "航母母港", "港口城市", "地方商业", "核动力舰艇"], "visual_hint": "适合做港口—舰艇—城市经济三层图,不展示具体舰艇行动细节。", "risk_level": "中高", "source_note": "CFA Yokosuka官方公开资料与日媒公开报道"}, {"id": "JP-KADENA-003", "name_cn": "嘉手纳空军基地", "name_eLine truncated
|
||||
+786
@@ -0,0 +1,786 @@
|
||||
{
|
||||
"说明": "字段显示目录:值级隐藏(隐藏即 data.json 各条目该键清空,全部渲染路径生效)。",
|
||||
"fields": [
|
||||
{
|
||||
"label": "label",
|
||||
"pages": [
|
||||
"总览"
|
||||
],
|
||||
"description": "总览 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"label"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "value",
|
||||
"pages": [
|
||||
"总览"
|
||||
],
|
||||
"description": "总览 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"value"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "note",
|
||||
"pages": [
|
||||
"总览"
|
||||
],
|
||||
"description": "总览 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"note"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "id",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"id"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "name_cn",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"name_cn"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "name_en",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"name_en"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "country_area",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"country_area"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "region",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"region"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "location",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"location"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "service",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"service"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "command",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"command"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "core_position",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"core_position"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "units",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"units"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "missions",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"missions"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "population",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"population"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "community",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"community"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "facilities",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"facilities"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "controversies",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"controversies"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "opinion_tags",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"opinion_tags"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "visual_hint",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"visual_hint"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "risk_level",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"risk_level"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "source_note",
|
||||
"pages": [
|
||||
"基地档案"
|
||||
],
|
||||
"description": "基地档案 数据字段(出现 13 条)",
|
||||
"keys": [
|
||||
"source_note"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "date",
|
||||
"pages": [
|
||||
"地方舆情"
|
||||
],
|
||||
"description": "地方舆情 数据字段(出现 11 条)",
|
||||
"keys": [
|
||||
"date"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "area",
|
||||
"pages": [
|
||||
"地方舆情"
|
||||
],
|
||||
"description": "地方舆情 数据字段(出现 11 条)",
|
||||
"keys": [
|
||||
"area"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "issue",
|
||||
"pages": [
|
||||
"地方舆情"
|
||||
],
|
||||
"description": "地方舆情 数据字段(出现 11 条)",
|
||||
"keys": [
|
||||
"issue"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "source_type",
|
||||
"pages": [
|
||||
"地方舆情"
|
||||
],
|
||||
"description": "地方舆情 数据字段(出现 11 条)",
|
||||
"keys": [
|
||||
"source_type"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "core_data",
|
||||
"pages": [
|
||||
"地方舆情"
|
||||
],
|
||||
"description": "地方舆情 数据字段(出现 11 条)",
|
||||
"keys": [
|
||||
"core_data"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "support",
|
||||
"pages": [
|
||||
"地方舆情"
|
||||
],
|
||||
"description": "地方舆情 数据字段(出现 11 条)",
|
||||
"keys": [
|
||||
"support"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "oppose",
|
||||
"pages": [
|
||||
"地方舆情"
|
||||
],
|
||||
"description": "地方舆情 数据字段(出现 11 条)",
|
||||
"keys": [
|
||||
"oppose"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "neutral",
|
||||
"pages": [
|
||||
"地方舆情"
|
||||
],
|
||||
"description": "地方舆情 数据字段(出现 11 条)",
|
||||
"keys": [
|
||||
"neutral"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "main_supporters",
|
||||
"pages": [
|
||||
"地方舆情"
|
||||
],
|
||||
"description": "地方舆情 数据字段(出现 11 条)",
|
||||
"keys": [
|
||||
"main_supporters"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "main_opponents",
|
||||
"pages": [
|
||||
"地方舆情"
|
||||
],
|
||||
"description": "地方舆情 数据字段(出现 11 条)",
|
||||
"keys": [
|
||||
"main_opponents"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "deep_conflict",
|
||||
"pages": [
|
||||
"地方舆情"
|
||||
],
|
||||
"description": "地方舆情 数据字段(出现 11 条)",
|
||||
"keys": [
|
||||
"deep_conflict"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "related_bases",
|
||||
"pages": [
|
||||
"地方舆情"
|
||||
],
|
||||
"description": "地方舆情 数据字段(出现 11 条)",
|
||||
"keys": [
|
||||
"related_bases"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "tags",
|
||||
"pages": [
|
||||
"地方舆情"
|
||||
],
|
||||
"description": "地方舆情 数据字段(出现 11 条)",
|
||||
"keys": [
|
||||
"tags"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "confidence",
|
||||
"pages": [
|
||||
"地方舆情"
|
||||
],
|
||||
"description": "地方舆情 数据字段(出现 11 条)",
|
||||
"keys": [
|
||||
"confidence"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "year",
|
||||
"pages": [
|
||||
"事件时间线"
|
||||
],
|
||||
"description": "事件时间线 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"year"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "title",
|
||||
"pages": [
|
||||
"事件时间线"
|
||||
],
|
||||
"description": "事件时间线 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"title"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "type",
|
||||
"pages": [
|
||||
"事件时间线"
|
||||
],
|
||||
"description": "事件时间线 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"type"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "actors",
|
||||
"pages": [
|
||||
"事件时间线"
|
||||
],
|
||||
"description": "事件时间线 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"actors"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "summary",
|
||||
"pages": [
|
||||
"事件时间线"
|
||||
],
|
||||
"description": "事件时间线 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"summary"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "impact",
|
||||
"pages": [
|
||||
"事件时间线"
|
||||
],
|
||||
"description": "事件时间线 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"impact"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "name",
|
||||
"pages": [
|
||||
"人群画像"
|
||||
],
|
||||
"description": "人群画像 数据字段(出现 9 条)",
|
||||
"keys": [
|
||||
"name"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "category",
|
||||
"pages": [
|
||||
"人群画像"
|
||||
],
|
||||
"description": "人群画像 数据字段(出现 9 条)",
|
||||
"keys": [
|
||||
"category"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "profile",
|
||||
"pages": [
|
||||
"人群画像"
|
||||
],
|
||||
"description": "人群画像 数据字段(出现 9 条)",
|
||||
"keys": [
|
||||
"profile"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "needs",
|
||||
"pages": [
|
||||
"人群画像"
|
||||
],
|
||||
"description": "人群画像 数据字段(出现 9 条)",
|
||||
"keys": [
|
||||
"needs"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "pressures",
|
||||
"pages": [
|
||||
"人群画像"
|
||||
],
|
||||
"description": "人群画像 数据字段(出现 9 条)",
|
||||
"keys": [
|
||||
"pressures"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "risks",
|
||||
"pages": [
|
||||
"人群画像"
|
||||
],
|
||||
"description": "人群画像 数据字段(出现 9 条)",
|
||||
"keys": [
|
||||
"risks"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "display",
|
||||
"pages": [
|
||||
"人群画像"
|
||||
],
|
||||
"description": "人群画像 数据字段(出现 9 条)",
|
||||
"keys": [
|
||||
"display"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "topic",
|
||||
"pages": [
|
||||
"SOFA与预算"
|
||||
],
|
||||
"description": "SOFA与预算 数据字段(出现 5 条)",
|
||||
"keys": [
|
||||
"topic"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "japan",
|
||||
"pages": [
|
||||
"SOFA与预算"
|
||||
],
|
||||
"description": "SOFA与预算 数据字段(出现 5 条)",
|
||||
"keys": [
|
||||
"japan"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "korea",
|
||||
"pages": [
|
||||
"SOFA与预算"
|
||||
],
|
||||
"description": "SOFA与预算 数据字段(出现 5 条)",
|
||||
"keys": [
|
||||
"korea"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "meaning",
|
||||
"pages": [
|
||||
"SOFA与预算"
|
||||
],
|
||||
"description": "SOFA与预算 数据字段(出现 5 条)",
|
||||
"keys": [
|
||||
"meaning"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "period",
|
||||
"pages": [
|
||||
"SOFA与预算"
|
||||
],
|
||||
"description": "SOFA与预算 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"period"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "item",
|
||||
"pages": [
|
||||
"SOFA与预算"
|
||||
],
|
||||
"description": "SOFA与预算 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"item"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "amount",
|
||||
"pages": [
|
||||
"SOFA与预算"
|
||||
],
|
||||
"description": "SOFA与预算 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"amount"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "explain",
|
||||
"pages": [
|
||||
"SOFA与预算"
|
||||
],
|
||||
"description": "SOFA与预算 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"explain"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "locations",
|
||||
"pages": [
|
||||
"环境健康"
|
||||
],
|
||||
"description": "环境健康 数据字段(出现 4 条)",
|
||||
"keys": [
|
||||
"locations"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "known_issue",
|
||||
"pages": [
|
||||
"环境健康"
|
||||
],
|
||||
"description": "环境健康 数据字段(出现 4 条)",
|
||||
"keys": [
|
||||
"known_issue"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "social_impact",
|
||||
"pages": [
|
||||
"环境健康"
|
||||
],
|
||||
"description": "环境健康 数据字段(出现 4 条)",
|
||||
"keys": [
|
||||
"social_impact"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "fields",
|
||||
"pages": [
|
||||
"环境健康"
|
||||
],
|
||||
"description": "环境健康 数据字段(出现 4 条)",
|
||||
"keys": [
|
||||
"fields"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "risk_trigger",
|
||||
"pages": [
|
||||
"NEO与信息安全"
|
||||
],
|
||||
"description": "NEO与信息安全 数据字段(出现 3 条)",
|
||||
"keys": [
|
||||
"risk_trigger"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "objects",
|
||||
"pages": [
|
||||
"NEO与信息安全"
|
||||
],
|
||||
"description": "NEO与信息安全 数据字段(出现 3 条)",
|
||||
"keys": [
|
||||
"objects"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "pressure",
|
||||
"pages": [
|
||||
"NEO与信息安全"
|
||||
],
|
||||
"description": "NEO与信息安全 数据字段(出现 3 条)",
|
||||
"keys": [
|
||||
"pressure"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "display_policy",
|
||||
"pages": [
|
||||
"NEO与信息安全"
|
||||
],
|
||||
"description": "NEO与信息安全 数据字段(出现 3 条)",
|
||||
"keys": [
|
||||
"display_policy"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "risk_type",
|
||||
"pages": [
|
||||
"NEO与信息安全"
|
||||
],
|
||||
"description": "NEO与信息安全 数据字段(出现 4 条)",
|
||||
"keys": [
|
||||
"risk_type"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "case",
|
||||
"pages": [
|
||||
"NEO与信息安全"
|
||||
],
|
||||
"description": "NEO与信息安全 数据字段(出现 4 条)",
|
||||
"keys": [
|
||||
"case"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "mechanism",
|
||||
"pages": [
|
||||
"NEO与信息安全"
|
||||
],
|
||||
"description": "NEO与信息安全 数据字段(出现 4 条)",
|
||||
"keys": [
|
||||
"mechanism"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "official_line",
|
||||
"pages": [
|
||||
"涉华涉台"
|
||||
],
|
||||
"description": "涉华涉台 数据字段(出现 5 条)",
|
||||
"keys": [
|
||||
"official_line"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "base_link",
|
||||
"pages": [
|
||||
"涉华涉台"
|
||||
],
|
||||
"description": "涉华涉台 数据字段(出现 5 条)",
|
||||
"keys": [
|
||||
"base_link"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "social_conflict",
|
||||
"pages": [
|
||||
"涉华涉台"
|
||||
],
|
||||
"description": "涉华涉台 数据字段(出现 5 条)",
|
||||
"keys": [
|
||||
"social_conflict"
|
||||
],
|
||||
"custom": false
|
||||
}
|
||||
]
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"系统": {
|
||||
"名称": "驻印太美国军事群体专题数据库",
|
||||
"版本": "V1.2",
|
||||
"说明": "公开资料研究型专题,覆盖驻日本、韩国、关岛等印太地区美国军事群体、基地社区、地方舆情、法律制度、环境健康、NEO与信息安全风险。"
|
||||
},
|
||||
"页面": [
|
||||
{
|
||||
"编号": "overview",
|
||||
"名称": "总览"
|
||||
},
|
||||
{
|
||||
"编号": "bases",
|
||||
"名称": "基地档案"
|
||||
},
|
||||
{
|
||||
"编号": "opinion",
|
||||
"名称": "地方舆情"
|
||||
},
|
||||
{
|
||||
"编号": "events",
|
||||
"名称": "事件时间线"
|
||||
},
|
||||
{
|
||||
"编号": "groups",
|
||||
"名称": "人群画像"
|
||||
},
|
||||
{
|
||||
"编号": "legal_budget",
|
||||
"名称": "SOFA与预算"
|
||||
},
|
||||
{
|
||||
"编号": "environment",
|
||||
"名称": "环境健康"
|
||||
},
|
||||
{
|
||||
"编号": "neo_opsec",
|
||||
"名称": "NEO与信息安全"
|
||||
},
|
||||
{
|
||||
"编号": "geopolitics",
|
||||
"名称": "涉华涉台"
|
||||
},
|
||||
{
|
||||
"编号": "schemas",
|
||||
"名称": "数据字段"
|
||||
}
|
||||
],
|
||||
"交互规则": {
|
||||
"默认展示": "overview"
|
||||
}
|
||||
}
|
||||
+225
@@ -0,0 +1,225 @@
|
||||
/* no.11 页面运行时(结构化模板)。
|
||||
* 由 template_fill.compose_structured 内联进骨架的运行时注入点。
|
||||
* DB 从骨架 JSON 元素读取;MANIFEST/FIELDS 供页面隐藏/自定义模块/字段可见性。 */
|
||||
const DB=JSON.parse((document.getElementById("structured-data")||{textContent:"{}"}).textContent);
|
||||
const MANIFEST=JSON.parse((document.getElementById("structured-manifest")||{textContent:"{}"}).textContent);
|
||||
const FIELDS=(function(){try{var v=JSON.parse((document.getElementById("structured-fields")||{textContent:"[]"}).textContent);return Array.isArray(v)?v:((v&&v.fields)||[])}catch(x){return []}})();
|
||||
;const state = { active:'overview' };
|
||||
const $ = sel => document.querySelector(sel);
|
||||
const content = $('#content');
|
||||
|
||||
function esc(v){
|
||||
if(v === null || v === undefined) return '';
|
||||
return String(v).replace(/[&<>"']/g, s=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[s]));
|
||||
}
|
||||
function arr(v){ return Array.isArray(v) ? v : (v ? [v] : []); }
|
||||
function tags(list){ return arr(list).map(t=>`<span class="tag">${esc(t)}</span>`).join(''); }
|
||||
function riskClass(r){ if(!r) return 'medium'; if(r.includes('高')) return 'high'; if(r.includes('低')) return 'low'; return 'medium'; }
|
||||
function includesText(obj, q){ return JSON.stringify(obj).toLowerCase().includes(q.toLowerCase()); }
|
||||
function filterByRegion(list, region){ return !region || region==='全部' ? list : list.filter(x => (x.region||x.country_area||'').includes(region) || (x.area||'').includes(region)); }
|
||||
|
||||
/* ── 页面隐藏 / 头部同步 / 自定义模块 ── */
|
||||
function pageHidden(key){
|
||||
const pg=(MANIFEST['页面']||[]).find(p=>p['编号']===key);
|
||||
return !!(pg&&pg['隐藏']===true);
|
||||
}
|
||||
function visibleTabs(){return (DB.tabs||[]).filter(t=>!pageHidden(t.id))}
|
||||
function syncHeader(){
|
||||
const sys=(MANIFEST['系统']||{});
|
||||
if(sys['名称']){document.title=String(sys['名称']);const h1=document.querySelector('.title-block h1,h1');if(h1)h1.textContent=String(sys['名称'])}
|
||||
const sub=document.querySelector('.title-block p');if(sub&&sys['说明'])sub.textContent=String(sys['说明']);
|
||||
const ver=document.querySelector('.version');if(ver&&sys['版本'])ver.textContent=String(sys['版本']);
|
||||
}
|
||||
function renderCustomModules(pageId){
|
||||
const host=document.querySelector('#content .tab-section');
|
||||
if(!host)return;
|
||||
host.querySelectorAll('.custom-module').forEach(x=>x.remove());
|
||||
const list=((MANIFEST||{})['自定义模块']||[]).filter(m=>m&&m['页面']===pageId&&m.html);
|
||||
list.forEach(m=>{
|
||||
const sec=document.createElement('div');sec.className='custom-module';sec.style.margin='18px 0';
|
||||
sec.innerHTML='<h2 style=\'margin:0 0 10px;font-size:18px\'>'+esc(m['标题']||'自定义模块')+'</h2>'+m.html;
|
||||
host.appendChild(sec);
|
||||
});
|
||||
}
|
||||
(function(){
|
||||
const _initTabs=initTabs;
|
||||
initTabs=function(){const saved=DB.tabs;DB.tabs=visibleTabs();try{_initTabs()}finally{DB.tabs=saved}};
|
||||
const _render=render;
|
||||
render=function(){_render();renderCustomModules(state.active)};
|
||||
})();
|
||||
function applyPageVisibility(){
|
||||
if(pageHidden(state.active)){const first=visibleTabs()[0];if(first)state.active=first.id}
|
||||
}
|
||||
function initTabs(){
|
||||
$('#tabs').innerHTML = DB.tabs.map(t=>`<button class="tab-btn ${t.id===state.active?'active':''}" onclick="switchTab('${t.id}')">${esc(t.name)}</button>`).join('');
|
||||
}
|
||||
function switchTab(id){ state.active=id; initTabs(); render(); window.scrollTo({top:0,behavior:'smooth'}); }
|
||||
|
||||
function head(title, desc){ return `<div class="section-head"><div><h2>${esc(title)}</h2><p>${esc(desc)}</p></div></div>`; }
|
||||
|
||||
function renderOverview(){
|
||||
const stats = DB.overview_metrics.map(m=>`<div class="stat"><div class="value">${esc(m.value)}</div><div class="label">${esc(m.label)}</div><div class="note">${esc(m.note)}</div></div>`).join('');
|
||||
const baseCount = DB.bases.length, opinionCount = DB.local_opinion.length, eventCount = DB.events.length, groupCount = DB.groups.length;
|
||||
return `${head('专题总览','以“前沿威慑—基地社会—同盟成本—地方冲突—家庭压力—信息安全—台海/朝鲜半岛风险”为主线。')}
|
||||
<div class="stats-grid">${stats}</div>
|
||||
<div class="columns">
|
||||
<div class="list-card"><h3>数据库构成</h3><ul>
|
||||
<li>基地档案:${baseCount} 条</li><li>地方舆情/民调:${opinionCount} 条</li><li>历史事件:${eventCount} 条</li><li>人群画像:${groupCount} 类</li>
|
||||
<li>SOFA制度:${DB.legal_sofa.length} 条</li><li>预算条目:${DB.budget.length} 条</li><li>环境健康:${DB.environment.length} 条</li>
|
||||
</ul></div>
|
||||
<div class="list-card"><h3>专题主线</h3><ul>
|
||||
<li>基地网络:日本本土、冲绳、韩国、关岛三层结构。</li>
|
||||
<li>地方舆情:冲绳反基地、韩国全国/地方分裂、关岛原住民与住房压力。</li>
|
||||
<li>制度争议:SOFA、刑事管辖、环境进入权、承包商身份。</li>
|
||||
<li>风险维度:NEO家庭压力、OPSEC、台海和朝鲜半岛危机暴露。</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="note-box"><b>使用建议:</b>先用“基地档案”建立核心对象,再用“事件时间线”和“地方舆情”解释社会反应,最后用“SOFA与预算”“环境健康”“NEO与信息安全”补足专题深度。</div>`;
|
||||
}
|
||||
|
||||
function baseCard(b){
|
||||
return `<article class="card"><span class="risk ${riskClass(b.risk_level)}">风险${esc(b.risk_level||'中')}</span><h3>${esc(b.name_cn)}</h3><div class="sub">${esc(b.name_en)} · ${esc(b.country_area)} / ${esc(b.region)}</div>
|
||||
<div class="meta-row"><b>军种</b><span>${esc(b.service)}</span></div>
|
||||
<div class="meta-row"><b>上级</b><span>${esc(b.command)}</span></div>
|
||||
<div class="meta-row"><b>定位</b><span>${esc(b.core_position)}</span></div>
|
||||
<div class="tags">${tags(b.opinion_tags)}</div><button class="btn" onclick="openBase('${b.id}')">查看详情</button></article>`;
|
||||
}
|
||||
function renderBases(){
|
||||
const regions = ['全部', ...new Set(DB.bases.map(b=>b.region))];
|
||||
return `${head('基地详细档案','按地区、军种和关键词检索基地,点击卡片可查看完整画像。')}
|
||||
<div class="toolbar"><input class="input" id="baseSearch" placeholder="搜索:基地名、军种、争议、任务、标签..." oninput="updateBases()"><select class="select" id="baseRegion" onchange="updateBases()">${regions.map(r=>`<option>${esc(r)}</option>`).join('')}</select></div><div class="grid" id="baseGrid"></div>`;
|
||||
}
|
||||
function updateBases(){
|
||||
const q = ($('#baseSearch')?.value || '').trim(); const region = $('#baseRegion')?.value || '全部';
|
||||
let list = filterByRegion(DB.bases, region); if(q) list = list.filter(b=>includesText(b,q));
|
||||
$('#baseGrid').innerHTML = list.length ? list.map(baseCard).join('') : '<div class="empty">没有找到匹配基地。</div>';
|
||||
}
|
||||
function openBase(id){
|
||||
const b = DB.bases.find(x=>x.id===id); if(!b) return;
|
||||
const rows = [
|
||||
['基地ID', b.id], ['中文名', b.name_cn], ['英文名', b.name_en], ['国家/地区', b.country_area], ['区域', b.region], ['所在地', b.location], ['所属军种', b.service], ['上级体系', b.command], ['核心定位', b.core_position], ['主要单位', arr(b.units).join('、')], ['主要任务', arr(b.missions).join('、')], ['人员/社区', b.population], ['社区特征', b.community], ['主要设施', arr(b.facilities).join('、')], ['争议点', arr(b.controversies).join('、')], ['舆情标签', arr(b.opinion_tags).join('、')], ['可视化建议', b.visual_hint], ['风险等级', b.risk_level], ['资料来源说明', b.source_note]
|
||||
];
|
||||
openModal(b.name_cn, detailRows(rows));
|
||||
}
|
||||
|
||||
function renderOpinion(){
|
||||
const regions = ['全部', ...new Set(DB.local_opinion.map(o=>o.region))];
|
||||
return `${head('地方舆情与民调数据库','重点呈现冲绳、韩国、关岛三个典型场景:地方负担、全国/地方分裂、原住民与住房压力。')}
|
||||
<div class="toolbar"><input class="input" id="opSearch" placeholder="搜索:边野古、THAAD、关岛、住房、SOFA..." oninput="updateOpinion()"><select class="select" id="opRegion" onchange="updateOpinion()">${regions.map(r=>`<option>${esc(r)}</option>`).join('')}</select></div>
|
||||
<div class="table-wrap"><table><thead><tr><th>时间</th><th>地区</th><th>议题</th><th>核心数据</th><th>支持/反对</th><th>深层矛盾</th><th>标签</th></tr></thead><tbody id="opRows"></tbody></table></div>`;
|
||||
}
|
||||
function updateOpinion(){
|
||||
const q = ($('#opSearch')?.value || '').trim(); const region = $('#opRegion')?.value || '全部';
|
||||
let list = filterByRegion(DB.local_opinion, region); if(q) list = list.filter(o=>includesText(o,q));
|
||||
$('#opRows').innerHTML = list.map(o=>`<tr><td>${esc(o.date)}</td><td>${esc(o.area)}</td><td><b>${esc(o.issue)}</b><br><span class="sub">${esc(o.source_type)} / 可信度:${esc(o.confidence)}</span></td><td>${esc(o.core_data)}</td><td>支持:${esc(o.support)}<br>反对:${esc(o.oppose)}<br>中立:${esc(o.neutral)}</td><td>${esc(o.deep_conflict)}</td><td>${tags(o.tags)}</td></tr>`).join('') || '<tr><td colspan="7">没有匹配结果。</td></tr>';
|
||||
}
|
||||
|
||||
function renderEvents(){
|
||||
return `${head('历史事件时间线','将个案事件与SOFA、地方自治、环境健康、基地扩张和大国博弈连接。')}
|
||||
<div class="toolbar"><input class="input" id="eventSearch" placeholder="搜索:冲绳、SOFA、THAAD、PFAS、关岛..." oninput="updateEvents()"></div>
|
||||
<div class="timeline" id="eventTimeline"></div>`;
|
||||
}
|
||||
function updateEvents(){
|
||||
const q = ($('#eventSearch')?.value || '').trim(); let list = DB.events; if(q) list = list.filter(e=>includesText(e,q));
|
||||
$('#eventTimeline').innerHTML = list.map(e=>`<div class="event"><div class="year">${esc(e.date)} · ${esc(e.region)} · ${esc(e.type)}</div><h3>${esc(e.title)}</h3><p>${esc(e.summary)}</p><p><b>影响:</b>${esc(e.impact)}</p><p><b>深层矛盾:</b>${esc(e.deep_conflict)}</p><div class="tags">${tags(e.tags)}</div></div>`).join('') || '<div class="empty">没有匹配事件。</div>';
|
||||
}
|
||||
|
||||
function renderGroups(){
|
||||
return `${head('人群画像','把“美军群体”拆成军人、家属、文职、承包商、当地雇员和混合国籍家庭。')}
|
||||
<div class="toolbar"><input class="input" id="groupSearch" placeholder="搜索:配偶、子女、承包商、NEO、就业..." oninput="updateGroups()"></div><div class="grid" id="groupGrid"></div>`;
|
||||
}
|
||||
function updateGroups(){
|
||||
const q = ($('#groupSearch')?.value || '').trim(); let list = DB.groups; if(q) list = list.filter(g=>includesText(g,q));
|
||||
$('#groupGrid').innerHTML = list.map(g=>`<article class="card"><h3>${esc(g.name)}</h3><div class="sub">${esc(g.category)} · ${esc(g.display)}</div><p>${esc(g.profile)}</p><div class="meta-row"><b>主要需求</b><span>${esc(arr(g.needs).join('、'))}</span></div><div class="meta-row"><b>核心压力</b><span>${esc(arr(g.pressures).join('、'))}</span></div><div class="tags">${tags(g.risks)}</div></article>`).join('') || '<div class="empty">没有匹配画像。</div>';
|
||||
}
|
||||
|
||||
function renderLegalBudget(){
|
||||
return `${head('SOFA与预算','把法律身份、刑事管辖、环境进入权、同盟分担和基地建设放在同一制度框架下观察。')}
|
||||
<h3>SOFA制度要点</h3><div class="table-wrap"><table><thead><tr><th>议题</th><th>日本方向</th><th>韩国方向</th><th>专题解释</th></tr></thead><tbody>${DB.legal_sofa.map(x=>`<tr><td><b>${esc(x.topic)}</b></td><td>${esc(x.japan)}</td><td>${esc(x.korea)}</td><td>${esc(x.meaning)}</td></tr>`).join('')}</tbody></table></div>
|
||||
<h3 style="margin-top:20px">预算与同盟分担</h3><div class="table-wrap"><table><thead><tr><th>地区</th><th>时期</th><th>项目</th><th>金额/口径</th><th>说明</th><th>标签</th></tr></thead><tbody>${DB.budget.map(x=>`<tr><td>${esc(x.area)}</td><td>${esc(x.period)}</td><td><b>${esc(x.item)}</b></td><td>${esc(x.amount)}</td><td>${esc(x.explain)}</td><td>${tags(x.tags)}</td></tr>`).join('')}</tbody></table></div>`;
|
||||
}
|
||||
|
||||
function renderEnvironment(){
|
||||
return `${head('环境与公共健康','重点覆盖PFAS、噪音、土地占用、海洋生态等与基地社会关系最密切的议题。')}
|
||||
<div class="grid">${DB.environment.map(e=>`<article class="card"><h3>${esc(e.type)}</h3><div class="sub">涉及地点:${esc(arr(e.locations).join('、'))}</div><p><b>已知问题:</b>${esc(e.known_issue)}</p><p><b>社会影响:</b>${esc(e.social_impact)}</p><div class="meta-row"><b>字段</b><span>${esc(arr(e.fields).join('、'))}</span></div><div class="tags">${tags(e.tags)}</div></article>`).join('')}</div>`;
|
||||
}
|
||||
|
||||
function renderNeoOpsec(){
|
||||
return `${head('NEO与信息安全','以家庭风险、撤离资格、信息安全治理为主题,不展示具体路线、集合点或可操作细节。')}
|
||||
<div class="columns"><div><h3>NEO风险场景</h3>${DB.neo.map(n=>`<div class="list-card" style="margin-bottom:12px"><h3>${esc(n.region)}</h3><p><b>触发:</b>${esc(n.risk_trigger)}</p><p><b>对象:</b>${esc(n.objects)}</p><p><b>压力:</b>${esc(n.pressure)}</p><div class="tags">${tags(n.tags)}</div></div>`).join('')}</div>
|
||||
<div><h3>OPSEC风险类型</h3>${DB.opsec.map(o=>`<div class="list-card" style="margin-bottom:12px"><h3>${esc(o.risk_type)}</h3><p><b>案例:</b>${esc(o.case)}</p><p><b>对象:</b>${esc(o.objects)}</p><p><b>机制:</b>${esc(o.mechanism)}</p><p><b>展示口径:</b>${esc(o.display)}</p><div class="tags">${tags(o.tags)}</div></div>`).join('')}</div></div>`;
|
||||
}
|
||||
|
||||
function renderGeopolitics(){
|
||||
return `${head('涉华涉台与地缘风险','从第一岛链、台湾问题、朝鲜半岛、关岛角色与中国叙事五个角度呈现。')}
|
||||
<div class="grid">${DB.geopolitics.map(g=>`<article class="card"><h3>${esc(g.issue)}</h3><p><b>美国官方口径:</b>${esc(g.official_line)}</p><p><b>基地/群体关联:</b>${esc(g.base_link)}</p><p><b>社会争议:</b>${esc(g.social_conflict)}</p><div class="tags">${tags(g.tags)}</div></article>`).join('')}</div>`;
|
||||
}
|
||||
|
||||
function renderSchemas(){
|
||||
const boxes = Object.entries(DB.schemas).map(([k, fields])=>`<div class="schema-box"><div class="schema-title">${esc(k)}</div><div class="field-list">${fields.map(f=>`<span class="field">${esc(f)}</span>`).join('')}</div></div>`).join('');
|
||||
const gaps = DB.data_gaps.map(g=>`<tr><td><b>${esc(g.gap)}</b></td><td>${esc(g.priority)}</td><td>${esc(g.explain)}</td></tr>`).join('');
|
||||
return `${head('数据字段与后续缺口','用于后续扩展JSON、接入外部数据源和长期更新。')}${boxes}<h3>当前数据缺口</h3><div class="table-wrap"><table><thead><tr><th>缺口</th><th>优先级</th><th>说明</th></tr></thead><tbody>${gaps}</tbody></table></div>`;
|
||||
}
|
||||
|
||||
function detailRows(rows){
|
||||
return `<div class="detail-grid">${rows.map(([k,v])=>`<div class="detail-k">${esc(k)}</div><div class="detail-v">${esc(v)}</div>`).join('')}</div>`;
|
||||
}
|
||||
function openModal(title, body){ $('#modalTitle').textContent = title; $('#modalBody').innerHTML = body; $('#modalBackdrop').style.display='block'; document.body.style.overflow='hidden'; }
|
||||
function closeModal(){ $('#modalBackdrop').style.display='none'; document.body.style.overflow=''; }
|
||||
|
||||
function render(){
|
||||
let html = '';
|
||||
if(state.active==='overview') html = renderOverview();
|
||||
if(state.active==='bases') html = renderBases();
|
||||
if(state.active==='opinion') html = renderOpinion();
|
||||
if(state.active==='events') html = renderEvents();
|
||||
if(state.active==='groups') html = renderGroups();
|
||||
if(state.active==='legal_budget') html = renderLegalBudget();
|
||||
if(state.active==='environment') html = renderEnvironment();
|
||||
if(state.active==='neo_opsec') html = renderNeoOpsec();
|
||||
if(state.active==='geopolitics') html = renderGeopolitics();
|
||||
if(state.active==='schemas') html = renderSchemas();
|
||||
content.innerHTML = `<section class="tab-section active">${html}</section>`;
|
||||
if(state.active==='bases') updateBases();
|
||||
if(state.active==='opinion') updateOpinion();
|
||||
if(state.active==='events') updateEvents();
|
||||
if(state.active==='groups') updateGroups();
|
||||
}applyPageVisibility(); syncHeader(); initTabs(); render();
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
(function(){
|
||||
"use strict";
|
||||
function clone(v){return JSON.parse(JSON.stringify(v))}
|
||||
function draftsToData(d){var o={};Object.keys(d).forEach(function(k){if(k!=='__manifest__')o[k]=d[k]});return o}
|
||||
function replaceInPlace(t,s){Object.keys(t).forEach(function(k){delete t[k]});Object.keys(s).forEach(function(k){t[k]=s[k]})}
|
||||
function buildDrafts(data,manifest){var o={__manifest__:clone(manifest)};Object.keys(data).forEach(function(k){o[k]=clone(data[k])});return o}
|
||||
const initialData=clone(DB),initialManifest=clone(MANIFEST);
|
||||
const overlay=document.getElementById('editorOverlay');
|
||||
if(!overlay)return;
|
||||
const fingerprint=(function(){let h=2166136261;const s=JSON.stringify(initialData)+'|'+JSON.stringify(initialManifest);for(let i=0;i<s.length;i++){h^=s.charCodeAt(i);h=Math.imul(h,16777619)}return (h>>>0).toString(36)})();
|
||||
const storageKey='structured-page-data-v1:'+fingerprint;
|
||||
function readLS(k){try{return window.localStorage?window.localStorage.getItem(k):null}catch(x){return null}}
|
||||
function writeLS(k,v){try{if(window.localStorage)window.localStorage.setItem(k,v)}catch(x){}}
|
||||
function removeLS(k){try{if(window.localStorage)window.localStorage.removeItem(k)}catch(x){}}
|
||||
(function(){const cached=readLS(storageKey);if(!cached)return;try{const parsed=JSON.parse(cached);if(parsed&&typeof parsed==='object'&&parsed.data&&typeof parsed.data==='object'){replaceInPlace(DB,parsed.data);if(parsed.manifest&&typeof parsed.manifest==='object')replaceInPlace(MANIFEST,parsed.manifest)}}catch(x){}})();
|
||||
const labels={};(MANIFEST['页面']||[]).forEach(function(p){if(p&&p['编号'])labels[p['编号']]=p['名称']||p['编号']});
|
||||
const modules=Object.keys(DB).filter(function(k){return k!=='metadata'&&k!=='tabs'&&k!=='schemas'&&k!=='data_gaps'}).concat(['__manifest__']);
|
||||
let active=modules[0]||'__manifest__';
|
||||
let drafts=buildDrafts(DB,MANIFEST);
|
||||
function moduleTitle(k){return k==='__manifest__'?'系统设置(MANIFEST)':(labels[k]||k)}
|
||||
const tabsEl=document.getElementById('editorTabs'),editor=document.getElementById('jsonEditor'),statusEl=document.getElementById('jsonStatus'),titleEl=document.getElementById('editorModuleTitle');
|
||||
function setStatus(ok,msg){statusEl.textContent=msg;statusEl.className='json-status '+(ok?'valid':'invalid')}
|
||||
function readEditor(){try{const p=JSON.parse(editor.value);if(!p||typeof p!=='object')throw new Error('模块必须是 JSON 对象或数组');setStatus(true,'JSON 有效');return p}catch(x){setStatus(false,'JSON 无效:'+x.message);return null}}
|
||||
function saveActiveDraft(){const p=readEditor();if(!p)return false;drafts[active]=p;return true}
|
||||
function loadEditor(){titleEl.textContent=moduleTitle(active);editor.value=JSON.stringify(drafts[active],null,2);setStatus(true,'JSON 有效')}
|
||||
function renderEditorTabs(){tabsEl.innerHTML='';modules.forEach(function(key){const b=document.createElement('button');b.type='button';b.className='editor-tab'+(key===active?' active':'');b.innerHTML='<b>'+esc(moduleTitle(key))+'</b><small>'+(key==='__manifest__'?'manifest.json':key)+'</small>';b.onclick=function(){if(key===active||!saveActiveDraft())return;active=key;renderEditorTabs();loadEditor()};tabsEl.appendChild(b)})}
|
||||
function closeEditor(){overlay.style.display='none'}
|
||||
function applyToPage(){if(!saveActiveDraft()){setStatus(false,'存在无效模块');return}replaceInPlace(DB,draftsToData(drafts));replaceInPlace(MANIFEST,drafts.__manifest__);closeEditor();applyPageVisibility();syncHeader();initTabs();render();writeLS(storageKey,JSON.stringify({data:DB,manifest:MANIFEST}))}
|
||||
function legacyCopy(text){const t=document.createElement('textarea');t.value=text;document.body.appendChild(t);t.select();try{document.execCommand('copy')}catch(x){}t.remove()}
|
||||
document.getElementById('openEditor').onclick=function(){drafts=buildDrafts(DB,MANIFEST);active=modules[0]||'__manifest__';renderEditorTabs();loadEditor();overlay.style.display='';setTimeout(function(){editor.focus()},40)};
|
||||
document.getElementById('closeEditor').onclick=closeEditor;
|
||||
document.addEventListener('keydown',function(ev){if(ev.key==='Escape'&&overlay.style.display!=='none')closeEditor()});
|
||||
document.getElementById('applyJson').onclick=applyToPage;
|
||||
document.getElementById('resetJson').onclick=function(){drafts=buildDrafts(initialData,initialManifest);active=modules[0]||'__manifest__';removeLS(storageKey);renderEditorTabs();loadEditor();setStatus(true,'已恢复默认数据,点击「应用到页面」生效')};
|
||||
document.getElementById('copyJson').onclick=function(){if(!saveActiveDraft())return;const text=JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2);if(navigator.clipboard&&navigator.clipboard.writeText)navigator.clipboard.writeText(text).catch(function(){legacyCopy(text)});else legacyCopy(text)};
|
||||
document.getElementById('downloadJson').onclick=function(){if(!saveActiveDraft())return;const blob=new Blob([JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2)],{type:'application/json;charset=utf-8'});const link=document.createElement('a');link.href=URL.createObjectURL(blob);link.download='page-data.json';link.click();setTimeout(function(){URL.revokeObjectURL(link.href)},1000)};
|
||||
})();
|
||||
+161
@@ -0,0 +1,161 @@
|
||||
<!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 {
|
||||
--bg0:#5b0d14;
|
||||
--bg1:#7f1620;
|
||||
--bg2:#2b080b;
|
||||
--card:#ffffff;
|
||||
--ink:#241015;
|
||||
--muted:#6f5960;
|
||||
--line:#ead9dc;
|
||||
--soft:#fff7f8;
|
||||
--accent:#b6202d;
|
||||
--accent2:#f2d7dc;
|
||||
--ok:#1f7a4d;
|
||||
--warn:#a96b00;
|
||||
--danger:#b6202d;
|
||||
--shadow:0 18px 45px rgba(27,5,9,.18);
|
||||
}
|
||||
*{box-sizing:border-box}
|
||||
body{margin:0;font-family:"Microsoft YaHei", "PingFang SC", Arial, sans-serif;background:radial-gradient(circle at 20% 0%, #9e2430 0, var(--bg1) 22%, var(--bg0) 50%, var(--bg2) 100%);color:var(--ink);}
|
||||
.hero{max-width:1320px;margin:0 auto;padding:34px 24px 18px;color:#fff;}
|
||||
.hero-top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;}
|
||||
.title-block h1{font-size:34px;margin:0 0 10px;letter-spacing:.5px}
|
||||
.title-block p{margin:0;max-width:900px;line-height:1.75;color:#ffe9ed;font-size:14px}
|
||||
.version{border:1px solid rgba(255,255,255,.35);padding:10px 14px;border-radius:999px;background:rgba(255,255,255,.1);white-space:nowrap;font-weight:700}
|
||||
.shell{max-width:1320px;margin:0 auto 40px;padding:0 24px 28px;}
|
||||
.panel{background:rgba(255,255,255,.96);border:1px solid rgba(255,255,255,.45);border-radius:26px;box-shadow:var(--shadow);overflow:hidden;}
|
||||
.tabs{display:flex;gap:8px;overflow-x:auto;padding:14px 14px 0;background:linear-gradient(180deg,#fff,#fff8f9);border-bottom:1px solid var(--line);}
|
||||
.tab-btn{border:1px solid var(--line);background:#fff;color:var(--muted);padding:10px 16px;border-radius:999px;font-weight:700;cursor:pointer;white-space:nowrap;transition:.18s;}
|
||||
.tab-btn:hover{transform:translateY(-1px);border-color:#d9aab1;color:var(--accent)}
|
||||
.tab-btn.active{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 8px 18px rgba(182,32,45,.22)}
|
||||
.content{padding:22px;}
|
||||
.tab-section{display:none}
|
||||
.tab-section.active{display:block}
|
||||
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:16px;}
|
||||
.section-head h2{margin:0;font-size:24px;color:#2b0c10}
|
||||
.section-head p{margin:6px 0 0;color:var(--muted);line-height:1.65}
|
||||
.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0 18px;}
|
||||
.input,.select{height:42px;border:1px solid var(--line);border-radius:14px;padding:0 12px;background:#fff;outline:none;color:var(--ink);}
|
||||
.input{min-width:260px;flex:1}
|
||||
.select{min-width:160px}
|
||||
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px;}
|
||||
.stat{background:linear-gradient(180deg,#fff,#fff6f7);border:1px solid var(--line);border-radius:20px;padding:16px;}
|
||||
.stat .value{font-size:26px;font-weight:900;color:var(--accent);margin-bottom:6px}
|
||||
.stat .label{font-weight:800;margin-bottom:8px}
|
||||
.stat .note{font-size:12px;color:var(--muted);line-height:1.5}
|
||||
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}
|
||||
.card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:16px;box-shadow:0 10px 26px rgba(58,16,23,.07);position:relative;overflow:hidden;}
|
||||
.card::before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,var(--accent),#e8a1ab)}
|
||||
.card h3{margin:4px 0 6px;font-size:19px;color:#2b0c10}
|
||||
.sub{font-size:13px;color:var(--muted);line-height:1.55;margin-bottom:12px}
|
||||
.meta-row{display:grid;grid-template-columns:90px 1fr;gap:8px;font-size:13px;margin:8px 0;line-height:1.5}
|
||||
.meta-row b{color:#5a1b22}
|
||||
.tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
|
||||
.tag{font-size:12px;padding:5px 8px;border-radius:999px;background:var(--soft);border:1px solid var(--accent2);color:#7b2430;font-weight:700}
|
||||
.risk{position:absolute;right:14px;top:13px;font-size:12px;padding:5px 9px;border-radius:999px;color:#fff;background:var(--warn);font-weight:800}
|
||||
.risk.high{background:var(--danger)}
|
||||
.risk.medium{background:var(--warn)}
|
||||
.risk.low{background:var(--ok)}
|
||||
.btn{border:0;background:var(--accent);color:#fff;border-radius:12px;padding:10px 12px;font-weight:800;cursor:pointer;margin-top:12px;}
|
||||
.btn.secondary{background:#fff;color:var(--accent);border:1px solid var(--accent2)}
|
||||
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:18px;background:#fff;}
|
||||
table{border-collapse:collapse;width:100%;min-width:980px}
|
||||
th,td{border-bottom:1px solid var(--line);padding:12px 12px;text-align:left;vertical-align:top;line-height:1.55;font-size:13px}
|
||||
th{background:#fff3f5;color:#5b1118;position:sticky;top:0;z-index:1}
|
||||
tr:hover td{background:#fffafa}
|
||||
.timeline{position:relative;margin:8px 0 0;padding-left:24px}
|
||||
.timeline::before{content:"";position:absolute;left:8px;top:0;bottom:0;width:2px;background:#e7b5bd}
|
||||
.event{position:relative;margin:0 0 14px;padding:14px 14px 14px 18px;background:#fff;border:1px solid var(--line);border-radius:18px;}
|
||||
.event::before{content:"";position:absolute;left:-22px;top:20px;width:12px;height:12px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 4px #f7dce1}
|
||||
.event .year{font-weight:900;color:var(--accent);font-size:14px}
|
||||
.event h3{margin:4px 0 8px}
|
||||
.columns{display:grid;grid-template-columns:1fr 1fr;gap:16px}
|
||||
.list-card{border:1px solid var(--line);border-radius:18px;padding:14px;background:#fff}
|
||||
.list-card h3{margin:0 0 10px;color:#391016}
|
||||
.list-card ul{margin:0;padding-left:18px;line-height:1.8;color:#443238}
|
||||
.schema-box{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;margin-bottom:12px}
|
||||
.schema-title{font-weight:900;color:#5b1118;margin-bottom:10px}
|
||||
.field-list{display:flex;flex-wrap:wrap;gap:8px}
|
||||
.field{padding:7px 9px;border:1px solid var(--accent2);background:#fff7f8;border-radius:10px;font-size:12px;font-weight:700;color:#6d222b}
|
||||
.note-box{background:#fff7f8;border:1px solid var(--accent2);border-radius:18px;padding:14px;color:#5d4047;line-height:1.7;margin:14px 0}
|
||||
.modal-backdrop{display:none;position:fixed;inset:0;background:rgba(25,0,5,.55);z-index:20;padding:28px;overflow:auto}
|
||||
.modal{max-width:980px;margin:20px auto;background:#fff;border-radius:24px;box-shadow:0 25px 70px rgba(0,0,0,.35);overflow:hidden}
|
||||
.modal-head{padding:18px 22px;background:linear-gradient(90deg,#7f1620,#b6202d);color:#fff;display:flex;justify-content:space-between;gap:14px;align-items:center}
|
||||
.modal-head h2{margin:0;font-size:22px}
|
||||
.close{background:rgba(255,255,255,.16);color:#fff;border:1px solid rgba(255,255,255,.35);border-radius:12px;padding:8px 10px;cursor:pointer;font-weight:900}
|
||||
.modal-body{padding:20px}
|
||||
.detail-grid{display:grid;grid-template-columns:160px 1fr;gap:10px;border:1px solid var(--line);border-radius:18px;overflow:hidden}
|
||||
.detail-k{background:#fff6f7;color:#6d222b;font-weight:900;padding:11px;border-bottom:1px solid var(--line)}
|
||||
.detail-v{padding:11px;border-bottom:1px solid var(--line);line-height:1.65}
|
||||
.footer{padding:16px 22px;background:#fff8f9;border-top:1px solid var(--line);color:var(--muted);font-size:12px;line-height:1.6}
|
||||
.empty{text-align:center;padding:28px;color:var(--muted);background:#fff;border:1px dashed var(--line);border-radius:18px}
|
||||
@media(max-width:1000px){.stats-grid{grid-template-columns:repeat(2,1fr)}.grid{grid-template-columns:repeat(2,1fr)}.columns{grid-template-columns:1fr}}
|
||||
@media(max-width:680px){.hero-top{flex-direction:column}.stats-grid,.grid{grid-template-columns:1fr}.content{padding:14px}.detail-grid{grid-template-columns:1fr}.detail-k{border-bottom:0;padding-bottom:0}.input{min-width:100%}}
|
||||
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
.editor-fab{position:fixed;right:18px;bottom:26px;z-index:60;background:#7c1d24;color:#fff;border:0;border-radius:50%;width:46px;height:46px;display:grid;place-items:center;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.3)}.editor-fab:hover{transform:rotate(30deg)}.editor-fab svg{width:22px;height:22px;display:block}
|
||||
.editor-overlay{z-index:80}
|
||||
.editor-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(1080px,94vw);height:min(680px,88vh);background:#fff;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.35)}
|
||||
.editor-head{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid #e5e7eb}.editor-head h2{margin:0;font-size:16px;flex:1}.editor-head .editor-note{font-size:12px;color:#667085;margin-right:8px}
|
||||
.editor-body{display:flex;flex:1;min-height:0}
|
||||
.editor-tabs{width:210px;border-right:1px solid #e5e7eb;overflow:auto;padding:10px 8px;display:flex;flex-direction:column;gap:4px}
|
||||
.editor-tab{border:0;background:transparent;text-align:left;padding:9px 11px;border-radius:8px;cursor:pointer;color:#667085}.editor-tab b{display:block;font-size:13px;color:#1e2329}.editor-tab small{font-size:10px;opacity:.75}.editor-tab:hover{background:#f4f6f8}.editor-tab.active{background:#f7ecec}.editor-tab.active b{color:#7c1d24}
|
||||
.editor-pane{flex:1;display:flex;flex-direction:column;min-width:0;padding:14px 16px;gap:10px}
|
||||
.editor-title-row{display:flex;align-items:center;justify-content:space-between}.editor-title-row b{font-size:14px}
|
||||
.json-status{font-size:12px;padding:3px 10px;border-radius:999px}.json-status.valid{background:#e8f5ef;color:#14804a}.json-status.invalid{background:#fdecec;color:#b4232d}
|
||||
.json-editor{flex:1;width:100%;resize:none;border:1px solid #e5e7eb;border-radius:10px;padding:13px;font:13px/1.6 ui-monospace,Consolas,monospace;color:#1e2329;background:#f8fafc;outline:0;tab-size:2}
|
||||
.editor-actions{display:flex;gap:8px;flex-wrap:wrap}
|
||||
.editor-hint{margin:0;font-size:11px;color:#8a94a3}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header class="hero">
|
||||
<div class="hero-top">
|
||||
<div class="title-block">
|
||||
<h1>驻印太美国军事群体专题库</h1>
|
||||
<p>围绕日本、韩国、关岛等地区的美国军事群体、基地网络、地方舆情、SOFA争议、环境健康、NEO撤离与信息安全风险进行结构化展示。</p>
|
||||
</div>
|
||||
<div class="version">V1.2</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="shell">
|
||||
<section class="panel">
|
||||
<nav class="tabs" id="tabs"></nav>
|
||||
<div class="content" id="content"></div>
|
||||
<div class="footer">资料边界:本页面仅展示公开资料研究数据,避免包含非公开部署细节、敏感坐标、警备路线、具体集合点或可操作化攻击信息。建议在正式发布前继续核验年度人员、预算、地方投诉与民调数据。</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<div class="modal-backdrop" id="modalBackdrop" onclick="if(event.target.id==='modalBackdrop') closeModal()">
|
||||
<div class="modal">
|
||||
<div class="modal-head"><h2 id="modalTitle">详情</h2><button class="close" onclick="closeModal()">关闭</button></div>
|
||||
<div class="modal-body" id="modalBody"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="button" id="openEditor" class="editor-fab" aria-label="JSON 编辑器" title="页面 JSON 编辑器"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg></button>
|
||||
<div id="editorOverlay" class="editor-overlay" style="display:none"><div class="editor-modal">
|
||||
<header class="editor-head"><h2>页面 JSON 编辑器</h2><span class="editor-note">按模块编辑,应用后即时重渲染;修改保存在浏览器本地,不回写服务器</span><button type="button" id="closeEditor" style="border:0;background:none;font-size:14px;cursor:pointer">关闭</button></header>
|
||||
<div class="editor-body">
|
||||
<nav id="editorTabs" class="editor-tabs"></nav>
|
||||
<div class="editor-pane">
|
||||
<div class="editor-title-row"><b id="editorModuleTitle"></b><span id="jsonStatus" class="json-status valid">JSON 有效</span></div>
|
||||
<textarea id="jsonEditor" class="json-editor" spellcheck="false" aria-label="当前模块 JSON"></textarea>
|
||||
<div class="editor-actions"><button type="button" id="applyJson" style="background:#7c1d24;color:#fff;border:0;border-radius:6px;padding:7px 14px;cursor:pointer">应用到页面</button><button type="button" id="resetJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">恢复默认数据</button><button type="button" id="copyJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">复制完整 JSON</button><button type="button" id="downloadJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">下载 JSON</button></div>
|
||||
<p class="editor-hint">模块 = 页面数据(DATA)的顶层键,另附「系统设置」编辑 MANIFEST;沙箱预览无法使用本地缓存时,修改仅当次会话有效。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
<script type="application/json" id="structured-data">__PAGE_DATA__</script>
|
||||
<script type="application/json" id="structured-manifest">__PAGE_MANIFEST__</script>
|
||||
<script type="application/json" id="structured-fields">__PAGE_FIELDS__</script>
|
||||
<script>__PAGE_RUNTIME__</script>
|
||||
</body>
|
||||
</html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"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
|
||||
+588
@@ -0,0 +1,588 @@
|
||||
{
|
||||
"说明": "字段显示目录:值级隐藏(隐藏即 data.json 各条目该键清空,全部渲染路径生效)。",
|
||||
"fields": [
|
||||
{
|
||||
"label": "id",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"id"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "名称",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"名称"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "英文名称",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"英文名称"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "节点类型",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"节点类型"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "所属层级",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"所属层级"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "政策领域",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"政策领域"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "权力来源",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"权力来源"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "政策工具",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"政策工具"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "核心诉求",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"核心诉求"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "涉华立场",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"涉华立场"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "涉台立场",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"涉台立场"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "近期动作",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"近期动作"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "风险信号",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"风险信号"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "证据等级",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"证据等级"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "来源",
|
||||
"pages": [
|
||||
"权力节点"
|
||||
],
|
||||
"description": "权力节点 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"来源"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "edge_id",
|
||||
"pages": [
|
||||
"关系图谱"
|
||||
],
|
||||
"description": "关系图谱 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"edge_id"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "source",
|
||||
"pages": [
|
||||
"关系图谱"
|
||||
],
|
||||
"description": "关系图谱 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"source"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "target",
|
||||
"pages": [
|
||||
"关系图谱"
|
||||
],
|
||||
"description": "关系图谱 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"target"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "关系类型",
|
||||
"pages": [
|
||||
"关系图谱"
|
||||
],
|
||||
"description": "关系图谱 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"关系类型"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "关系方向",
|
||||
"pages": [
|
||||
"关系图谱"
|
||||
],
|
||||
"description": "关系图谱 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"关系方向"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "强度",
|
||||
"pages": [
|
||||
"关系图谱"
|
||||
],
|
||||
"description": "关系图谱 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"强度"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "证据说明",
|
||||
"pages": [
|
||||
"关系图谱"
|
||||
],
|
||||
"description": "关系图谱 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"证据说明"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "可视化样式",
|
||||
"pages": [
|
||||
"关系图谱"
|
||||
],
|
||||
"description": "关系图谱 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"可视化样式"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "最后更新日期",
|
||||
"pages": [
|
||||
"关系图谱"
|
||||
],
|
||||
"description": "关系图谱 数据字段(出现 30 条)",
|
||||
"keys": [
|
||||
"最后更新日期"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "工具名称",
|
||||
"pages": [
|
||||
"行政工具"
|
||||
],
|
||||
"description": "行政工具 数据字段(出现 10 条)",
|
||||
"keys": [
|
||||
"工具名称"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "主责机构",
|
||||
"pages": [
|
||||
"行政工具"
|
||||
],
|
||||
"description": "行政工具 数据字段(出现 10 条)",
|
||||
"keys": [
|
||||
"主责机构"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "政策性质",
|
||||
"pages": [
|
||||
"行政工具"
|
||||
],
|
||||
"description": "行政工具 数据字段(出现 10 条)",
|
||||
"keys": [
|
||||
"政策性质"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "功能说明",
|
||||
"pages": [
|
||||
"行政工具"
|
||||
],
|
||||
"description": "行政工具 数据字段(出现 10 条)",
|
||||
"keys": [
|
||||
"功能说明"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "建议字段",
|
||||
"pages": [
|
||||
"行政工具"
|
||||
],
|
||||
"description": "行政工具 数据字段(出现 10 条)",
|
||||
"keys": [
|
||||
"建议字段"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "状态",
|
||||
"pages": [
|
||||
"国会网络"
|
||||
],
|
||||
"description": "国会网络 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"状态"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "牵引节点",
|
||||
"pages": [
|
||||
"国会网络"
|
||||
],
|
||||
"description": "国会网络 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"牵引节点"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "涉华涉台意义",
|
||||
"pages": [
|
||||
"国会网络"
|
||||
],
|
||||
"description": "国会网络 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"涉华涉台意义"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "关联节点",
|
||||
"pages": [
|
||||
"国会网络"
|
||||
],
|
||||
"description": "国会网络 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"关联节点"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "事件名称",
|
||||
"pages": [
|
||||
"摩擦事件"
|
||||
],
|
||||
"description": "摩擦事件 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"事件名称"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "时间",
|
||||
"pages": [
|
||||
"摩擦事件"
|
||||
],
|
||||
"description": "摩擦事件 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"时间"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "类型",
|
||||
"pages": [
|
||||
"摩擦事件"
|
||||
],
|
||||
"description": "摩擦事件 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"类型"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "涉及主体",
|
||||
"pages": [
|
||||
"摩擦事件"
|
||||
],
|
||||
"description": "摩擦事件 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"涉及主体"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "美国动作",
|
||||
"pages": [
|
||||
"摩擦事件"
|
||||
],
|
||||
"description": "摩擦事件 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"美国动作"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "中方可能反应",
|
||||
"pages": [
|
||||
"摩擦事件"
|
||||
],
|
||||
"description": "摩擦事件 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"中方可能反应"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "风险等级",
|
||||
"pages": [
|
||||
"摩擦事件"
|
||||
],
|
||||
"description": "摩擦事件 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"风险等级"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "关联指标",
|
||||
"pages": [
|
||||
"摩擦事件"
|
||||
],
|
||||
"description": "摩擦事件 数据字段(出现 6 条)",
|
||||
"keys": [
|
||||
"关联指标"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "指标名称",
|
||||
"pages": [
|
||||
"风险预警"
|
||||
],
|
||||
"description": "风险预警 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"指标名称"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "低风险",
|
||||
"pages": [
|
||||
"风险预警"
|
||||
],
|
||||
"description": "风险预警 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"低风险"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "中风险",
|
||||
"pages": [
|
||||
"风险预警"
|
||||
],
|
||||
"description": "风险预警 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"中风险"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "高风险",
|
||||
"pages": [
|
||||
"风险预警"
|
||||
],
|
||||
"description": "风险预警 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"高风险"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "极高风险",
|
||||
"pages": [
|
||||
"风险预警"
|
||||
],
|
||||
"description": "风险预警 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"极高风险"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "监测源",
|
||||
"pages": [
|
||||
"风险预警"
|
||||
],
|
||||
"description": "风险预警 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"监测源"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "关联领域",
|
||||
"pages": [
|
||||
"风险预警"
|
||||
],
|
||||
"description": "风险预警 数据字段(出现 8 条)",
|
||||
"keys": [
|
||||
"关联领域"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "路径",
|
||||
"pages": [
|
||||
"影响链条"
|
||||
],
|
||||
"description": "影响链条 数据字段(出现 5 条)",
|
||||
"keys": [
|
||||
"路径"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "关键节点",
|
||||
"pages": [
|
||||
"影响链条"
|
||||
],
|
||||
"description": "影响链条 数据字段(出现 5 条)",
|
||||
"keys": [
|
||||
"关键节点"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "风险",
|
||||
"pages": [
|
||||
"影响链条"
|
||||
],
|
||||
"description": "影响链条 数据字段(出现 5 条)",
|
||||
"keys": [
|
||||
"风险"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "url",
|
||||
"pages": [
|
||||
"来源审查"
|
||||
],
|
||||
"description": "来源审查 数据字段(出现 10 条)",
|
||||
"keys": [
|
||||
"url"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "说明",
|
||||
"pages": [
|
||||
"来源审查"
|
||||
],
|
||||
"description": "来源审查 数据字段(出现 10 条)",
|
||||
"keys": [
|
||||
"说明"
|
||||
],
|
||||
"custom": false
|
||||
}
|
||||
]
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"系统": {
|
||||
"名称": "美国涉华涉台政策权力网络专题数据库",
|
||||
"版本": "v1.0",
|
||||
"说明": "仅使用公开资料进行结构性政策研究、风险预警和认知防护分析;不包含私人信息、定向影响操作或作战敏感细节。"
|
||||
},
|
||||
"页面": [
|
||||
{
|
||||
"编号": "overview",
|
||||
"名称": "总览仪表盘"
|
||||
},
|
||||
{
|
||||
"编号": "nodes",
|
||||
"名称": "权力节点"
|
||||
},
|
||||
{
|
||||
"编号": "tools",
|
||||
"名称": "行政工具"
|
||||
},
|
||||
{
|
||||
"编号": "congress",
|
||||
"名称": "国会网络"
|
||||
},
|
||||
{
|
||||
"编号": "graph",
|
||||
"名称": "关系图谱"
|
||||
},
|
||||
{
|
||||
"编号": "chains",
|
||||
"名称": "影响链条"
|
||||
},
|
||||
{
|
||||
"编号": "interest",
|
||||
"名称": "利益集团"
|
||||
},
|
||||
{
|
||||
"编号": "thinktank",
|
||||
"名称": "智库媒体"
|
||||
},
|
||||
{
|
||||
"编号": "events",
|
||||
"名称": "摩擦事件"
|
||||
},
|
||||
{
|
||||
"编号": "risks",
|
||||
"名称": "风险预警"
|
||||
},
|
||||
{
|
||||
"编号": "sources",
|
||||
"名称": "来源审查"
|
||||
}
|
||||
],
|
||||
"交互规则": {
|
||||
"默认展示": "overview"
|
||||
}
|
||||
}
|
||||
+185
@@ -0,0 +1,185 @@
|
||||
/* no.14 页面运行时(结构化模板)。
|
||||
* 由 template_fill.compose_structured 内联进骨架的运行时注入点。
|
||||
* DATA 从骨架 JSON 元素读取;MANIFEST/FIELDS 供页面隐藏/自定义模块/字段可见性。 */
|
||||
const DATA=JSON.parse((document.getElementById("structured-data")||{textContent:"{}"}).textContent);
|
||||
const MANIFEST=JSON.parse((document.getElementById("structured-manifest")||{textContent:"{}"}).textContent);
|
||||
const FIELDS=(function(){try{var v=JSON.parse((document.getElementById("structured-fields")||{textContent:"[]"}).textContent);return Array.isArray(v)?v:((v&&v.fields)||[])}catch(x){return []}})();
|
||||
;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 pageHidden(key){
|
||||
const pg=(MANIFEST['页面']||[]).find(p=>p['编号']===key);
|
||||
return !!(pg&&pg['隐藏']===true);
|
||||
}
|
||||
function visibleTabs(){return (tabs||[]).filter(t=>!pageHidden(t[0]))}
|
||||
function syncHeader(){
|
||||
const sys=(MANIFEST['系统']||{});
|
||||
if(sys['名称']){document.title=String(sys['名称']);const h1=document.querySelector('header h1,h1');if(h1)h1.textContent=String(sys['名称'])}
|
||||
const sub=document.querySelector('header .subtitle,.subtitle');if(sub&&sys['说明'])sub.textContent=String(sys['说明']);
|
||||
}
|
||||
function renderCustomModules(pageId){
|
||||
const host=document.getElementById(pageId);
|
||||
if(!host)return;
|
||||
host.querySelectorAll('.custom-module').forEach(x=>x.remove());
|
||||
const list=((MANIFEST||{})['自定义模块']||[]).filter(m=>m&&m['页面']===pageId&&m.html);
|
||||
list.forEach(m=>{
|
||||
const sec=document.createElement('div');sec.className='custom-module';sec.style.margin='18px 0';
|
||||
sec.innerHTML='<h2 style=\'margin:0 0 10px;font-size:18px\'>'+esc(m['标题']||'自定义模块')+'</h2>'+m.html;
|
||||
host.appendChild(sec);
|
||||
});
|
||||
}
|
||||
(function(){
|
||||
const _initTabs=initTabs;
|
||||
initTabs=function(){const vis=visibleTabs();const saved=tabs.slice();tabs.length=0;vis.forEach(t=>tabs.push(t));try{_initTabs()}finally{tabs.length=0;saved.forEach(t=>tabs.push(t))}};
|
||||
const _renderAll=renderAll;
|
||||
renderAll=function(){_renderAll();(MANIFEST['页面']||[]).forEach(function(p){if(p&&p['编号']&&p['隐藏']!==true)renderCustomModules(p['编号'])})};
|
||||
})();
|
||||
function activateTab(id){
|
||||
document.querySelectorAll('.panel').forEach(p=>p.classList.remove('active'));
|
||||
const sec=document.getElementById(id);if(sec)sec.classList.add('active');
|
||||
const idx=visibleTabs().findIndex(t=>t[0]===id);
|
||||
document.querySelectorAll('#tabs .tab').forEach(function(b,i){b.classList.toggle('active',i===idx)});
|
||||
}
|
||||
function applyPageVisibility(){
|
||||
(MANIFEST['页面']||[]).forEach(function(p){
|
||||
if(!p||!p['编号'])return;
|
||||
const sec=document.getElementById(p['编号']);
|
||||
if(sec)sec.style.display=p['隐藏']===true?'none':'';
|
||||
});
|
||||
const active=document.querySelector('.panel.active');
|
||||
if(active&&pageHidden(active.id)){const first=visibleTabs()[0];if(first)activateTab(first[0])}
|
||||
}
|
||||
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="evidence-levels">${Object.entries(DATA.metadata.证据等级说明||{}).map(([level,description])=>`<div class="evidence-level"><b>${esc(level)}</b><span>${esc(description)}</span></div>`).join('')}</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); }
|
||||
applyPageVisibility(); syncHeader(); initTabs(); renderAll();
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
(function(){
|
||||
"use strict";
|
||||
function clone(v){return JSON.parse(JSON.stringify(v))}
|
||||
function draftsToData(d){var o={};Object.keys(d).forEach(function(k){if(k!=='__manifest__')o[k]=d[k]});return o}
|
||||
function replaceInPlace(t,s){Object.keys(t).forEach(function(k){delete t[k]});Object.keys(s).forEach(function(k){t[k]=s[k]})}
|
||||
function buildDrafts(data,manifest){var o={__manifest__:clone(manifest)};Object.keys(data).forEach(function(k){o[k]=clone(data[k])});return o}
|
||||
const initialData=clone(DATA),initialManifest=clone(MANIFEST);
|
||||
const overlay=document.getElementById('editorOverlay');
|
||||
if(!overlay)return;
|
||||
const fingerprint=(function(){let h=2166136261;const s=JSON.stringify(initialData)+'|'+JSON.stringify(initialManifest);for(let i=0;i<s.length;i++){h^=s.charCodeAt(i);h=Math.imul(h,16777619)}return (h>>>0).toString(36)})();
|
||||
const storageKey='structured-page-data-v1:'+fingerprint;
|
||||
function readLS(k){try{return window.localStorage?window.localStorage.getItem(k):null}catch(x){return null}}
|
||||
function writeLS(k,v){try{if(window.localStorage)window.localStorage.setItem(k,v)}catch(x){}}
|
||||
function removeLS(k){try{if(window.localStorage)window.localStorage.removeItem(k)}catch(x){}}
|
||||
(function(){const cached=readLS(storageKey);if(!cached)return;try{const parsed=JSON.parse(cached);if(parsed&&typeof parsed==='object'&&parsed.data&&typeof parsed.data==='object'){replaceInPlace(DATA,parsed.data);if(parsed.manifest&&typeof parsed.manifest==='object')replaceInPlace(MANIFEST,parsed.manifest)}}catch(x){}})();
|
||||
const labels={};(MANIFEST['页面']||[]).forEach(function(p){if(p&&p['编号'])labels[p['编号']]=p['名称']||p['编号']});
|
||||
const modules=Object.keys(DATA).filter(function(k){return k!=='metadata'&&k!=='tabs'&&k!=='schemas'&&k!=='data_gaps'}).concat(['__manifest__']);
|
||||
let active=modules[0]||'__manifest__';
|
||||
let drafts=buildDrafts(DATA,MANIFEST);
|
||||
function moduleTitle(k){return k==='__manifest__'?'系统设置(MANIFEST)':(labels[k]||k)}
|
||||
const tabsEl=document.getElementById('editorTabs'),editor=document.getElementById('jsonEditor'),statusEl=document.getElementById('jsonStatus'),titleEl=document.getElementById('editorModuleTitle');
|
||||
function setStatus(ok,msg){statusEl.textContent=msg;statusEl.className='json-status '+(ok?'valid':'invalid')}
|
||||
function readEditor(){try{const p=JSON.parse(editor.value);if(!p||typeof p!=='object')throw new Error('模块必须是 JSON 对象或数组');setStatus(true,'JSON 有效');return p}catch(x){setStatus(false,'JSON 无效:'+x.message);return null}}
|
||||
function saveActiveDraft(){const p=readEditor();if(!p)return false;drafts[active]=p;return true}
|
||||
function loadEditor(){titleEl.textContent=moduleTitle(active);editor.value=JSON.stringify(drafts[active],null,2);setStatus(true,'JSON 有效')}
|
||||
function renderEditorTabs(){tabsEl.innerHTML='';modules.forEach(function(key){const b=document.createElement('button');b.type='button';b.className='editor-tab'+(key===active?' active':'');b.innerHTML='<b>'+esc(moduleTitle(key))+'</b><small>'+(key==='__manifest__'?'manifest.json':key)+'</small>';b.onclick=function(){if(key===active||!saveActiveDraft())return;active=key;renderEditorTabs();loadEditor()};tabsEl.appendChild(b)})}
|
||||
function closeEditor(){overlay.style.display='none'}
|
||||
function applyToPage(){if(!saveActiveDraft()){setStatus(false,'存在无效模块');return}replaceInPlace(DATA,draftsToData(drafts));replaceInPlace(MANIFEST,drafts.__manifest__);closeEditor();applyPageVisibility();syncHeader();initTabs();renderAll();writeLS(storageKey,JSON.stringify({data:DATA,manifest:MANIFEST}))}
|
||||
function legacyCopy(text){const t=document.createElement('textarea');t.value=text;document.body.appendChild(t);t.select();try{document.execCommand('copy')}catch(x){}t.remove()}
|
||||
document.getElementById('openEditor').onclick=function(){drafts=buildDrafts(DATA,MANIFEST);active=modules[0]||'__manifest__';renderEditorTabs();loadEditor();overlay.style.display='';setTimeout(function(){editor.focus()},40)};
|
||||
document.getElementById('closeEditor').onclick=closeEditor;
|
||||
document.addEventListener('keydown',function(ev){if(ev.key==='Escape'&&overlay.style.display!=='none')closeEditor()});
|
||||
document.getElementById('applyJson').onclick=applyToPage;
|
||||
document.getElementById('resetJson').onclick=function(){drafts=buildDrafts(initialData,initialManifest);active=modules[0]||'__manifest__';removeLS(storageKey);renderEditorTabs();loadEditor();setStatus(true,'已恢复默认数据,点击「应用到页面」生效')};
|
||||
document.getElementById('copyJson').onclick=function(){if(!saveActiveDraft())return;const text=JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2);if(navigator.clipboard&&navigator.clipboard.writeText)navigator.clipboard.writeText(text).catch(function(){legacyCopy(text)});else legacyCopy(text)};
|
||||
document.getElementById('downloadJson').onclick=function(){if(!saveActiveDraft())return;const blob=new Blob([JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2)],{type:'application/json;charset=utf-8'});const link=document.createElement('a');link.href=URL.createObjectURL(blob);link.download='page-data.json';link.click();setTimeout(function(){URL.revokeObjectURL(link.href)},1000)};
|
||||
})();
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
<!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; }
|
||||
.evidence-levels { display:grid; gap:10px; margin-top:12px; }
|
||||
.evidence-level { display:grid; grid-template-columns:32px minmax(0,1fr); gap:12px; align-items:start; padding:10px 0; border-bottom:1px dashed var(--line); }
|
||||
.evidence-level:last-child { border-bottom:0; padding-bottom:0; }
|
||||
.evidence-level b { color:#6f242c; font-size:16px; line-height:1.7; }
|
||||
.evidence-level span { min-width:0; color:var(--text); line-height:1.7; }
|
||||
.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; } }
|
||||
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
.editor-fab{position:fixed;right:18px;bottom:26px;z-index:60;background:#a41422;color:#fff;border:0;border-radius:50%;width:46px;height:46px;display:grid;place-items:center;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.3)}.editor-fab:hover{transform:rotate(30deg)}.editor-fab svg{width:22px;height:22px;display:block}
|
||||
.editor-overlay{z-index:80}
|
||||
.editor-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(1080px,94vw);height:min(680px,88vh);background:#fff;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.35)}
|
||||
.editor-head{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid #e5e7eb}.editor-head h2{margin:0;font-size:16px;flex:1}.editor-head .editor-note{font-size:12px;color:#667085;margin-right:8px}
|
||||
.editor-body{display:flex;flex:1;min-height:0}
|
||||
.editor-tabs{width:210px;border-right:1px solid #e5e7eb;overflow:auto;padding:10px 8px;display:flex;flex-direction:column;gap:4px}
|
||||
.editor-tab{border:0;background:transparent;text-align:left;padding:9px 11px;border-radius:8px;cursor:pointer;color:#667085}.editor-tab b{display:block;font-size:13px;color:#1e2329}.editor-tab small{font-size:10px;opacity:.75}.editor-tab:hover{background:#f4f6f8}.editor-tab.active{background:#f7ecec}.editor-tab.active b{color:#a41422}
|
||||
.editor-pane{flex:1;display:flex;flex-direction:column;min-width:0;padding:14px 16px;gap:10px}
|
||||
.editor-title-row{display:flex;align-items:center;justify-content:space-between}.editor-title-row b{font-size:14px}
|
||||
.json-status{font-size:12px;padding:3px 10px;border-radius:999px}.json-status.valid{background:#e8f5ef;color:#14804a}.json-status.invalid{background:#fdecec;color:#b4232d}
|
||||
.json-editor{flex:1;width:100%;resize:none;border:1px solid #e5e7eb;border-radius:10px;padding:13px;font:13px/1.6 ui-monospace,Consolas,monospace;color:#1e2329;background:#f8fafc;outline:0;tab-size:2}
|
||||
.editor-actions{display:flex;gap:8px;flex-wrap:wrap}
|
||||
.editor-hint{margin:0;font-size:11px;color:#8a94a3}
|
||||
</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>
|
||||
<button type="button" id="openEditor" class="editor-fab" aria-label="JSON 编辑器" title="页面 JSON 编辑器"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg></button>
|
||||
<div id="editorOverlay" class="editor-overlay" style="display:none"><div class="editor-modal">
|
||||
<header class="editor-head"><h2>页面 JSON 编辑器</h2><span class="editor-note">按模块编辑,应用后即时重渲染;修改保存在浏览器本地,不回写服务器</span><button type="button" id="closeEditor" style="border:0;background:none;font-size:14px;cursor:pointer">关闭</button></header>
|
||||
<div class="editor-body">
|
||||
<nav id="editorTabs" class="editor-tabs"></nav>
|
||||
<div class="editor-pane">
|
||||
<div class="editor-title-row"><b id="editorModuleTitle"></b><span id="jsonStatus" class="json-status valid">JSON 有效</span></div>
|
||||
<textarea id="jsonEditor" class="json-editor" spellcheck="false" aria-label="当前模块 JSON"></textarea>
|
||||
<div class="editor-actions"><button type="button" id="applyJson" style="background:#a41422;color:#fff;border:0;border-radius:6px;padding:7px 14px;cursor:pointer">应用到页面</button><button type="button" id="resetJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">恢复默认数据</button><button type="button" id="copyJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">复制完整 JSON</button><button type="button" id="downloadJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">下载 JSON</button></div>
|
||||
<p class="editor-hint">模块 = 页面数据(DATA)的顶层键,另附「系统设置」编辑 MANIFEST;沙箱预览无法使用本地缓存时,修改仅当次会话有效。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
<script type="application/json" id="structured-data">__PAGE_DATA__</script>
|
||||
<script type="application/json" id="structured-manifest">__PAGE_MANIFEST__</script>
|
||||
<script type="application/json" id="structured-fields">__PAGE_FIELDS__</script>
|
||||
<script>__PAGE_RUNTIME__</script>
|
||||
</body>
|
||||
</html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"meta": {"title": "美国左翼/进步群体涉华涉台专题研究平台(增强版)", "subtitle": "公开资料研究 · 组织深描 · 事件时间线 · 叙事语料 · 关系图谱 · 争议与来源", "version": "v2-enhanced-display", "updated_at": "2026-06-25T18:20:00+09:00", "language": "zh-CN", "scope_note": "本数据包基于公开网页、组织自述、媒体报道和政策/倡议文本,服务学术研究和公开资料分析。组织立场不等于普通成员个人立场;间接相关组织不得被强行解释为涉台组织。", "safety_boundary": {"allowed_scope": ["公开资料研究", "组织层级生态分析", "非定向叙事风险评估", "来源可信度审查", "公共沟通误读预警"], "excluded": ["个人脆弱点", "住址/行程/家庭/普通成员账号", "线下行动操作指南", "规避执法或平台审核", "欺骗性影响行动", "冒充身份或假草根动员"], "terminology_rule": "将“脆弱点”统一改写为“内部矛盾、传播风险、误读点、韧性需求”。"}, "data_note": "展示层 JSON 由 v2 原始数据转换而成,供单文件 HTML 离线检索、筛选、弹框展示使用。", "enhancement_note": "增强版将弹框从原始 JSON 改为分区式详情页,并增加 Markdown 原始研究摘编、组织深描、事件研究价值、争议处理和来源可信度说明。"}, "tabs": [{"id": "overview", "label": "专题总览", "dataset": "dashboard", "layout": "dashboard"}, {"id": "factions", "label": "阵营分类", "dataset": "factions", "layout": "cards", "modal": "factions"}, {"id": "organizations", "label": "组织画像", "dataset": "organizations", "layout": "cards", "modal": "organizations"}, {"id": "events", "label": "事件时间线", "dataset": "events", "layout": "timeline", "modal": "events"}, {"id": "narratives", "label": "叙事矩阵", "dataset": "narratives", "layout": "matrix", "modal": "narratives"}, {"id": "corpus", "label": "叙事语料", "dataset": "corpus", "layout": "cards", "modal": "corpus"}, {"id": "relationships", "label": "关系图谱", "dataset": "relationships", "layout": "network", "modal": "relationships"}, {"id": "platforms", "label": "平台传播", "dataset": "platforms", "layout": "cards", "modal": "platforms"}, {"id": "public_opinion", "label": "民意基础", "dataset": "public_opinion", "layout": "evidence", "modal": "public_opinion"}, {"id": "finance_resources", "label": "资源能力", "dataset": "finance_resources", "layout": "cards", "modal": "finance_resources"}, {"id": "disputes_sources", "label": "争议与来源", "dataset": "disputes", "layout": "split", "modal": "disputes"}, {"id": "research_doc", "label": "研究文档摘编", "dataset": "research_sections", "layout": "document", "modal": null}], "global_filters": [{"id": "faction", "label": "阵营", "type": "multi_select", "options": ["亚裔/华裔反新冷战派", "人权与台湾主体性左翼/反威权左翼", "制度内民主社会主义派", "反战反帝国主义派", "无政府主义、Antifa与黑块式网络", "校园亲巴勒斯坦与反殖民左翼", "气候正义与环境直接行动派", "种族正义与废除主义派", "选举进步派与民主党左翼外围", "革命社会主义/共产主义组织派"]}, {"id": "organization_type", "label": "组织类型", "type": "select", "options": ["abolitionist organization", "anti-Zionist Jewish advocacy organization", "anti-new-cold-war advocacy network", "antiwar NGO / global peace network", "antiwar coalition", "antiwar feminist grassroots organization", "candidate recruitment / progressive PAC-style organization", "communist party", "diasporic Chinese left media/education collective", "global climate movement organization", "left movement space / education venue", "membership organization / democratic socialist", "nonviolent direct action climate movement", "online racial justice advocacy organization", "peace organization / veterans network", "progressive advocacy / petition platform", "progressive electoral party / ballot line organization", "racial justice coalition", "revolutionary socialist party / party media network", "student Palestine solidarity network", "student/youth network", "youth climate movement"]}, {"id": "relevance", "label": "涉华涉台相关度", "type": "select", "options": ["中等:通过反新冷战、反军工、台湾主体性内部讨论进入", "中高:反战动员中出现No war with China和亚太基地议题", "中高:有台湾与南海军事对抗、冲绳基地等文章", "中高:设有China Working Group并提到佩洛西访台抗议", "中:不一定频繁涉台,但在中国/关税/新冷战议题上有公开文章", "中:曾有请愿要求佩洛西重新考虑访台风险", "中:通过中国社会主义、反帝论坛和左翼教育议题关联", "低到中:以校园政治为通道,涉台多为间接", "低到中:通过国会进步派候选人和外交预算立场间接关联", "低到间接:平台Line truncated
|
||||
+1526
File diff suppressed because it is too large.
Load diff
+60
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"系统": {
|
||||
"名称": "美国左翼/进步群体涉华涉台专题研究平台(增强版)",
|
||||
"说明": "公开资料研究 · 组织深描 · 事件时间线 · 叙事语料 · 关系图谱 · 争议与来源。增强版将弹框从原始 JSON 改为分区式详情页,并增加 Markdown 原始研究摘编、组织深描、事件研究价值、争议处理和来源可信度说明。",
|
||||
"版本": "v2-enhanced-display"
|
||||
},
|
||||
"页面": [
|
||||
{
|
||||
"编号": "overview",
|
||||
"名称": "专题总览"
|
||||
},
|
||||
{
|
||||
"编号": "factions",
|
||||
"名称": "阵营分类"
|
||||
},
|
||||
{
|
||||
"编号": "organizations",
|
||||
"名称": "组织画像"
|
||||
},
|
||||
{
|
||||
"编号": "events",
|
||||
"名称": "事件时间线"
|
||||
},
|
||||
{
|
||||
"编号": "narratives",
|
||||
"名称": "叙事矩阵"
|
||||
},
|
||||
{
|
||||
"编号": "corpus",
|
||||
"名称": "叙事语料"
|
||||
},
|
||||
{
|
||||
"编号": "relationships",
|
||||
"名称": "关系图谱"
|
||||
},
|
||||
{
|
||||
"编号": "platforms",
|
||||
"名称": "平台传播"
|
||||
},
|
||||
{
|
||||
"编号": "public_opinion",
|
||||
"名称": "民意基础"
|
||||
},
|
||||
{
|
||||
"编号": "finance_resources",
|
||||
"名称": "资源能力"
|
||||
},
|
||||
{
|
||||
"编号": "disputes_sources",
|
||||
"名称": "争议与来源"
|
||||
},
|
||||
{
|
||||
"编号": "research_doc",
|
||||
"名称": "研究文档摘编"
|
||||
}
|
||||
],
|
||||
"交互规则": {
|
||||
"默认展示": "overview"
|
||||
}
|
||||
}
|
||||
+307
@@ -0,0 +1,307 @@
|
||||
/* no.15 页面运行时(结构化模板)。
|
||||
* 由 template_fill.compose_structured 内联进骨架的运行时注入点。
|
||||
* DATA 从骨架 JSON 元素读取;MANIFEST/FIELDS 供页面隐藏/自定义模块/字段可见性。 */
|
||||
const DATA=JSON.parse((document.getElementById("structured-data")||{textContent:"{}"}).textContent);
|
||||
const MANIFEST=JSON.parse((document.getElementById("structured-manifest")||{textContent:"{}"}).textContent);
|
||||
const FIELDS=(function(){try{var v=JSON.parse((document.getElementById("structured-fields")||{textContent:"[]"}).textContent);return Array.isArray(v)?v:((v&&v.fields)||[])}catch(x){return []}})();
|
||||
|
||||
let D = DATA.datasets;
|
||||
let sourceIndex = Object.fromEntries((D.sources||[]).map(s=>[s.id,s]));
|
||||
let orgIndex = Object.fromEntries((D.organizations||[]).map(o=>[o.id,o]));
|
||||
function refreshIndexes(){
|
||||
D = DATA.datasets || {};
|
||||
sourceIndex = Object.fromEntries((D.sources||[]).map(s=>[s.id,s]));
|
||||
orgIndex = Object.fromEntries((D.organizations||[]).map(o=>[o.id,o]));
|
||||
}
|
||||
function pageHidden(key){
|
||||
const pg=(MANIFEST['页面']||[]).find(p=>p['编号']===key);
|
||||
return !!(pg&&pg['隐藏']===true);
|
||||
}
|
||||
function visibleTabs(){return (DATA.tabs||[]).filter(t=>!pageHidden(t.id))}
|
||||
function syncHeader(){
|
||||
const sys=(MANIFEST['系统']||{});
|
||||
if(sys['名称']){document.title=String(sys['名称']);const h1=document.getElementById('pageTitle');if(h1)h1.textContent=String(sys['名称'])}
|
||||
const sub=document.getElementById('pageSubtitle');if(sub&&sys['说明'])sub.textContent=String(sys['说明']);
|
||||
}
|
||||
function renderCustomModules(pageId){
|
||||
const host=document.getElementById('panel');
|
||||
if(!host)return;
|
||||
host.querySelectorAll('.custom-module').forEach(x=>x.remove());
|
||||
const list=((MANIFEST||{})['自定义模块']||[]).filter(m=>m&&m['页面']===pageId&&m.html);
|
||||
list.forEach(m=>{
|
||||
const sec=document.createElement('div');sec.className='custom-module';sec.style.margin='18px 0';
|
||||
sec.innerHTML='<h2 style="margin:0 0 10px;font-size:18px">'+esc(m['标题']||'自定义模块')+'</h2>'+m.html;
|
||||
host.appendChild(sec);
|
||||
});
|
||||
}
|
||||
function applyPageVisibility(){
|
||||
if(pageHidden(state.tab)){const first=visibleTabs()[0];if(first)state.tab=first.id}
|
||||
}
|
||||
const state = {tab:'overview', q:'', faction:'', relevance:'', confidence:'', year:''};
|
||||
const tabDesc = {
|
||||
overview:'总览数据规模、核心发现、研究边界、补充摘要和仍需补充的数据缺口。',
|
||||
factions:'展示美国左翼/进步派生态的阵营分类、社会基础、组织能力和涉华涉台立场。',
|
||||
organizations:'展示组织画像、公开结构、涉华涉台活动、组织深描、争议入口和资料来源。',
|
||||
events:'按时间线展示涉华涉台及关联事件,突出触发因素、组织反应、研究价值和争议。',
|
||||
narratives:'展示叙事框架、道德入口、接受与反弹结构、证据要求和安全边界。',
|
||||
corpus:'展示公开声明、文章、活动页和短摘录语料,用于支撑叙事分析。',
|
||||
relationships:'展示组织—组织、组织—议题之间的关系边、证据基础和简易网络图。',
|
||||
platforms:'展示社交平台、组织官网和独立媒体的传播适配、内容形式和研究指标。',
|
||||
public_opinion:'展示民意、社会基础和受众背景,用来解释叙事为什么有进入空间或反弹风险。',
|
||||
finance_resources:'展示公开财务与资源能力信息,同时明确禁止用途。',
|
||||
disputes_sources:'展示争议、反驳、研究处理方式和来源可信度注册表。',
|
||||
research_doc:'尽量保留 v2 Markdown 的原始研究知识,以文档摘编形式完整展示。'
|
||||
};
|
||||
const titleFields = {
|
||||
factions:'阵营名称', organizations:'显示标题', events:'事件标题', narratives:'叙事名称', corpus:'中文摘要', relationships:'关系类型', platforms:'平台名称', public_opinion:'主题', finance_resources:'组织名称', disputes:'争议标题', sources:'标题'
|
||||
};
|
||||
function esc(x){return String(x??'').replace(/[&<>"']/g,m=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[m]));}
|
||||
function arr(v){ if(!v) return []; if(Array.isArray(v)) return v.filter(x=>x!==''&&x!=null); return [v]; }
|
||||
function isEmpty(v){return v==null || v==='' || (Array.isArray(v)&&v.length===0);}
|
||||
function textOf(v){ if(Array.isArray(v)) return v.map(textOf).join(' '); if(v&&typeof v==='object') return Object.values(v).map(textOf).join(' '); return String(v??''); }
|
||||
function orgName(id){ return orgIndex[id]?.['组织名称'] || orgIndex[id]?.['显示标题'] || id; }
|
||||
function tagList(items, cls=''){ const a=arr(items); if(!a.length) return ''; return `<div class="list">${a.map(x=>`<span class="chip ${cls}">${esc(formatToken(x))}</span>`).join('')}</div>`; }
|
||||
function formatToken(x){ if(orgIndex[x]) return orgName(x); return String(x??''); }
|
||||
function fieldValue(v, key=''){
|
||||
if(isEmpty(v)) return '<span style="color:#967979">暂无记录</span>';
|
||||
if(Array.isArray(v)){
|
||||
if(key.includes('来源')) return v.map(sourceCard).join('') || '<span style="color:#967979">暂无来源</span>';
|
||||
return '<ul>'+v.map(x=>`<li>${esc(formatToken(x))}</li>`).join('')+'</ul>';
|
||||
}
|
||||
const s=String(v);
|
||||
if(/^https?:\/\//.test(s)) return `<a href="${esc(s)}" target="_blank" rel="noopener">${esc(s)}</a>`;
|
||||
return `<p>${esc(s).replace(/\n/g,'<br>')}</p>`;
|
||||
}
|
||||
function sourceCard(idOrObj){
|
||||
const sid = typeof idOrObj==='string'?idOrObj:(idOrObj?.id||idOrObj?.source_id||'');
|
||||
const s = sourceIndex[sid];
|
||||
if(!s) return `<div class="source-card"><div class="source-title">${esc(sid || textOf(idOrObj))}</div><div class="source-meta">未在来源表中展开,建议后续补齐。</div></div>`;
|
||||
const link = s['链接'] ? `<a href="${esc(s['链接'])}" target="_blank" rel="noopener">打开来源</a>` : '无链接';
|
||||
return `<div class="source-card"><div class="source-title">${esc(s['标题']||s.id)}</div><div class="source-meta">${esc(s['来源类型']||'')} · 可信度:${esc(s['可信度']||'')} · ${link}</div>${s['说明']?`<div class="source-meta">${esc(s['说明'])}</div>`:''}</div>`;
|
||||
}
|
||||
function init(){
|
||||
refreshIndexes();
|
||||
applyPageVisibility();
|
||||
document.getElementById('pageTitle').textContent = DATA.meta.title;
|
||||
document.getElementById('pageSubtitle').textContent = DATA.meta.subtitle + '。' + (DATA.meta.enhancement_note||'');
|
||||
const b = D.safety_boundary || {};
|
||||
document.getElementById('boundaryPills').innerHTML = ['公开资料研究','分区式详情页','完整文档摘编','可检索数据'].map((x,i)=>`<span class="pill ${i===0?'strong':''}">${x}</span>`).join('') + (b.allowed_scope? b.allowed_scope.slice(0,4).map(x=>`<span class="pill">${esc(x)}</span>`).join(''):'');
|
||||
document.getElementById('tabs').innerHTML = visibleTabs().map(t=>`<button class="tab ${t.id===state.tab?'active':''}" onclick="switchTab('${t.id}')">${esc(t.label)}</button>`).join('');
|
||||
populateFilters(); bind(); render();
|
||||
}
|
||||
function bind(){
|
||||
document.getElementById('q').addEventListener('input',e=>{state.q=e.target.value.trim(); render();});
|
||||
['factionFilter','relevanceFilter','confidenceFilter','yearFilter'].forEach(id=>document.getElementById(id).addEventListener('change',e=>{state[id.replace('Filter','')]=e.target.value; render();}));
|
||||
document.getElementById('resetBtn').onclick=()=>{state.q='';state.faction='';state.relevance='';state.confidence='';state.year='';document.querySelectorAll('.toolbar input,.toolbar select').forEach(el=>el.value='');render();};
|
||||
}
|
||||
function populateFilters(){
|
||||
const factions=[...new Set((D.organizations||[]).flatMap(o=>arr(o['所属阵营'])).filter(Boolean))].sort();
|
||||
const relevance=[...new Set((D.organizations||[]).map(o=>o['涉华涉台相关度']).filter(Boolean))].sort();
|
||||
const conf=[...new Set(Object.values(D).flatMap(ds=>Array.isArray(ds)?ds.map(x=>x['来源可信度']||x['可信度']||x['补充来源可信度']).filter(Boolean):[]))].sort();
|
||||
const years=[...new Set((D.events||[]).concat(D.corpus||[]).map(x=>x['年份']).filter(Boolean))].sort().reverse();
|
||||
fillSelect('factionFilter',factions); fillSelect('relevanceFilter',relevance); fillSelect('confidenceFilter',conf); fillSelect('yearFilter',years);
|
||||
}
|
||||
function fillSelect(id, vals){ const el=document.getElementById(id); const first=el.options[0].outerHTML; el.innerHTML=first+vals.map(v=>`<option value="${esc(v)}">${esc(v)}</option>`).join('');}
|
||||
function switchTab(id){if(pageHidden(id)){const first=visibleTabs()[0];if(!first)return;id=first.id}state.tab=id;render();}
|
||||
function datasetForTab(){ const t=DATA.tabs.find(x=>x.id===state.tab); return t?.dataset; }
|
||||
function filtered(items){
|
||||
return items.filter(item=>{
|
||||
const txt=textOf(item).toLowerCase();
|
||||
if(state.q && !txt.includes(state.q.toLowerCase())) return false;
|
||||
if(state.faction && !arr(item['所属阵营']).includes(state.faction) && !arr(item['易接受阵营']).includes(state.faction) && !arr(item['易反弹阵营']).includes(state.faction)) return false;
|
||||
if(state.relevance && item['涉华涉台相关度']!==state.relevance) return false;
|
||||
if(state.confidence && ![item['来源可信度'],item['可信度'],item['补充来源可信度']].includes(state.confidence)) return false;
|
||||
if(state.year && item['年份']!==state.year) return false;
|
||||
return true;
|
||||
});
|
||||
}
|
||||
function panelHead(label, desc, count){return `<div class="panel-head"><div><h2 class="panel-title">${esc(label)}</h2><p class="panel-desc">${esc(desc||'')}</p></div>${count!=null?`<div class="count-badge">${count} 条</div>`:''}</div>`;}
|
||||
function render(){
|
||||
document.getElementById('tabs').innerHTML = visibleTabs().map(t=>`<button class="tab ${t.id===state.tab?'active':''}" onclick="switchTab('${t.id}')">${esc(t.label)}</button>`).join('');
|
||||
const t=DATA.tabs.find(x=>x.id===state.tab); const panel=document.getElementById('panel');
|
||||
if(state.tab==='overview'){ panel.innerHTML=renderOverview(); return; }
|
||||
if(state.tab==='research_doc'){ panel.innerHTML=renderDocument(); return; }
|
||||
if(state.tab==='disputes_sources'){ panel.innerHTML=renderSplit(t); return; }
|
||||
const data=filtered(D[t.dataset]||[]);
|
||||
let body='';
|
||||
if(t.layout==='timeline') body=renderTimeline(data,t.modal);
|
||||
else if(t.layout==='matrix') body=renderMatrix(data,t.modal);
|
||||
else if(t.layout==='network') body=renderNetwork(data,t.modal);
|
||||
else body=renderCards(data,t.dataset,t.modal);
|
||||
panel.innerHTML=panelHead(t.label,tabDesc[t.id],data.length)+body;
|
||||
}
|
||||
function renderOverview(){
|
||||
const counts=DATA.dashboard.counts||{}; const summary=DATA.dashboard.completion_summary||{}; const safety=DATA.dashboard.safety_boundary||{};
|
||||
const stats=[['阵营',counts.factions],['组织',counts.organizations],['事件',counts.events],['叙事框架',counts.narratives],['语料',counts.corpus],['关系边',counts.relationships],['来源',counts.sources],['研究文档节',counts.research_sections]];
|
||||
return panelHead('专题总览',tabDesc.overview,null)+`
|
||||
<div class="stat-grid">${stats.map(([k,v])=>`<div class="stat"><div class="num">${esc(v??0)}</div><div class="lab">${esc(k)}</div></div>`).join('')}</div>
|
||||
<div class="section-grid">
|
||||
<div>
|
||||
<div class="info-box"><h3>核心发现</h3><ul>${(DATA.dashboard.core_findings||[]).map(x=>`<li>${esc(x)}</li>`).join('')}</ul></div>
|
||||
<div class="info-box"><h3>v2 补充摘要</h3><div class="grid two">${Object.entries(summary).map(([k,v])=>`<div class="card" style="cursor:default"><h3>${esc(k)}</h3><div class="summary">新增/补充 ${esc(v)} 条</div></div>`).join('')}</div></div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="info-box"><h3>研究边界</h3><p><b>允许范围:</b></p>${tagList(safety.allowed_scope,'green')}<p><b>排除内容:</b></p>${tagList(safety.excluded,'red')}<p>${esc(safety.terminology_rule||'')}</p></div>
|
||||
<div class="info-box"><h3>后续数据缺口</h3><ul>${(DATA.dashboard.remaining_gaps_v2||[]).map(x=>`<li>${esc(x)}</li>`).join('')}</ul></div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
function cardTitle(item, ds){return item[titleFields[ds]] || item['标题'] || item['id'];}
|
||||
function cardSummary(item, ds){
|
||||
const keys={factions:['涉华涉台立场','组织能力'], organizations:['公开自我描述','涉华涉台活动','组织能力判断'], events:['触发因素','组织反应','研究价值','结果'], narratives:['核心主张','风险说明'], corpus:['中文摘要','原文短摘'], platforms:['适配场景','涉华涉台用途'], public_opinion:['最新观察','研究相关性'], finance_resources:['已知公开信息','研究用途'], disputes:['研究处理方式','主张A','主张B'], sources:['说明']};
|
||||
return (keys[ds]||[]).map(k=>item[k]).filter(Boolean).join(' ');
|
||||
}
|
||||
function renderCards(items, ds, modal){
|
||||
if(!items.length) return '<div class="empty">没有匹配结果</div>';
|
||||
return `<div class="grid">${items.map(item=>`<article class="card" onclick='openModal("${modal||ds}",${JSON.stringify(item.id)})'><h3>${esc(cardTitle(item,ds))}</h3><div class="meta">${esc(item['组织类型']||item['阵营类型']||item['事件类型']||item['平台名称']||item['来源类型']||'')}</div><div class="summary">${esc(cardSummary(item,ds))}</div>${renderCardChips(item)}</article>`).join('')}</div>`;
|
||||
}
|
||||
function renderCardChips(item){
|
||||
const chips=[]; ['所属阵营','涉华涉台相关度','来源可信度','可信度','争议等级','年份'].forEach(k=>{if(item[k]) chips.push(...arr(item[k]).slice(0,3));});
|
||||
if(item['议题焦点']) chips.push(...arr(item['议题焦点']).slice(0,3));
|
||||
if(item['叙事标签']) chips.push(...arr(item['叙事标签']).slice(0,3));
|
||||
return tagList(chips.slice(0,8));
|
||||
}
|
||||
function renderTimeline(items, modal){
|
||||
if(!items.length) return '<div class="empty">没有匹配事件</div>';
|
||||
return `<div class="timeline">${items.map(item=>`<div class="titem" onclick='openModal("${modal}",${JSON.stringify(item.id)})'><div class="tdate">${esc(item['日期']||'未注明日期')}</div><h3>${esc(item['事件标题'])}</h3><div class="summary">${esc(cardSummary(item,'events'))}</div>${tagList([item['事件类型'],...(arr(item['叙事标签']).slice(0,4)), item['来源可信度']].filter(Boolean))}</div>`).join('')}</div>`;
|
||||
}
|
||||
function renderMatrix(items, modal){
|
||||
if(!items.length) return '<div class="empty">没有匹配叙事</div>';
|
||||
return `<div class="matrix">${items.map(item=>`<div class="matrix-card" onclick='openModal("${modal}",${JSON.stringify(item.id)})'><h3>${esc(item['叙事名称'])}</h3><div class="summary">${esc(item['核心主张'])}</div><div class="kv"><b>道德入口</b><div>${tagList(item['道德入口'])}</div><b>争议等级</b><div>${esc(item['争议等级']||'')}</div></div></div>`).join('')}</div>`;
|
||||
}
|
||||
function renderNetwork(items, modal){
|
||||
const top=items.slice(0,50); const nodes=[]; const seen=new Set(); top.forEach(e=>{[e['源节点'],e['目标节点']].forEach(n=>{if(n&&!seen.has(n)){seen.add(n);nodes.push(n)}})});
|
||||
const N=Math.min(nodes.length,24); const cx=520,cy=160,R=125; const pos={}; nodes.slice(0,N).forEach((n,i)=>{pos[n]=[cx+R*Math.cos(2*Math.PI*i/N),cy+R*Math.sin(2*Math.PI*i/N)]});
|
||||
const svg=`<div class="network"><svg viewBox="0 0 1040 320">${top.map(e=>pos[e['源节点']]&&pos[e['目标节点']]?`<line class="edge" x1="${pos[e['源节点']][0]}" y1="${pos[e['源节点']][1]}" x2="${pos[e['目标节点']][0]}" y2="${pos[e['目标节点']][1]}"/>`:'' ).join('')}${nodes.slice(0,N).map(n=>`<g><circle class="node" cx="${pos[n][0]}" cy="${pos[n][1]}" r="24"/><text class="nodeText" text-anchor="middle" x="${pos[n][0]}" y="${pos[n][1]+4}">${esc(orgName(n)).slice(0,14)}</text></g>`).join('')}</svg></div>`;
|
||||
const table=`<div class="table-wrap"><table><thead><tr><th>源节点</th><th>目标节点</th><th>关系类型</th><th>议题语境</th><th>强度</th><th>可信度</th></tr></thead><tbody>${items.map(item=>`<tr onclick='openModal("${modal}",${JSON.stringify(item.id)})'><td>${esc(item['源节点名称'])}</td><td>${esc(item['目标节点名称'])}</td><td>${esc(item['关系类型'])}</td><td>${esc(item['议题语境'])}</td><td>${esc(item['强度']||'')}</td><td>${esc(item['来源可信度']||'')}</td></tr>`).join('')}</tbody></table></div>`;
|
||||
return svg+table;
|
||||
}
|
||||
function renderSplit(t){
|
||||
const disputes=filtered(D.disputes||[]); const sources=filtered(D.sources||[]);
|
||||
return panelHead('争议与来源',tabDesc.disputes_sources,disputes.length+sources.length)+`<div class="split"><div><h3>争议与反驳记录</h3>${renderCards(disputes,'disputes','disputes')}</div><div><h3>来源注册表</h3><div class="table-wrap"><table><thead><tr><th>标题</th><th>类型</th><th>可信度</th><th>说明</th></tr></thead><tbody>${sources.map(s=>`<tr onclick='openModal("sources",${JSON.stringify(s.id)})'><td>${esc(s['标题'])}</td><td>${esc(s['来源类型'])}</td><td>${esc(s['可信度'])}</td><td>${esc(s['说明']||'')}</td></tr>`).join('')}</tbody></table></div></div></div>`;
|
||||
}
|
||||
function renderDocument(){
|
||||
const sections=D.research_sections||[];
|
||||
return panelHead('研究文档摘编',tabDesc.research_doc,sections.length)+`<div class="doc-layout"><div class="doc-nav">${sections.map(s=>`<button onclick="document.getElementById('${s.id}').scrollIntoView({behavior:'smooth',block:'start'})">${esc(s.title)}</button>`).join('')}</div><div class="doc-body">${sections.map(s=>`<section class="md-section" id="${s.id}"><h2>${esc(s.title)}</h2>${mdToHtml(s.markdown)}</section>`).join('')}</div></div>`;
|
||||
}
|
||||
function mdToHtml(md){
|
||||
const lines=(md||'').split(/\n/); let out='', i=0;
|
||||
while(i<lines.length){
|
||||
const line=lines[i];
|
||||
if(!line.trim()){i++; continue;}
|
||||
if(line.startsWith('|')){
|
||||
let rows=[]; while(i<lines.length && lines[i].startsWith('|')){rows.push(lines[i]); i++;}
|
||||
const clean=rows.filter(r=>!/^[|\s:\-]+$/.test(r));
|
||||
if(clean.length){ out+='<div class="md-table"><table>'+clean.map((r,idx)=>'<tr>'+r.split('|').slice(1,-1).map(c=>idx===0?`<th>${esc(c.trim())}</th>`:`<td>${esc(c.trim())}</td>`).join('')+'</tr>').join('')+'</table></div>'; }
|
||||
continue;
|
||||
}
|
||||
if(/^###\s+/.test(line)){out+=`<h3>${esc(line.replace(/^###\s+/,''))}</h3>`;i++;continue;}
|
||||
if(/^[-*]\s+/.test(line)){let items=[]; while(i<lines.length && /^[-*]\s+/.test(lines[i])){items.push(lines[i].replace(/^[-*]\s+/,''));i++;} out+='<ul>'+items.map(x=>`<li>${esc(x)}</li>`).join('')+'</ul>'; continue;}
|
||||
out+=`<p>${esc(line)}</p>`; i++;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
function openModal(ds, id){
|
||||
let item=(D[ds]||[]).find(x=>x.id===id);
|
||||
if(!item && ds==='sources') item=(D.sources||[]).find(x=>x.id===id);
|
||||
if(!item) return;
|
||||
const title=cardTitle(item,ds)||id; document.getElementById('modalTitle').textContent=title;
|
||||
document.getElementById('modalSub').innerHTML=modalSubtitle(item,ds);
|
||||
document.getElementById('modalBody').innerHTML=renderDetail(item,ds)+renderRelated(item,ds);
|
||||
document.getElementById('modal').classList.add('show');
|
||||
}
|
||||
function modalSubtitle(item,ds){
|
||||
const vals=[item['组织类型'],item['阵营类型'],item['事件类型'],item['平台名称'],item['来源类型'],item['日期'],item['来源可信度']||item['可信度']].filter(Boolean);
|
||||
return vals.map(esc).join(' · ');
|
||||
}
|
||||
function renderDetail(item,ds){
|
||||
const schema=DATA.rich_modal_schemas[ds]||[{title:'详情字段',fields:Object.keys(item).filter(k=>k!=='搜索文本')}];
|
||||
let used=new Set();
|
||||
let html=schema.map(sec=>{
|
||||
const fields=sec.fields.filter(k=>!isEmpty(item[k])); fields.forEach(k=>used.add(k));
|
||||
if(!fields.length) return '';
|
||||
return `<section class="detail-section"><h3>${esc(sec.title)}</h3>${fields.map(k=>`<div class="field"><div class="field-label">${esc(k)}</div><div class="field-value">${fieldValue(item[k],k)}</div></div>`).join('')}</section>`;
|
||||
}).join('');
|
||||
const rest=Object.keys(item).filter(k=>!used.has(k)&&!['id','搜索文本','显示标题'].includes(k)&&!isEmpty(item[k]));
|
||||
if(rest.length){ html+=`<section class="detail-section"><h3>其他补充字段</h3>${rest.map(k=>`<div class="field"><div class="field-label">${esc(k)}</div><div class="field-value">${fieldValue(item[k],k)}</div></div>`).join('')}</section>`; }
|
||||
return html;
|
||||
}
|
||||
function renderRelated(item,ds){
|
||||
let blocks=[];
|
||||
if(ds==='organizations'){
|
||||
const oid=item.id;
|
||||
const ev=(D.events||[]).filter(e=>arr(e['涉及组织']).includes(oid)).slice(0,6);
|
||||
const rel=(D.relationships||[]).filter(r=>r['源节点']===oid||r['目标节点']===oid).slice(0,8);
|
||||
const corp=(D.corpus||[]).filter(c=>c['来源组织']===oid).slice(0,6);
|
||||
blocks.push(relatedCards('关联事件',ev,'events','事件标题',['日期','研究价值','触发因素']));
|
||||
blocks.push(relatedCards('关系边',rel,'relationships','关系类型',['源节点名称','目标节点名称','议题语境']));
|
||||
blocks.push(relatedCards('相关语料',corp,'corpus','中文摘要',['日期','平台','反弹风险']));
|
||||
}
|
||||
if(ds==='events'){
|
||||
const tags=arr(item['叙事标签']).concat(arr(item['议题框架']));
|
||||
const ns=(D.narratives||[]).filter(n=>tags.some(t=>textOf(n).includes(t))).slice(0,6);
|
||||
blocks.push(relatedCards('相关叙事框架',ns,'narratives','叙事名称',['核心主张','风险说明']));
|
||||
}
|
||||
if(ds==='narratives'){
|
||||
const name=item['叙事名称'];
|
||||
const corp=(D.corpus||[]).filter(c=>arr(c['叙事标签']).some(t=>name.includes(t)||t.includes(name)||item['核心主张']?.includes(t))).slice(0,8);
|
||||
blocks.push(relatedCards('支撑语料样本',corp,'corpus','中文摘要',['来源组织名称','日期','反弹风险']));
|
||||
}
|
||||
return blocks.filter(Boolean).join('');
|
||||
}
|
||||
function relatedCards(title,items,ds,titleKey,fields){
|
||||
if(!items.length) return '';
|
||||
return `<section class="detail-section related-block"><h3>${esc(title)}</h3><div class="subcards">${items.map(it=>`<div class="subcard" onclick='openModal("${ds}",${JSON.stringify(it.id)})'><h4>${esc(it[titleKey]||it.id)}</h4><p>${esc(fields.map(f=>it[f]).filter(Boolean).join(' · ')).slice(0,220)}</p></div>`).join('')}</div></section>`;
|
||||
}
|
||||
function closeModal(){document.getElementById('modal').classList.remove('show');}
|
||||
document.addEventListener('keydown',e=>{if(e.key==='Escape')closeModal()});
|
||||
|
||||
(function(){
|
||||
const _render=render;
|
||||
render=function(){
|
||||
refreshIndexes();
|
||||
applyPageVisibility();
|
||||
_render();
|
||||
syncHeader();
|
||||
renderCustomModules(state.tab);
|
||||
};
|
||||
})();
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
(function(){
|
||||
"use strict";
|
||||
function clone(v){return JSON.parse(JSON.stringify(v))}
|
||||
function draftsToData(d){var o={};Object.keys(d).forEach(function(k){if(k!=='__manifest__')o[k]=d[k]});return o}
|
||||
function replaceInPlace(t,s){Object.keys(t).forEach(function(k){delete t[k]});Object.keys(s).forEach(function(k){t[k]=s[k]})}
|
||||
function buildDrafts(data,manifest){var o={__manifest__:clone(manifest)};Object.keys(data).forEach(function(k){o[k]=clone(data[k])});return o}
|
||||
const initialData=clone(DATA),initialManifest=clone(MANIFEST);
|
||||
const overlay=document.getElementById('editorOverlay');
|
||||
if(!overlay)return;
|
||||
const fingerprint=(function(){let h=2166136261;const s=JSON.stringify(initialData)+'|'+JSON.stringify(initialManifest);for(let i=0;i<s.length;i++){h^=s.charCodeAt(i);h=Math.imul(h,16777619)}return (h>>>0).toString(36)})();
|
||||
const storageKey='structured-page-data-v1:'+fingerprint;
|
||||
function readLS(k){try{return window.localStorage?window.localStorage.getItem(k):null}catch(x){return null}}
|
||||
function writeLS(k,v){try{if(window.localStorage)window.localStorage.setItem(k,v)}catch(x){}}
|
||||
function removeLS(k){try{if(window.localStorage)window.localStorage.removeItem(k)}catch(x){}}
|
||||
(function(){const cached=readLS(storageKey);if(!cached)return;try{const parsed=JSON.parse(cached);if(parsed&&typeof parsed==='object'&&parsed.data&&typeof parsed.data==='object'){replaceInPlace(DATA,parsed.data);if(parsed.manifest&&typeof parsed.manifest==='object')replaceInPlace(MANIFEST,parsed.manifest)}}catch(x){}})();
|
||||
const labels={};(MANIFEST['页面']||[]).forEach(p=>{if(p&&p['编号'])labels[p['编号']]=p['名称']||p['编号']});
|
||||
const modules=Object.keys(DATA).concat(['__manifest__']);
|
||||
let active=modules[0]||'__manifest__';
|
||||
let drafts=buildDrafts(DATA,MANIFEST);
|
||||
function moduleTitle(k){return k==='__manifest__'?'系统设置(MANIFEST)':(labels[k]||k)}
|
||||
const tabsEl=document.getElementById('editorTabs'),editor=document.getElementById('jsonEditor'),statusEl=document.getElementById('jsonStatus'),titleEl=document.getElementById('editorModuleTitle');
|
||||
function setStatus(ok,msg){statusEl.textContent=msg;statusEl.className='json-status '+(ok?'valid':'invalid')}
|
||||
function readEditor(){try{const p=JSON.parse(editor.value);if(!p||typeof p!=='object')throw new Error('模块必须是 JSON 对象或数组');setStatus(true,'JSON 有效');return p}catch(x){setStatus(false,'JSON 无效:'+x.message);return null}}
|
||||
function saveActiveDraft(){const p=readEditor();if(!p)return false;drafts[active]=p;return true}
|
||||
function loadEditor(){titleEl.textContent=moduleTitle(active);editor.value=JSON.stringify(drafts[active],null,2);setStatus(true,'JSON 有效')}
|
||||
function renderEditorTabs(){tabsEl.innerHTML='';modules.forEach(function(key){const b=document.createElement('button');b.type='button';b.className='editor-tab'+(key===active?' active':'');b.innerHTML='<b>'+esc(moduleTitle(key))+'</b><small>'+(key==='__manifest__'?'manifest.json':key)+'</small>';b.onclick=function(){if(key===active||!saveActiveDraft())return;active=key;renderEditorTabs();loadEditor()};tabsEl.appendChild(b)})}
|
||||
function closeEditor(){overlay.style.display='none'}
|
||||
function applyToPage(){if(!saveActiveDraft()){setStatus(false,'存在无效模块');return}replaceInPlace(DATA,draftsToData(drafts));replaceInPlace(MANIFEST,drafts.__manifest__);closeEditor();refreshIndexes();populateFilters();render();writeLS(storageKey,JSON.stringify({data:DATA,manifest:MANIFEST}))}
|
||||
function legacyCopy(text){const t=document.createElement('textarea');t.value=text;document.body.appendChild(t);t.select();try{document.execCommand('copy')}catch(x){}t.remove()}
|
||||
document.getElementById('openEditor').onclick=function(){drafts=buildDrafts(DATA,MANIFEST);active=modules[0]||'__manifest__';renderEditorTabs();loadEditor();overlay.style.display='';setTimeout(function(){editor.focus()},40)};
|
||||
document.getElementById('closeEditor').onclick=closeEditor;
|
||||
document.addEventListener('keydown',function(ev){if(ev.key==='Escape'&&overlay.style.display!=='none')closeEditor()});
|
||||
document.getElementById('applyJson').onclick=applyToPage;
|
||||
document.getElementById('resetJson').onclick=function(){drafts=buildDrafts(initialData,initialManifest);active=modules[0]||'__manifest__';removeLS(storageKey);renderEditorTabs();loadEditor();setStatus(true,'已恢复默认数据,点击「应用到页面」生效')};
|
||||
document.getElementById('copyJson').onclick=function(){if(!saveActiveDraft())return;const text=JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2);if(navigator.clipboard&&navigator.clipboard.writeText)navigator.clipboard.writeText(text).catch(function(){legacyCopy(text)});else legacyCopy(text)};
|
||||
document.getElementById('downloadJson').onclick=function(){if(!saveActiveDraft())return;const blob=new Blob([JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2)],{type:'application/json;charset=utf-8'});const link=document.createElement('a');link.href=URL.createObjectURL(blob);link.download='page-data.json';link.click();setTimeout(function(){URL.revokeObjectURL(link.href)},1000)};
|
||||
})();
|
||||
init();
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
<!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{
|
||||
--bg:#781d22;--bg2:#4d1014;--card:#fffaf5;--card2:#fff3eb;--soft:#f8e8de;--line:rgba(95,27,31,.22);
|
||||
--text:#261313;--muted:#755e5e;--accent:#b33a3f;--accent2:#8e2f34;--gold:#b98b54;--ok:#236e56;--warn:#a05a16;
|
||||
--shadow:0 18px 55px rgba(45,10,12,.22);--radius:22px;--radius2:14px;
|
||||
}
|
||||
*{box-sizing:border-box} body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;background:radial-gradient(circle at 20% 0%,#9b3035 0,#781d22 36%,#4d1014 100%);color:var(--text)}
|
||||
a{color:var(--accent2);text-decoration:none} a:hover{text-decoration:underline}.wrap{max-width:1500px;margin:0 auto;padding:28px 22px 48px}.hero{background:linear-gradient(135deg,rgba(255,250,245,.96),rgba(247,232,222,.92));border:1px solid rgba(255,255,255,.52);border-radius:30px;box-shadow:var(--shadow);padding:28px;position:relative;overflow:hidden}.hero:after{content:"";position:absolute;right:-80px;top:-80px;width:300px;height:300px;border-radius:50%;background:rgba(179,58,63,.12)}.eyebrow{font-size:13px;color:var(--accent2);font-weight:800;letter-spacing:.12em;text-transform:uppercase}.hero h1{margin:10px 0 8px;font-size:34px;line-height:1.2;color:#2b1113}.subtitle{color:var(--muted);font-size:16px;max-width:940px;line-height:1.75}.pillbar{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.pill,.tag{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:#fff;border:1px solid var(--line);font-size:12px;color:#553333}.pill.strong{background:#792026;color:#fff;border-color:#792026}.toolbar{margin:18px 0;background:rgba(255,250,245,.94);border:1px solid rgba(255,255,255,.45);border-radius:22px;box-shadow:0 10px 32px rgba(39,7,9,.14);padding:14px;display:grid;grid-template-columns:minmax(260px,1.6fr) repeat(4,minmax(130px,.7fr)) auto;gap:10px;align-items:center}.toolbar input,.toolbar select,.toolbar button{height:42px;border-radius:14px;border:1px solid var(--line);background:#fff;color:var(--text);padding:0 12px;font-size:14px}.toolbar button{background:var(--accent);color:#fff;border-color:var(--accent);font-weight:700;cursor:pointer}.tabs{display:flex;gap:8px;overflow-x:auto;padding:4px 0 12px}.tab{border:1px solid rgba(255,255,255,.45);background:rgba(255,250,245,.88);color:#5b2a2d;border-radius:999px;padding:10px 16px;white-space:nowrap;font-weight:800;cursor:pointer}.tab.active{background:#fff;color:#781d22;box-shadow:0 8px 22px rgba(55,8,10,.2)}.panel{background:rgba(255,250,245,.96);border:1px solid rgba(255,255,255,.52);border-radius:28px;box-shadow:var(--shadow);padding:22px;min-height:560px}.panel-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-end;margin-bottom:18px}.panel-title{font-size:25px;font-weight:900;margin:0;color:#2d1214}.panel-desc{color:var(--muted);line-height:1.65;margin:8px 0 0}.count-badge{background:#5a1519;color:#fff;border-radius:999px;padding:7px 12px;font-size:13px;font-weight:800}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:16px;box-shadow:0 7px 18px rgba(51,16,15,.07);cursor:pointer;transition:.15s}.card:hover{transform:translateY(-2px);box-shadow:0 14px 32px rgba(51,16,15,.14);border-color:rgba(179,58,63,.45)}.card h3{margin:0 0 8px;font-size:18px;color:#2a1012;line-height:1.35}.card .meta{color:var(--muted);font-size:13px;line-height:1.6;margin-bottom:10px}.summary{font-size:14px;line-height:1.72;color:#3b2222;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.kv{display:grid;grid-template-columns:150px 1fr;gap:8px;border-top:1px dashed var(--line);padding-top:10px;margin-top:10px;font-size:14px}.kv b{color:#5b2225}.list{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.chip{display:inline-flex;padding:5px 9px;border-radius:999px;background:var(--soft);border:1px solid var(--line);font-size:12px;color:#653234}.chip.red{background:#ffe3de;color:#8b2327}.chip.green{background:#e9f5ef;color:#236e56}.chip.gold{background:#fff0d9;color:#8d5816}.stat-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin-bottom:18px}.stat{background:#fff;border:1px solid var(--line);border-radius:20px;padding:16px}.stat .num{font-size:28px;font-weight:950;color:#8c2429}.stat .lab{color:var(--muted);font-size:13px;margin-top:4px}.section-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:16px}.info-box{background:#fff;border:1px solid var(--line);border-radius:20px;padding:18px;margin-bottom:14px}.info-box h3{margin:0 0 12px;color:#3a1517}.info-box p,.info-box li{line-height:1.75;color:#442626}.timeline{position:relative;padding-left:22px}.timeline:before{content:"";position:absolute;left:8px;top:4px;bottom:4px;width:2px;background:#e2c6bd}.titem{position:relative;background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px 16px;margin-bottom:12px;cursor:pointer}.titem:before{content:"";position:absolute;left:-20px;top:20px;width:12px;height:12px;border-radius:50%;background:var(--accent);border:3px solid #fff;box-shadow:0 0 0 1px var(--accent)}.tdate{font-weight:900;color:#8c2429;font-size:13px}.matrix{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.matrix-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:16px;cursor:pointer}.split{display:grid;grid-template-columns:1fr 1fr;gap:16px}.table-wrap{overflow:auto;background:#fff;border:1px solid var(Line truncated
|
||||
@media(max-width:1100px){.toolbar{grid-template-columns:1fr 1fr}.grid,.grid.two,.matrix,.split,.section-grid,.stat-grid{grid-template-columns:1fr 1fr}.doc-layout{grid-template-columns:1fr}.doc-nav{position:relative;max-height:none}.field{grid-template-columns:1fr}.subcards{grid-template-columns:1fr}}
|
||||
@media(max-width:720px){.wrap{padding:14px 10px}.hero h1{font-size:25px}.toolbar,.grid,.grid.two,.matrix,.split,.section-grid,.stat-grid{grid-template-columns:1fr}.modal{padding:8px}.modal-head{padding:16px}.modal-body{padding:16px}.panel{padding:14px}.tabs{gap:6px}.tab{padding:9px 12px;font-size:13px}}
|
||||
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
.editor-fab{position:fixed;right:18px;bottom:26px;z-index:60;background:#7c1d24;color:#fff;border:0;border-radius:50%;width:46px;height:46px;display:grid;place-items:center;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.3)}.editor-fab:hover{transform:rotate(30deg)}.editor-fab svg{width:22px;height:22px;display:block}
|
||||
.editor-overlay{z-index:80}
|
||||
.editor-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(1080px,94vw);height:min(680px,88vh);background:#fff;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.35)}
|
||||
.editor-head{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid #e5e7eb}.editor-head h2{margin:0;font-size:16px;flex:1}.editor-head .editor-note{font-size:12px;color:#667085;margin-right:8px}
|
||||
.editor-body{display:flex;flex:1;min-height:0}
|
||||
.editor-tabs{width:210px;border-right:1px solid #e5e7eb;overflow:auto;padding:10px 8px;display:flex;flex-direction:column;gap:4px}
|
||||
.editor-tab{border:0;background:transparent;text-align:left;padding:9px 11px;border-radius:8px;cursor:pointer;color:#667085}.editor-tab b{display:block;font-size:13px;color:#1e2329}.editor-tab small{font-size:10px;opacity:.75}.editor-tab:hover{background:#f4f6f8}.editor-tab.active{background:#f7ecec}.editor-tab.active b{color:#7c1d24}
|
||||
.editor-pane{flex:1;display:flex;flex-direction:column;min-width:0;padding:14px 16px;gap:10px}
|
||||
.editor-title-row{display:flex;align-items:center;justify-content:space-between}.editor-title-row b{font-size:14px}
|
||||
.json-status{font-size:12px;padding:3px 10px;border-radius:999px}.json-status.valid{background:#e8f5ef;color:#14804a}.json-status.invalid{background:#fdecec;color:#b4232d}
|
||||
.json-editor{flex:1;width:100%;resize:none;border:1px solid #e5e7eb;border-radius:10px;padding:13px;font:13px/1.6 ui-monospace,Consolas,monospace;color:#1e2329;background:#f8fafc;outline:0;tab-size:2}
|
||||
.editor-actions{display:flex;gap:8px;flex-wrap:wrap}
|
||||
.editor-hint{margin:0;font-size:11px;color:#8a94a3}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<header class="hero">
|
||||
<div class="eyebrow">Research Dashboard · Enhanced Display</div>
|
||||
<h1 id="pageTitle">美国左翼/进步群体涉华涉台专题研究平台(增强版)</h1>
|
||||
<div class="subtitle" id="pageSubtitle"></div>
|
||||
<div class="pillbar" id="boundaryPills"></div>
|
||||
</header>
|
||||
<section class="toolbar">
|
||||
<input id="q" placeholder="搜索组织、事件、叙事、关系、来源……" />
|
||||
<select id="factionFilter"><option value="">全部阵营</option></select>
|
||||
<select id="relevanceFilter"><option value="">全部相关度</option></select>
|
||||
<select id="confidenceFilter"><option value="">全部可信度</option></select>
|
||||
<select id="yearFilter"><option value="">全部年份</option></select>
|
||||
<button id="resetBtn">重置</button>
|
||||
</section>
|
||||
<nav class="tabs" id="tabs"></nav>
|
||||
<main class="panel" id="panel"></main>
|
||||
<div class="footer-note">本页面仅用于公开资料研究与来源核验,不包含普通成员隐私、个人弱点、线下行动操作指南或定向操纵建议。</div>
|
||||
</div>
|
||||
<div class="modal" id="modal" onclick="if(event.target.id==='modal') closeModal()">
|
||||
<div class="modal-card">
|
||||
<div class="modal-head">
|
||||
<div><div class="modal-title" id="modalTitle"></div><div class="modal-sub" id="modalSub"></div></div>
|
||||
<button class="close" onclick="closeModal()">×</button>
|
||||
</div>
|
||||
<div class="modal-body" id="modalBody"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" id="openEditor" class="editor-fab" aria-label="JSON 编辑器" title="页面 JSON 编辑器"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg></button>
|
||||
<div id="editorOverlay" class="editor-overlay" style="display:none"><div class="editor-modal">
|
||||
<header class="editor-head"><h2>页面 JSON 编辑器</h2><span class="editor-note">按模块编辑,应用后即时重渲染;修改保存在浏览器本地,不回写服务器</span><button type="button" id="closeEditor" style="border:0;background:none;font-size:14px;cursor:pointer">关闭</button></header>
|
||||
<div class="editor-body">
|
||||
<nav id="editorTabs" class="editor-tabs"></nav>
|
||||
<div class="editor-pane">
|
||||
<div class="editor-title-row"><b id="editorModuleTitle"></b><span id="jsonStatus" class="json-status valid">JSON 有效</span></div>
|
||||
<textarea id="jsonEditor" class="json-editor" spellcheck="false" aria-label="当前模块 JSON"></textarea>
|
||||
<div class="editor-actions"><button type="button" id="applyJson" style="background:#7c1d24;color:#fff;border:0;border-radius:6px;padding:7px 14px;cursor:pointer">应用到页面</button><button type="button" id="resetJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">恢复默认数据</button><button type="button" id="copyJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">复制完整 JSON</button><button type="button" id="downloadJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">下载 JSON</button></div>
|
||||
<p class="editor-hint">模块 = 页面数据(DATA)的顶层键,另附「系统设置」编辑 MANIFEST;沙箱预览无法使用本地缓存时,修改仅当次会话有效。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
<script type="application/json" id="structured-data">__PAGE_DATA__</script>
|
||||
<script type="application/json" id="structured-manifest">__PAGE_MANIFEST__</script>
|
||||
<script type="application/json" id="structured-fields">__PAGE_FIELDS__</script>
|
||||
<script>__PAGE_RUNTIME__</script>
|
||||
</body>
|
||||
</html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"meta": {"title": "美方新右翼与极右翼群体研究专题库", "subtitle": "公开资料研究|组织谱系|叙事结构|平台生态|地方嵌入|涉华涉台议题", "version": "v3.0-full-structured-no-blank", "language": "zh-CN", "lastUpdated": "2026-06-25", "researchScope": ["美国新右翼政策网络", "极右翼街头组织", "反政府民兵", "白人民族主义组织", "阴谋论运动", "地方文化战生态", "涉华涉台右翼叙事"], "researchBoundary": "本专题库仅用于公开资料研究、政策分析、舆情观察和风险防护,不用于渗透、动员、骚扰、目标定位、动员招募、规避平台治理或暴力指导。", "methodNote": "所有条目均以公开资料研究为定位;风险等级是研究性提示,不等同于法律定性。新右翼、传统保守主义、宗教保守主义、共和党支持者与暴力极端主义必须严格区分。", "dataDesignNote": "v3 修复详情页空白问题:弹框改为按字段动态分组,只有存在内容的二级页才显示;同时增加“全部字段”结构化页,避免知识删减或字段遗漏。", "allowedUses": ["公开资料研究", "非操控性风险监测", "舆情趋势分析", "反极端主义预防", "政策建议", "公共沟通建议", "族群安全风险提示", "来源可信度审查"], "prohibitedUses": ["渗透、诱导、策反或操控任何群体", "制造、放大或投放欺骗性信息", "对特定个人进行画像、骚扰、跟踪、威胁或 doxxing", "规避平台治理、执法监测或安全机制", "提供暴力、破坏、骚乱组织、逃避执法或现场对抗的操作性指导", "针对族裔、宗教、政治立场、国籍、性别或性取向群体进行仇恨动员"], "coreResearchChain": ["概念区分", "历史演化", "主要群体与组织谱系", "人员结构与社会基础", "叙事结构与受众心理", "社交媒体与平台生态", "生态网络与影响通道", "涉华涉台议题嵌入路径", "风险行为链条", "地方社会与经济利益", "资源、法律与治理反应"], "interpretationPrinciple": "保守主义立场、共和党支持、反移民政策主张、反中共言论、支持台湾或反对美国介入台湾,本身均不等于极端主义;只有出现去人化、暴力正当化、具体目标指向、威胁或行动化迹象,才进入高风险研判。"}, "dictionaries": {"riskLevels": {"低": "普通政治表达、政策争议或低风险研究对象", "中": "存在议题极化、阴谋论倾向或平台扩散风险", "中-高": "存在群体泛化、目标个人化、地方冲突或跨平台扩散风险", "高": "存在反政府动员、仇恨叙事、线下行动化或暴力正当化风险", "严重": "存在现实暴力、模仿袭击、攻击者崇拜或明确威胁风险"}, "riskColors": {"低": "green", "中": "yellow", "中-高": "orange", "高": "red", "严重": "darkred"}, "sourceLevels": {"A": "法院、政府、国会、执法机构等官方公开文件", "B": "主流媒体或可靠地方媒体", "C": "研究机构、智库、倡议组织", "D": "学术论文、预印本、数据集", "E": "公开社交媒体样本,仅作为舆情线索", "F": "匿名论坛、截图、二手转述,只能作为待核查线索"}, "organizationTypes": ["新右翼政策网络", "极右翼街头组织", "反政府民兵", "白人民族主义组织", "阴谋论运动", "主权公民运动", "宗教民族主义网络", "男性至上主义生态", "反移民组织", "去中心化训练网络"], "platformTypes": ["主流社交平台", "替代社交平台", "匿名论坛", "长视频平台", "播客生态", "众筹平台", "地方社群平台", "邮件/通讯平台", "独立网站"], "researchModules": {"concepts_typology": "概念与谱系:区分新右翼、极右翼和暴力极端主义", "history_evolution": "历史演化:从白人至上、民兵、Tea Party、Alt-Right 到 MAGA 与新右翼制度化", "groups_organizations": "群体与组织:组织资料卡、行动形态与风险边界", "personnel_social_base": "人员与社会基础:受众分层、人员生态与地方嵌入", "narratives_psychology": "叙事与心理:解释世界、塑造敌人、吸引受众的叙事结构", "social_media_ecology": "社交媒体生态:引流、沉淀、强化、迁移和线下转化", "influence_networks": "生态网络与影响通道:思想、媒体、平台、地方、资金如何形成影响", "china_taiwan_issues": "涉华涉台议题:TikTok、芯片、疫情、留学生、芬太尼、台湾和台海", "local_society_economics": "地方社会与经济利益:学校、教会、县级政治、注意力经济与法律基金"}, "riskBehaviorSignals": ["明确敌人 + 末日紧迫感", "去人化语言 + 行动号召", "目标地点 + 时间窗口", "个人 grievance + 武器文化 + 社群鼓励", "过去袭击者崇拜 + 模仿语言", "执法/法院不合法叙事 + 被捕者殉道化"], "sourceUseRules": Line truncated
|
||||
+1424
File diff suppressed because it is too large.
Load diff
+56
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"系统": {
|
||||
"名称": "美方新右翼与极右翼群体研究专题库",
|
||||
"说明": "公开资料研究|组织谱系|叙事结构|平台生态|地方嵌入|涉华涉台议题。保守主义立场、共和党支持、反移民政策主张、反中共言论、支持台湾或反对美国介入台湾,本身均不等于极端主义;只有出现去人化、暴力正当化、具体目标指向、威胁或行动化迹象,才进入高风险研判。",
|
||||
"版本": "v3.0-full-structured-no-blank"
|
||||
},
|
||||
"页面": [
|
||||
{
|
||||
"编号": "dashboard",
|
||||
"名称": "综合态势"
|
||||
},
|
||||
{
|
||||
"编号": "conceptSpectrum",
|
||||
"名称": "概念边界与思想谱系"
|
||||
},
|
||||
{
|
||||
"编号": "historicalStages",
|
||||
"名称": "历史演化"
|
||||
},
|
||||
{
|
||||
"编号": "organizations",
|
||||
"名称": "组织谱系"
|
||||
},
|
||||
{
|
||||
"编号": "actorsAndInstitutions",
|
||||
"名称": "人物、机构与政策网络"
|
||||
},
|
||||
{
|
||||
"编号": "audienceSegments",
|
||||
"名称": "社会基础与受众结构"
|
||||
},
|
||||
{
|
||||
"编号": "mediaPlatforms",
|
||||
"名称": "媒体与平台生态"
|
||||
},
|
||||
{
|
||||
"编号": "localScenes",
|
||||
"名称": "地方社会与场景嵌入"
|
||||
},
|
||||
{
|
||||
"编号": "events",
|
||||
"名称": "事件案例库"
|
||||
},
|
||||
{
|
||||
"编号": "chinaTaiwanNarratives",
|
||||
"名称": "涉华涉台叙事库"
|
||||
},
|
||||
{
|
||||
"编号": "resourcesLegalGovernance",
|
||||
"名称": "资源、法律与治理反应"
|
||||
}
|
||||
],
|
||||
"交互规则": {
|
||||
"默认展示": "dashboard"
|
||||
}
|
||||
}
|
||||
+267
@@ -0,0 +1,267 @@
|
||||
/* no.16 页面运行时(结构化模板)。
|
||||
* 由 template_fill.compose_structured 内联进骨架的运行时注入点。
|
||||
* DATA 从骨架 JSON 元素读取;MANIFEST/FIELDS 供页面隐藏/自定义模块/字段可见性。 */
|
||||
const DATA=JSON.parse((document.getElementById("structured-data")||{textContent:"{}"}).textContent);
|
||||
const MANIFEST=JSON.parse((document.getElementById("structured-manifest")||{textContent:"{}"}).textContent);
|
||||
const FIELDS=(function(){try{var v=JSON.parse((document.getElementById("structured-fields")||{textContent:"[]"}).textContent);return Array.isArray(v)?v:((v&&v.fields)||[])}catch(x){return []}})();
|
||||
|
||||
function pageHidden(key){
|
||||
const pg=(MANIFEST['页面']||[]).find(p=>p['编号']===key);
|
||||
return !!(pg&&pg['隐藏']===true);
|
||||
}
|
||||
function visibleTabs(){return (DATA.tabs||[]).filter(t=>!pageHidden(t.id))}
|
||||
function syncHeader(){
|
||||
const sys=(MANIFEST['系统']||{});
|
||||
if(sys['名称']){document.title=String(sys['名称']);const h1=document.getElementById('pageTitle');if(h1)h1.textContent=String(sys['名称'])}
|
||||
const sub=document.getElementById('pageSubtitle');if(sub&&sys['说明'])sub.textContent=String(sys['说明']);
|
||||
}
|
||||
function renderCustomModules(pageId){
|
||||
const host=document.getElementById('content');
|
||||
if(!host)return;
|
||||
host.querySelectorAll('.custom-module').forEach(x=>x.remove());
|
||||
const list=((MANIFEST||{})['自定义模块']||[]).filter(m=>m&&m['页面']===pageId&&m.html);
|
||||
list.forEach(m=>{
|
||||
const sec=document.createElement('section');sec.className='custom-module';sec.style.margin='18px 0';
|
||||
sec.innerHTML='<h2 class="section-title">'+esc(m['标题']||'自定义模块')+'</h2>'+m.html;
|
||||
host.appendChild(sec);
|
||||
});
|
||||
}
|
||||
function applyPageVisibility(){
|
||||
if(pageHidden(activeTab)){const first=visibleTabs()[0];if(first)activeTab=first.id}
|
||||
}
|
||||
|
||||
let activeTab = 'dashboard';
|
||||
let currentModalItem = null; let currentModalKey = null; let currentModalGroup = null;
|
||||
let KEY_TO_TITLE = {};
|
||||
let SEARCH_KEYS = [];
|
||||
function refreshDerived(){
|
||||
KEY_TO_TITLE = Object.fromEntries((DATA.tabs||[]).map(t=>[t.dataKey,t.name]));
|
||||
SEARCH_KEYS = (DATA.queryConfig && DATA.queryConfig.searchKeys) || (DATA.tabs||[]).map(t=>t.dataKey).filter(k=>Array.isArray(DATA[k]));
|
||||
}
|
||||
const riskClass = r => ({'低':'low','中':'mid','中-高':'midhi','高':'high','严重':'severe'}[r] || '');
|
||||
function esc(s){ return String(s ?? '').replace(/[&<>"']/g, m => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[m])); }
|
||||
function arr(v){ return Array.isArray(v) ? v : (v === undefined || v === null || v === '' ? [] : [v]); }
|
||||
function isEmpty(v){ return v === undefined || v === null || v === '' || (Array.isArray(v)&&v.length===0) || (typeof v==='object'&&!Array.isArray(v)&&Object.keys(v).length===0); }
|
||||
function titleOf(item){ return item['名称'] || item['事件'] || item['议题'] || item['平台'] || item['场景'] || item['受众类型'] || item['阶段'] || item['概念'] || item['类型'] || item.label || item.id || '条目'; }
|
||||
function subOf(item){ return item['中文名称'] || item['英文'] || item['事件类型'] || item['议题类型'] || item['平台类型'] || item['节点类型'] || item['时间'] || item['基本定位'] || item.description || ''; }
|
||||
function riskBadge(r){ return r ? `<span class="risk ${riskClass(r)}">${esc(r)}</span>` : ''; }
|
||||
function tags(list, cls=''){ return arr(list).slice(0,18).map(x=>`<span class="pill ${cls}">${esc(typeof x==='object' ? objectSummary(x) : x)}</span>`).join(''); }
|
||||
function objectSummary(o){ return Object.entries(o).map(([k,v])=>`${k}:${Array.isArray(v)?v.join('、'):v}`).join(';'); }
|
||||
function init(){
|
||||
refreshDerived();
|
||||
applyPageVisibility();
|
||||
document.getElementById('pageTitle').textContent = DATA.meta.title || '专题库';
|
||||
document.getElementById('pageSubtitle').textContent = (DATA.meta.subtitle||'') + '。' + (DATA.meta.interpretationPrinciple||'');
|
||||
document.getElementById('metaPills').innerHTML = [`版本:${DATA.meta.version}`,`更新:${DATA.meta.lastUpdated}`,'11个研究栏目','结构化详情页','无空白二级页'].map(x=>`<span class="pill light">${esc(x)}</span>`).join('');
|
||||
renderFilters(); renderTabs(); bindEvents(); render();
|
||||
}
|
||||
function renderFilters(){
|
||||
const rf=document.getElementById('riskFilter'); rf.innerHTML='<option value="">全部风险等级</option>'; Object.keys(DATA.dictionaries.riskLevels||{}).forEach(r=>rf.insertAdjacentHTML('beforeend',`<option>${esc(r)}</option>`));
|
||||
const sf=document.getElementById('sourceFilter'); sf.innerHTML='<option value="">全部来源</option>'; Object.keys(DATA.dictionaries.sourceLevels||{}).forEach(s=>sf.insertAdjacentHTML('beforeend',`<option>${esc(s)}</option>`));
|
||||
updateTypeFilter();
|
||||
}
|
||||
function updateTypeFilter(){
|
||||
const sel=document.getElementById('typeFilter'); const old=sel.value; sel.innerHTML='<option value="">全部类型/节点</option>';
|
||||
const tab=DATA.tabs.find(t=>t.id===activeTab); const d=DATA[tab.dataKey]; const set=new Set();
|
||||
if(Array.isArray(d)) d.forEach(it=>['类型','节点类型','平台类型','事件类型','议题类型','受众类型','场景','概念'].forEach(k=>{if(it[k]) set.add(it[k]);}));
|
||||
[...set].sort().forEach(v=>sel.insertAdjacentHTML('beforeend',`<option>${esc(v)}</option>`));
|
||||
if([...set].includes(old)) sel.value=old;
|
||||
}
|
||||
function renderTabs(){ document.getElementById('tabs').innerHTML = visibleTabs().map(t=>`<button class="tab ${t.id===activeTab?'active':''}" data-tab="${t.id}">${esc(t.name)}</button>`).join(''); }
|
||||
function bindEvents(){
|
||||
document.getElementById('tabs').addEventListener('click', e=>{if(e.target.dataset.tab){if(pageHidden(e.target.dataset.tab))return;activeTab=e.target.dataset.tab; render();}});
|
||||
['globalSearch','riskFilter','typeFilter','sourceFilter'].forEach(id=>document.getElementById(id).addEventListener('input',()=>{ renderSearch(); render(); }));
|
||||
document.getElementById('resetBtn').onclick=()=>{['globalSearch','riskFilter','typeFilter','sourceFilter'].forEach(id=>document.getElementById(id).value=''); document.getElementById('searchResults').style.display='none'; render();};
|
||||
document.getElementById('closeModal').onclick=closeModal;
|
||||
document.getElementById('modalBackdrop').addEventListener('click', e=>{if(e.target.id==='modalBackdrop') closeModal();});
|
||||
document.getElementById('copyJsonBtn').onclick=()=>{ if(currentModalItem) navigator.clipboard.writeText(JSON.stringify(currentModalItem,null,2)); };
|
||||
document.getElementById('modalTabs').addEventListener('click', e=>{ if(e.target.dataset.group){currentModalGroup=e.target.dataset.group; renderModalBody();} });
|
||||
}
|
||||
function itemText(it){ return JSON.stringify(it).toLowerCase(); }
|
||||
function filterData(items){
|
||||
if(!Array.isArray(items)) return items;
|
||||
const q=document.getElementById('globalSearch').value.trim().toLowerCase(); const risk=document.getElementById('riskFilter').value; const type=document.getElementById('typeFilter').value; const source=document.getElementById('sourceFilter').value;
|
||||
return items.filter(it=>{
|
||||
if(q && !itemText(it).includes(q)) return false;
|
||||
if(risk && it['风险等级']!==risk) return false;
|
||||
if(source && !arr(it['来源等级']).includes(source)) return false;
|
||||
if(type){ const vals=['类型','节点类型','平台类型','事件类型','议题类型','受众类型','场景','概念'].map(k=>it[k]).filter(Boolean); if(!vals.includes(type)) return false; }
|
||||
return true;
|
||||
});
|
||||
}
|
||||
function render(){
|
||||
const tab=DATA.tabs.find(t=>t.id===activeTab); document.getElementById('tabDesc').innerHTML = `<b>${esc(tab.name)}</b>:${esc(tab.description||'')}`;
|
||||
const raw=DATA[tab.dataKey]; const filtered=filterData(raw);
|
||||
if(tab.dataKey==='dashboard') return renderDashboard(raw);
|
||||
if(tab.layout==='timeline' || tab.layout==='timelineTable') return renderTimeline(filtered, tab.dataKey);
|
||||
if(tab.layout==='tableCard') return renderTableCards(filtered, tab.dataKey);
|
||||
return renderCards(filtered, tab.dataKey, tab.layout);
|
||||
}
|
||||
function renderDashboard(d){
|
||||
const html = [];
|
||||
html.push(`<div class="overview-grid">${d.summaryCards.map(c=>`<div class="stat"><div class="label">${esc(c.label)}</div><div class="value">${esc(c.value)}${c.unit?`<span style="font-size:14px">${esc(c.unit)}</span>`:''}</div><div class="desc">${esc(c.description||'')}</div></div>`).join('')}</div>`);
|
||||
html.push(`<div class="notice safe"><b>研究边界:</b>${esc(DATA.meta.researchBoundary)}<br><b>判读原则:</b>${esc(DATA.meta.interpretationPrinciple)}</div>`);
|
||||
html.push(`<div class="grid two"><div class="card"><h3>热点议题</h3><div class="tags">${tags(d.hotIssues,'red')}</div></div><div class="card"><h3>重点风险关注</h3>${listBlock(d.riskFocus)}</div></div>`);
|
||||
html.push(section('核心研究问题','来自原 Skill 的研究框架'));
|
||||
html.push(`<div class="grid three">${d.coreQuestions.map(q=>`<div class="card"><h3>${esc(q.title)}</h3><p class="sub">${esc(q.content)}</p></div>`).join('')}</div>`);
|
||||
html.push(section('风险行为链条模型','结构化展示,不提供操作性行动方案'));
|
||||
html.push(`<div class="grid">${d.riskBehaviorModels.map(m=>`<div class="card"><h3>${esc(m.name)}</h3><div class="chain">${m.steps.map((s,i)=>`${i?'<span class="arrow">→</span>':''}<span class="step">${esc(s)}</span>`).join('')}</div></div>`).join('')}</div>`);
|
||||
html.push(section('八类核心叙事模块','叙事-受众-风险点'));
|
||||
html.push(simpleTable(d.narrativeModules,['叙事','核心内容','主要受众','风险点']));
|
||||
html.push(section('六层生态网络','思想、媒体、平台、地方、街头、资源'));
|
||||
html.push(simpleTable(d.ecosystemLayers,['层级','功能','典型节点']));
|
||||
html.push(section('来源材料地图','对应原 Skill references/source_materials_map.md'));
|
||||
html.push(renderObjectCards(d.sourceMaterialsMap,'来源类型'));
|
||||
html.push(section('公开资料研究检查清单','对应原 Skill references/open_source_research_checklist.md'));
|
||||
html.push(`<div class="grid three">${Object.entries(d.openSourceResearchChecklist||{}).map(([k,v])=>`<div class="card"><h3>${esc(k)}</h3>${listBlock(v)}</div>`).join('')}</div>`);
|
||||
html.push(section('标准报告模板','对应原 Skill 的标准输出结构与模板'));
|
||||
html.push(renderObjectCards(d.standardTemplates,'模板'));
|
||||
html.push(section('未来趋势判断框架','对应原 Skill 的未来十年趋势判断框架'));
|
||||
html.push(`<div class="card">${listBlock(d.futureTrendFramework)}</div>`);
|
||||
html.push(`<div class="grid two" style="margin-top:14px"><div class="card"><h3>最小可用研判公式</h3><p class="sub" style="font-weight:900;color:#7a1f1f">${esc(d.minimumAssessmentFormula)}</p>${listBlock(d.formulaInterpretation)}</div><div class="card"><h3>事件触发覆盖范围</h3><div class="tags">${tags(d.triggerEventCoverage,'orange')}</div></div></div>`);
|
||||
document.getElementById('content').innerHTML = html.join('');
|
||||
}
|
||||
function section(h,small=''){return `<div class="section-title"><h2>${esc(h)}</h2><small>${esc(small)}</small></div>`;}
|
||||
function renderCards(items,key,layout){
|
||||
const content=document.getElementById('content'); if(!items.length){content.innerHTML='<div class="empty">没有匹配的数据。请调整搜索或筛选条件。</div>';return;}
|
||||
content.innerHTML = `<div class="grid">${items.map(it=>cardHTML(it,key)).join('')}</div>`; bindOpenButtons();
|
||||
}
|
||||
function pickTags(it){ return it['核心叙事'] || it['核心特征'] || it['主要议题'] || it['关联议题'] || it['易触发议题'] || it['典型内容'] || it['主要形式'] || it['外溢风险'] || it['代表现象'] || []; }
|
||||
function cardHTML(it,key){
|
||||
const title=titleOf(it), sub=subOf(it), risk=it['风险等级'];
|
||||
const line1 = it['基本定位'] || it['公开身份'] || it['功能定位'] || it['研究意义'] || it['事件概况'] || it['研究价值'] || it['风险关注']?.[0] || '';
|
||||
return `<article class="card">${riskBadge(risk)}<h3>${esc(title)}</h3><div class="sub">${esc(sub)}</div><div class="kv">${esc(String(line1)).slice(0,220)}</div><div class="tags">${tags(pickTags(it))}</div><div class="card-actions"><button class="linkbtn open-detail" data-id="${esc(it.id||title)}" data-key="${key}">查看结构化详情</button>${it['来源等级']?`<span class="mini">来源:${arr(it['来源等级']).join('/')}</span>`:''}</div></article>`;
|
||||
}
|
||||
function renderTimeline(items,key){
|
||||
if(!items.length){document.getElementById('content').innerHTML='<div class="empty">没有匹配的数据。</div>';return;}
|
||||
const rows=items.map(it=>`<div class="timeline-item"><div class="card">${riskBadge(it['风险等级'])}<h3>${esc(titleOf(it))}</h3><div class="sub">${esc(it['时间']||'')} ${it['地点']?'|'+esc(it['地点']):''}</div><div class="kv">${esc(it['研究意义']||it['事件类型']||it['事件概况']||'')}</div><div class="tags">${tags(it['主要特征']||it['核心叙事']||it['代表现象'])}</div><button class="linkbtn open-detail" data-id="${esc(it.id||titleOf(it))}" data-key="${key}">查看详情</button></div></div>`).join('');
|
||||
document.getElementById('content').innerHTML=`<div class="timeline">${rows}</div>`; bindOpenButtons();
|
||||
}
|
||||
function renderTableCards(items,key){
|
||||
if(!items.length){document.getElementById('content').innerHTML='<div class="empty">没有匹配的数据。</div>';return;}
|
||||
document.getElementById('content').innerHTML = `<div class="table-wrap"><table><thead><tr><th>类型</th><th>对应生态</th><th>主要形式</th><th>相关议题</th><th>风险</th><th>操作</th></tr></thead><tbody>${items.map(it=>`<tr><td><b>${esc(it['类型'])}</b></td><td>${renderSimple(it['对应生态'])}</td><td>${renderSimple(it['主要形式'])}</td><td>${renderSimple(it['相关议题'])}</td><td>${it['风险等级']?`<span class="pill red">${esc(it['风险等级'])}</span>`:''}</td><td><button class="linkbtn open-detail" data-id="${esc(it.id||it['类型'])}" data-key="${key}">详情</button></td></tr>`).join('')}</tbody></table></div>`; bindOpenButtons();
|
||||
}
|
||||
function renderSimple(v){ return arr(v).map(x=>esc(typeof x==='object'?objectSummary(x):x)).join('、'); }
|
||||
function simpleTable(rows, cols){ return `<div class="table-wrap"><table><thead><tr>${cols.map(c=>`<th>${esc(c)}</th>`).join('')}</tr></thead><tbody>${(rows||[]).map(r=>`<tr>${cols.map(c=>`<td>${renderValue(r[c])}</td>`).join('')}</tr>`).join('')}</tbody></table></div>`; }
|
||||
function renderObjectCards(rows,titleKey){ return `<div class="grid">${(rows||[]).map((r,i)=>`<div class="card"><h3>${esc(r[titleKey] || titleOf(r) || ('条目 '+(i+1)))}</h3>${Object.entries(r).filter(([k])=>k!==titleKey).map(([k,v])=>`<div style="margin-top:9px"><b style="color:#6b1717">${esc(k)}:</b>${renderValue(v)}</div>`).join('')}</div>`).join('')}</div>`; }
|
||||
function listBlock(list){ return `<ul>${arr(list).map(x=>`<li>${esc(typeof x==='object'?objectSummary(x):x)}</li>`).join('')}</ul>`; }
|
||||
function bindOpenButtons(){ document.querySelectorAll('.open-detail').forEach(btn=>btn.onclick=()=>openDetail(btn.dataset.key, btn.dataset.id)); }
|
||||
function openDetail(key,id){
|
||||
const arrData=DATA[key]||[]; currentModalItem=arrData.find(x=>(x.id||titleOf(x))===id) || arrData.find(x=>titleOf(x)===id); currentModalKey=key;
|
||||
if(!currentModalItem) return; const groups=availableGroups(currentModalItem); currentModalGroup=groups[0]?.id || 'all';
|
||||
document.getElementById('modalTitle').textContent=titleOf(currentModalItem); document.getElementById('modalSubtitle').textContent=(KEY_TO_TITLE[key]||key) + (subOf(currentModalItem)?'|'+subOf(currentModalItem):'');
|
||||
renderModalTabs(); renderModalBody(); document.getElementById('modalBackdrop').style.display='flex';
|
||||
}
|
||||
function closeModal(){ document.getElementById('modalBackdrop').style.display='none'; }
|
||||
function groupDefs(){ return (DATA.detailConfig && DATA.detailConfig.groups) || []; }
|
||||
function groupFields(item, group){
|
||||
const keys = group.keys === '*' ? Object.keys(item) : group.keys;
|
||||
return keys.filter(k=>!isEmpty(item[k]));
|
||||
}
|
||||
function assignedKeys(){
|
||||
const s=new Set(); groupDefs().forEach(g=>{ if(g.keys !== '*') g.keys.forEach(k=>s.add(k)); }); return s;
|
||||
}
|
||||
function availableGroups(item){
|
||||
const defs=groupDefs();
|
||||
const groups=[];
|
||||
defs.forEach(g=>{
|
||||
if(g.keys==='*') return;
|
||||
if(groupFields(item,g).length) groups.push(g);
|
||||
});
|
||||
// Always include all fields as a structured page, never blank, but not JSON raw.
|
||||
groups.push(defs.find(g=>g.id==='all') || {id:'all',name:'全部字段',keys:'*'});
|
||||
return groups;
|
||||
}
|
||||
function renderModalTabs(){
|
||||
const groups=availableGroups(currentModalItem);
|
||||
if(!groups.find(g=>g.id===currentModalGroup)) currentModalGroup=groups[0].id;
|
||||
document.getElementById('modalTabs').innerHTML=groups.map(g=>`<button class="modal-tab ${g.id===currentModalGroup?'active':''}" data-group="${esc(g.id)}">${esc(g.name)}</button>`).join('');
|
||||
}
|
||||
function renderModalBody(){
|
||||
renderModalTabs(); const group=availableGroups(currentModalItem).find(g=>g.id===currentModalGroup); let html='';
|
||||
if(currentModalGroup==='boundary') html += `<div class="notice danger"><b>安全提醒:</b>${esc(DATA.meta.researchBoundary)}</div>`;
|
||||
if(currentModalGroup==='all') {
|
||||
const entries=Object.entries(currentModalItem).filter(([k,v])=>!isEmpty(v));
|
||||
html += `<div class="notice warn"><b>全部字段结构化展示:</b>这一页不是 JSON 原文,而是将该条目的所有非空字段按字段卡片呈现,避免详情内容遗漏。</div>`;
|
||||
html += `<div class="detail-grid">${entries.map(([k,v])=>fieldHTML(k,v)).join('')}</div>`;
|
||||
} else {
|
||||
const fields=groupFields(currentModalItem, group);
|
||||
if(!fields.length) html += '<div class="empty">该分类没有可展示字段,已自动隐藏;请查看“全部字段”。</div>';
|
||||
else html += `<div class="detail-grid">${fields.map(k=>fieldHTML(k,currentModalItem[k])).join('')}</div>`;
|
||||
}
|
||||
document.getElementById('modalBody').innerHTML=html;
|
||||
}
|
||||
function fieldHTML(k,v){ return `<section class="detail-section"><h4>${esc(k)}</h4><div class="field">${renderValue(v)}</div></section>`; }
|
||||
function renderValue(v){
|
||||
if(isEmpty(v)) return '<span class="mini">暂无数据</span>';
|
||||
if(Array.isArray(v)){
|
||||
if(v.every(x=>typeof x !== 'object')){
|
||||
if(v.length<=12 && v.every(x=>String(x).length<60)) return `<div class="tags">${tags(v)}</div>`;
|
||||
return `<ul class="field-list">${v.map(x=>`<li>${esc(x)}</li>`).join('')}</ul>`;
|
||||
}
|
||||
return v.map((obj,i)=>`<div class="object-card"><h5>条目 ${i+1}</h5>${objectTable(obj)}</div>`).join('');
|
||||
}
|
||||
if(typeof v === 'object') return objectTable(v);
|
||||
const str=String(v);
|
||||
if(str.length>180) return `<p>${esc(str)}</p>`;
|
||||
return `<p>${esc(str)}</p>`;
|
||||
}
|
||||
function objectTable(obj){ return `<div class="table-wrap"><table><tbody>${Object.entries(obj).filter(([k,v])=>!isEmpty(v)).map(([k,v])=>`<tr><th>${esc(k)}</th><td>${renderValue(v)}</td></tr>`).join('')}</tbody></table></div>`; }
|
||||
function renderSearch(){
|
||||
const q=document.getElementById('globalSearch').value.trim().toLowerCase(); const box=document.getElementById('searchResults');
|
||||
if(!q){box.style.display='none';return;}
|
||||
const res=[]; SEARCH_KEYS.forEach(k=>(DATA[k]||[]).forEach(it=>{ if(itemText(it).includes(q)) res.push({key:k,item:it}); }));
|
||||
box.style.display='block'; box.innerHTML = `<div style="padding:10px 12px"><b>全局搜索结果:${res.length} 条</b></div>` + (res.length?res.slice(0,50).map(r=>`<div class="result-row"><div><div class="result-title">${esc(titleOf(r.item))}</div><div class="result-source">来源栏目:${esc(KEY_TO_TITLE[r.key]||r.key)} ${r.item['风险等级']?'|风险:'+esc(r.item['风险等级']):''}</div></div><button class="linkbtn" onclick="openDetail('${r.key}','${esc(r.item.id||titleOf(r.item))}')">查看</button></div>`).join(''):'<div class="empty">无匹配结果</div>');
|
||||
}
|
||||
|
||||
(function(){
|
||||
const _render=render;
|
||||
render=function(){
|
||||
refreshDerived();
|
||||
applyPageVisibility();
|
||||
renderTabs();
|
||||
updateTypeFilter();
|
||||
_render();
|
||||
syncHeader();
|
||||
renderCustomModules(activeTab);
|
||||
};
|
||||
})();
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
(function(){
|
||||
"use strict";
|
||||
function clone(v){return JSON.parse(JSON.stringify(v))}
|
||||
function draftsToData(d){var o={};Object.keys(d).forEach(function(k){if(k!=='__manifest__')o[k]=d[k]});return o}
|
||||
function replaceInPlace(t,s){Object.keys(t).forEach(function(k){delete t[k]});Object.keys(s).forEach(function(k){t[k]=s[k]})}
|
||||
function buildDrafts(data,manifest){var o={__manifest__:clone(manifest)};Object.keys(data).forEach(function(k){o[k]=clone(data[k])});return o}
|
||||
const initialData=clone(DATA),initialManifest=clone(MANIFEST);
|
||||
const overlay=document.getElementById('editorOverlay');
|
||||
if(!overlay)return;
|
||||
const fingerprint=(function(){let h=2166136261;const s=JSON.stringify(initialData)+'|'+JSON.stringify(initialManifest);for(let i=0;i<s.length;i++){h^=s.charCodeAt(i);h=Math.imul(h,16777619)}return (h>>>0).toString(36)})();
|
||||
const storageKey='structured-page-data-v1:'+fingerprint;
|
||||
function readLS(k){try{return window.localStorage?window.localStorage.getItem(k):null}catch(x){return null}}
|
||||
function writeLS(k,v){try{if(window.localStorage)window.localStorage.setItem(k,v)}catch(x){}}
|
||||
function removeLS(k){try{if(window.localStorage)window.localStorage.removeItem(k)}catch(x){}}
|
||||
(function(){const cached=readLS(storageKey);if(!cached)return;try{const parsed=JSON.parse(cached);if(parsed&&typeof parsed==='object'&&parsed.data&&typeof parsed.data==='object'){replaceInPlace(DATA,parsed.data);if(parsed.manifest&&typeof parsed.manifest==='object')replaceInPlace(MANIFEST,parsed.manifest)}}catch(x){}})();
|
||||
const labels={};(MANIFEST['页面']||[]).forEach(p=>{if(p&&p['编号'])labels[p['编号']]=p['名称']||p['编号']});
|
||||
const modules=Object.keys(DATA).concat(['__manifest__']);
|
||||
let active=modules[0]||'__manifest__';
|
||||
let drafts=buildDrafts(DATA,MANIFEST);
|
||||
function moduleTitle(k){return k==='__manifest__'?'系统设置(MANIFEST)':(labels[k]||k)}
|
||||
const tabsEl=document.getElementById('editorTabs'),editor=document.getElementById('jsonEditor'),statusEl=document.getElementById('jsonStatus'),titleEl=document.getElementById('editorModuleTitle');
|
||||
function setStatus(ok,msg){statusEl.textContent=msg;statusEl.className='json-status '+(ok?'valid':'invalid')}
|
||||
function readEditor(){try{const p=JSON.parse(editor.value);if(!p||typeof p!=='object')throw new Error('模块必须是 JSON 对象或数组');setStatus(true,'JSON 有效');return p}catch(x){setStatus(false,'JSON 无效:'+x.message);return null}}
|
||||
function saveActiveDraft(){const p=readEditor();if(!p)return false;drafts[active]=p;return true}
|
||||
function loadEditor(){titleEl.textContent=moduleTitle(active);editor.value=JSON.stringify(drafts[active],null,2);setStatus(true,'JSON 有效')}
|
||||
function renderEditorTabs(){tabsEl.innerHTML='';modules.forEach(function(key){const b=document.createElement('button');b.type='button';b.className='editor-tab'+(key===active?' active':'');b.innerHTML='<b>'+esc(moduleTitle(key))+'</b><small>'+(key==='__manifest__'?'manifest.json':key)+'</small>';b.onclick=function(){if(key===active||!saveActiveDraft())return;active=key;renderEditorTabs();loadEditor()};tabsEl.appendChild(b)})}
|
||||
function closeEditor(){overlay.style.display='none'}
|
||||
function applyToPage(){if(!saveActiveDraft()){setStatus(false,'存在无效模块');return}replaceInPlace(DATA,draftsToData(drafts));replaceInPlace(MANIFEST,drafts.__manifest__);closeEditor();refreshDerived();renderFilters();render();writeLS(storageKey,JSON.stringify({data:DATA,manifest:MANIFEST}))}
|
||||
function legacyCopy(text){const t=document.createElement('textarea');t.value=text;document.body.appendChild(t);t.select();try{document.execCommand('copy')}catch(x){}t.remove()}
|
||||
document.getElementById('openEditor').onclick=function(){drafts=buildDrafts(DATA,MANIFEST);active=modules[0]||'__manifest__';renderEditorTabs();loadEditor();overlay.style.display='';setTimeout(function(){editor.focus()},40)};
|
||||
document.getElementById('closeEditor').onclick=closeEditor;
|
||||
document.addEventListener('keydown',function(ev){if(ev.key==='Escape'&&overlay.style.display!=='none')closeEditor()});
|
||||
document.getElementById('applyJson').onclick=applyToPage;
|
||||
document.getElementById('resetJson').onclick=function(){drafts=buildDrafts(initialData,initialManifest);active=modules[0]||'__manifest__';removeLS(storageKey);renderEditorTabs();loadEditor();setStatus(true,'已恢复默认数据,点击「应用到页面」生效')};
|
||||
document.getElementById('copyJson').onclick=function(){if(!saveActiveDraft())return;const text=JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2);if(navigator.clipboard&&navigator.clipboard.writeText)navigator.clipboard.writeText(text).catch(function(){legacyCopy(text)});else legacyCopy(text)};
|
||||
document.getElementById('downloadJson').onclick=function(){if(!saveActiveDraft())return;const blob=new Blob([JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2)],{type:'application/json;charset=utf-8'});const link=document.createElement('a');link.href=URL.createObjectURL(blob);link.download='page-data.json';link.click();setTimeout(function(){URL.revokeObjectURL(link.href)},1000)};
|
||||
})();
|
||||
init();
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>美方新右翼与极右翼群体研究专题库 v3</title>
|
||||
<style>
|
||||
:root{
|
||||
--bg:#f4f5f7; --card:#fff; --ink:#1f2933; --muted:#657282; --line:#e1e4e8;
|
||||
--red:#7a1f1f; --red2:#9f2b2b; --softred:#fff4f4; --accent:#b84632;
|
||||
--green:#2e7d32; --yellow:#b7791f; --orange:#c05621; --high:#c62828; --severe:#5f0f0f;
|
||||
--shadow:0 14px 36px rgba(31,41,51,.12);
|
||||
}
|
||||
*{box-sizing:border-box} body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif;line-height:1.6}
|
||||
.header{background:linear-gradient(135deg,#6b1717,#9c2f2f 64%,#c25a42);color:#fff;padding:32px 28px 26px;border-bottom:6px solid rgba(255,255,255,.18)}
|
||||
.header-inner{max-width:1440px;margin:auto}.header h1{margin:0 0 8px;font-size:30px;letter-spacing:.5px}.header p{margin:0;color:rgba(255,255,255,.88);font-size:15px;max-width:1100px}.top-pills{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
|
||||
.app{max-width:1440px;margin:0 auto;padding:20px 24px 38px}.toolbar{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;box-shadow:0 8px 22px rgba(31,41,51,.06);position:sticky;top:0;z-index:20}
|
||||
.search-row{display:grid;grid-template-columns:minmax(280px,1fr) 170px 190px 140px 96px;gap:10px}.input,.select{width:100%;border:1px solid #d7dce2;border-radius:12px;padding:11px 12px;background:#fff;color:var(--ink);outline:none}.input:focus,.select:focus{border-color:#a93a31;box-shadow:0 0 0 3px rgba(169,58,49,.12)}
|
||||
.btn{border:0;border-radius:12px;padding:10px 14px;background:var(--red);color:#fff;cursor:pointer;font-weight:700}.btn.secondary{background:#f1f3f5;color:#334155;border:1px solid #dbe1e8}.btn:hover{filter:brightness(.96)}
|
||||
.tabs{display:flex;gap:8px;overflow-x:auto;padding:14px 0 4px}.tab{white-space:nowrap;border:1px solid #e1d0d0;background:#fff;color:#5f1d1d;border-radius:999px;padding:9px 13px;cursor:pointer;font-weight:700}.tab.active{background:var(--red);color:#fff;border-color:var(--red)}
|
||||
.notice{border-radius:16px;padding:14px 16px;margin:14px 0;border:1px solid #ead7d7;background:#fffafa}.notice b{color:var(--red)}.notice.safe{background:#fbfff7;border-color:#d9eac8}.notice.warn{background:#fffaf0;border-color:#f0dfb8}.notice.danger{background:#fff4f4;border-color:#eac2c2}
|
||||
.section-title{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:22px 0 12px}.section-title h2{font-size:20px;margin:0;color:#5c1717}.section-title small{color:var(--muted)}
|
||||
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}.grid.two{grid-template-columns:repeat(auto-fit,minmax(400px,1fr))}.grid.three{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}.overview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-bottom:14px}.stat,.card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:0 8px 22px rgba(31,41,51,.05);position:relative}.stat .label{color:var(--muted);font-size:13px}.stat .value{font-size:24px;font-weight:900;color:#7a1f1f;margin:6px 0}.stat .desc,.sub,.mini{color:var(--muted);font-size:13px}.card h3{margin:0 0 6px;font-size:18px;color:#253041}.card .kv{color:#4b5563;font-size:14px;margin:10px 0}.card-actions{display:flex;justify-content:space-between;align-items:center;margin-top:12px;gap:10px}.linkbtn{border:1px solid #d8caca;background:#fff;color:#7a1f1f;border-radius:10px;padding:7px 10px;cursor:pointer;font-weight:800}.linkbtn:hover{background:#fff4f4}
|
||||
.tags{display:flex;flex-wrap:wrap;gap:7px}.pill{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:4px 9px;background:#f1f3f5;color:#344054;font-size:12px;max-width:100%;word-break:break-word}.pill.red{background:#fff1f1;color:#7a1f1f}.pill.orange{background:#fff7ed;color:#9a3412}.pill.blue{background:#eef6ff;color:#075985}.pill.light{background:rgba(255,255,255,.16);color:#fff;border:1px solid rgba(255,255,255,.26)}
|
||||
.risk{position:absolute;top:14px;right:14px;color:#fff;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:900}.risk.low{background:var(--green)}.risk.mid{background:var(--yellow)}.risk.midhi{background:var(--orange)}.risk.high{background:var(--high)}.risk.severe{background:var(--severe)}
|
||||
.chain{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.step{border:1px solid #eadede;background:#fffafa;border-radius:12px;padding:7px 9px;font-size:13px}.arrow{color:#a33;font-weight:900}
|
||||
.table-wrap{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:auto;margin:10px 0}table{width:100%;border-collapse:collapse;font-size:14px}th{background:#faf3f3;color:#6b1717;text-align:left;position:sticky;top:0;z-index:1}th,td{padding:10px 12px;border-bottom:1px solid #edf0f3;vertical-align:top}td ul{margin:0;padding-left:18px}.timeline{border-left:3px solid #b84632;margin-left:12px}.timeline-item{margin:0 0 16px 18px;position:relative}.timeline-item:before{content:"";width:12px;height:12px;background:#b84632;border-radius:50%;position:absolute;left:-26px;top:22px;box-shadow:0 0 0 5px #f7dada}
|
||||
.search-results{display:none;background:#fff;border:1px solid var(--line);border-radius:16px;margin-top:12px;max-height:330px;overflow:auto}.result-row{display:flex;justify-content:space-between;gap:12px;align-items:center;border-top:1px solid #eef0f2;padding:10px 12px}.result-row:first-child{border-top:0}.result-title{font-weight:900}.result-source{font-size:12px;color:var(--muted)}.empty{background:#fff;border:1px dashed #d2d8e0;border-radius:16px;padding:22px;text-align:center;color:var(--muted)}
|
||||
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.45);display:none;align-items:center;justify-content:center;z-index:100;padding:18px}.modal{width:min(1180px,96vw);max-height:92vh;background:#fff;border-radius:22px;box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden}.modal-head{padding:18px 20px;background:linear-gradient(135deg,#711818,#a5362f);color:#fff;display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.modal-head h2{margin:0;font-size:22px}.modal-sub{font-size:13px;color:rgba(255,255,255,.82);margin-top:4px}.modal-close{border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.14);color:#fff;border-radius:10px;padding:8px 10px;cursor:pointer;font-weight:800;white-space:nowrap}.modal-tabs{display:flex;gap:8px;overflow-x:auto;padding:12px 16px;border-bottom:1px solid var(--line);background:#fff7f7}.modal-tab{border:1px solid #e2cfcf;background:#fff;color:#6b1717;border-radius:999px;padding:8px 12px;cursor:pointer;white-space:nowrap;font-weight:800}.modal-tab.active{background:#7a1f1f;color:#fff;border-color:#7a1f1f}.modal-body{padding:18px;overflow:auto}.detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px}.detail-section{border:1px solid #e5e7eb;border-radius:16px;background:#fff;padding:14px}.detail-section h4{margin:0 0 8px;color:#6b1717}.detail-section p{margin:0;white-space:pre-line}.field-list{margin:0;padding-left:18px}.object-card{border:1px solid #e7eaf0;background:#fbfcfe;border-radius:14px;padding:10px;margin:8px 0}.object-card h5{margin:0 0 6px;color:#354052}.modal-grid-large{display:grid;grid-template-columns:1.2fr .8fr;gap:14px}.json-note{font-size:12px;color:rgba(255,255,255,.86);margin-top:6px}
|
||||
@media(max-width:900px){.search-row{grid-template-columns:1fr}.grid.two,.grid.three,.modal-grid-large{grid-template-columns:1fr}.header h1{font-size:24px}.app{padding:14px}.modal{width:100vw;height:100vh;max-height:100vh;border-radius:0}.modal-backdrop{padding:0}.modal-head{flex-direction:column}.risk{position:static;display:inline-block;margin-bottom:8px}}
|
||||
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
.editor-fab{position:fixed;right:18px;bottom:26px;z-index:60;background:#7c1d24;color:#fff;border:0;border-radius:50%;width:46px;height:46px;display:grid;place-items:center;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.3)}.editor-fab:hover{transform:rotate(30deg)}.editor-fab svg{width:22px;height:22px;display:block}
|
||||
.editor-overlay{z-index:80}
|
||||
.editor-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(1080px,94vw);height:min(680px,88vh);background:#fff;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.35)}
|
||||
.editor-head{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid #e5e7eb}.editor-head h2{margin:0;font-size:16px;flex:1}.editor-head .editor-note{font-size:12px;color:#667085;margin-right:8px}
|
||||
.editor-body{display:flex;flex:1;min-height:0}
|
||||
.editor-tabs{width:210px;border-right:1px solid #e5e7eb;overflow:auto;padding:10px 8px;display:flex;flex-direction:column;gap:4px}
|
||||
.editor-tab{border:0;background:transparent;text-align:left;padding:9px 11px;border-radius:8px;cursor:pointer;color:#667085}.editor-tab b{display:block;font-size:13px;color:#1e2329}.editor-tab small{font-size:10px;opacity:.75}.editor-tab:hover{background:#f4f6f8}.editor-tab.active{background:#f7ecec}.editor-tab.active b{color:#7c1d24}
|
||||
.editor-pane{flex:1;display:flex;flex-direction:column;min-width:0;padding:14px 16px;gap:10px}
|
||||
.editor-title-row{display:flex;align-items:center;justify-content:space-between}.editor-title-row b{font-size:14px}
|
||||
.json-status{font-size:12px;padding:3px 10px;border-radius:999px}.json-status.valid{background:#e8f5ef;color:#14804a}.json-status.invalid{background:#fdecec;color:#b4232d}
|
||||
.json-editor{flex:1;width:100%;resize:none;border:1px solid #e5e7eb;border-radius:10px;padding:13px;font:13px/1.6 ui-monospace,Consolas,monospace;color:#1e2329;background:#f8fafc;outline:0;tab-size:2}
|
||||
.editor-actions{display:flex;gap:8px;flex-wrap:wrap}
|
||||
.editor-hint{margin:0;font-size:11px;color:#8a94a3}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header class="header"><div class="header-inner"><h1 id="pageTitle"></h1><p id="pageSubtitle"></p><div class="top-pills" id="metaPills"></div></div></header>
|
||||
<main class="app">
|
||||
<section class="toolbar">
|
||||
<div class="search-row">
|
||||
<input class="input" id="globalSearch" placeholder="全局搜索:组织、人物、平台、事件、叙事、涉华涉台议题……" />
|
||||
<select class="select" id="riskFilter"><option value="">全部风险等级</option></select>
|
||||
<select class="select" id="typeFilter"><option value="">全部类型/节点</option></select>
|
||||
<select class="select" id="sourceFilter"><option value="">全部来源</option></select>
|
||||
<button class="btn secondary" id="resetBtn">重置</button>
|
||||
</div>
|
||||
<div id="searchResults" class="search-results"></div>
|
||||
<nav class="tabs" id="tabs"></nav>
|
||||
</section>
|
||||
<div class="notice" id="tabDesc"></div>
|
||||
<section id="content"></section>
|
||||
</main>
|
||||
<div class="modal-backdrop" id="modalBackdrop">
|
||||
<div class="modal" role="dialog" aria-modal="true">
|
||||
<div class="modal-head">
|
||||
<div><h2 id="modalTitle"></h2><div class="modal-sub" id="modalSubtitle"></div><div class="json-note">详情页为结构化展示;原始 JSON 仅可通过按钮复制。</div></div>
|
||||
<div style="display:flex;gap:8px;align-items:center"><button class="modal-close" id="copyJsonBtn">复制本条JSON</button><button class="modal-close" id="closeModal">关闭</button></div>
|
||||
</div>
|
||||
<div class="modal-tabs" id="modalTabs"></div>
|
||||
<div class="modal-body" id="modalBody"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" id="openEditor" class="editor-fab" aria-label="JSON 编辑器" title="页面 JSON 编辑器"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg></button>
|
||||
<div id="editorOverlay" class="editor-overlay" style="display:none"><div class="editor-modal">
|
||||
<header class="editor-head"><h2>页面 JSON 编辑器</h2><span class="editor-note">按模块编辑,应用后即时重渲染;修改保存在浏览器本地,不回写服务器</span><button type="button" id="closeEditor" style="border:0;background:none;font-size:14px;cursor:pointer">关闭</button></header>
|
||||
<div class="editor-body">
|
||||
<nav id="editorTabs" class="editor-tabs"></nav>
|
||||
<div class="editor-pane">
|
||||
<div class="editor-title-row"><b id="editorModuleTitle"></b><span id="jsonStatus" class="json-status valid">JSON 有效</span></div>
|
||||
<textarea id="jsonEditor" class="json-editor" spellcheck="false" aria-label="当前模块 JSON"></textarea>
|
||||
<div class="editor-actions"><button type="button" id="applyJson" style="background:#7c1d24;color:#fff;border:0;border-radius:6px;padding:7px 14px;cursor:pointer">应用到页面</button><button type="button" id="resetJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">恢复默认数据</button><button type="button" id="copyJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">复制完整 JSON</button><button type="button" id="downloadJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">下载 JSON</button></div>
|
||||
<p class="editor-hint">模块 = 页面数据(DATA)的顶层键,另附「系统设置」编辑 MANIFEST;沙箱预览无法使用本地缓存时,修改仅当次会话有效。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
<script type="application/json" id="structured-data">__PAGE_DATA__</script>
|
||||
<script type="application/json" id="structured-manifest">__PAGE_MANIFEST__</script>
|
||||
<script type="application/json" id="structured-fields">__PAGE_FIELDS__</script>
|
||||
<script>__PAGE_RUNTIME__</script>
|
||||
</body>
|
||||
</html>
|
||||
+10413
File diff suppressed because it is too large.
Load diff
+2678
File diff suppressed because it is too large.
Load diff
+87
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"系统": {
|
||||
"名称": "美国涉台叙事生态研究工作台",
|
||||
"版本": "v2.0-rich",
|
||||
"说明": "面向公开资料的叙事、政策、平台与风险观察数据库。"
|
||||
},
|
||||
"页面": [
|
||||
{
|
||||
"编号": "overview",
|
||||
"名称": "专题总览",
|
||||
"数据源": "overview"
|
||||
},
|
||||
{
|
||||
"编号": "narratives",
|
||||
"名称": "叙事结构",
|
||||
"数据源": "narrative_modules"
|
||||
},
|
||||
{
|
||||
"编号": "policy_environment",
|
||||
"名称": "政策环境",
|
||||
"数据源": "policy_environment"
|
||||
},
|
||||
{
|
||||
"编号": "factions",
|
||||
"名称": "舆论派系",
|
||||
"数据源": "faction_profiles"
|
||||
},
|
||||
{
|
||||
"编号": "actors",
|
||||
"名称": "人物库",
|
||||
"数据源": "actor_profiles"
|
||||
},
|
||||
{
|
||||
"编号": "organizations",
|
||||
"名称": "机构库",
|
||||
"数据源": "organization_profiles"
|
||||
},
|
||||
{
|
||||
"编号": "audiences",
|
||||
"名称": "受众矩阵",
|
||||
"数据源": "audience_matrix"
|
||||
},
|
||||
{
|
||||
"编号": "swing_groups",
|
||||
"名称": "摇摆群体",
|
||||
"数据源": "swing_group_analysis"
|
||||
},
|
||||
{
|
||||
"编号": "backlash_groups",
|
||||
"名称": "高反弹群体",
|
||||
"数据源": "high_backlash_analysis"
|
||||
},
|
||||
{
|
||||
"编号": "competing_narratives",
|
||||
"名称": "竞争叙事",
|
||||
"数据源": "competing_narratives"
|
||||
},
|
||||
{
|
||||
"编号": "platforms",
|
||||
"名称": "平台生态",
|
||||
"数据源": "platform_ecology"
|
||||
},
|
||||
{
|
||||
"编号": "events",
|
||||
"名称": "事件案例",
|
||||
"数据源": "event_cases"
|
||||
},
|
||||
{
|
||||
"编号": "risk_rules",
|
||||
"名称": "风险预警",
|
||||
"数据源": "risk_rules"
|
||||
},
|
||||
{
|
||||
"编号": "evaluation",
|
||||
"名称": "效果评估",
|
||||
"数据源": "evaluation_indicators"
|
||||
},
|
||||
{
|
||||
"编号": "reports",
|
||||
"名称": "报告模板",
|
||||
"数据源": "report_templates"
|
||||
}
|
||||
],
|
||||
"交互规则": {
|
||||
"默认展示": "overview"
|
||||
}
|
||||
}
|
||||
+219
@@ -0,0 +1,219 @@
|
||||
|
||||
let DATA=JSON.parse((document.getElementById('structured-data')||{textContent:'{}'}).textContent);
|
||||
const MANIFEST=JSON.parse((document.getElementById('structured-manifest')||{textContent:'{}'}).textContent);
|
||||
const FIELDS=(function(){try{const v=JSON.parse((document.getElementById('structured-fields')||{textContent:'[]'}).textContent);return Array.isArray(v)?v:(v.fields||[])}catch(_){return []}})();
|
||||
const STRUCTURED_STORAGE_KEY='structured-page-data-v1:'+location.pathname+':no17';
|
||||
function replaceStructuredObject(target,source){if(!source||typeof source!=='object')return;Object.keys(target).forEach(key=>delete target[key]);Object.keys(source).forEach(key=>target[key]=source[key]);}
|
||||
(function(){try{const c=JSON.parse(localStorage.getItem(STRUCTURED_STORAGE_KEY)||'null');if(c&&c.data)replaceStructuredObject(DATA,c.data);if(c&&c.manifest)replaceStructuredObject(MANIFEST,c.manifest);}catch(_){}})();
|
||||
let activeTab = DATA.tabs?.[0]?.id || 'overview';
|
||||
let filters = { q:'', risk:'', faction:'', platform:'' };
|
||||
|
||||
const datasetLabel = {
|
||||
overview:'专题总览', narrative_modules:'叙事结构', policy_environment:'政策环境', faction_profiles:'舆论派系', actor_profiles:'人物库', organization_profiles:'机构库', audience_matrix:'受众矩阵', swing_group_analysis:'摇摆群体', high_backlash_analysis:'高反弹群体', competing_narratives:'竞争叙事', platform_ecology:'平台生态', event_cases:'事件案例', risk_rules:'风险预警', evaluation_indicators:'效果评估', keyword_library:'关键词库', report_templates:'报告模板'
|
||||
};
|
||||
|
||||
function esc(v) { return String(v ?? '').replace(/[&<>'"]/g, s => ({'&':'&','<':'<','>':'>',"'":''','"':'"'}[s])); }
|
||||
function arr(v) { return Array.isArray(v) ? v : (v ? [v] : []); }
|
||||
function val(obj, fields) { for (const f of fields) if (obj && obj[f] !== undefined && obj[f] !== null && obj[f] !== '') return obj[f]; return ''; }
|
||||
function riskClass(level) { if(level==='极高') return 'extreme'; if(level==='高') return 'high'; if(level==='中') return 'mid'; if(level==='低') return 'low'; return 'mid'; }
|
||||
function riskBadge(level) { return level ? `<span class="risk ${riskClass(level)}">${esc(level)}</span>` : '<span class="muted">未标注</span>'; }
|
||||
function chipList(items, max=8) { return arr(items).slice(0,max).map(x=>`<span class="chip">${esc(x)}</span>`).join(''); }
|
||||
function listHtml(items) { items = arr(items); return items.length ? `<ul class="list">${items.map(x=>`<li>${esc(x)}</li>`).join('')}</ul>` : '<span class="muted">暂无</span>'; }
|
||||
function scoreBar(label, score) { if(score===undefined || score===null || score==='') return ''; const n = Math.max(0, Math.min(5, Number(score)||0)); return `<div class="scorebar"><span>${esc(label)}</span><div class="bar"><span style="width:${n/5*100}%"></span></div><b>${n}</b></div>`; }
|
||||
function textOrList(v) { if(Array.isArray(v)) return listHtml(v); if(typeof v==='object' && v) return Object.entries(v).map(([k,val])=>`<div class="kv"><div class="k">${esc(k)}</div><div class="v">${Array.isArray(val)?chipList(val,20):esc(val)}</div></div>`).join(''); return `<div class="v">${esc(v || '暂无')}</div>`; }
|
||||
function hasText(v) { return v!==undefined && v!==null && String(JSON.stringify(v)).trim()!=='' && !(Array.isArray(v)&&v.length===0); }
|
||||
|
||||
function pageHidden(id){const page=(MANIFEST['页面']||[]).find(item=>item&&item['编号']===id);return !!(page&&page['隐藏']===true);}
|
||||
function visibleTabs(){return (DATA.tabs||[]).filter(tab=>!pageHidden(tab.id));}
|
||||
function getTab(){const tab=DATA.tabs.find(t=>t.id===activeTab);return tab&&!pageHidden(tab.id)?tab:(visibleTabs()[0]||DATA.tabs[0]);}
|
||||
function getDataset(name) { return DATA.datasets?.[name]; }
|
||||
|
||||
function init() {
|
||||
renderHero(); renderTabs(); populateFilters(); bindFilters(); render();
|
||||
}
|
||||
function renderHero() {
|
||||
const m=DATA.meta||{}, o=DATA.datasets?.overview||{};
|
||||
const stats=o.key_statistics||{};
|
||||
document.getElementById('heroPills').innerHTML = [
|
||||
`版本:${m.version||'v2.0-rich'}`, `更新时间:${m.last_updated||''}`, `Tab:${stats.tab_count||DATA.tabs.length} 个`, `人物:${stats.actor_count||0}`, `机构:${stats.organization_count||0}`, `事件:${stats.event_case_count||0}`
|
||||
].map(x=>`<span class="pill">${esc(x)}</span>`).join('');
|
||||
}
|
||||
function renderTabs() {
|
||||
document.getElementById('tabs').innerHTML = visibleTabs().map(t=>`<button class="tab-btn ${t.id===activeTab?'active':''}" data-id="${esc(t.id)}">${esc(t.label)}</button>`).join('');
|
||||
document.querySelectorAll('.tab-btn').forEach(btn=>btn.onclick=()=>{activeTab=btn.dataset.id; renderTabs(); render();});
|
||||
}
|
||||
function bindFilters() {
|
||||
document.getElementById('globalSearch').oninput = e=>{filters.q=e.target.value.trim().toLowerCase(); render();};
|
||||
document.getElementById('riskFilter').onchange = e=>{filters.risk=e.target.value; render();};
|
||||
document.getElementById('factionFilter').onchange = e=>{filters.faction=e.target.value; render();};
|
||||
document.getElementById('platformFilter').onchange = e=>{filters.platform=e.target.value; render();};
|
||||
}
|
||||
function resetFilters() { filters={q:'',risk:'',faction:'',platform:''}; ['globalSearch','riskFilter','factionFilter','platformFilter'].forEach(id=>document.getElementById(id).value=''); render(); }
|
||||
function populateFilters() {
|
||||
const factions = new Set(); const platforms = new Set();
|
||||
Object.values(DATA.datasets||{}).forEach(ds=>{ if(Array.isArray(ds)) ds.forEach(it=>{
|
||||
arr(it.faction || it.related_factions || it.representative_factions).forEach(x=>factions.add(x));
|
||||
arr(it.platforms || it.main_platforms || it.affected_platforms || it.related_platforms || it.platform).forEach(x=>platforms.add(x));
|
||||
}); });
|
||||
const fsel=document.getElementById('factionFilter'), psel=document.getElementById('platformFilter');
|
||||
Array.from(factions).sort().forEach(x=>{ const o=document.createElement('option'); o.value=x; o.textContent=x; fsel.appendChild(o); });
|
||||
Array.from(platforms).sort().forEach(x=>{ const o=document.createElement('option'); o.value=x; o.textContent=x; psel.appendChild(o); });
|
||||
}
|
||||
|
||||
function passFilters(it) {
|
||||
const text=JSON.stringify(it).toLowerCase();
|
||||
if(filters.q && !text.includes(filters.q)) return false;
|
||||
if(filters.risk) { const r=it.risk_level || it.backlash_risk || it.narrative_acceptance; if(!text.includes(filters.risk) && r!==filters.risk) return false; }
|
||||
if(filters.faction && !text.includes(filters.faction.toLowerCase())) return false;
|
||||
if(filters.platform && !text.includes(filters.platform.toLowerCase())) return false;
|
||||
return true;
|
||||
}
|
||||
function filteredArray(ds) { return Array.isArray(ds) ? ds.filter(passFilters) : ds; }
|
||||
|
||||
function render() {
|
||||
const tab=getTab(); const ds=getDataset(tab.dataset);
|
||||
const content=document.getElementById('content');
|
||||
let html=`<div class="section-head"><div><h2>${esc(tab.label)}</h2><p>${esc(tab.description||'')}</p></div><div class="muted small">数据集:${esc(tab.dataset)}</div></div>`;
|
||||
if(tab.dataset==='overview') html += renderOverview(ds);
|
||||
else if(tab.dataset==='report_templates') html += renderReports(ds);
|
||||
else if(['narrative_modules','faction_profiles','platform_ecology','competing_narratives','swing_group_analysis','high_backlash_analysis','evaluation_indicators','policy_environment'].includes(tab.dataset)) html += renderCards(tab.dataset, filteredArray(ds));
|
||||
else if(tab.dataset==='audience_matrix') html += renderAudience(filteredArray(ds));
|
||||
else if(tab.dataset==='event_cases') html += renderEvents(filteredArray(ds));
|
||||
else html += renderTable(tab.dataset, filteredArray(ds));
|
||||
content.innerHTML=html;
|
||||
}
|
||||
|
||||
function renderOverview(o) {
|
||||
const stats=o.key_statistics||{};
|
||||
let html='<div class="grid cols-4">';
|
||||
Object.entries(stats).slice(0,12).forEach(([k,v])=>{ html += `<div class="stat"><div class="num">${esc(v)}</div><div class="label">${esc(k)}</div></div>`; });
|
||||
html+='</div>';
|
||||
html += `<div class="grid cols-2" style="margin-top:14px"><div class="summary-card"><h3>研究定位</h3><p>${esc(o.research_positioning||'')}</p><div class="notice">${esc((DATA.meta.research_boundary_display||[]).join(' '))}</div></div><div class="summary-card"><h3>风险摘要</h3>${Object.entries(o.risk_summary||{}).map(([k,v])=>`<div class="kv"><div class="k">${esc(k)}</div><div class="v">${esc(v)}</div></div>`).join('')}</div></div>`;
|
||||
if(o.knowledge_architecture) {
|
||||
html += '<h2 style="margin:22px 0 10px;color:#351017">知识架构</h2><div class="grid cols-3">';
|
||||
o.knowledge_architecture.forEach((x,i)=>{ html += `<div class="card"><div class="card-title"><h3>${i+1}. ${esc(x.level)}</h3></div><p><strong>${esc(x.content)}</strong></p><p>${esc(x.display)}</p></div>`; });
|
||||
html += '</div>';
|
||||
}
|
||||
if(o.main_question) html += `<div class="summary-card" style="margin-top:14px"><h3>核心问题</h3>${listHtml(o.main_question)}</div>`;
|
||||
return html;
|
||||
}
|
||||
|
||||
function cardTitle(it) { return it.name_cn || it.name || it.title || it.category || it.id; }
|
||||
function cardSubtitle(it) { return it.position || it.core_claim || it.description || it.summary || it.why_possible || it.why_backlash || it.us_context_translation || it.orientation || it.type || ''; }
|
||||
function renderCards(dataset, arrData) {
|
||||
if(!arrData?.length) return '<div class="empty">没有匹配结果</div>';
|
||||
let html='<div class="grid cols-3">';
|
||||
arrData.forEach(it=>{
|
||||
const risk=it.risk_level || it.backlash_risk || '';
|
||||
const tags = it.related_issues || it.core_issues || it.main_issues || it.platforms || it.stance_tags || it.category || it.data_fields || [];
|
||||
html += `<article class="card"><div class="card-title"><h3>${esc(cardTitle(it))}</h3>${risk?riskBadge(risk):''}</div><p>${esc(cardSubtitle(it))}</p>${scoreBar('接受度', it.acceptance_score)}${scoreBar('反弹度', it.backlash_score)}<div class="chips">${chipList(tags,6)}</div><button class="detail-link" style="margin-top:14px" onclick="openDrawer('${dataset}','${esc(it.id)}')">查看结构化详情</button></article>`;
|
||||
});
|
||||
html+='</div>'; return html;
|
||||
}
|
||||
function renderAudience(arrData) {
|
||||
let html='<div class="matrix">';
|
||||
arrData.forEach(it=>{ html += `<div class="matrix-item"><strong>${esc(it.name)}</strong>${scoreBar('影响力',it.policy_influence)}${scoreBar('接受度',it.acceptance_score)}${scoreBar('反弹度',it.backlash_score)}<div class="chips">${chipList(it.main_triggers,4)}</div><button class="detail-link" style="margin-top:10px" onclick="openDrawer('audience_matrix','${esc(it.id)}')">详情</button></div>`; });
|
||||
html+='</div>'; return html;
|
||||
}
|
||||
function renderEvents(arrData) {
|
||||
let html='<div class="timeline">';
|
||||
arrData.forEach(it=>{ html += `<div class="timeline-item"><div class="card-title"><h3>${esc(it.date)} · ${esc(it.title)}</h3>${riskBadge(it.risk_level)}</div><p>${esc(it.summary)}</p><div class="chips">${chipList([...(it.triggered_narratives||[]),...(it.triggered_competing_narratives||[])],7)}</div><button class="detail-link" style="margin-top:10px" onclick="openDrawer('event_cases','${esc(it.id)}')">查看事件链</button></div>`; });
|
||||
html+='</div>'; return html;
|
||||
}
|
||||
function renderTable(dataset, arrData) {
|
||||
if(!arrData?.length) return '<div class="empty">没有匹配结果</div>';
|
||||
const columns = tableColumns(dataset);
|
||||
let html='<div class="table-wrap"><table><thead><tr>' + columns.map(c=>`<th>${esc(c.label)}</th>`).join('') + '<th>操作</th></tr></thead><tbody>';
|
||||
arrData.forEach(it=>{ html += '<tr>' + columns.map(c=>`<td>${renderCell(it[c.key])}</td>`).join('') + `<td><button class="detail-link" onclick="openDrawer('${dataset}','${esc(it.id)}')">详情</button></td></tr>`; });
|
||||
html+='</tbody></table></div>'; return html;
|
||||
}
|
||||
function tableColumns(ds) {
|
||||
const map={
|
||||
actor_profiles:[{key:'name',label:'姓名'},{key:'type',label:'类型'},{key:'affiliation',label:'机构'},{key:'faction',label:'派系'},{key:'stance_tags',label:'标签'},{key:'risk_level',label:'风险'}],
|
||||
organization_profiles:[{key:'name',label:'机构'},{key:'type',label:'类型'},{key:'orientation',label:'倾向'},{key:'main_issues',label:'议题'},{key:'backlash_risk',label:'反弹'}],
|
||||
risk_rules:[{key:'name',label:'规则'},{key:'risk_type',label:'类型'},{key:'trigger_condition',label:'触发条件'},{key:'related_keywords',label:'关键词'},{key:'risk_level',label:'风险'}]
|
||||
};
|
||||
return map[ds] || [{key:'name',label:'名称'},{key:'type',label:'类型'},{key:'risk_level',label:'风险'},{key:'summary',label:'摘要'}];
|
||||
}
|
||||
function renderCell(v) { if(Array.isArray(v)) return chipList(v,4); if(['低','中','高','极高'].includes(v)) return riskBadge(v); return esc(v||''); }
|
||||
function renderReports(rt) {
|
||||
let html='<div class="grid cols-3">';
|
||||
Object.entries(rt||{}).forEach(([k,v])=>{ const sections=v.sections_detail||v.sections||[]; html += `<div class="card"><h3>${esc(v.name||k)}</h3><p>${esc(v.positioning||'')}</p>${Array.isArray(sections)&&typeof sections[0]==='object'?sections.map(s=>`<div class="kv"><div class="k">${esc(s.name)}</div><div class="v">${esc(s.description)}</div></div>`).join(''):listHtml(sections)}<div class="chips">${chipList(v.writing_rules||[],4)}</div></div>`; });
|
||||
html+='</div>'; return html;
|
||||
}
|
||||
|
||||
const detailSchemas = {
|
||||
narrative_modules:[['基本定位',['name','core_claim','us_context_translation','risk_level']],['逻辑链',['logic_chain']],['典型表达',['typical_expressions']],['适配场景与证据字段',['applicable_scenarios','evidence_fields']],['共鸣机制',['resonance_points','receptive_groups']],['反弹机制',['backlash_points','resistant_groups','counter_frame']],['研究问题与观察指标',['research_questions','keywords','detail_note']]],
|
||||
faction_profiles:[['群体定义',['name','position','group_definition','narrative_acceptance','backlash_risk']],['理论与利益',['core_theory','core_interests','core_issues']],['人物机构网络',['representative_actors','representative_organizations']],['平台与叙事风格',['platforms','social_platform_features','narrative_style','typical_expression']],['预期行为与反制行为',['typical_behavior','expected_behavior','counter_behavior','competing_pressure','historical_cases']],['研究备注',['detail_note']]],
|
||||
actor_profiles:[['基本信息',['name','name_cn','type','affiliation','faction','risk_level']],['立场与观点',['stance_tags','core_views','role_summary']],['议题与影响渠道',['related_issues','influence_channels','observable_outputs','platform_behavior']],['预期行为与反制',['possible_expected_behavior','possible_counter_behavior']],['关联网络',['related_organizations','related_narratives','background_keywords']],['研究价值与注意事项',['research_value','risk_note','caution_note']]],
|
||||
organization_profiles:[['基本信息',['name','name_cn','type','orientation','risk_level']],['组织画像',['organization_profile','main_issues','related_factions','representative_actors']],['输出与平台',['output_types','platforms','influence_path']],['观察方法',['observation_method','relation_analysis','risk_mechanism']],['研究备注',['detail_note']]],
|
||||
audience_matrix:[['群体画像',['name','group_definition','policy_influence','acceptance_score','backlash_score']],['触发议题与平台',['main_triggers','main_platforms']],['接受与摇摆机制',['why_receptive','why_unstable','turning_events']],['反弹条件与观察方法',['backlash_triggers','observation_methods','recommended_observation','risk_note']]],
|
||||
swing_group_analysis:[['群体画像',['name','category','risk_level']],['为什么可能被影响',['why_possible','suitable_narratives']],['为什么不稳定',['why_unstable','competing_narratives']],['转向事件与平台',['turning_events','platforms']],['观察重点',['observation_focus']]],
|
||||
high_backlash_analysis:[['群体画像',['name','category','risk_level','why_backlash']],['核心价值框架',['core_value_frame']],['典型反制叙事',['typical_counter_narratives']],['平台行为与反向动员',['platform_behavior','reverse_mobilization']],['预警信号',['warning_signs']]],
|
||||
competing_narratives:[['基本信息',['name','core_expression','risk_level']],['推动者与压制机制',['main_promoters','suppression_mechanism','relationship_to_target']],['逻辑结构与媒体路径',['logic_structure','media_entry_path']],['触发事件与影响群体',['trigger_events','affected_swing_groups','related_platforms']],['关键词与情绪化机制',['counter_keywords','emotionalization_mechanism','detail_note']]],
|
||||
platform_ecology:[['平台画像',['name','main_users','risk_note']],['适合观察与高风险叙事',['suitable_observation','high_risk_narratives']],['传播形式与算法特点',['communication_forms','algorithm_features','diffusion_path']],['共鸣与反弹表达',['resonance_expression','backlash_expression','echo_chamber_effect']],['数据字段',['data_fields','monitoring_fields']]],
|
||||
event_cases:[['事件摘要',['date','title','type','summary','risk_level']],['事件链',['event_chain']],['触发叙事与竞争叙事',['triggered_narratives','triggered_competing_narratives','narrative_effects']],['影响受众与平台',['affected_audiences','affected_platforms','backlash_effects']],['政策效果与后续指标',['policy_effect','follow_up_indicators','research_question','detail_note']]],
|
||||
risk_rules:[['规则摘要',['name','risk_type','risk_level','trigger_condition']],['关键词与相关群体',['related_keywords','related_groups']],['检测逻辑',['detection_logic','observation_process']],['升级信号',['escalation_signals']],['研究用途',['suggested_response_for_research','research_usage']]],
|
||||
evaluation_indicators:[['指标摘要',['category','name','description']],['数据字段',['data_fields']],['用途',['usage']]],
|
||||
policy_environment:[['基本信息',['category','name','description']],['相关性与风险效应',['relevance','risk_effect']],['关联叙事与标签',['related_narratives','tags']]]
|
||||
};
|
||||
|
||||
function openDrawer(dataset, id) {
|
||||
const ds=getDataset(dataset); const it=Array.isArray(ds)?ds.find(x=>String(x.id)===String(id)):null; if(!it) return;
|
||||
document.getElementById('drawerTitle').textContent = cardTitle(it);
|
||||
document.getElementById('drawerSub').textContent = `${datasetLabel[dataset]||dataset} · ${it.type||it.category||it.faction||it.date||''}`;
|
||||
document.getElementById('drawerBody').innerHTML = renderDetail(dataset,it);
|
||||
document.getElementById('drawerMask').classList.add('show'); document.getElementById('drawer').classList.add('show');
|
||||
}
|
||||
function closeDrawer() { document.getElementById('drawerMask').classList.remove('show'); document.getElementById('drawer').classList.remove('show'); }
|
||||
function renderDetail(dataset,it) {
|
||||
const schema = detailSchemas[dataset];
|
||||
let html='';
|
||||
if(it.risk_level || it.backlash_risk || it.narrative_acceptance) html += `<div class="notice"><strong>快速判断:</strong> ${it.display_summary||it.detail_note||it.risk_note||'该条目需要结合事件、平台和派系语境综合研判。'}</div>`;
|
||||
if(schema) {
|
||||
schema.forEach(([title,fields], idx)=>{
|
||||
const body = fields.filter(f=>hasText(it[f])).map(f=>renderField(f,it[f])).join('');
|
||||
if(body) html += `<section class="detail-section"><h3>${idx+1}. ${esc(title)}</h3><div class="kv-grid">${body}</div></section>`;
|
||||
});
|
||||
} else {
|
||||
html += '<section class="detail-section"><h3>结构化字段</h3><div class="kv-grid">' + Object.entries(it).filter(([k,v])=>k!=='id'&&hasText(v)).map(([k,v])=>renderField(k,v)).join('') + '</div></section>';
|
||||
}
|
||||
html += renderRelations(dataset,it);
|
||||
return html;
|
||||
}
|
||||
function labelFor(key) {
|
||||
const map={name:'名称',name_cn:'中文名',title:'标题',type:'类型',category:'类别',date:'时间',summary:'摘要',description:'说明',core_claim:'核心命题',us_context_translation:'美国语境转译',risk_level:'风险等级',backlash_risk:'反弹风险',narrative_acceptance:'叙事接受度',acceptance_score:'接受度分数',backlash_score:'反弹度分数',policy_influence:'政策影响力',position:'核心立场',group_definition:'群体定义',core_theory:'核心理论',core_interests:'核心利益点',representative_actors:'代表人物',representative_organizations:'代表机构',core_issues:'核心议题',platforms:'平台',social_platform_features:'社交平台特征',narrative_style:'叙事风格',typical_expression:'典型表达',typical_expressions:'典型表达',typical_behavior:'典型行为',expected_behavior:'预期行为',counter_behavior:'反制行为',historical_cases:'典型历史案例',logic_chain:'逻辑链',applicable_scenarios:'适配场景',evidence_fields:'证据字段',resonance_points:'共鸣点',receptive_groups:'适配/接受群体',backlash_points:'反弹点',resistant_groups:'反弹群体',counter_frame:'竞争框架',research_questions:'研究问题',keywords:'关键词',detail_note:'研究备注',stance_tags:'立场标签',core_views:'核心观点',related_issues:'关联议题',influence_channels:'影响渠道',observable_outputs:'可观察输出',possible_expected_behavior:'可能预期行为',possible_counter_behavior:'可能反制行为',related_organizations:'关联机构',related_narratives:'关联叙事',background_keywords:'背景关键词',research_value:'研究价值',risk_note:'风险备注',caution_note:'注意事项',organization_profile:'机构画像',main_issues:'主要议题',related_factions:'关联派系',output_types:'输出形式',influence_path:'影响路径',observation_method:'观察方法',relation_analysis:'关系分析',risk_mechanism:'风险机制',main_triggers:'触发议题',main_platforms:'主要平台',why_receptive:'为什么可能接受',why_unstable:'为什么不稳定',turning_events:'转向事件',backlash_triggers:'反弹触发点',observation_methods:'观察方法',recommended_observation:'建议观察',why_possible:'为什么可能被影响',suitable_narratives:'适配叙事',competing_narratives:'竞争叙事',observation_focus:'观察重点',why_backlash:'为什么反弹',core_value_frame:'核心价值框架',typical_counter_narratives:'典型反制叙事',platform_behavior:'平台行为',reverse_mobilization:'反向动员',warning_signs:'预警信号',core_expression:'核心表达',main_promoters:'主要推动者',suppression_mechanism:'压制机制',relationship_to_target:'与目标叙事关系',logic_structure:'逻辑结构',media_entry_path:'媒体进入路径',trigger_events:'触发事件',affected_swing_groups:'影响摇摆群体',related_platforms:'相关平台',counter_keywords:'反制关键词',emotionalization_mechanism:'情绪化机制',main_users:'核心用户',suitable_observation:'适合观察议题',high_risk_narratives:'高风险叙事',communication_forms:'传播形式',algorithm_features:'算法/机制特点',diffusion_path:'扩散路径',resonance_expression:'共鸣表达',backlash_expression:'反弹表达',echo_chamber_effect:'回音室效应',data_fields:'数据字段',monitoring_fields:'监测字段',event_chain:'事件链',triggered_narratives:'触发叙事',triggered_competing_narratives:'触发竞争叙事',narrative_effects:'叙事效果',affected_audiences:'影响受众',affected_platforms:'影响平台',backlash_effects:'反弹效果',policy_effect:'政策效果',follow_up_indicators:'后续指标',research_question:'研究问题',risk_type:'风险类型',trigger_condition:'触发条件',related_keywords:'相关关键词',related_groups:'相关群体',detection_logic:'检测逻辑',observation_process:'观察流程',escalation_signals:'升级信号',suggested_response_for_research:'研究建议',research_usage:'研究用途',usage:'用途',relevance:'相关性',risk_effect:'风险效应',tags:'标签',affiliation:'所属机构',faction:'派系',role_summary:'角色摘要'};
|
||||
return map[key] || key;
|
||||
}
|
||||
function renderField(k,v) {
|
||||
let content='';
|
||||
if(['risk_level','backlash_risk'].includes(k)) content=riskBadge(v);
|
||||
else if(['acceptance_score','backlash_score','policy_influence'].includes(k)) content=scoreBar(labelFor(k),v);
|
||||
else if(Array.isArray(v)) content = v.length && typeof v[0]==='object' ? v.map(x=>`<div class="kv"><div class="v">${Object.entries(x).map(([a,b])=>`<strong>${esc(labelFor(a))}:</strong>${Array.isArray(b)?chipList(b,20):esc(b)}`).join('<br>')}</div></div>`).join('') : (v.length>6 ? listHtml(v) : `<div class="chips">${chipList(v,20)}</div>`);
|
||||
else if(typeof v==='object' && v) content = Object.entries(v).map(([a,b])=>`<div><strong>${esc(labelFor(a))}:</strong>${Array.isArray(b)?chipList(b,20):esc(b)}</div>`).join('');
|
||||
else content = esc(v);
|
||||
return `<div class="kv"><div class="k">${esc(labelFor(k))}</div><div class="v">${content}</div></div>`;
|
||||
}
|
||||
function renderRelations(dataset,it) {
|
||||
const rel=[];
|
||||
['related_organizations','representative_organizations','related_factions','representative_actors','related_narratives','triggered_narratives','triggered_competing_narratives','affected_audiences','affected_platforms'].forEach(k=>{ if(hasText(it[k])) rel.push([labelFor(k),it[k]]); });
|
||||
if(!rel.length) return '';
|
||||
return `<section class="detail-section"><h3>关联条目</h3>${rel.map(([k,v])=>`<div class="kv" style="margin-bottom:8px"><div class="k">${esc(k)}</div><div class="v"><div class="chips">${chipList(v,30)}</div></div></div>`).join('')}</section>`;
|
||||
}
|
||||
|
||||
function downloadJSON() {
|
||||
const blob = new Blob([JSON.stringify(DATA,null,2)], {type:'application/json;charset=utf-8'});
|
||||
const url = URL.createObjectURL(blob); const a=document.createElement('a'); a.href=url; a.download='us_taiwan_narrative_ecosystem_display_data_rich_export.json'; a.click(); URL.revokeObjectURL(url);
|
||||
}
|
||||
function importJSON(e) {
|
||||
const file=e.target.files[0]; if(!file) return; const reader=new FileReader();
|
||||
reader.onload=()=>{ try { DATA=JSON.parse(reader.result); activeTab=visibleTabs()[0]?.id||DATA.tabs?.[0]?.id||'overview'; document.getElementById('factionFilter').innerHTML='<option value="">派系:全部</option>'; document.getElementById('platformFilter').innerHTML='<option value="">平台:全部</option>'; populateFilters(); renderHero(); renderTabs(); render(); alert('JSON 已导入并刷新页面。'); } catch(err) { alert('JSON 解析失败:'+err.message); } };
|
||||
reader.readAsText(file,'utf-8');
|
||||
}
|
||||
|
||||
document.addEventListener('keydown',e=>{if(e.key==='Escape')closeDrawer();});
|
||||
function syncStructuredHeader(){const sys=MANIFEST['系统']||{};if(sys['名称']){document.title=String(sys['名称']);const h=document.querySelector('h1');if(h)h.textContent=String(sys['名称']);}const sub=document.querySelector('header p,.subtitle');if(sub&&sys['说明'])sub.textContent=String(sys['说明']);}
|
||||
function renderStructuredModules(){const host=document.getElementById('content');if(!host)return;host.querySelectorAll('.custom-module').forEach(node=>node.remove());(MANIFEST['自定义模块']||[]).filter(m=>m&&m['页面']===activeTab&&m.html).forEach(m=>{const node=document.createElement('section');node.className='custom-module';node.dataset.customModule=m['编号']||m['标题']||'custom';node.innerHTML='<h3>'+esc(m['标题']||'自定义模块')+'</h3>'+m.html;host.appendChild(node);});}
|
||||
const renderStructuredBase=render;render=function(){renderStructuredBase();renderStructuredModules();};
|
||||
function installStructuredEditor(data,manifest){const overlay=document.getElementById('editorOverlay');if(!overlay)return;const clone=v=>JSON.parse(JSON.stringify(v)),replace=(target,source)=>{Object.keys(target).forEach(k=>delete target[k]);Object.keys(source||{}).forEach(k=>target[k]=source[k]);};let drafts={},active='';const tabs=document.getElementById('editorTabs'),editor=document.getElementById('jsonEditor'),status=document.getElementById('jsonStatus'),all=()=>Object.keys(data).concat(['__manifest__']),value=k=>k==='__manifest__'?manifest:data[k];function save(){try{drafts[active]=JSON.parse(editor.value);status.textContent='JSON 有效';return true}catch(e){status.textContent='JSON 无效:'+e.message;return false}}function load(){editor.value=JSON.stringify(drafts[active],null,2);status.textContent='JSON 有效'}function draw(){tabs.innerHTML='';all().forEach(k=>{const b=document.createElement('button');b.type='button';b.textContent=k==='__manifest__'?'系统设置':'数据:'+k;b.className=k===active?'active':'';b.onclick=()=>{if(k!==active&&save()){active=k;draw();load();}};tabs.appendChild(b);});}document.getElementById('openEditor').onclick=()=>{drafts={};all().forEach(k=>drafts[k]=clone(value(k)));active=all()[0];draw();load();overlay.style.display='block';editor.focus();};document.getElementById('closeEditor').onclick=()=>overlay.style.display='none';document.getElementById('applyJson').onclick=()=>{if(!save())return;const next={};all().filter(k=>k!=='__manifest__').forEach(k=>next[k]=drafts[k]);replace(data,next);replace(manifest,drafts.__manifest__);try{localStorage.setItem(STRUCTURED_STORAGE_KEY,JSON.stringify({data,manifest}));}catch(_){}window.location.reload();};}
|
||||
syncStructuredHeader();activeTab=visibleTabs()[0]?.id||DATA.tabs?.[0]?.id||'overview';init();installStructuredEditor(DATA,MANIFEST);
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>美国涉台叙事生态专题研究平台 · 增强版(修复表头)</title>
|
||||
<style>
|
||||
:root {
|
||||
--primary:#9B1C31; --primary-2:#7F1426; --soft:#F7E8EC; --soft2:#FCF5F6;
|
||||
--bg:#F6F3F1; --card:#FFFFFF; --text:#262626; --muted:#6B7280;
|
||||
--border:#E8D5DA; --shadow:0 12px 32px rgba(91,25,38,.10);
|
||||
--green:#137A42; --blue:#2457A6; --orange:#B85C00; --red:#B42318; --purple:#6A3FB5;
|
||||
}
|
||||
* { box-sizing:border-box; }
|
||||
body { margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif; color:var(--text); background:linear-gradient(180deg,#F9F1F3 0%, var(--bg) 230px); }
|
||||
.app { max-width:1480px; margin:0 auto; padding:24px 26px 44px; }
|
||||
.hero { position:relative; overflow:hidden; border:1px solid rgba(155,28,49,.18); background:linear-gradient(135deg,#9B1C31 0%,#681223 55%,#351017 100%); color:#fff; border-radius:28px; padding:30px 34px; box-shadow:var(--shadow); }
|
||||
.hero::after { content:""; position:absolute; width:420px; height:420px; border-radius:50%; background:rgba(255,255,255,.09); right:-160px; top:-180px; }
|
||||
.hero h1 { margin:0 0 10px; font-size:30px; letter-spacing:.5px; }
|
||||
.hero p { max-width:980px; line-height:1.75; margin:8px 0; color:rgba(255,255,255,.88); }
|
||||
.meta-row { display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
|
||||
.pill { display:inline-flex; align-items:center; gap:6px; border-radius:999px; border:1px solid rgba(255,255,255,.24); background:rgba(255,255,255,.10); padding:7px 12px; font-size:13px; }
|
||||
.toolbar { margin:18px 0 14px; display:grid; grid-template-columns: 1.5fr repeat(4, minmax(130px, .5fr)); gap:10px; align-items:center; }
|
||||
input,select,button { font:inherit; }
|
||||
.searchbox,.filter { height:42px; border:1px solid var(--border); border-radius:14px; background:#fff; padding:0 14px; outline:none; box-shadow:0 4px 14px rgba(0,0,0,.03); }
|
||||
.searchbox:focus,.filter:focus { border-color:rgba(155,28,49,.55); box-shadow:0 0 0 4px rgba(155,28,49,.10); }
|
||||
.btn { border:1px solid var(--border); border-radius:14px; height:42px; padding:0 14px; background:#fff; cursor:pointer; color:var(--primary); font-weight:650; }
|
||||
.btn.primary { background:var(--primary); color:#fff; border-color:var(--primary); }
|
||||
.tabs-wrap { position:sticky; top:0; z-index:20; background:rgba(246,243,241,.92); backdrop-filter:blur(10px); padding:8px 0 10px; }
|
||||
.tabs { display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; }
|
||||
.tab-btn { flex:0 0 auto; border:1px solid var(--border); background:#fff; color:#5a1a28; border-radius:999px; padding:10px 15px; cursor:pointer; font-weight:650; white-space:nowrap; }
|
||||
.tab-btn.active { background:var(--primary); color:#fff; border-color:var(--primary); box-shadow:0 8px 20px rgba(155,28,49,.22); }
|
||||
.panel { margin-top:12px; }
|
||||
.section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin:18px 0 14px; }
|
||||
.section-head h2 { margin:0; font-size:23px; color:#351017; }
|
||||
.section-head p { margin:7px 0 0; color:var(--muted); line-height:1.6; }
|
||||
.summary-card { background:#fff; border:1px solid var(--border); border-radius:22px; padding:18px; box-shadow:0 6px 18px rgba(63,15,28,.05); }
|
||||
.grid { display:grid; gap:14px; }
|
||||
.grid.cols-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
|
||||
.grid.cols-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
|
||||
.grid.cols-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
|
||||
.stat { padding:18px; border-radius:22px; background:#fff; border:1px solid var(--border); box-shadow:0 6px 18px rgba(63,15,28,.05); }
|
||||
.stat .num { font-size:28px; font-weight:800; color:var(--primary); }
|
||||
.stat .label { color:var(--muted); margin-top:5px; font-size:13px; }
|
||||
.card { background:#fff; border:1px solid var(--border); border-radius:22px; padding:18px; box-shadow:0 6px 18px rgba(63,15,28,.05); min-height:160px; }
|
||||
.card:hover { transform:translateY(-1px); box-shadow:0 10px 24px rgba(63,15,28,.08); transition:.16s ease; }
|
||||
.card-title { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; margin-bottom:10px; }
|
||||
.card h3 { margin:0; color:#351017; font-size:18px; }
|
||||
.card p { color:#555; line-height:1.68; margin:8px 0; }
|
||||
.chips { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
|
||||
.chip { display:inline-flex; align-items:center; border-radius:999px; padding:4px 9px; font-size:12px; background:var(--soft2); color:#6b2230; border:1px solid var(--border); }
|
||||
.risk { border-radius:999px; padding:4px 10px; font-size:12px; font-weight:800; display:inline-flex; align-items:center; white-space:nowrap; }
|
||||
.risk.low,.risk.低 { background:#EAF7EF; color:var(--green); }
|
||||
.risk.mid,.risk.中 { background:#EEF4FF; color:var(--blue); }
|
||||
.risk.high,.risk.高 { background:#FFF4E6; color:var(--orange); }
|
||||
.risk.extreme,.risk.极高 { background:#FEECEC; color:var(--red); }
|
||||
.scorebar { display:grid; grid-template-columns:62px 1fr 26px; gap:8px; align-items:center; margin:6px 0; font-size:12px; color:var(--muted); }
|
||||
.bar { height:8px; border-radius:999px; background:#F2E5E8; overflow:hidden; }
|
||||
.bar span { display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#B74B60,#7F1426); }
|
||||
.table-wrap { background:#fff; border:1px solid var(--border); border-radius:22px; overflow-x:auto; overflow-y:visible; box-shadow:0 6px 18px rgba(63,15,28,.05); }
|
||||
table { width:100%; min-width:980px; border-collapse:collapse; font-size:14px; }
|
||||
th,td { padding:12px 13px; border-bottom:1px solid #F0E3E6; text-align:left; vertical-align:top; }
|
||||
/* 修复:取消表头 sticky,避免滚动时表头悬浮、遮挡首行内容。 */
|
||||
th { background:#FBF4F5; color:#51202b; font-weight:800; position:static; top:auto; z-index:auto; }
|
||||
thead { position:static; }
|
||||
tr:hover td { background:#FFF9FA; }
|
||||
.detail-link { border:0; background:var(--primary); color:#fff; border-radius:10px; padding:7px 10px; cursor:pointer; font-size:13px; white-space:nowrap; }
|
||||
.muted { color:var(--muted); }
|
||||
.matrix { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-top:12px; }
|
||||
.matrix-item { border:1px solid var(--border); background:#fff; border-radius:16px; padding:12px; min-height:108px; }
|
||||
.matrix-item strong { color:var(--primary); display:block; margin-bottom:6px; }
|
||||
.timeline { position:relative; padding-left:18px; }
|
||||
.timeline::before { content:""; position:absolute; left:5px; top:8px; bottom:8px; width:2px; background:#E1CBD0; }
|
||||
.timeline-item { position:relative; margin:0 0 12px; padding:14px 16px; background:#fff; border:1px solid var(--border); border-radius:18px; }
|
||||
.timeline-item::before { content:""; position:absolute; left:-18px; top:20px; width:12px; height:12px; border-radius:50%; background:var(--primary); }
|
||||
.drawer-mask { display:none; position:fixed; inset:0; background:rgba(32,20,24,.36); z-index:100; }
|
||||
.drawer-mask.show { display:block; }
|
||||
.drawer { position:fixed; right:0; top:0; bottom:0; width:min(780px,92vw); background:#fff; z-index:101; transform:translateX(105%); transition:.22s ease; box-shadow:-24px 0 60px rgba(0,0,0,.25); display:flex; flex-direction:column; }
|
||||
.drawer.show { transform:translateX(0); }
|
||||
.drawer-head { padding:22px 24px; background:linear-gradient(135deg,#9B1C31,#681223); color:#fff; }
|
||||
.drawer-head h2 { margin:0; font-size:22px; }
|
||||
.drawer-head p { margin:8px 0 0; color:rgba(255,255,255,.86); line-height:1.6; }
|
||||
.drawer-close { position:absolute; right:18px; top:15px; border:1px solid rgba(255,255,255,.35); color:#fff; background:rgba(255,255,255,.12); border-radius:12px; width:36px; height:36px; cursor:pointer; font-size:22px; }
|
||||
.drawer-body { overflow:auto; padding:20px 24px 36px; background:#FCFAFA; }
|
||||
.detail-section { background:#fff; border:1px solid var(--border); border-radius:18px; padding:16px; margin-bottom:12px; }
|
||||
.detail-section h3 { margin:0 0 12px; font-size:17px; color:#551A29; display:flex; gap:8px; align-items:center; }
|
||||
.kv-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
|
||||
.kv { background:#FFF9FA; border:1px solid #F0E0E4; border-radius:14px; padding:11px; }
|
||||
.kv .k { color:#7B4350; font-size:12px; font-weight:800; margin-bottom:5px; }
|
||||
.kv .v { line-height:1.62; }
|
||||
.list { margin:0; padding-left:20px; line-height:1.75; }
|
||||
.notice { background:#FFF7E8; border:1px solid #F3D7A1; color:#704300; border-radius:18px; padding:13px 15px; margin:14px 0; line-height:1.7; }
|
||||
.empty { padding:30px; text-align:center; color:var(--muted); }
|
||||
.footer-tools { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
|
||||
.small { font-size:12px; }
|
||||
.file-input { display:none; }
|
||||
@media (max-width:1100px) { .toolbar { grid-template-columns:1fr 1fr; } .grid.cols-3,.grid.cols-4 { grid-template-columns:repeat(2,minmax(0,1fr)); } .matrix { grid-template-columns:repeat(2,1fr); } }
|
||||
@media (max-width:720px) { .app { padding:14px; } .toolbar { grid-template-columns:1fr; } .grid.cols-2,.grid.cols-3,.grid.cols-4 { grid-template-columns:1fr; } .kv-grid { grid-template-columns:1fr; } th:nth-child(n+4),td:nth-child(n+4) { display:none; } }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="app">
|
||||
<section class="hero">
|
||||
<h1>美国涉台叙事生态专题研究平台 · 增强版</h1>
|
||||
<p>围绕“<strong>中国统一进程难阻挡</strong>”这一研究母题,展示其在美国政策圈、媒体场、平台生态、受众派系、竞争叙事和风险预警中的接受、转译、抵抗与反弹机制。</p>
|
||||
<p>本页面重构为结构化资料库:详情弹框不再显示 JSON 原文,而是按“基本信息、逻辑链、共鸣机制、反弹机制、平台行为、观察指标、研究备注”等分区展示。</p>
|
||||
<div class="meta-row" id="heroPills"></div>
|
||||
</section>
|
||||
|
||||
<div class="toolbar">
|
||||
<input id="globalSearch" class="searchbox" placeholder="全局搜索:人物、机构、叙事、平台、事件、关键词……" />
|
||||
<select id="riskFilter" class="filter"><option value="">风险等级:全部</option><option>低</option><option>中</option><option>高</option><option>极高</option></select>
|
||||
<select id="factionFilter" class="filter"><option value="">派系:全部</option></select>
|
||||
<select id="platformFilter" class="filter"><option value="">平台:全部</option></select>
|
||||
<button class="btn primary" onclick="resetFilters()">重置筛选</button>
|
||||
</div>
|
||||
<div class="footer-tools">
|
||||
<button class="btn" onclick="downloadJSON()">导出当前 JSON</button>
|
||||
<button class="btn" onclick="document.getElementById('importJson').click()">导入外部 JSON</button>
|
||||
<input class="file-input" id="importJson" type="file" accept="application/json" onchange="importJSON(event)">
|
||||
<button class="btn" onclick="window.print()">打印 / 保存 PDF</button>
|
||||
</div>
|
||||
|
||||
<div class="tabs-wrap"><nav id="tabs" class="tabs"></nav></div>
|
||||
<main id="content" class="panel"></main>
|
||||
</div>
|
||||
|
||||
<div id="drawerMask" class="drawer-mask" onclick="closeDrawer()"></div>
|
||||
<aside id="drawer" class="drawer">
|
||||
<button class="drawer-close" onclick="closeDrawer()">×</button>
|
||||
<div class="drawer-head"><h2 id="drawerTitle">详情</h2><p id="drawerSub"></p></div>
|
||||
<div id="drawerBody" class="drawer-body"></div>
|
||||
</aside>
|
||||
|
||||
<style>
|
||||
.structured-edit-button{position:fixed;right:18px;bottom:18px;z-index:80;border:0;border-radius:999px;padding:11px 16px;background:#7f1d1d;color:#fff;font-weight:800;box-shadow:0 8px 22px rgba(0,0,0,.22);cursor:pointer}.structured-editor{display:none;position:fixed;inset:0;z-index:90;background:rgba(15,23,42,.62);padding:4vh 4vw}.structured-editor-card{width:min(1120px,92vw);height:min(760px,92vh);margin:auto;background:#fff;border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:12px}.structured-editor-tabs{display:flex;gap:8px;flex-wrap:wrap;overflow:auto}.structured-editor-tabs button{border:1px solid #d1d5db;border-radius:8px;background:#fff;padding:7px 10px;cursor:pointer}.structured-editor-tabs button.active{background:#7f1d1d;color:#fff;border-color:#7f1d1d}.structured-editor textarea{flex:1;min-height:220px;width:100%;box-sizing:border-box;font:13px/1.5 Consolas,monospace;padding:12px;border:1px solid #d1d5db;border-radius:10px}.structured-editor-actions{display:flex;justify-content:space-between;gap:10px}.structured-editor-actions button{border:0;border-radius:8px;padding:9px 14px;cursor:pointer}.structured-editor-apply{background:#7f1d1d;color:#fff}
|
||||
</style>
|
||||
<button id="openEditor" class="structured-edit-button" type="button">编辑页面数据</button>
|
||||
<div id="editorOverlay" class="structured-editor" role="dialog" aria-modal="true"><div class="structured-editor-card"><div class="structured-editor-tabs" id="editorTabs"></div><div id="jsonStatus"></div><textarea id="jsonEditor" spellcheck="false"></textarea><div class="structured-editor-actions"><button id="closeEditor" type="button">关闭</button><span></span><button id="applyJson" class="structured-editor-apply" type="button">应用到页面</button></div></div></div>
|
||||
<script type="application/json" id="structured-data">__PAGE_DATA__</script>
|
||||
<script type="application/json" id="structured-manifest">__PAGE_MANIFEST__</script>
|
||||
<script type="application/json" id="structured-fields">__PAGE_FIELDS__</script>
|
||||
<script>__PAGE_RUNTIME__</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"pages": [
|
||||
{
|
||||
"id": "overview",
|
||||
"name": "专题概览",
|
||||
"html": "<div class=\"merged-module\" data-source-module=\"overview\"><div class=\"grid four\"><article class=\"card stat\"><div class=\"label\">2024年美台商品贸易总额</div><div class=\"value\">$158.8B</div><div class=\"note\">美国官方商品贸易统计;并非冲突损失。</div><span class=\"status ok\">历史统计</span></article><article class=\"card stat\"><div class=\"label\">台海封锁情景经济活动风险</div><div class=\"value\">$2T+</div><div class=\"note\">Rhodium Group情景估算,不是实际损失。</div><span class=\"status estimate\">情景估算</span></article><article class=\"card stat\"><div class=\"label\">社交媒体研究</div><div class=\"value\">911,510</div><div class=\"note\">2024年台湾地区领导人选举相关社交媒体研究的帖子样本量。</div><span class=\"status partial\">相关背景数据</span></article><article class=\"card stat\"><div class=\"label\">公开研究互动基准</div><div class=\"value\">101.6M</div><div class=\"note\">PNAS Nexus公开研究汇总Facebook/Instagram相关选举讨论的101,600,047次互动(911,510帖),属于台湾政治讨论背景基准,不是本专题叙事总量。另有一条直接相关YouTube视频页面索引快照:12次观看、4个赞(2026-10-26);不同平台、不同范围不可相加。</div><span class=\"status partial\">已核验背景基准</span></article></div>\r\n<div class=\"head\"><h2>专题功能导航</h2><p>从叙事结构、经济证据、受众结构到平台传播和原始资料。</p></div><div class=\"grid two\"><div class=\"card source\"><div class=\"icon\">01</div><div><h3>叙事分析</h3><p class=\"small\">母叙事、子叙事、论证机制、支持与反向证据。</p><button class=\"btn\" data-goto=\"overview\">进入叙事分析 →</button></div></div><div class=\"card source\"><div class=\"icon\">02</div><div><h3>经济与预算</h3><p class=\"small\">国防预算、美台贸易、双边投资、供应链风险。</p><button class=\"btn\" data-goto=\"trade\">查看经济数据 →</button></div></div><div class=\"card source\"><div class=\"icon\">03</div><div><h3>目标受众</h3><p class=\"small\">政府决策层、政策影响层、经济利益相关方与公众。</p><button class=\"btn\" data-goto=\"policy\">查看受众分类 →</button></div></div><div class=\"card source\"><div class=\"icon\">04</div><div><h3>平台传播</h3><p class=\"small\">研究样本背景、公开内容、互动指标和传播路径。</p><button class=\"btn\" data-goto=\"evidence\">查看传播资料 →</button></div></div><div class=\"card source\" style=\"grid-column:1/-1\"><div class=\"icon\">05</div><div><h3>原始资料与研究报告</h3><p class=\"small\">官方统计、预算文件、智库报告、新闻和平台原始内容。</p><button class=\"btn\" data-goto=\"evidence\">打开资料档案 →</button></div></div></div>\r\n<div class=\"head\"><h2>核心研判维度</h2><p>已收集资料与待验证内容分开显示。</p></div>\r\n<div class=\"grid three core-dimensions\">\r\n<article class=\"card\"><div class=\"label\">01 / 财政成本</div><h3>美国国防预算与增量成本</h3><div class=\"value\">$849.8B</div><p class=\"small\">FY2025国防部基础预算请求量级;FY2024法律另含约19亿美元台湾局势相关拨款。二者均不是美国直接介入台海的实战成本。</p><span class=\"status partial\">预算基线已核验;直接成本需建模</span><p class=\"small\"><a href=\"https://comptroller.defense.gov/Budget-Materials/\" rel=\"noopener\" target=\"_blank\">美国国防部预算资料</a> · <a href=\"https://www.govinfo.gov/content/pkg/PLAW-118publ50/html/PLAW-118publ50.htm\" rel=\"noopener\" target=\"_blank\">P.L. 118-50</a></p></article>\r\n<article class=\"card\"><div class=\"label\">02 / 供应链冲击</div><h3>台海封锁情景经济活动风险</h3><div class=\"value\">$2T+</div><p class=\"small\">Rhodium Group估计封锁情景下超过2万亿美元经济活动面临中断风险;不是已发生损失,也不等同美国GDP损失。</p><span class=\"status estimate\">情景估算</span><p class=\"small\"><a href=\"https://rhg.com/research/taiwan-economic-disruptions/\" rel=\"noopener\" target=\"_blank\">Rhodium Group原文</a></p></article>\r\n<article class=\"card\"><div class=\"label\">03 / 海运与贸易</div><h3>台湾海峡全球贸易流量</h3><div class=\"value\">$2.4T+</div><p class=\"small\">CSIS估计2024年超过2.4万亿美元货物经台湾海峡运输,约占全球海运贸易的21%;这是贸易流量暴露,不是潜在损失金额。</p><span class=\"status ok\">研究估算</span><p class=\"small\"><a href=\"https://www.csis.org/analysis/south-china-sea-trade-chokepoints\" rel=\"noopener\" target=\"_blank\">CSIS 2026贸易咽喉研究</a></p></article>\r\n<article class=\"card\"><div class=\"label\">04 / 半导体与企业</div><h3>先进芯片集中度与企业暴露</h3><div Line truncated
|
||||
},
|
||||
{
|
||||
"id": "trade",
|
||||
"name": "美国经济暴露与贸易成本",
|
||||
"html": "<div class=\"callout\"><b>美国视角说明:</b>本模块以美国自身的贸易、投资、关键投入品和企业成本为主线。台湾与大陆市场的联系作为供应链和区域贸易背景证据,用于分析其可能对美国企业及亚太经济产生的传导影响,而不是本模块的主叙事。</div><div class=\"merged-module\" data-source-module=\"economy\"><div class=\"head\"><h2>经济与预算</h2><p>统计事实、预算请求、风险估算分开呈现。</p></div><div class=\"grid three\"><div class=\"card\"><div class=\"label\">美台商品贸易总额 · 2024</div><div class=\"value\">$158.8B</div><p class=\"small\">美国出口约424.98亿美元;进口约1,162.85亿美元。年度商品贸易口径。</p><span class=\"status ok\">历史统计</span></div><div class=\"card\"><div class=\"label\">全球经济活动风险敞口</div><div class=\"value\">$2T+</div><p class=\"small\">Rhodium Group对假设封锁情景的估算,不是已发生损失。</p><span class=\"status estimate\">情景估算</span></div><div class=\"card\"><div class=\"label\">FY2024台海相关安全拨款</div><div class=\"value\">$1.9B</div><p class=\"small\">已拨款用于应对台湾局势相关支出,包括补充转交台湾的美军库存及相关服务、训练报销;不是美国直接参战成本。</p><span class=\"status ok\">法定拨款</span></div></div><div class=\"head\"><h2>经济数据表</h2></div><div class=\"tablewrap\"><table><thead><tr><th>指标</th><th>数据/口径</th><th>解释与限制</th><th>来源</th></tr></thead><tbody><tr><td>美台商品贸易总额(2024)</td><td>约1,588亿美元</td><td>贸易联系规模,不等于冲突损失。</td><td><a href=\"https://www.census.gov/foreign-trade/balance/c5830.html\" target=\"_blank\">美国人口普查局</a></td></tr><tr><td>台海封锁经济活动风险</td><td>超过2万亿美元</td><td>特定封锁情景估算,不是实际GDP损失。</td><td><a href=\"https://rhg.com/research/taiwan-economic-disruptions/\" target=\"_blank\">Rhodium Group</a></td></tr><tr><td>美国国防预算</td><td>按财政年度和预算口径采集</td><td>区分总统预算请求、最终拨款、实际支出。</td><td><a href=\"https://comptroller.defense.gov/Budget-Materials/\" target=\"_blank\">DoD预算资料</a></td></tr><tr><td>美国在台直接投资(2024)</td><td>约201亿美元存量</td><td>投资存量是经济暴露指标,不代表可能损失。</td><td><a href=\"https://www.bea.gov/data/intl-trade-investment\" target=\"_blank\">BEA国际投资</a></td></tr><tr><td>FY2024应对台湾局势相关拨款</td><td>19亿美元</td><td>法律指定用于应对台湾局势相关支出,包括补充美军库存、相关国防服务及训练;并非实际军事介入或战争成本。</td><td><a href=\"https://www.govinfo.gov/content/pkg/PLAW-118publ50/html/PLAW-118publ50.htm\" target=\"_blank\">Public Law 118-50</a></td></tr><tr><td>FY2024印太外国军事融资(FMF)</td><td>20亿美元</td><td>面向印太伙伴的融资拨款,不是全部专用于台湾;台湾可能成为受援方,不能全部计作对台支出。</td><td><a href=\"https://www.everycrsreport.com/reports/IF12481.html\" target=\"_blank\">CRS台湾防务议题</a></td></tr><tr><td>FY2024台湾外国军事融资</td><td>至少3亿美元</td><td>2024年综合拨款法为台湾提供不低于3亿美元FMF;属于安全援助,不是直接介入成本。</td><td><a href=\"https://www.everycrsreport.com/reports/IF12481.html\" target=\"_blank\">CRS台湾防务议题</a></td></tr><tr><td>美国直接军事介入台海的实际成本</td><td>暂无实际发生数据</td><td>美国未发生可供统计的直接参战案例;需用情景模型估算部署、弹药、装备损耗、人员与后勤成本。</td><td><a href=\"https://www.cbo.gov/topics/defense-and-national-security\" target=\"_blank\">CBO国防与国家安全</a></td></tr></tbody></table></div><div class=\"callout\" style=\"margin-top:14px\"><b>口径提示:</b>军售通知金额不等于美国财政支出;国防预算总额也不等于台海行动成本。已存在的台湾相关安全拨款可核验,但它们不等于美国直接军事介入成本。必须区分对台安全援助、印太区域融资、台湾自行支付的军购,以及尚未发生的假设性军事行动成本。</div></div><div class=\"merged-module\" data-source-module=\"crossstrait\"><div class=\"head\"><h2>台湾经济联系</h2><p>第一批已核验基础数据。贸易、投资存量和出口占比是经济联系指标,不等于冲突损失。</p></div>\r\n<div class=\"grid four\">\r\n<article class=\"card stat\"><div class=\"label\">台湾2024年商品贸易总额</div><div class=\"value\">$875.5B</div><div class=\"note\">UNCTAD:出口474.4B、进口401.1B美元。</div><span class=\"status ok\">官方国际统计</span></article>\r\n<article class=\"card stat\"><div class=\"laLine truncated
|
||||
},
|
||||
{
|
||||
"id": "companies",
|
||||
"name": "美国企业与供应链风险",
|
||||
"html": "<div class=\"merged-module\" data-source-module=\"companyrisk\">\r\n<div class=\"head\"><h2>美国企业与产业风险披露</h2><p>以企业向美国证券交易委员会(SEC)提交的年度报告为核心。企业披露的是风险因素,不等于风险已经发生,也不直接代表战争损失金额。</p></div>\r\n<div class=\"grid four\">\r\n<article class=\"card stat\"><div class=\"label\">TSMC · 2025财年</div><div class=\"value\">74%</div><p class=\"small\">7纳米及更先进制程占晶圆收入比例;不是台湾地区全球份额。</p><span class=\"status ok\">企业年报披露</span></article>\r\n<article class=\"card stat\"><div class=\"label\">NVIDIA · FY2025</div><div class=\"value\">$130.5B</div><p class=\"small\">年度总收入;供应链主要集中在亚太,并使用TSMC、Samsung等晶圆代工厂。</p><span class=\"status ok\">企业年报披露</span></article>\r\n<article class=\"card stat\"><div class=\"label\">Micron · FY2025</div><div class=\"value\">多数DRAM产出</div><p class=\"small\">公司披露,2025年大部分DRAM产出来自台湾制造设施。</p><span class=\"status ok\">企业年报原文</span></article>\r\n<article class=\"card stat\"><div class=\"label\">Apple · FY2025</div><div class=\"value\">多地外包</div><p class=\"small\">硬件制造依赖外包伙伴,制造与组装地点包括台湾及多个亚洲经济体。</p><span class=\"status ok\">企业年报披露</span></article>\r\n</div>\r\n<div class=\"head\"><h2>企业证据记录</h2><p>披露事实、专题关联、解释边界与原始来源。</p></div>\r\n<div class=\"tablewrap\"><table><thead><tr><th>企业/文件</th><th>可核验披露</th><th>风险渠道与研究用途</th><th>解释边界</th><th>原始来源</th></tr></thead><tbody>\r\n<tr><td>TSMC<br/>2025年报/Form 20-F</td><td>先进制程(7纳米及以下)占2025年晶圆收入74%;年报披露地缘政治紧张、供应链中断、能源与水资源、设备和原材料供应等运营风险,部分原材料依赖单一来源供应商。</td><td>晶圆制造、原料供给、能源与水、地缘政治和物流;用于分析先进制程制造及配套生态系统的连续性风险。</td><td>74%是TSMC自身晶圆收入中的制程占比,不是全球先进芯片份额;不能据此直接量化冲突损失。</td><td><a href=\"https://investor.tsmc.com/static/annualReports/2025/english/index.html\" target=\"_blank\">TSMC 2025年报</a> · <a href=\"https://www.sec.gov/Archives/edgar/data/1046179/000162828026025362/tsm-20251231.htm\" target=\"_blank\">SEC文件</a></td></tr>\r\n<tr><td>NVIDIA<br/>FY2025 Form 10-K</td><td>FY2025收入为1,305亿美元;供应链主要集中在亚太,使用TSMC、Samsung生产晶圆,使用CoWoS先进封装,并依赖多家组装、测试及封装合作方;公司披露制造交期与产能可得性风险。</td><td>AI加速器晶圆代工、先进封装、存储器、组装与交期;相关环节受扰可能影响AI产品交付。</td><td>不能将NVIDIA全部收入视为台湾风险敞口;客户账单所在地不等于产品制造地,影响程度取决于库存、替代产能与持续时间。</td><td><a href=\"https://www.sec.gov/Archives/edgar/data/1045810/000104581025000023/nvda-20250126.htm\" target=\"_blank\">SEC FY2025 Form 10-K</a></td></tr>\r\n<tr><td>Micron<br/>FY2025 Form 10-K</td><td>公司明确披露,2025年大部分DRAM产出来自台湾晶圆厂;若产出损失,可能对公司产生重大不利影响,也可能影响客户及以台湾为中心的技术产业链。</td><td>存储器供给、数据中心与终端电子产品、客户交付;提醒专题不能只分析逻辑芯片。</td><td>“大部分”是公司定性表述,不应改写成未披露的精确百分比;风险不等于已发生损失。</td><td><a href=\"https://www.sec.gov/Archives/edgar/data/723125/000072312525000028/mu-20250828.htm\" target=\"_blank\">SEC FY2025 Form 10-K</a></td></tr>\r\n<tr><td>Apple<br/>FY2025 Form 10-K</td><td>硬件制造主要依赖外包伙伴,制造与组装地点包括中国大陆、印度、日本、韩国、台湾和越南等地;部分关键组件来自单一或有限来源,贸易限制可能增加成本或限制供应。</td><td>电子产品制造、关键组件、外包生产、跨境物流和贸易政策;需进一步追踪具体产品与供应商层级。</td><td>供应链分布于多个经济体,不能据此声称全部或绝大多数产品在台湾制造。</td><td><a href=\"https://www.sec.gov/Archives/edgar/data/320193/000032019325000079/aapl-20250927.htm\" target=\"_blank\">SEC FY2025 Form 10-K</a></td></tr>\r\n</tbody></table></div>\r\n<div class=\"callout\"><b>本模块结论:</b>企业一手披露支持“台湾相关制造节点和供应链具有商业重要性、相关中断可能产生经营风险”。但若要估计具体经济损失,还需要产品级产能、库存、替代能力、停Line truncated
|
||||
},
|
||||
{
|
||||
"id": "semiconductor",
|
||||
"name": "半导体与关键产业",
|
||||
"html": "<div class=\"merged-module\" data-source-module=\"industrymap\">\r\n<div class=\"head\"><h2>产业传导分析</h2><p>将企业披露转化为可检验的产业链路径。以下“可能影响”属于机制分析,规模和持续时间仍需验证。</p></div>\r\n<div class=\"grid two\">\r\n<div class=\"card\"><div class=\"label\">路径 A · AI与数据中心</div><h3>晶圆代工 → 先进封装 → AI加速器 → 服务器/数据中心</h3><p class=\"small\">NVIDIA年报披露使用TSMC等晶圆代工厂及CoWoS先进封装。相关制造、封装或物流受扰,可能延迟加速器与系统交付。</p><p class=\"small\"><b>待补证据:</b>产品级产能分布、封装替代能力、交期、云厂商资本开支与订单延期公告。</p></div>\r\n<div class=\"card\"><div class=\"label\">路径 B · 消费电子</div><h3>关键芯片/组件 → 外包制造与组装 → 物流 → 终端销售</h3><p class=\"small\">Apple披露硬件生产依赖多个亚洲经济体的外包伙伴,并存在单一或有限来源组件。冲击可能经零部件、组装和运输传导。</p><p class=\"small\"><b>待补证据:</b>产品级供应商所在地、组件替代周期、库存与交付数据。</p></div>\r\n<div class=\"card\"><div class=\"label\">路径 C · 存储器与企业IT</div><h3>DRAM生产 → 服务器/PC/移动设备 → 企业采购</h3><p class=\"small\">Micron披露其2025年大部分DRAM产出来自台湾设施,并指出产出损失可能对公司及技术产业链产生重大不利影响。</p><p class=\"small\"><b>待补证据:</b>DRAM产品产能、库存周期、竞争厂商可用产能、客户行业分布与价格变化。</p></div>\r\n<div class=\"card\"><div class=\"label\">路径 D · 制造生态系统</div><h3>晶圆厂 → 材料/设备/公用事业 → 维护 → 良率与产能</h3><p class=\"small\">TSMC年报提及原材料、单一来源采购、能源与水资源、设备零部件等风险。半导体制造依赖完整配套生态系统。</p><p class=\"small\"><b>待补证据:</b>材料集中度、设备备件交期、能源供水连续性、厂区恢复时间。</p></div>\r\n</div>\r\n<div class=\"head\"><h2>风险评估的最小分析单元</h2></div>\r\n<div class=\"tablewrap\"><table><thead><tr><th>维度</th><th>需要记录的字段</th><th>分析用途</th><th>建议来源</th></tr></thead><tbody>\r\n<tr><td>产能位置</td><td>企业、工厂、地区、产品、制程、产能占比、数据年份</td><td>区分台湾直接生产暴露与全球供应链间接暴露</td><td>企业年报、公司官网、监管披露</td></tr>\r\n<tr><td>替代能力</td><td>替代供应商、认证周期、迁移成本、替代产能和良率爬坡时间</td><td>判断短期冲击是否转化为长期供给短缺</td><td>企业公告、财报电话会、行业研究</td></tr>\r\n<tr><td>缓冲能力</td><td>库存覆盖天数、预付款、长期采购协议、备用物流路线</td><td>估计企业短期缓冲能力</td><td>年报、采购披露、供应链调查</td></tr>\r\n<tr><td>经济结果</td><td>延迟交付、价格变化、收入暴露、资本开支调整、客户停产</td><td>将风险机制与实际经济后果分开验证</td><td>财报、市场数据、企业公告、官方统计</td></tr>\r\n</tbody></table></div>\r\n<div class=\"callout\">建议后续优先研究AI芯片、先进封装、存储器和消费电子四条链;不要把所有科技行业统一视为同等暴露。</div>\r\n</div><div class=\"merged-module\" data-source-module=\"riskindicators\">\r\n<div class=\"head\"><h2>企业与产业风险指标库</h2><p>将后续采集任务标准化。没有可靠数值的指标标记为待采集,不以推测值填充。</p></div>\r\n<div class=\"filters\"><input id=\"riskSearch\" placeholder=\"搜索行业、指标、企业或关键词…\"/><select id=\"riskSector\"><option value=\"all\">全部行业</option><option>先进逻辑芯片</option><option>AI与先进封装</option><option>存储器</option><option>消费电子</option><option>半导体设备与材料</option><option>物流与保险</option></select><select id=\"riskStatus\"><option value=\"all\">全部状态</option><option>已有企业披露</option><option>待采集</option><option>需模型估算</option></select></div>\r\n<div class=\"tablewrap\"><table id=\"riskTable\"><thead><tr><th>行业</th><th>指标</th><th>定义/采集口径</th><th>优先来源</th><th>状态</th><th>关联子叙事</th></tr></thead><tbody>\r\n<tr data-sector=\"先进逻辑芯片\" data-status=\"已有企业披露\"><td>先进逻辑芯片</td><td>先进制程收入占比</td><td>企业披露的制程分类及收入占比;记录公司口径和财年。</td><td><a href=\"https://investor.tsmc.com/static/annualReports/2025/english/index.html\" target=\"_blank\">TSMC年报</a></td><td><span class=\"status ok\">已有企业披露</span></td><td>先进制程供给中Line truncated
|
||||
},
|
||||
{
|
||||
"id": "fiscal",
|
||||
"name": "美国军费与财政代价",
|
||||
"html": "<div class=\"merged-module\" data-source-module=\"fiscal\"><div class=\"head\"><h2>美国财政与政策</h2><p>建立“现有国防预算—对台安全援助—假设性军事介入增量成本”的口径边界。</p></div>\r\n<div class=\"grid two\"><article class=\"card stat\"><div class=\"label\">FY2025国防部基础预算请求</div><div class=\"value\">$849.8B</div><div class=\"note\">CRS汇总的国防部基础预算请求,不是台海相关支出。</div><span class=\"status partial\">预算请求</span></article>\r\n<article class=\"card stat\"><div class=\"label\">FY2025国防部基础拨款</div><div class=\"value\">$831.3B</div><div class=\"note\">全年持续拨款法下国防部项目的可自由裁量基础预算权限。</div><span class=\"status ok\">拨款口径</span></article>\r\n</div>\r\n<div class=\"head\"><h2>财政与政策数据表</h2></div><div class=\"tablewrap\"><table><thead><tr><th>指标/政策</th><th>金额/内容</th><th>性质</th><th>研究用途</th><th>来源</th></tr></thead><tbody>\r\n<tr><td>FY2025国防部基础预算请求</td><td>约8,498亿美元</td><td>总统预算请求;CRS汇总</td><td>作为常规国防预算基线,不应计作台海介入成本</td><td><a href=\"https://www.everycrsreport.com/reports/IN12447.html\" target=\"_blank\">CRS IN12447</a></td></tr>\r\n<tr><td>FY2025国防部基础预算拨款</td><td>约8,313亿美元</td><td>全年持续拨款法下的基础预算权限</td><td>比较预算请求与实际拨款口径</td><td><a href=\"https://www.everycrsreport.com/reports/IN12425.html\" target=\"_blank\">CRS IN12425</a></td></tr>\r\n<tr><td>FY2025额外强制性国防资金</td><td>2025年预算协调法中约1,562亿美元国防资金</td><td>2025年立法新增资金;非专属台海支出</td><td>观察军费扩张与国内财政权衡;不可全部归因于台海</td><td><a href=\"https://www.everycrsreport.com/reports/IN12580.html\" target=\"_blank\">CRS IN12580</a></td></tr>\r\n<tr><td>FY2024台湾局势相关拨款</td><td>约19亿美元</td><td>P.L. 118-50中相关拨款</td><td>区分对台安全相关拨款与直接参战成本</td><td><a href=\"https://www.govinfo.gov/content/pkg/PLAW-118publ50/html/PLAW-118publ50.htm\" target=\"_blank\">P.L. 118-50</a></td></tr>\r\n<tr><td>FY2024印太外国军事融资</td><td>约20亿美元</td><td>面向印太伙伴的融资,不是全部专用于台湾</td><td>分析区域安全援助的预算分布</td><td><a href=\"https://www.everycrsreport.com/reports/IF12481.html\" target=\"_blank\">CRS IF12481</a></td></tr>\r\n<tr><td>FY2024台湾外国军事融资</td><td>至少3亿美元</td><td>台湾相关FMF拨款</td><td>单列台湾安全援助,避免把区域总额全部算作对台支出</td><td><a href=\"https://www.everycrsreport.com/reports/IF12481.html\" target=\"_blank\">CRS IF12481</a></td></tr>\r\n<tr><td>美国国防预算分析基准</td><td>按财政年度区分预算请求、拨款、义务支出与实际支出</td><td>数据口径规则</td><td>防止把授权额、拨款额和实际成本混为一谈</td><td><a href=\"https://comptroller.defense.gov/Budget-Materials/\" target=\"_blank\">DoD预算资料</a></td></tr>\r\n</tbody></table></div><div class=\"callout\" style=\"margin-top:14px\"><b>关键方法:</b>“军费高”不能单独证明“台海政策造成财政损失”。后续应建立可比情景:基准预算、危机期间新增行动成本、冲突后装备补充成本,以及可能被挤出的其他财政用途,并明确假设与不确定区间。</div></div><div class=\"merged-module\" data-source-module=\"fiscalcost\">\r\n<div class=\"head\"><h2>美国财政机会成本与军事行动成本</h2><p>将常规国防预算、冲突增量成本、资源机会成本和宏观经济外溢影响分开,避免重复计算。</p></div>\r\n<div class=\"grid four\">\r\n<article class=\"card stat\"><div class=\"label\">FY2025 DoD预算计划</div><div class=\"value\">$850B</div><div class=\"note\">CBO对2025年未来年度国防计划的分析口径,不包括额外紧急拨款。</div><span class=\"status ok\">预算计划</span></article>\r\n<article class=\"card stat\"><div class=\"label\">CBO对2039年计划成本预测</div><div class=\"value\">$965B</div><div class=\"note\">以2025年美元计;较2029年计划水平增加约11%。</div><span class=\"status estimate\">长期预测</span></article>\r\n<article class=\"card stat\"><div class=\"label\">2026年对伊军事行动成本估算</div><div class=\"value\">$38B</div><div class=\"note\">CBO估计截至2026年8月1日的增量成本,含弹药、装备损失、飞行时数、行动与燃油成本。</div><span class=\"status estimate\">比较案例</span></article>\r\n<article class=\"card stat\"><div class=\"label\">对伊行动延续成本估算</div><div class=\"value\">$2–3B/月</div><div class=\"note\">CBO针对2026年对伊行动的月度估算,随行动强度变化Line truncated
|
||||
},
|
||||
{
|
||||
"id": "shipping",
|
||||
"name": "航运贸易与全球经济",
|
||||
"html": "<div class=\"merged-module\" data-source-module=\"supplychain\"><div class=\"head\"><h2>产业链与航运</h2><p>将芯片集中度、海上运输和贸易融资风险拆成独立的可验证指标。</p></div>\r\n<div class=\"grid three\"><article class=\"card stat\"><div class=\"label\">全球先进逻辑芯片产能(报告估计)</div><div class=\"value\">约92%</div><div class=\"note\">Rhodium Group 2022年报告引用的当时估计:台湾生产小于10纳米先进逻辑芯片的比例。</div><span class=\"status estimate\">历史研究估计</span></article>\r\n<article class=\"card stat\"><div class=\"label\">台海2022年货物通行价值</div><div class=\"value\">$2.45T</div><div class=\"note\">CSIS估算,超过全球海运贸易的五分之一。</div><span class=\"status estimate\">研究估算</span></article>\r\n<article class=\"card stat\"><div class=\"label\">封锁情景下台湾增加值贸易风险</div><div class=\"value\">约$565B</div><div class=\"note\">Rhodium Group基于2021年贸易关系的保守估计。</div><span class=\"status estimate\">情景估算</span></article></div>\r\n<div class=\"head\"><h2>供应链与航运风险数据表</h2></div><div class=\"tablewrap\"><table><thead><tr><th>风险指标</th><th>数据/结论</th><th>数据性质</th><th>可连接的子叙事</th><th>来源</th></tr></thead><tbody>\r\n<tr><td>先进逻辑芯片产能集中</td><td>台湾约占全球小于10纳米先进逻辑芯片产量的92%(报告引用估计)</td><td>研究估计;保留年份和制程定义</td><td>芯片供给中断影响计算、通信和工业生产</td><td><a href=\"https://rhg.com/research/taiwan-economic-disruptions/\" target=\"_blank\">Rhodium Group</a></td></tr>\r\n<tr><td>汽车微控制器暴露</td><td>报告引用估计:台积电约生产全球35%的汽车微控制器</td><td>第三方估计,非官方完整统计</td><td>汽车产线、零部件交付和库存风险</td><td><a href=\"https://rhg.com/research/taiwan-economic-disruptions/\" target=\"_blank\">Rhodium Group</a></td></tr>\r\n<tr><td>智能手机芯片组暴露</td><td>报告引用估计:台积电约生产全球70%的智能手机芯片组</td><td>第三方估计,产品口径需核验</td><td>消费电子产量、交付和价格风险</td><td><a href=\"https://rhg.com/research/taiwan-economic-disruptions/\" target=\"_blank\">Rhodium Group</a></td></tr>\r\n<tr><td>台湾商品与服务贸易</td><td>2021年进出口合计约9,220亿美元</td><td>历史统计</td><td>台湾外贸整体暴露与港口中断影响</td><td><a href=\"https://rhg.com/research/taiwan-economic-disruptions/\" target=\"_blank\">Rhodium Group</a></td></tr>\r\n<tr><td>封锁情景下全球经济活动风险</td><td>超过2万亿美元;是活动风险敞口,不是GDP损失</td><td>假设情景估算</td><td>冲突可能对全球贸易和投资产生外溢</td><td><a href=\"https://rhg.com/research/taiwan-economic-disruptions/\" target=\"_blank\">Rhodium Group</a></td></tr>\r\n<tr><td>中国大陆经台海贸易</td><td>2022年约1.4万亿美元中国进出口货物通过台海</td><td>CSIS研究估算</td><td>航运冲击也会反作用于大陆生产和区域贸易</td><td><a href=\"https://www.csis.org/analysis/disruptions-trade-taiwan-strait-would-severely-impact-chinas-economy\" target=\"_blank\">CSIS</a></td></tr>\r\n<tr><td>全球贸易融资</td><td>Rhodium报告估计每年贸易融资约6.5万亿至8万亿美元,支撑最多约三分之一贸易流</td><td>研究报告引用估计</td><td>金融机构风险收缩可能先于实物供应中断影响贸易</td><td><a href=\"https://rhg.com/research/taiwan-economic-disruptions/\" target=\"_blank\">Rhodium Group</a></td></tr>\r\n<tr><td>对华贸易融资风险</td><td>报告估计:特定危机假设下,超过2,700亿美元对华贸易可能受贸易融资收缩影响</td><td>情景估算,不是已发生损失</td><td>风险预期、融资成本和跨境贸易传导</td><td><a href=\"https://rhg.com/research/taiwan-economic-disruptions/\" target=\"_blank\">Rhodium Group</a></td></tr>\r\n<tr><td>台湾港口集装箱吞吐量</td><td>2024年约1,359.7万TEU</td><td>UNCTAD统计</td><td>建立港口、海运和物流基线序列</td><td><a href=\"https://unctadstat.unctad.org/CountryProfile/MaritimeProfile/en-GB/158/index.html\" target=\"_blank\">UNCTAD</a></td></tr>\r\n</tbody></table></div><div class=\"callout\" style=\"margin-top:14px\"><b>解释边界:</b>芯片占比、海运货值和经济活动风险不能直接相加;它们衡量不同层面的暴露。后续需把产品、企业、运输、库存、替代产能和持续时间连接起来,避免重复计算。</div></div><div class=\"merged-module\" data-source-module=\"shippingrisk\">\r\n<div class=\"head\"><h2>航运、保险与物流风险</h2><p>以海上贸易流量研究为基线,拆分航线、保险、港口、能源与企业库存风险。流量价值不Line truncated
|
||||
},
|
||||
{
|
||||
"id": "markets",
|
||||
"name": "投资金融与市场风险",
|
||||
"html": "<div class=\"callout\"><b>市场研究口径:</b>页面中已收录的新闻报道涨跌幅、初步市场调整 AR/CAR 和待采集行情必须分开理解。只有完整复权价格序列、市场基准、估计窗口和同期事件均核验后,才能形成正式事件研究结果;初步计算不构成因果证明。</div><div class=\"merged-module\" data-source-module=\"marketwindow\">\r\n<div class=\"head\"><h2>市场事件窗口:真实市场波动与归因边界</h2><p>2026年10月22日半导体板块下跌,是观察市场如何反应于AI资本开支预期、企业指引和供应链约束的参考案例;它不是台海军事事件,不能用来证明台海风险导致股价下跌。</p></div>\r\n<div class=\"callout\"><b>研究边界:</b>以下为公开报道的市场变化,不是已计算完成的异常收益(AR)或累计异常收益(CAR)。正式事件研究仍需下载逐日复权价格,设定估计窗口和事件窗口,并建立市场/行业基准模型。</div>\r\n<div class=\"grid four\" style=\"margin-top:14px\">\r\n<div class=\"card stat\"><div class=\"label\">PHLX 半导体指数(SOX)</div><div class=\"value\">−6.7%</div><div class=\"note\">2026-10-22 收盘日跌幅。</div><span class=\"status ok\">市场观测</span></div>\r\n<div class=\"card stat\"><div class=\"label\">纳斯达克综合指数</div><div class=\"value\">−2.60%</div><div class=\"note\">2026-10-22 收盘表现。</div><span class=\"status ok\">市场观测</span></div>\r\n<div class=\"card stat\"><div class=\"label\">标普 500 指数</div><div class=\"value\">−1.21%</div><div class=\"note\">2026-10-22 收盘表现。</div><span class=\"status ok\">市场观测</span></div>\r\n<div class=\"card stat\"><div class=\"label\">道琼斯工业平均指数</div><div class=\"value\">+0.02%</div><div class=\"note\">同日大盘横向参照。</div><span class=\"status ok\">市场观测</span></div></div>\r\n<div class=\"head\"><h2>半导体相关证券当日变化</h2><p>采用公开报道的收盘数据,不混用盘中报价。</p></div>\r\n<div class=\"filters\"><input id=\"searchMarketEvent\" placeholder=\"搜索证券、事件或解释…\"/><select id=\"marketEventType\"><option value=\"all\">全部类别</option><option value=\"设备\">设备</option><option value=\"存储器\">存储器</option><option value=\"芯片设计\">芯片设计</option><option value=\"指数\">指数</option><option value=\"大盘基准\">大盘基准</option></select><select id=\"marketEventStatus\"><option value=\"all\">全部证据状态</option><option value=\"报道收盘数据\">报道收盘数据</option><option value=\"市场基准\">市场基准</option></select></div>\r\n<div class=\"tablewrap\"><table id=\"marketEventTable\"><thead><tr><th>日期</th><th>标的</th><th>类别</th><th>当日变化</th><th>报道所述背景</th><th>解释边界</th><th>来源</th></tr></thead><tbody>\r\n<tr data-kind=\"指数\" data-status=\"报道收盘数据\"><td>2026-10-22</td><td>PHLX 半导体指数(SOX)</td><td>指数</td><td>−6.7%</td><td>半导体板块普跌,市场关注AI投资可持续性与设备供应限制。</td><td>行业指数变化;不是台海风险事件的因果估计。</td><td><a href=\"https://www.investors.com/news/technology/chip-stocks-tumble-lrcx-txn-sox-q3-earnings/\" target=\"_blank\">Investors.com</a></td></tr>\r\n<tr data-kind=\"设备\" data-status=\"报道收盘数据\"><td>2026-10-22</td><td>Lam Research(LRCX)</td><td>设备</td><td>−11.8%</td><td>公司公布业绩后,管理层谈及近期供应链约束,下一季度指引未超出市场预期。</td><td>多因素市场反应;不能归因于单一因素。</td><td><a href=\"https://www.investors.com/news/technology/chip-stocks-tumble-lrcx-txn-sox-q3-earnings/\" target=\"_blank\">Investors.com</a></td></tr>\r\n<tr data-kind=\"存储器\" data-status=\"报道收盘数据\"><td>2026-10-22</td><td>Micron(MU)</td><td>存储器</td><td>−6.3%</td><td>处于半导体板块整体回调期间。</td><td>报道未证明跌幅来自台海风险或台湾生产中断。</td><td><a href=\"https://www.marketwatch.com/story/two-big-reasons-micron-and-other-chip-stocks-are-falling-on-thursday-312f1fb2\" target=\"_blank\">MarketWatch</a></td></tr>\r\n<tr data-kind=\"芯片设计\" data-status=\"报道收盘数据\"><td>2026-10-22</td><td>NVIDIA(NVDA)</td><td>芯片设计</td><td>−4.4%</td><td>市场关注AI资本支出、融资和估值预期。</td><td>日收益不代表台湾业务暴露造成的损失。</td><td><a href=\"https://apnews.com/article/33767691a4a0730b96d6f0c5100ea9b2\" target=\"_blank\">AP News</a></td></tr>\r\n<tr data-kind=\"大盘基准\" data-status=\"市场基准\"><td>2026-10-22</td><td>纳斯达克综合指数</td><td>大盘基准</td><td>−2.60%</td><td>科技股与AI投资相关担忧扩散。</td><td>正式研究需使用复权日价格序列。</td><td><a href=\"https:/Line truncated
|
||||
},
|
||||
{
|
||||
"id": "history",
|
||||
"name": "历史危机案例",
|
||||
"html": "<div class=\"merged-module\" data-source-module=\"historycases\">\r\n<div class=\"head\"><h2>历史危机经济案例库</h2><p>用真实发生过的供应链与贸易冲击识别传导机制;历史案例用于比较机制,不直接等同于台海情景预测。</p></div>\r\n<div class=\"grid four\">\r\n<article class=\"card stat\"><div class=\"label\">疫情供应链压力 · 2021年末</div><div class=\"value\">4σ+</div><div class=\"note\">纽约联储GSCPI一度超过历史均值4个标准差。</div><span class=\"status ok\">历史指标</span></article>\r\n<article class=\"card stat\"><div class=\"label\">美国通胀传导 · 2021–2022</div><div class=\"value\">约60%</div><div class=\"note\">旧金山联储估计,供应链压力解释同期总体PCE通胀高于趋势上升部分约60%。</div><span class=\"status estimate\">研究估计</span></article>\r\n<article class=\"card stat\"><div class=\"label\">红海危机 · 2024年初</div><div class=\"value\">+10天</div><div class=\"note\">绕行好望角使平均交付时间增加至少10天。</div><span class=\"status ok\">历史观测</span></article>\r\n<article class=\"card stat\"><div class=\"label\">乌克兰战争商品冲击 · 2022预测</div><div class=\"value\">$100/桶</div><div class=\"note\">世界银行2022年4月预测当年布伦特原油均价;是当时预测值,不是最终实际均价。</div><span class=\"status estimate\">当时预测</span></article>\r\n</div>\r\n<div class=\"callout\" style=\"margin-top:14px\"><b>比较原则:</b>每个案例记录冲击来源、通道、观测指标、时间窗口和证据限制。不得把“供应链压力解释通胀变化的比例”当作“台海冲突将造成的通胀比例”,也不得把某一航线的运价涨幅直接套用于台湾海峡。</div>\r\n<div class=\"head\"><h2>案例明细与可复用指标</h2></div>\r\n<div class=\"filters\"><input id=\"historySearch\" placeholder=\"搜索案例、指标、机制或来源…\"/><select id=\"historyType\"><option value=\"all\">全部案例类型</option><option value=\"supply\">供应链</option><option value=\"shipping\">航运/通道</option><option value=\"commodity\">能源/大宗商品</option><option value=\"disaster\">自然灾害</option></select><select id=\"historyStatus\"><option value=\"all\">全部证据状态</option><option value=\"measured\">历史观测/统计</option><option value=\"estimate\">研究估计/预测</option><option value=\"qualitative\">定性机制</option></select></div>\r\n<div class=\"tablewrap\"><table id=\"historyTable\"><thead><tr><th>案例与时间</th><th>可核验数据</th><th>经济传导机制</th><th>观察指标</th><th>证据边界</th><th>原始来源</th></tr></thead><tbody>\r\n<tr data-kind=\"supply\" data-status=\"estimate\"><td>COVID-19全球供应链冲击<br/>2021–2022</td><td>纽约联储GSCPI在2021年末超过历史均值4个标准差;旧金山联储研究估计,供应链压力解释了2021–2022年美国总体PCE通胀高于趋势上升部分约60%。</td><td>运输成本和交付周期上升 → 投入成本、缺货与积压 → 部分成本向终端价格传导。</td><td>GSCPI、海运/空运成本、交货时间、库存积压、PCE通胀、生产者价格。</td><td>“约60%”是研究模型估计,指高于趋势的通胀上升部分,不是全部通胀,也不是台海冲突预测。</td><td><a href=\"https://www.frbsf.org/research-and-insights/publications/economic-letter/global-supply-chain-pressures-and-us-inflation/\" target=\"_blank\">旧金山联储</a>;<a href=\"https://www.newyorkfed.org/research/policy/gscpi\" target=\"_blank\">纽约联储GSCPI</a></td></tr>\r\n<tr data-kind=\"shipping\" data-status=\"measured\"><td>红海/苏伊士航线扰动<br/>2023年末–2024年初</td><td>IMF报告称,2024年前两个月苏伊士运河贸易量同比下降约50%;绕行好望角船舶流量同比增加约74%;绕航平均增加10天以上交付时间。</td><td>安全风险 → 改道 → 航程延长、船舶周转下降、运力占用与港口拥堵 → 运输成本和库存需求上升。</td><td>运河通行量、好望角船舶流量、港口挂靠、交付时间、库存覆盖天数、航运价格指数。</td><td>不同指标口径和基准期不同;贸易量下降不等于永久损失,部分货物只是延迟或改道。</td><td><a href=\"https://www.imf.org/en/Blogs/Articles/2024/03/07/red-sea-attacks-disrupt-global-trade\" target=\"_blank\">IMF红海贸易分析</a></td></tr>\r\n<tr data-kind=\"shipping\" data-status=\"measured\"><td>红海危机运价变化<br/>2023年末–2024年初</td><td>UNCTAD报告称,上海至欧洲集装箱现货运价在2024年2月初较2023年12月初上涨256%;亚洲至美国西海岸运价较2023年11月初上涨130%。</td><td>航线重新配置和有效运力收紧,可将局部航道风险传导到其他贸易航线。</td><td>上海至欧洲/美Line truncated
|
||||
},
|
||||
{
|
||||
"id": "policy",
|
||||
"name": "美国政策受众与决策",
|
||||
"html": "<div class=\"merged-module\" data-source-module=\"audience\"><div class=\"head\"><h2>目标受众</h2><p>点击任一受众卡片,查看其子群体、核心关切、可采集资料与分析指标。</p></div><div class=\"grid\" style=\"grid-template-columns:1fr\">\r\n<div class=\"card audience-card\"><div class=\"icon\">01</div><h3>核心决策层</h3><p class=\"small\">美国国会相关委员会、白宫国家安全与经济政策团队、国防部及国务院相关政策人员。</p><p class=\"small\"><b>关注:</b>财政成本、危机升级、政策收益与经济代价。</p><button class=\"btn audience-detail\" data-audience=\"decision\">查看受众详情 →</button></div>\r\n<div class=\"card audience-card\"><div class=\"icon\">02</div><h3>政策影响层</h3><p class=\"small\">智库研究人员、前政府官员、军事与经济分析人员、政策顾问。</p><p class=\"small\"><b>关注:</b>情景推演、长期预算、贸易冲击和战略风险。</p><button class=\"btn audience-detail\" data-audience=\"policy\">查看受众详情 →</button></div>\r\n<div class=\"card audience-card\"><div class=\"icon\">03</div><h3>经济利益层</h3><p class=\"small\">半导体与电子企业、金融机构、跨国公司、供应链管理、航运与保险行业。</p><p class=\"small\"><b>关注:</b>供应链连续性、资产风险、运输成本与投资环境。</p><button class=\"btn audience-detail\" data-audience=\"business\">查看受众详情 →</button></div>\r\n<div class=\"card audience-card\"><div class=\"icon\">04</div><h3>社会舆论层</h3><p class=\"small\">选民与纳税人、行业协会、公共政策组织、新闻媒体和评论人士。</p><p class=\"small\"><b>关注:</b>公共预算、生活成本、就业与军事升级风险。</p><button class=\"btn audience-detail\" data-audience=\"public\">查看受众详情 →</button></div>\r\n</div><div class=\"callout\" style=\"margin-top:14px\">受众的经济利益关联不等于其支持或反对军事介入。实际立场需依据公开发言、投票记录、组织文件或调查数据单独编码。</div></div>"
|
||||
},
|
||||
{
|
||||
"id": "evidence",
|
||||
"name": "资料档案与证据矩阵",
|
||||
"html": "<div class=\"merged-module\" data-source-module=\"sources\"><div class=\"head\"><h2>资料档案</h2><p>保存原始来源、资料类型、研究用途和证据边界。</p></div><div class=\"filters\"><input id=\"searchSources\" placeholder=\"搜索资料标题或机构…\"/><select id=\"sourceType\"><option value=\"all\">全部类型</option><option>官方统计</option><option>智库研究</option><option>学术论文</option><option>官方预算</option><option>历史案例研究</option><option>企业年报</option><option value=\"官方预算\">官方预算</option><option>平台原始内容</option></select></div><div class=\"tablewrap\"><table id=\"sourceTable\"><thead><tr><th>资料标题</th><th>机构/类型</th><th>主要用途</th><th>证据边界</th><th>原文</th></tr></thead><tbody><tr data-type=\"智库研究\"><td>The Global Economic Disruptions from a Taiwan Conflict</td><td>Rhodium Group · 智库研究</td><td>台海封锁情景、贸易、投资、半导体风险</td><td>情景估算,不是实际损失</td><td><a href=\"https://rhg.com/research/taiwan-economic-disruptions/\" target=\"_blank\">查看报告</a></td></tr><tr data-type=\"智库研究\"><td>Scared Strait: Understanding the Economic and Financial Impacts of a Taiwan Crisis</td><td>CSIS · 智库研究</td><td>市场反应、企业风险认知、危机情景</td><td>情景研判,不等同于实际介入成本</td><td><a href=\"https://www.csis.org/analysis/scared-strait-understanding-economic-and-financial-impacts-taiwan-crisis\" target=\"_blank\">查看报告</a></td></tr><tr data-type=\"学术论文\"><td>The 2024 Taiwanese Presidential Election on social media: Identity, policy, and affective virality</td><td>PNAS Nexus · 学术论文</td><td>台湾选举期间的社交媒体内容和互动研究</td><td>不能作为本叙事的直接传播总量</td><td><a href=\"https://academic.oup.com/pnasnexus/article/3/4/pgae130/7641140\" target=\"_blank\">查看论文</a></td></tr><tr data-type=\"官方统计\"><td>美国与台湾商品贸易数据</td><td>美国人口普查局 · 官方统计</td><td>双边商品贸易流量</td><td>贸易规模不是冲突损失</td><td><a href=\"https://www.census.gov/foreign-trade/balance/c5830.html\" target=\"_blank\">查看数据</a></td></tr><tr data-type=\"官方预算\"><td>国防部预算资料</td><td>美国国防部财务主计长办公室 · 官方预算</td><td>年度预算请求、采购、运维和人员开支</td><td>须区分预算请求、拨款和实际支出</td><td><a href=\"https://comptroller.defense.gov/Budget-Materials/\" target=\"_blank\">查看预算</a></td></tr><tr data-type=\"官方预算\"><td>Indo-Pacific Security Supplemental Appropriations Act, 2024(P.L. 118-50)</td><td>美国联邦法律 · 官方拨款</td><td>19亿美元台湾局势相关拨款及相关支出用途</td><td>不是直接军事介入成本</td><td><a href=\"https://www.govinfo.gov/content/pkg/PLAW-118publ50/html/PLAW-118publ50.htm\" target=\"_blank\">查看法律原文</a></td></tr><tr data-type=\"官方预算\"><td>台湾防务与军事议题(CRS IF12481)</td><td>美国国会研究处 · 研究报告</td><td>台湾FMF与PDA安全援助口径、2024拨款</td><td>区域FMF不全属台湾;援助不等于战争成本</td><td><a href=\"https://www.everycrsreport.com/reports/IF12481.html\" target=\"_blank\">查看报告</a></td></tr><tr data-type=\"官方预算\"><td>国防与国家安全预算分析</td><td>美国国会预算办公室 · 预算分析</td><td>长期成本、预算赤字与财政空间</td><td>需要单独识别台海相关增量成本</td><td><a href=\"https://www.cbo.gov/topics/defense-and-national-security\" target=\"_blank\">查看研究</a></td></tr><tr data-type=\"历史案例研究\"><td>Global Supply Chain Pressures and U.S. Inflation</td><td>旧金山联储 · 历史案例研究</td><td>供应链压力与美国通胀传导</td><td>约60%为模型估计,指高于趋势的通胀上升部分,不是台海情景预测</td><td><a href=\"https://www.frbsf.org/research-and-insights/publications/economic-letter/global-supply-chain-pressures-and-us-inflation/\" target=\"_blank\">查看研究</a></td></tr><tr data-type=\"历史案例研究\"><td>Red Sea Attacks Disrupt Global Trade</td><td>IMF · 历史案例研究</td><td>苏伊士运河、好望角绕航和贸易流量变化</td><td>2024年前两个月的同比数据;部分货物可能只是延迟或改道</td><td><a href=\"https://www.imf.org/en/Blogs/Articles/2024/03/07/red-sea-attacks-disrupt-global-trade\" target=\"_blank\">查看研究</a></td></tr><tr data-type=\"历史案例研究\"><td>Food and Energy Price Shocks from Ukraine War Could Last for Years</td><td>世界银行 · 商品市场展望</td><td>战争相关能源、粮食与化肥价格冲击</td><td>页面引用为2022年4月当时预测,不标作最终实际值</td><td><a href=\"https://www.worldbank.org/en/news/press-release/Line truncated
|
||||
}
|
||||
]
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"说明": "字段显示目录:页面模块以结构化数据保存;隐藏页面正文会清空对应模块内容。",
|
||||
"fields": [
|
||||
{
|
||||
"label": "模块编号",
|
||||
"pages": [
|
||||
"pages"
|
||||
],
|
||||
"description": "页面模块标识",
|
||||
"keys": [
|
||||
"id"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "模块名称",
|
||||
"pages": [
|
||||
"pages"
|
||||
],
|
||||
"description": "页面导航与模块名称",
|
||||
"keys": [
|
||||
"name"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "页面正文",
|
||||
"pages": [
|
||||
"pages"
|
||||
],
|
||||
"description": "页面模块 HTML 正文",
|
||||
"keys": [
|
||||
"html"
|
||||
],
|
||||
"custom": false
|
||||
}
|
||||
]
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"系统": {
|
||||
"名称": "U军事介入T海经济民生必下降",
|
||||
"版本": "structured",
|
||||
"说明": "从美国经济利益出发,分析台海军事介入可能带来的财政负担、贸易与供应链冲击、企业投资风险及民生影响,结合官方统计、企业披露、历史案例与公开平台数据,区分已核实事实、情景估算和待核验判断。"
|
||||
},
|
||||
"页面": [
|
||||
{
|
||||
"编号": "overview",
|
||||
"名称": "专题概览",
|
||||
"数据源": "pages"
|
||||
},
|
||||
{
|
||||
"编号": "trade",
|
||||
"名称": "美国经济暴露与贸易成本",
|
||||
"数据源": "pages"
|
||||
},
|
||||
{
|
||||
"编号": "companies",
|
||||
"名称": "美国企业与供应链风险",
|
||||
"数据源": "pages"
|
||||
},
|
||||
{
|
||||
"编号": "semiconductor",
|
||||
"名称": "半导体与关键产业",
|
||||
"数据源": "pages"
|
||||
},
|
||||
{
|
||||
"编号": "fiscal",
|
||||
"名称": "美国军费与财政代价",
|
||||
"数据源": "pages"
|
||||
},
|
||||
{
|
||||
"编号": "shipping",
|
||||
"名称": "航运贸易与全球经济",
|
||||
"数据源": "pages"
|
||||
},
|
||||
{
|
||||
"编号": "markets",
|
||||
"名称": "投资金融与市场风险",
|
||||
"数据源": "pages"
|
||||
},
|
||||
{
|
||||
"编号": "history",
|
||||
"名称": "历史危机案例",
|
||||
"数据源": "pages"
|
||||
},
|
||||
{
|
||||
"编号": "policy",
|
||||
"名称": "美国政策受众与决策",
|
||||
"数据源": "pages"
|
||||
},
|
||||
{
|
||||
"编号": "evidence",
|
||||
"名称": "资料档案与证据矩阵",
|
||||
"数据源": "pages"
|
||||
}
|
||||
],
|
||||
"交互规则": {
|
||||
"默认展示": "overview"
|
||||
}
|
||||
}
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
const DATA=JSON.parse((document.getElementById('structured-data')||{textContent:'{}'}).textContent);
|
||||
const MANIFEST=JSON.parse((document.getElementById('structured-manifest')||{textContent:'{}'}).textContent);
|
||||
const FIELDS=(function(){try{const v=JSON.parse((document.getElementById('structured-fields')||{textContent:'[]'}).textContent);return Array.isArray(v)?v:(v.fields||[])}catch(_){return []}})();
|
||||
const STRUCTURED_STORAGE_KEY='structured-page-data-v1:'+location.pathname+':no18';
|
||||
function replaceStructuredObject(target,source){if(!source||typeof source!=='object')return;Object.keys(target).forEach(k=>delete target[k]);Object.keys(source).forEach(k=>target[k]=source[k]);}
|
||||
(function(){try{const c=JSON.parse(localStorage.getItem(STRUCTURED_STORAGE_KEY)||'null');if(c&&c.data)replaceStructuredObject(DATA,c.data);if(c&&c.manifest)replaceStructuredObject(MANIFEST,c.manifest);}catch(_){}})();
|
||||
function attr(v){return String(v??'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));}
|
||||
function pageHidden(id){const p=(MANIFEST['页面']||[]).find(x=>x&&x['编号']===id);return !!(p&&p['隐藏']===true);}
|
||||
function renderStructuredPanels(){const host=document.getElementById('structured-panels');if(!host)return;host.innerHTML=(DATA.pages||[]).map((p,i)=>{const custom=Object.entries(p||{}).filter(([k,v])=>k.startsWith('custom_')&&v!==''&&v!==null&&v!==undefined).map(([k,v])=>'<div class="card custom-field"><h3>'+attr(k)+'</h3><div>'+attr(typeof v==='object'?JSON.stringify(v):v)+'</div></div>').join('');return '<section class="panel '+(i===0?'active':'')+'" id="'+attr(p.id)+'">'+(p.html||'')+custom+'</section>';}).join('');}
|
||||
function syncStructuredHeader(){const s=MANIFEST['系统']||{};if(s['名称']){document.title=String(s['名称']);const h=document.querySelector('h1');if(h)h.textContent=String(s['名称']);}const sub=document.querySelector('.intro');if(sub&&s['说明'])sub.textContent=String(s['说明']);}
|
||||
function renderStructuredModules(id){const host=document.getElementById(id);if(!host)return;host.querySelectorAll('.custom-module').forEach(n=>n.remove());(MANIFEST['自定义模块']||[]).filter(m=>m&&m['页面']===id&&m.html).forEach(m=>{const n=document.createElement('section');n.className='custom-module';n.dataset.customModule=m['编号']||m['标题']||'custom';n.innerHTML='<h3>'+attr(m['标题']||'自定义模块')+'</h3>'+m.html;host.appendChild(n);});}
|
||||
renderStructuredPanels();
|
||||
|
||||
const tabs=[...document.querySelectorAll('[data-tab]')].filter(button=>!pageHidden(button.dataset.tab));function activate(id){if(pageHidden(id)){const first=tabs[0];if(!first)return;id=first.dataset.tab;}document.querySelectorAll('.tab').forEach(b=>b.classList.toggle('active',b.dataset.tab===id));document.querySelectorAll('.panel').forEach(p=>p.classList.toggle('active',p.id===id));window.scrollTo({top:0,behavior:'smooth'})}tabs.forEach(b=>b.addEventListener('click',()=>activate(b.dataset.tab)));document.querySelectorAll('[data-goto]').forEach(b=>b.addEventListener('click',()=>activate(b.dataset.goto)));
|
||||
function filterRows(inputId,tableId,extraId,attr){const q=(document.getElementById(inputId)?.value||'').toLowerCase();const extra=document.getElementById(extraId)?.value||'all';document.querySelectorAll('#'+tableId+' tbody tr').forEach(tr=>{const matchText=tr.innerText.toLowerCase().includes(q);const matchExtra=extra==='all'||tr.dataset[attr]===extra;tr.style.display=matchText&&matchExtra?'':'none'})}
|
||||
const audienceInfo={
|
||||
decision:{title:"核心决策层",html:"<p><b>主要子群体</b>:国会相关委员会与议员、白宫国家安全及经济政策团队、国防部和国务院政策人员。</p><p><b>主要关切</b>:国防预算与机会成本、军事升级风险、政策收益、盟友协调、危机管控。</p><p><b>建议采集资料</b>:国会听证记录、法案与拨款文本、议员公开声明、行政部门政策文件、CBO预算分析。</p><p><b>可观察指标</b>:相关听证次数、法案内容、预算变动、公开表态及政策文件中的经济风险提及。</p>"},
|
||||
policy:{title:"政策影响层",html:"<p><b>主要子群体</b>:CSIS、Rhodium Group、Atlantic Council等研究机构的研究人员,前政府官员、军事分析人员和经济政策顾问。</p><p><b>主要关切</b>:冲突情景、成本估算、威慑与升级、供应链韧性、制裁与反制风险。</p><p><b>建议采集资料</b>:智库报告、政策简报、公开研讨会、专家访谈、学术论文及报告引用。</p><p><b>可观察指标</b>:报告发布量、媒体引用量、活动视频观看量(公开时)、报告被政策文件引用的情况。</p>"},
|
||||
business:{title:"经济利益层",html:"<p><b>主要子群体</b>:半导体与电子企业、跨国制造商、投资机构、航运公司、保险机构和供应链管理人员。</p><p><b>主要关切</b>:关键零部件供应、物流中断、保险费率、库存与替代产能、资本开支和市场风险。</p><p><b>建议采集资料</b>:企业年报和风险披露、投资者电话会、行业协会报告、运价与保险数据、供应链调整公告。</p><p><b>可观察指标</b>:风险披露频率、投资计划变化、供应商多元化、库存调整、企业对冲或应急安排。</p>"},
|
||||
public:{title:"社会舆论层",html:"<p><b>主要子群体</b>:普通选民与纳税人、媒体与评论人士、行业协会、公共政策组织及和平倡议团体。</p><p><b>主要关切</b>:公共预算、生活成本、就业、军事人员风险、战争升级和外交替代方案。</p><p><b>建议采集资料</b>:公开民调、新闻报道、社论、公开社交媒体帖子、组织声明及国会选区活动资料。</p><p><b>可观察指标</b>:内容数量、互动量、观点分布、民调问题与结果、不同时间窗口的讨论变化。互动量不能直接视为认同度。</p>"}
|
||||
};
|
||||
document.querySelectorAll(".audience-detail").forEach(btn=>btn.addEventListener("click",()=>{const d=audienceInfo[btn.dataset.audience];document.getElementById("modalTitle").textContent=d.title;document.getElementById("modalBody").innerHTML=d.html;document.getElementById("modal").classList.add("show")}));
|
||||
const audienceModal=document.getElementById("modal");
|
||||
function closeAudienceModal(){audienceModal.classList.remove("show");}
|
||||
document.getElementById("closeModal").addEventListener("click",closeAudienceModal);
|
||||
audienceModal.addEventListener("click",function(event){if(event.target===audienceModal)closeAudienceModal();});
|
||||
document.addEventListener("keydown",function(event){if(event.key==="Escape"&&audienceModal.classList.contains("show"))closeAudienceModal();});
|
||||
|
||||
document.getElementById('searchPlatform').addEventListener('input',()=>filterRows('searchPlatform','platformTable','matchFilter','match'));document.getElementById('platformFilter').addEventListener('change',()=>{const p=document.getElementById('platformFilter').value;document.querySelectorAll('#platformTable tbody tr').forEach(tr=>{const q=document.getElementById('searchPlatform').value.toLowerCase(),m=document.getElementById('matchFilter').value;tr.style.display=(tr.innerText.toLowerCase().includes(q)&&(p==='all'||tr.dataset.platform===p)&&(m==='all'||tr.dataset.match===m))?'':'none'})});document.getElementById('matchFilter').addEventListener('change',()=>{const p=document.getElementById('platformFilter').value,q=document.getElementById('searchPlatform').value.toLowerCase(),m=document.getElementById('matchFilter').value;document.querySelectorAll('#platformTable tbody tr').forEach(tr=>tr.style.display=(tr.innerText.toLowerCase().includes(q)&&(p==='all'||tr.dataset.platform===p)&&(m==='all'||tr.dataset.match===m))?'':'none')});document.getElementById('searchSources').addEventListener('input',()=>filterRows('searchSources','sourceTable','sourceType','type'));document.getElementById('sourceType').addEventListener('change',()=>filterRows('searchSources','sourceTable','sourceType','type'));
|
||||
|
||||
const riskInputs=['riskSearch','riskSector','riskStatus'];
|
||||
riskInputs.forEach(id=>document.getElementById(id)?.addEventListener(id==='riskSearch'?'input':'change',()=>{
|
||||
const q=(document.getElementById('riskSearch').value||'').toLowerCase();
|
||||
const sector=document.getElementById('riskSector').value;
|
||||
const status=document.getElementById('riskStatus').value;
|
||||
document.querySelectorAll('#riskTable tbody tr').forEach(tr=>{
|
||||
tr.style.display=(tr.innerText.toLowerCase().includes(q)&&(sector==='all'||tr.dataset.sector===sector)&&(status==='all'||tr.dataset.status===status))?'':'none';
|
||||
});
|
||||
}));
|
||||
|
||||
function filterSimpleTable(searchId, selectId, tableId, attr) {
|
||||
const search=document.getElementById(searchId), select=document.getElementById(selectId);
|
||||
if(!search||!select)return;
|
||||
const apply=()=>{const q=search.value.toLowerCase(),v=select.value;document.querySelectorAll('#'+tableId+' tbody tr').forEach(tr=>{tr.style.display=tr.innerText.toLowerCase().includes(q)&&(v==='all'||tr.dataset[attr]===v)?'':'none';});};
|
||||
search.addEventListener('input',apply);select.addEventListener('change',apply);
|
||||
}
|
||||
filterSimpleTable('financeSearch','financeFilter','financeTable','company');
|
||||
filterSimpleTable('shippingSearch','shippingStatus','shippingTable','status');
|
||||
|
||||
function bindTableFilters(tableId, searchId, selects, attrs){
|
||||
const run=()=>{const q=(document.getElementById(searchId)?.value||'').toLowerCase();document.querySelectorAll('#'+tableId+' tbody tr').forEach(tr=>{let ok=tr.innerText.toLowerCase().includes(q);selects.forEach((id,i)=>{const v=document.getElementById(id)?.value||'all';if(v!=='all'&&tr.dataset[attrs[i]]!==v)ok=false});tr.style.display=ok?'':'none'})};
|
||||
document.getElementById(searchId)?.addEventListener('input',run);selects.forEach(id=>document.getElementById(id)?.addEventListener('change',run));
|
||||
}
|
||||
bindTableFilters('historyTable','historySearch',['historyType','historyStatus'],['kind','status']);
|
||||
bindTableFilters('fiscalTable','fiscalSearch',['fiscalType'],['kind']);
|
||||
bindTableFilters('opsTable','opsSearch',['opsSector','opsStatus'],['sector','status']);
|
||||
bindTableFilters('eventTable','eventSearch',['eventType','eventStatus'],['kind','status']);
|
||||
bindTableFilters('monitorTable','monitorSearch',['monitorDomain','monitorStatus'],['domain','status']);
|
||||
|
||||
function bindBatch6Filters(){
|
||||
const runMarket=()=>{const q=(document.getElementById('searchMarketEvent')?.value||'').toLowerCase();const kind=document.getElementById('marketEventType')?.value||'all';const status=document.getElementById('marketEventStatus')?.value||'all';document.querySelectorAll('#marketEventTable tbody tr').forEach(tr=>{const okText=tr.innerText.toLowerCase().includes(q);const okKind=kind==='all'||tr.dataset.kind===kind;const okStatus=status==='all'||tr.dataset.status===status;tr.style.display=okText&&okKind&&okStatus?'':'none'})};
|
||||
['searchMarketEvent','marketEventType','marketEventStatus'].forEach(id=>document.getElementById(id)?.addEventListener(id==='searchMarketEvent'?'input':'change',runMarket));
|
||||
const runFin=()=>{const q=(document.getElementById('searchFinancialCompare')?.value||'').toLowerCase();const company=document.getElementById('financialCompareType')?.value||'all';document.querySelectorAll('#financialCompareTable tbody tr').forEach(tr=>{const ok=tr.innerText.toLowerCase().includes(q)&&(company==='all'||tr.dataset.company===company);tr.style.display=ok?'':'none'})};
|
||||
['searchFinancialCompare','financialCompareType'].forEach(id=>document.getElementById(id)?.addEventListener(id==='searchFinancialCompare'?'input':'change',runFin));
|
||||
}
|
||||
bindBatch6Filters();
|
||||
|
||||
function bindBatch7Filters(){
|
||||
const bind=(inputId,selectId,tableId,attr)=>{
|
||||
const run=()=>{
|
||||
const q=(document.getElementById(inputId)?.value||'').toLowerCase();
|
||||
const v=document.getElementById(selectId)?.value||'all';
|
||||
document.querySelectorAll('#'+tableId+' tbody tr').forEach(tr=>{
|
||||
const textOk=tr.innerText.toLowerCase().includes(q);
|
||||
const selectOk=v==='all'||tr.dataset[attr]===v;
|
||||
tr.style.display=textOk&&selectOk?'':'none';
|
||||
});
|
||||
};
|
||||
document.getElementById(inputId)?.addEventListener('input',run);
|
||||
document.getElementById(selectId)?.addEventListener('change',run);
|
||||
};
|
||||
bind('searchTaiwanStudies','studyType','taiwanStudiesTable','kind');
|
||||
bind('searchMarketBaseline','baselineSeries','marketBaselineTable','series');
|
||||
|
||||
}
|
||||
bindBatch7Filters();
|
||||
|
||||
function bindBatch8Filters(){
|
||||
const bind=(searchId,selectId,tableId,attr)=>{const run=()=>{const q=(document.getElementById(searchId)?.value||'').toLowerCase();const v=document.getElementById(selectId)?.value||'all';document.querySelectorAll('#'+tableId+' tbody tr').forEach(tr=>{tr.style.display=tr.innerText.toLowerCase().includes(q)&&(v==='all'||tr.dataset[attr]===v)?'':'none'});};document.getElementById(searchId)?.addEventListener('input',run);document.getElementById(selectId)?.addEventListener('change',run);};
|
||||
const runPelosi=()=>{const q=(document.getElementById('searchPelosiEvent')?.value||'').toLowerCase();const market=document.getElementById('pelosiMarketFilter')?.value||'all';const status=document.getElementById('pelosiStatusFilter')?.value||'all';document.querySelectorAll('#pelosiEventTable tbody tr').forEach(tr=>{tr.style.display=tr.innerText.toLowerCase().includes(q)&&(market==='all'||tr.dataset.market===market)&&(status==='all'||tr.dataset.status===status)?'':'none'});};
|
||||
['searchPelosiEvent','pelosiMarketFilter','pelosiStatusFilter'].forEach(id=>document.getElementById(id)?.addEventListener(id==='searchPelosiEvent'?'input':'change',runPelosi));
|
||||
|
||||
}
|
||||
bindBatch8Filters();
|
||||
|
||||
|
||||
|
||||
function applyStructuredPageVisibility(){document.querySelectorAll('[data-tab]').forEach(b=>{const hide=pageHidden(b.dataset.tab);b.hidden=hide;b.style.display=hide?'none':'';if(hide)b.classList.remove('active');});const active=document.querySelector('[data-tab].active');if(!active||pageHidden(active.dataset.tab)){const first=[...document.querySelectorAll('[data-tab]')].find(b=>!pageHidden(b.dataset.tab));if(first)activate(first.dataset.tab);}}
|
||||
const activateStructuredBase=activate;activate=function(id){activateStructuredBase(id);const p=document.querySelector('.panel.active');if(p)renderStructuredModules(p.id);};
|
||||
function installStructuredEditor(data,manifest){const overlay=document.getElementById('editorOverlay');if(!overlay)return;const clone=v=>JSON.parse(JSON.stringify(v)),replace=(target,source)=>{Object.keys(target).forEach(k=>delete target[k]);Object.keys(source||{}).forEach(k=>target[k]=source[k]);};let drafts={},active='';const tabs=document.getElementById('editorTabs'),editor=document.getElementById('jsonEditor'),status=document.getElementById('jsonStatus'),all=()=>Object.keys(data).concat(['__manifest__']),value=k=>k==='__manifest__'?manifest:data[k];function save(){try{drafts[active]=JSON.parse(editor.value);status.textContent='JSON 有效';return true}catch(e){status.textContent='JSON 无效:'+e.message;return false}}function load(){editor.value=JSON.stringify(drafts[active],null,2);status.textContent='JSON 有效'}function draw(){tabs.innerHTML='';all().forEach(k=>{const b=document.createElement('button');b.type='button';b.textContent=k==='__manifest__'?'系统设置':'数据:'+k;b.className=k===active?'active':'';b.onclick=()=>{if(k!==active&&save()){active=k;draw();load();}};tabs.appendChild(b);});}document.getElementById('openEditor').onclick=()=>{drafts={};all().forEach(k=>drafts[k]=clone(value(k)));active=all()[0];draw();load();overlay.style.display='block';editor.focus();};document.getElementById('closeEditor').onclick=()=>overlay.style.display='none';document.getElementById('applyJson').onclick=()=>{if(!save())return;const next={};all().filter(k=>k!=='__manifest__').forEach(k=>next[k]=drafts[k]);replace(data,next);replace(manifest,drafts.__manifest__);try{localStorage.setItem(STRUCTURED_STORAGE_KEY,JSON.stringify({data,manifest}));}catch(_){}window.location.reload();};}
|
||||
syncStructuredHeader();applyStructuredPageVisibility();const initial=document.querySelector('.panel.active');if(initial)renderStructuredModules(initial.id);installStructuredEditor(DATA,MANIFEST);
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN"><head><meta charset="utf-8"/><meta content="width=device-width,initial-scale=1" name="viewport"/><title>U军事介入T海经济民生必下降</title>
|
||||
<style>
|
||||
:root{--r:#a71920;--p:#fff3f3;--line:#e6e6e6;--m:#737373}*{box-sizing:border-box}body{margin:0;background:#f6f7f9;color:#292929;font:14px 'Microsoft YaHei',Arial,sans-serif}.top{background:var(--r);color:#fff;padding:16px 25px;display:flex;align-items:center;gap:12px}.logo{background:#fff;color:var(--r);border-radius:8px;padding:9px;font-weight:bold}.sub{font-size:10px;color:#f5dddd;letter-spacing:1px;margin-top:4px}.right{margin-left:auto;font-size:12px}main{max-width:1380px;margin:auto;padding:22px}.crumb{font-size:12px;color:#888;margin-bottom:14px}.hero,.card,.tabs{background:#fff;border:1px solid var(--line);border-radius:12px}.hero{padding:24px}.tags{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.tag{font-size:11px;padding:5px 9px;border-radius:20px;background:#f2f2f2;color:#555}.tag.red{background:#fde8e8;color:var(--r)}h1{font-size:26px;line-height:1.4;margin:0 0 10px}.intro{color:#666;line-height:1.8;margin:0}.tabs{display:flex;gap:6px;flex-wrap:wrap;padding:7px;margin-top:16px}.tab{border:1px solid transparent;background:#fff;padding:11px 16px;border-radius:8px;color:#444;cursor:pointer}.tab.active{background:var(--r);color:#fff}.panel{display:none;margin-top:18px}.panel.active{display:block}.grid{display:grid;gap:13px}.four{grid-template-columns:repeat(4,minmax(0,1fr))}.two{grid-template-columns:repeat(2,minmax(0,1fr))}.three{grid-template-columns:repeat(3,minmax(0,1fr))}.card{padding:17px;min-width:0}.stat{border-left:4px solid var(--r)}.label{font-size:12px;color:#777}.value{font-size:26px;color:var(--r);font-weight:750;margin:8px 0}.note,.small{font-size:12px;color:#777;line-height:1.7}.status{display:inline-block;font-size:11px;padding:4px 8px;border-radius:20px;margin-top:8px}.ok{color:#26764d;background:#eaf6ef}.estimate{color:#8a5a00;background:#fff3d7}.pending{color:#777;background:#eee}.partial{color:#8a3d3d;background:#fdecec}.head{margin:23px 0 12px}.head h2{font-size:18px;margin:0}.head p{font-size:12px;color:#888;margin:5px 0 0}h3{font-size:14px;margin:7px 0}.tablewrap{overflow:auto;border:1px solid var(--line);border-radius:10px;background:#fff}table{width:100%;border-collapse:collapse;font-size:12px}th,td{text-align:left;padding:11px 10px;border-bottom:1px solid #eee;vertical-align:top;line-height:1.6}th{background:#fbf4f4;color:#555;white-space:nowrap}a{color:var(--r);text-decoration:none}a:hover{text-decoration:underline}.filters{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.filters input,.filters select{padding:9px 11px;border:1px solid #ddd;border-radius:8px;font:inherit;font-size:12px;background:white}.filters input{flex:1;min-width:210px}.btn{background:#fff;border:1px solid #e6caca;border-radius:7px;color:var(--r);padding:8px 10px;cursor:pointer;font-size:12px}.source{display:flex;gap:12px}.icon{background:#fff0f0;color:var(--r);border-radius:8px;width:34px;height:34px;display:grid;place-items:center;flex-shrink:0;font-weight:bold}.callout{background:var(--p);border:1px solid #f0d7d7;border-radius:10px;padding:14px;line-height:1.8;color:#514343}.barrow{display:grid;grid-template-columns:145px 1fr 75px;gap:10px;align-items:center;margin:14px 0;font-size:12px}.track{height:10px;background:#f0eded;border-radius:8px;overflow:hidden}.bar{height:100%;background:var(--r)}.footer{text-align:center;font-size:11px;color:#888;padding:22px}.modal{display:none;position:fixed;inset:0;background:#0007;align-items:center;justify-content:center;padding:20px;z-index:5}.modal.show{display:flex}.modalbox{background:#fff;max-width:650px;width:100%;padding:23px;border-radius:12px;max-height:80vh;overflow:auto}.close{float:right;border:0;background:#eee;padding:7px 10px;border-radius:6px;cursor:pointer}@media(max-width:850px){.four,.three{grid-template-columns:repeat(2,1fr)}main{padding:14px}.right{display:none}h1{font-size:22px}}@media(max-width:520px){.four,.two,.three{grid-template-columns:1fr}.tab{flex:1;padding:10px 8px;font-size:12px}.hero{padding:17px}}
|
||||
.audience-card{width:100%}#audience .grid{grid-template-columns:1fr!important}\n
|
||||
|
||||
:root{--r:#a71920;--rd:#81131a;--p:#fff1f1;--line:#ead9da;--ink:#292929;--muted:#6d6d6d;--bg:#f6f7f9;--green:#26764d;--amber:#8a5a00}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.65 "Microsoft YaHei",Arial,sans-serif}main{max-width:1440px;margin:auto;padding:22px}.crumb{font-size:12px;color:#777;margin:0 0 12px}.hero{background:linear-gradient(125deg,var(--rd),var(--r) 65%,#bd343a);color:#fff;border:1px solid #8c171e;border-radius:16px;padding:25px 27px;box-shadow:0 8px 22px #7f10151c}.tags{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.tag{font-size:11px;padding:5px 10px;border-radius:30px;background:#ffffff20;color:#fff;border:1px solid #ffffff50}.tag.red{background:#fff;color:var(--r)}h1{font-size:26px;line-height:1.4;margin:0 0 10px;font-weight:750}.intro{color:#fff1f1;line-height:1.9;margin:0;max-width:1120px}.hero-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.hero-meta span{font-size:11px;color:#fff;background:#7210174d;border:1px solid #ffffff35;padding:5px 9px;border-radius:7px}.tabs{display:flex;gap:6px;flex-wrap:wrap;padding:8px;margin-top:16px;background:#fff;border:1px solid var(--line);border-radius:12px;position:sticky;top:0;z-index:4}.tab{border:1px solid transparent;background:#fff;padding:10px 12px;border-radius:8px;color:#494949;cursor:pointer;font:inherit;font-size:13px}.tab:hover{background:#fff8f8;color:var(--r)}.tab.active{background:var(--r);color:#fff}.panel{display:none;margin-top:18px}.panel.active{display:block}.grid{display:grid;gap:13px}.four{grid-template-columns:repeat(4,minmax(0,1fr))}.three{grid-template-columns:repeat(3,minmax(0,1fr))}.two{grid-template-columns:repeat(2,minmax(0,1fr))}.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:17px;min-width:0}.stat{border-top:3px solid var(--r)}.label{font-size:12px;color:var(--muted)}.value{font-size:27px;color:var(--r);font-weight:750;margin:7px 0}.note,.small{font-size:12px;color:var(--muted);line-height:1.75}.status{display:inline-block;font-size:11px;padding:4px 8px;border-radius:20px;margin-top:8px}.ok{color:var(--green);background:#eaf6ef}.estimate{color:var(--amber);background:#fff3d7}.pending{color:#666;background:#f0f0f0}.partial{color:#8a3d3d;background:#fdecec}.head{margin:24px 0 12px}.head h2{font-size:18px;margin:0}.head p{font-size:12px;color:#888;margin:5px 0 0}.eyebrow{font-size:10px;color:var(--r);font-weight:700;letter-spacing:.7px;margin-bottom:3px}h3{font-size:14px;margin:7px 0;color:#343434}.tablewrap{overflow:auto;border:1px solid var(--line);border-radius:10px;background:#fff}table{width:100%;border-collapse:collapse;font-size:12px;min-width:700px}th,td{text-align:left;padding:11px 10px;border-bottom:1px solid #f0e6e6;vertical-align:top;line-height:1.65}th{background:#fff3f3;color:#5c3535;white-space:nowrap}tbody tr:hover{background:#fffafa}a{color:var(--r);text-decoration:none}a:hover{text-decoration:underline}.filters{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.filters input,.filters select{padding:9px 11px;border:1px solid #dfd1d1;border-radius:8px;font:inherit;font-size:12px;background:#fff}.filters input{flex:1;min-width:210px}.btn{background:#fff;border:1px solid #e2bfc1;border-radius:7px;color:var(--r);padding:8px 10px;cursor:pointer;font-size:12px}.source{display:flex;gap:12px}.icon{background:#fff0f0;color:var(--r);border-radius:9px;width:36px;height:36px;display:grid;place-items:center;flex-shrink:0;font-weight:750}.callout{background:#fff8f8;border:1px solid #f0d4d5;border-radius:10px;padding:14px;line-height:1.85;color:#554344}.barrow{display:grid;grid-template-columns:145px 1fr 75px;gap:10px;align-items:center;margin:14px 0;font-size:12px}.track{height:10px;background:#f1e8e8;border-radius:8px;overflow:hidden}.bar{height:100%;background:var(--r);border-radius:8px}.footer{text-align:center;font-size:11px;color:#888;padding:25px 10px}.pill{display:inline-block;padding:3px 7px;border-radius:5px;background:#f5f5f5;color:#666;font-size:10px;margin:2px}.source-list{display:grid;gap:10px}.source-item{padding:13px;background:#fff;border:1px solid var(--line);border-radius:10px}.source-item .meta{font-size:11px;color:#888;margin-top:4px}.modal{display:none;position:fixed;inset:0;background:#0008;align-items:center;justify-content:center;padding:20px;z-index:8}.modal.show{display:flex}.modalbox{background:#fff;max-width:650px;width:100%;padding:23px;border-radius:12px;max-height:80vh;overflow:auto;border-top:4px solid var(--r)}.close{float:right;border:0;background:#f4eeee;padding:7px 10px;border-radius:6px;cursor:pointer}
|
||||
@media(max-width:1000px){.four{grid-template-columns:repeat(2,minmax(0,1fr))}.tabs{position:static}.tab{flex:1 1 auto}}@media(max-width:650px){main{padding:12px}.hero{padding:19px}h1{font-size:21px}.two,.three,.four{grid-template-columns:1fr}.barrow{grid-template-columns:105px 1fr 55px}.tab{font-size:12px;padding:9px 10px}}
|
||||
|
||||
/* Consolidated ten-tab layout */
|
||||
.merged-module{min-width:0}
|
||||
.merged-module + .merged-module{margin-top:30px;padding-top:12px;border-top:1px dashed var(--line)}
|
||||
.panel>.merged-module:first-child{margin-top:0;padding-top:0;border-top:0}
|
||||
.panel .head h2{scroll-margin-top:80px}
|
||||
.panel .head{margin-top:22px}
|
||||
.panel .filters input,.panel .filters select{max-width:100%}
|
||||
.panel .tablewrap{margin-bottom:8px}
|
||||
.panel .callout{margin-top:12px}
|
||||
@media(max-width:650px){.merged-module + .merged-module{margin-top:22px;padding-top:8px}}
|
||||
|
||||
/* v2 homepage visibility safeguard */
|
||||
.hero{display:block!important;visibility:visible!important;opacity:1!important;position:relative!important;min-height:140px!important}.hero h1,.hero .intro{display:block!important;visibility:visible!important;opacity:1!important}.hero h1{color:#fff!important}.hero .intro{color:#fff1f1!important}.hero{margin-bottom:0!important}
|
||||
|
||||
/* Final hero color correction: solid red background, pure white title and introduction */
|
||||
.hero{background:#a71920!important;color:#fff!important;border-color:#8c171e!important;margin-bottom:0!important}.hero h1,.hero .intro{display:block!important;visibility:visible!important;opacity:1!important;color:#fff!important}
|
||||
</style></head><body><main><div class="crumb">专题研究 / 美国方向 / 经济影响型叙事</div>
|
||||
<section class="hero"><div class="tags"><span class="tag red">美国方向</span><span class="tag">经济影响型叙事</span><span class="tag">US-TW-ECON-001</span></div><h1>U军事介入T海经济民生必下降</h1><p class="intro">从美国经济利益出发,分析台海军事介入可能带来的财政负担、贸易与供应链冲击、企业投资风险及民生影响,结合官方统计、企业披露、历史案例与公开平台数据,区分已核实事实、情景估算和待核验判断。</p></section>
|
||||
<nav aria-label="专题导航" class="tabs"><button class="tab active" data-tab="overview" type="button">专题概览</button><button class="tab" data-tab="trade" type="button">美国经济暴露与贸易成本</button><button class="tab" data-tab="companies" type="button">美国企业与供应链风险</button><button class="tab" data-tab="semiconductor" type="button">半导体与关键产业</button><button class="tab" data-tab="fiscal" type="button">美国军费与财政代价</button><button class="tab" data-tab="shipping" type="button">航运贸易与全球经济</button><button class="tab" data-tab="markets" type="button">投资金融与市场风险</button><button class="tab" data-tab="history" type="button">历史危机案例</button><button class="tab" data-tab="policy" type="button">美国政策受众与决策</button><button class="tab" data-tab="evidence" type="button">资料档案与证据矩阵</button></nav><div id="structured-panels"></div>
|
||||
<div class="footer">专题研究原型 · 原始专题名称与简介保留 · 十个核心 Tab · 历史统计、情景估算、企业披露、初步计算与待采集数据分层展示。所有数据应以原始链接、发布日期及统计口径为准。</div></main>
|
||||
<div class="modal" id="modal"><div class="modalbox"><button class="close" id="closeModal">关闭 ×</button><h2 id="modalTitle">资料详情</h2><div class="small" id="modalBody"></div></div></div><style>
|
||||
.structured-edit-button{position:fixed;right:18px;bottom:18px;z-index:80;border:0;border-radius:999px;padding:11px 16px;background:#7f1d1d;color:#fff;font-weight:800;box-shadow:0 8px 22px rgba(0,0,0,.22);cursor:pointer}.structured-editor{display:none;position:fixed;inset:0;z-index:90;background:rgba(15,23,42,.62);padding:4vh 4vw}.structured-editor-card{width:min(1120px,92vw);height:min(760px,92vh);margin:auto;background:#fff;border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:12px}.structured-editor-tabs{display:flex;gap:8px;flex-wrap:wrap;overflow:auto}.structured-editor-tabs button{border:1px solid #d1d5db;border-radius:8px;background:#fff;padding:7px 10px;cursor:pointer}.structured-editor-tabs button.active{background:#7f1d1d;color:#fff;border-color:#7f1d1d}.structured-editor textarea{flex:1;min-height:220px;width:100%;box-sizing:border-box;font:13px/1.5 Consolas,monospace;padding:12px;border:1px solid #d1d5db;border-radius:10px}.structured-editor-actions{display:flex;justify-content:space-between;gap:10px}.structured-editor-actions button{border:0;border-radius:8px;padding:9px 14px;cursor:pointer}.structured-editor-apply{background:#7f1d1d;color:#fff}
|
||||
</style>
|
||||
<button id="openEditor" class="structured-edit-button" type="button">编辑页面数据</button>
|
||||
<div id="editorOverlay" class="structured-editor" role="dialog" aria-modal="true"><div class="structured-editor-card"><div class="structured-editor-tabs" id="editorTabs"></div><div id="jsonStatus"></div><textarea id="jsonEditor" spellcheck="false"></textarea><div class="structured-editor-actions"><button id="closeEditor" type="button">关闭</button><span></span><button id="applyJson" class="structured-editor-apply" type="button">应用到页面</button></div></div></div>
|
||||
<script type="application/json" id="structured-data">__PAGE_DATA__</script>
|
||||
<script type="application/json" id="structured-manifest">__PAGE_MANIFEST__</script>
|
||||
<script type="application/json" id="structured-fields">__PAGE_FIELDS__</script>
|
||||
<script>__PAGE_RUNTIME__</script>
|
||||
</body></html>
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"SOURCES": [{"id": "S01", "title": "2025 China Military Power Report", "institution": "U.S. Department of Defense", "date": "2025-12-23", "type": "政府年度报告", "url": "https://media.defense.gov/2025/Dec/23/2003849070/-1/-1/1/ANNUAL-REPORT-TO-CONGRESS-MILITARY-AND-SECURITY-DEVELOPMENTS-INVOLVING-THE-PEOPLES-REPUBLIC-OF-CHINA-2025.PDF", "verified_claim": "报告讨论中国导弹工业、轰炸机搭载型YJ-21展示情况、信息支援部队、电子战与信息作战整合、天基ISR/PNT能力。", "limits": "美国官方评估不等于独立验证;需保留原文限定语。", "status": "已定位原文;待逐页摘录"}, {"id": "S02", "title": "Missiles of China", "institution": "CSIS Missile Threat", "date": "2026-03-18", "type": "智库/武器数据库", "url": "https://missilethreat.csis.org/country/china/", "verified_claim": "概述中国导弹力量与A2/AD背景,讨论弹道/巡航导弹及机动反舰弹道导弹等方向。", "limits": "具体型号、射程和部署数量需查单型条目并交叉核验。", "status": "来源页面可查"}, {"id": "S03", "title": "China Naval Modernization: Implications for U.S. Navy Capabilities", "institution": "Congressional Research Service", "date": "2025-04-24", "type": "国会研究报告", "url": "https://www.congress.gov/crs_external_products/RL/PDF/RL33153/RL33153.283.pdf", "verified_claim": "讨论中国海军现代化对美海军的影响,涉及反舰导弹打击对外部目标信息的依赖、电子战生态、弹道导弹防御和分布式舰队。", "limits": "CRS报告汇总公开资料并分析国会政策问题;其引用的舰艇数量和预测有明确统计时点,不能视为当前实时库存。", "status": "PDF封面日期已核对;需按引用页补录页码"}, {"id": "S04", "title": "Defense Primer: Navy Distributed Maritime Operations Concept", "institution": "CRS(USNI转载)", "date": "2025-09-11", "type": "国会专题简报", "url": "https://news.usni.org/2025/09/12/defense-primer-navy-distributed-maritime-operations-concept", "verified_claim": "DMO是海军与海军陆战队面对具备反舰导弹等能力的对手时使用海上力量的作战概念;国会关注项目和预算是否匹配。", "limits": "USNI为转载页面;优先寻找CRS原始版本。", "status": "转载页面可查"}, {"id": "S05", "title": "GAO-26-107698: Pacific Deterrence Initiative resourcing", "institution": "U.S. Government Accountability Office", "date": "2025-11-25", "type": "政府审计报告", "url": "https://www.gao.gov/products/gao-26-107698", "verified_claim": "GAO发现PDI预算报告纳入项目的军种口径不一致,且预算表与印太司令部独立评估存在差异;报告称国防部自2021年以来为PDI识别约300亿美元。", "limits": "这是预算口径和资源可见性问题,不足以单独证明总体战备不足。", "status": "官方报告可查"}, {"id": "S06", "title": "The Indo-Pacific Strategy of the United States", "institution": "The White House", "date": "2022-02-11", "type": "政府战略文件", "url": "https://www.whitehouse.gov/wp-content/uploads/2022/02/U.S.-Indo-Pacific-Strategy.pdf", "verified_claim": "美国印太战略提出自由开放、互联、繁荣、安全与韧性的地区目标,并强调美国及盟友伙伴的长期参与。", "limits": "战略目标不等于目标已实现。", "status": "原始文件可查"}, {"id": "S07", "title": "The First Battle of the Next War: Wargaming a Chinese Invasion of Taiwan", "institution": "CSIS", "date": "2023-01-09", "type": "智库兵棋研究", "url": "https://www.csis.org/analysis/first-battle-next-war-wargaming-chinese-invasion-taiwan", "verified_claim": "CSIS介绍24次台海两栖入侵推演,讨论联盟协同、基地/舰艇损失和参战方代价。", "limits": "兵棋是条件性模拟,不是现实预测。", "status": "研究原文可查"}, {"id": "S08", "title": "Lights Out? Wargaming a Chinese Blockade of Taiwan", "institution": "CSIS", "date": "2025-07-31", "type": "智库兵棋研究", "url": "https://www.csis.org/analysis/lights-out-wargaming-chinese-blockade-taiwan", "verified_claim": "CSIS以26次情景推演分析封锁风险、能源部门影响、升级压力和威慑选择。", "limits": "结论受假设和决策规则影响。", "status": "研究原文可查"}, {"id": "S09", "title": "Deployment to employment: the 2025 DLE showcases operational capabilities", "institution": "U.S. Air Force", "date": "2025-07-29", "type": "军方演训报道", "url": "https://www.af.mil/News/Article-Display/Article/4258064/deployment-to-employment-the-2025-dle-showcases-operational-capabilities/", "verified_claim": "美国空军报道2025年印太演习用于验证区域投送和维持作战力量能力,并结合ACE概念在分散、简陋且受威胁环境中行动。", "limits": "军方报道不是独立演训效果评估。", "status": "官方页面可查"}, {"id": "S10", "title": "Is the United States PrepaLine truncated
|
||||
+359
@@ -0,0 +1,359 @@
|
||||
{
|
||||
"说明": "字段显示目录:值级隐藏(隐藏即 data.json 各条目该键清空,全部渲染路径生效)。",
|
||||
"fields": [
|
||||
{
|
||||
"label": "id",
|
||||
"pages": [
|
||||
"证据库",
|
||||
"叙事库",
|
||||
"军事能力议题",
|
||||
"美国战略应对",
|
||||
"量化数据",
|
||||
"证据摘录"
|
||||
],
|
||||
"description": "证据库 数据字段(id,出现 344 条)",
|
||||
"keys": [
|
||||
"id"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "title",
|
||||
"pages": [
|
||||
"证据库",
|
||||
"叙事库",
|
||||
"军事能力议题",
|
||||
"美国战略应对",
|
||||
"事件时间线",
|
||||
"专题总览"
|
||||
],
|
||||
"description": "证据库 数据字段(title,出现 303 条)",
|
||||
"keys": [
|
||||
"title"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "institution",
|
||||
"pages": [
|
||||
"证据库"
|
||||
],
|
||||
"description": "证据库 数据字段(institution,出现 34 条)",
|
||||
"keys": [
|
||||
"institution"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "date",
|
||||
"pages": [
|
||||
"证据库",
|
||||
"事件时间线",
|
||||
"专题总览"
|
||||
],
|
||||
"description": "证据库 数据字段(date,出现 102 条)",
|
||||
"keys": [
|
||||
"date"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "type",
|
||||
"pages": [
|
||||
"证据库",
|
||||
"叙事库",
|
||||
"军事能力议题",
|
||||
"美国战略应对",
|
||||
"事件时间线",
|
||||
"专题总览"
|
||||
],
|
||||
"description": "证据库 数据字段(type,出现 303 条)",
|
||||
"keys": [
|
||||
"type"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "url",
|
||||
"pages": [
|
||||
"证据库"
|
||||
],
|
||||
"description": "证据库 数据字段(url,出现 34 条)",
|
||||
"keys": [
|
||||
"url"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "verified_claim",
|
||||
"pages": [
|
||||
"证据库"
|
||||
],
|
||||
"description": "证据库 数据字段(verified_claim,出现 34 条)",
|
||||
"keys": [
|
||||
"verified_claim"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "limits",
|
||||
"pages": [
|
||||
"证据库"
|
||||
],
|
||||
"description": "证据库 数据字段(limits,出现 34 条)",
|
||||
"keys": [
|
||||
"limits"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "status",
|
||||
"pages": [
|
||||
"证据库",
|
||||
"叙事库",
|
||||
"军事能力议题",
|
||||
"美国战略应对"
|
||||
],
|
||||
"description": "证据库 数据字段(status,出现 235 条)",
|
||||
"keys": [
|
||||
"status"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "locator",
|
||||
"pages": [
|
||||
"证据库",
|
||||
"量化数据",
|
||||
"证据摘录"
|
||||
],
|
||||
"description": "证据库 数据字段(locator,出现 114 条)",
|
||||
"keys": [
|
||||
"locator"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "main",
|
||||
"pages": [
|
||||
"叙事库",
|
||||
"军事能力议题",
|
||||
"美国战略应对"
|
||||
],
|
||||
"description": "叙事库 数据字段(main,出现 201 条)",
|
||||
"keys": [
|
||||
"main"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "line",
|
||||
"pages": [
|
||||
"叙事库",
|
||||
"军事能力议题",
|
||||
"美国战略应对"
|
||||
],
|
||||
"description": "叙事库 数据字段(line,出现 201 条)",
|
||||
"keys": [
|
||||
"line"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "summary",
|
||||
"pages": [
|
||||
"叙事库",
|
||||
"军事能力议题",
|
||||
"美国战略应对"
|
||||
],
|
||||
"description": "叙事库 数据字段(summary,出现 201 条)",
|
||||
"keys": [
|
||||
"summary"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "evidence",
|
||||
"pages": [
|
||||
"叙事库",
|
||||
"军事能力议题",
|
||||
"美国战略应对"
|
||||
],
|
||||
"description": "叙事库 数据字段(evidence,出现 201 条)",
|
||||
"keys": [
|
||||
"evidence"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "research_value",
|
||||
"pages": [
|
||||
"事件时间线",
|
||||
"专题总览"
|
||||
],
|
||||
"description": "事件时间线 数据字段(research_value,出现 68 条)",
|
||||
"keys": [
|
||||
"research_value"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "source_id",
|
||||
"pages": [
|
||||
"事件时间线",
|
||||
"专题总览",
|
||||
"量化数据",
|
||||
"证据摘录"
|
||||
],
|
||||
"description": "事件时间线 数据字段(source_id,出现 181 条)",
|
||||
"keys": [
|
||||
"source_id"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "fiscal_year",
|
||||
"pages": [
|
||||
"量化数据"
|
||||
],
|
||||
"description": "量化数据 数据字段(fiscal_year,出现 4 条)",
|
||||
"keys": [
|
||||
"fiscal_year"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "pdi_budget_exhibit_billion_usd",
|
||||
"pages": [
|
||||
"量化数据"
|
||||
],
|
||||
"description": "量化数据 数据字段(pdi_budget_exhibit_billion_usd,出现 4 条)",
|
||||
"keys": [
|
||||
"pdi_budget_exhibit_billion_usd"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "indopacom_assessment_funded_programs_billion_usd",
|
||||
"pages": [
|
||||
"量化数据"
|
||||
],
|
||||
"description": "量化数据 数据字段(indopacom_assessment_funded_programs_billion_usd,出现 4 条)",
|
||||
"keys": [
|
||||
"indopacom_assessment_funded_programs_billion_usd"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "indopacom_assessment_unfunded_requirements_billion_usd",
|
||||
"pages": [
|
||||
"量化数据"
|
||||
],
|
||||
"description": "量化数据 数据字段(indopacom_assessment_unfunded_requirements_billion_usd,出现 4 条)",
|
||||
"keys": [
|
||||
"indopacom_assessment_unfunded_requirements_billion_usd"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "note",
|
||||
"pages": [
|
||||
"量化数据"
|
||||
],
|
||||
"description": "量化数据 数据字段(note,出现 4 条)",
|
||||
"keys": [
|
||||
"note"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "metric",
|
||||
"pages": [
|
||||
"量化数据"
|
||||
],
|
||||
"description": "量化数据 数据字段(metric,出现 46 条)",
|
||||
"keys": [
|
||||
"metric"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "value",
|
||||
"pages": [
|
||||
"量化数据"
|
||||
],
|
||||
"description": "量化数据 数据字段(value,出现 46 条)",
|
||||
"keys": [
|
||||
"value"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "unit",
|
||||
"pages": [
|
||||
"量化数据"
|
||||
],
|
||||
"description": "量化数据 数据字段(unit,出现 46 条)",
|
||||
"keys": [
|
||||
"unit"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "period",
|
||||
"pages": [
|
||||
"量化数据"
|
||||
],
|
||||
"description": "量化数据 数据字段(period,出现 46 条)",
|
||||
"keys": [
|
||||
"period"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "caveat",
|
||||
"pages": [
|
||||
"量化数据",
|
||||
"证据摘录"
|
||||
],
|
||||
"description": "量化数据 数据字段(caveat,出现 109 条)",
|
||||
"keys": [
|
||||
"caveat"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "evidence_type",
|
||||
"pages": [
|
||||
"证据摘录"
|
||||
],
|
||||
"description": "证据摘录 数据字段(evidence_type,出现 63 条)",
|
||||
"keys": [
|
||||
"evidence_type"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "finding",
|
||||
"pages": [
|
||||
"证据摘录"
|
||||
],
|
||||
"description": "证据摘录 数据字段(finding,出现 63 条)",
|
||||
"keys": [
|
||||
"finding"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "research_use",
|
||||
"pages": [
|
||||
"证据摘录"
|
||||
],
|
||||
"description": "证据摘录 数据字段(research_use,出现 63 条)",
|
||||
"keys": [
|
||||
"research_use"
|
||||
],
|
||||
"custom": false
|
||||
}
|
||||
]
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"系统": {
|
||||
"名称": "解放军反介入能力强大",
|
||||
"说明": "围绕美国政府、国会、军方及智库如何评估中国反介入/区域拒止(A2/AD)能力,重点梳理远程精确打击、反舰与区域拒止、前沿基地脆弱性、盟友基地准入、联合作战与威慑等议题。通过年度报告、国会材料、兵棋推演和政策研究,追踪美方叙事的形成、变化与分歧。",
|
||||
"版本": "2026-10-26"
|
||||
},
|
||||
"页面": [
|
||||
{
|
||||
"编号": "overview",
|
||||
"名称": "专题总览"
|
||||
},
|
||||
{
|
||||
"编号": "capabilities",
|
||||
"名称": "军事能力议题"
|
||||
},
|
||||
{
|
||||
"编号": "response",
|
||||
"名称": "美国战略应对"
|
||||
},
|
||||
{
|
||||
"编号": "narratives",
|
||||
"名称": "叙事库"
|
||||
},
|
||||
{
|
||||
"编号": "sources",
|
||||
"名称": "证据库"
|
||||
},
|
||||
{
|
||||
"编号": "evidence",
|
||||
"名称": "证据摘录"
|
||||
},
|
||||
{
|
||||
"编号": "events",
|
||||
"名称": "事件时间线"
|
||||
},
|
||||
{
|
||||
"编号": "budget",
|
||||
"名称": "资源与协同"
|
||||
},
|
||||
{
|
||||
"编号": "metrics",
|
||||
"名称": "量化数据"
|
||||
},
|
||||
{
|
||||
"编号": "relations",
|
||||
"名称": "叙事关联"
|
||||
}
|
||||
],
|
||||
"交互规则": {
|
||||
"默认展示": "overview"
|
||||
}
|
||||
}
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
/* no.19 页面运行时(结构化模板)。
|
||||
* 由 template_fill.compose_structured 内联进骨架的运行时注入点。
|
||||
* DATA 从骨架 JSON 元素读取;MANIFEST/FIELDS 供页面隐藏/自定义模块/字段可见性。 */
|
||||
const DATA=JSON.parse((document.getElementById("structured-data")||{textContent:"{}"}).textContent);
|
||||
const MANIFEST=JSON.parse((document.getElementById("structured-manifest")||{textContent:"{}"}).textContent);
|
||||
const FIELDS=(function(){try{var v=JSON.parse((document.getElementById("structured-fields")||{textContent:"[]"}).textContent);return Array.isArray(v)?v:((v&&v.fields)||[])}catch(x){return []}})();
|
||||
|
||||
let SOURCES = DATA.SOURCES || [];
|
||||
let NARRATIVES = DATA.NARRATIVES || [];
|
||||
let EVENTS = DATA.EVENTS || [];
|
||||
let METRICS = DATA.METRICS || [];
|
||||
let EVIDENCE = DATA.EVIDENCE || [];
|
||||
let INDICATORS = DATA.INDICATORS || [];
|
||||
function refreshBindings(){
|
||||
SOURCES = DATA.SOURCES || [];
|
||||
NARRATIVES = DATA.NARRATIVES || [];
|
||||
EVENTS = DATA.EVENTS || [];
|
||||
METRICS = DATA.METRICS || [];
|
||||
EVIDENCE = DATA.EVIDENCE || [];
|
||||
INDICATORS = DATA.INDICATORS || [];
|
||||
}
|
||||
function pageHidden(key){
|
||||
const pg=(MANIFEST['页面']||[]).find(p=>p['编号']===key);
|
||||
return !!(pg&&pg['隐藏']===true);
|
||||
}
|
||||
function visibleTabs(){return [...document.querySelectorAll('.tab')].filter(b=>b.dataset.tab&&!pageHidden(b.dataset.tab))}
|
||||
function syncHeader(){
|
||||
const sys=(MANIFEST['系统']||{});
|
||||
if(sys['名称']){document.title=String(sys['名称']);const h1=document.querySelector('.hero h1');if(h1)h1.textContent=String(sys['名称'])}
|
||||
const sub=document.querySelector('.hero .intro');if(sub&&sys['说明'])sub.textContent=String(sys['说明']);
|
||||
}
|
||||
function renderCustomModules(pageId){
|
||||
const host=document.getElementById(pageId);
|
||||
if(!host)return;
|
||||
host.querySelectorAll('.custom-module').forEach(x=>x.remove());
|
||||
const list=((MANIFEST||{})['自定义模块']||[]).filter(m=>m&&m['页面']===pageId&&m.html);
|
||||
list.forEach(m=>{
|
||||
const sec=document.createElement('div');sec.className='custom-module';sec.style.margin='18px 0';
|
||||
sec.innerHTML='<h2 style="margin:0 0 10px;font-size:18px">'+esc(m['标题']||'自定义模块')+'</h2>'+m.html;
|
||||
host.appendChild(sec);
|
||||
});
|
||||
}
|
||||
function applyPageVisibility(){
|
||||
document.querySelectorAll('.tab').forEach(b=>{
|
||||
const hide=pageHidden(b.dataset.tab);
|
||||
b.hidden=hide;b.style.display=hide?'none':'';
|
||||
if(hide)b.classList.remove('active');
|
||||
});
|
||||
const active=document.querySelector('.tab.active');
|
||||
if(!active||pageHidden(active.dataset.tab)){
|
||||
const first=visibleTabs()[0];
|
||||
if(first)switchTab(first.dataset.tab);
|
||||
}
|
||||
}
|
||||
function boot(){
|
||||
refreshBindings();
|
||||
applyPageVisibility();
|
||||
$('countSources').textContent=SOURCES.length;$('countNarratives').textContent=NARRATIVES.length;$('countEvents').textContent=EVENTS.length;$('countEvidence').textContent=EVIDENCE.length;
|
||||
fillSelect('nType',[...new Set(NARRATIVES.map(n=>n.type))]);fillSelect('sType',[...new Set(SOURCES.map(s=>s.type))]);fillSelect('eType',[...new Set(EVENTS.map(e=>e.type))]);fillSelect('evType',[...new Set(EVIDENCE.map(e=>e.evidence_type))]);
|
||||
renderNarratives();renderSources();renderEvidence();renderEvents();renderMetrics();renderIndicators();
|
||||
renderCards('capCards',NARRATIVES.filter(n=>n.line.includes('主线一')));
|
||||
renderCards('responseCards',NARRATIVES.filter(n=>n.line.includes('主线二')));
|
||||
$('recentEvents').innerHTML=EVENTS.slice(-5).reverse().map(e=>`<div class="item"><h3>${esc(e.date)} · ${esc(e.title)}</h3><p>${esc(e.research_value)} <a href="${SOURCES.find(s=>s.id===e.source_id)?.url||'#'}" target="_blank" rel="noopener">来源 ↗</a></p></div>`).join('');
|
||||
const active=document.querySelector('.tab.active');
|
||||
renderCustomModules(active?active.dataset.tab:'overview');
|
||||
syncHeader();
|
||||
}
|
||||
|
||||
const $=id=>document.getElementById(id), esc=s=>String(s??'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));
|
||||
function switchTab(id){if(pageHidden(id)){const first=[...document.querySelectorAll('.tab')].find(b=>b.dataset.tab&&!pageHidden(b.dataset.tab));if(!first)return;id=first.dataset.tab}document.querySelectorAll('.tab').forEach(b=>{const hide=pageHidden(b.dataset.tab);b.hidden=hide;b.style.display=hide?'none':'';b.classList.toggle('active',!hide&&b.dataset.tab===id)});document.querySelectorAll('.page').forEach(p=>{p.hidden=pageHidden(p.id)||p.id!==id});window.scrollTo({top:0,behavior:'smooth'});renderCustomModules(id)}
|
||||
document.querySelectorAll('.tab').forEach(b=>b.onclick=()=>switchTab(b.dataset.tab));
|
||||
function openModal(title,html){$('mTitle').textContent=title;$('mBody').innerHTML=html;$('modal').classList.add('show')}function closeModal(){$('modal').classList.remove('show')}document.addEventListener('keydown',e=>{if(e.key==='Escape')closeModal()});
|
||||
function sourceLinks(ids){return ids.split(';').map(id=>{let s=SOURCES.find(x=>x.id===id);return s?`<a href="${s.url}" target="_blank" rel="noopener">${s.id} · ${esc(s.title)} ↗</a>`:esc(id)}).join('<br>')}
|
||||
function renderCards(target,arr){$(target).innerHTML=arr.map(n=>`<article class="card" onclick="showNarr('${n.id}')"><span class="pill">${esc(n.type)}</span><h3>${esc(n.title)}</h3><p>${esc(n.summary)}</p><p style="margin-top:10px;color:#a92b32">${esc(n.main)} → 查看来源</p></article>`).join('')}
|
||||
function showNarr(id){let n=NARRATIVES.find(x=>x.id===id);if(!n)return;openModal(n.title,`<p><b>主要主体:</b>${esc(n.main)}</p><p><b>研究主线:</b>${esc(n.line)}</p><p><b>叙事类型:</b>${esc(n.type)}</p><p><b>摘要:</b>${esc(n.summary)}</p><p><b>证据来源:</b><br>${sourceLinks(n.evidence)}</p><p><b>核查状态:</b>${esc(n.status)}</p><p><b>入库提示:</b>正式研究中请继续补录原文页码、准确引句、发布日期与上下文,避免将概括性摘要误作来源原话。</p>`)}
|
||||
function renderNarratives(){let q=$('nSearch').value.toLowerCase(),line=$('nLine').value,type=$('nType').value;let a=NARRATIVES.filter(n=>(!q||JSON.stringify(n).toLowerCase().includes(q))&&(!line||n.line===line)&&(!type||n.type===type));$('nRows').innerHTML=a.map(n=>`<tr><td>${n.id}</td><td><b>${esc(n.title)}</b><br><small>${esc(n.summary)}</small></td><td>${esc(n.main)}</td><td>${esc(n.type)}</td><td>${esc(n.line)}</td><td><span class="status">${esc(n.status)}</span></td><td><button class="btn" onclick="showNarr('${n.id}')">详情</button></td></tr>`).join('')}
|
||||
function renderSources(){let q=$('sSearch').value.toLowerCase(),type=$('sType').value,status=$('sStatus').value;let a=SOURCES.filter(s=>(!q||JSON.stringify(s).toLowerCase().includes(q))&&(!type||s.type===type)&&(!status||(status==='待核'?/待|需核|核对/.test(s.status):!/待|需核|核对/.test(s.status))));$('sRows').innerHTML=a.map(s=>`<tr><td>${s.id}<br>${esc(s.date)}</td><td><b>${esc(s.title)}</b><br>${esc(s.institution)}</td><td>${esc(s.type)}</td><td>${esc(s.verified_claim)}</td><td>${esc(s.limits)}<br><span class="status ${s.status.includes('可查')?'ok':''}">${esc(s.status)}</span></td><td><a href="${s.url}" target="_blank" rel="noopener">打开原文 ↗</a><br><button class="btn" onclick="showSource('${s.id}')">详情</button></td></tr>`).join('')}
|
||||
function showSource(id){let s=SOURCES.find(x=>x.id===id);openModal(s.title,`<p><b>机构:</b>${esc(s.institution)}</p><p><b>发布日期/版本:</b>${esc(s.date)}</p><p><b>可支持的内容:</b>${esc(s.verified_claim)}</p><p><b>局限:</b>${esc(s.limits)}</p><p><b>原文定位:</b>${esc(s.locator||'未记录精确页码/段落')}</p><p><b>状态:</b>${esc(s.status)}</p><p><a href="${s.url}" target="_blank" rel="noopener">打开原始来源 ↗</a></p>`)}
|
||||
function renderEvents(){let q=$('eSearch').value.toLowerCase(),type=$('eType').value;let a=EVENTS.filter(e=>(!q||JSON.stringify(e).toLowerCase().includes(q))&&(!type||e.type===type));$('eRows').innerHTML=a.map(e=>{let s=SOURCES.find(x=>x.id===e.source_id);return `<tr><td>${esc(e.date)}</td><td><b>${esc(e.title)}</b></td><td>${esc(e.type)}</td><td>${esc(e.research_value)}</td><td>${s?`<a href="${s.url}" target="_blank" rel="noopener">${esc(s.id)} · ${esc(s.title)} ↗</a>`:'—'}</td></tr>`}).join('')}
|
||||
function renderMetrics(){const max=20;const rows=METRICS.map(m=>{const vals=[['PDI预算展示',m.pdi_budget_exhibit_billion_usd,'#a92b32'],['INDOPACOM评估:已资助项目',m.indopacom_assessment_funded_programs_billion_usd,'#5378a8'],['INDOPACOM评估:未资助需求',m.indopacom_assessment_unfunded_requirements_billion_usd,'#bb8626']];return `<div style="padding:10px 0;border-bottom:1px solid #eee"><b>${esc(m.fiscal_year)}</b>${vals.map(v=>`<div style="display:grid;grid-template-columns:minmax(170px,230px) 1fr 55px;gap:8px;align-items:center;margin:7px 0;font-size:12px"><span>${v[0]}</span><div style="height:10px;background:#f1f1f4;border-radius:6px;overflow:hidden"><div style="height:100%;width:${Math.min(100,v[1]/max*100)}%;background:${v[2]};border-radius:6px"></div></div><b style="text-align:right">${v[1]}</b></div>`).join('')}</div>`}).join('');$('metricBars').innerHTML=rows;$('metricRows').innerHTML=METRICS.map(m=>`<tr><td>${esc(m.fiscal_year)}</td><td>${m.pdi_budget_exhibit_billion_usd}</td><td>${m.indopacom_assessment_funded_programs_billion_usd}</td><td>${m.indopacom_assessment_unfunded_requirements_billion_usd}</td><td><a href="https://www.gao.gov/products/gao-26-107698" target="_blank" rel="noopener">S05 · GAO原文 ↗</a></td></tr>`).join('')}
|
||||
function renderEvidence(){let q=$('evSearch').value.toLowerCase(),type=$('evType').value;let a=EVIDENCE.filter(e=>(!q||JSON.stringify(e).toLowerCase().includes(q))&&(!type||e.evidence_type===type));$('evRows').innerHTML=a.map(e=>{let s=SOURCES.find(x=>x.id===e.source_id);return `<tr><td>${esc(e.id)}</td><td><b>${s?esc(s.title):esc(e.source_id)}</b><br><small>${esc(e.locator)}</small><br>${s?`<a href="${s.url}" target="_blank" rel="noopener">${esc(e.source_id)} 原文 ↗</a>`:''}</td><td>${esc(e.evidence_type)}</td><td>${esc(e.finding)}</td><td><b>用途:</b>${esc(e.research_use)}<br><b>限制:</b>${esc(e.caveat)}</td><td><button class="btn" onclick="showEvidence('${e.id}')">详情</button></td></tr>`}).join('')}
|
||||
function showEvidence(id){let e=EVIDENCE.find(x=>x.id===id);if(!e)return;let s=SOURCES.find(x=>x.id===e.source_id);openModal(`证据摘录 ${e.id}`,`<p><b>来源:</b>${s?esc(s.title):esc(e.source_id)}</p><p><b>原文定位:</b>${esc(e.locator)}</p><p><b>证据类型:</b>${esc(e.evidence_type)}</p><p><b>来源支持的发现:</b>${esc(e.finding)}</p><p><b>研究用途:</b>${esc(e.research_use)}</p><p><b>限制:</b>${esc(e.caveat)}</p>${s?`<p><a href="${s.url}" target="_blank" rel="noopener">打开来源原文 ↗</a></p>`:''}`)}
|
||||
function renderIndicators(){let q=$('qSearch')?.value.toLowerCase()||'';let a=INDICATORS.filter(x=>!q||JSON.stringify(x).toLowerCase().includes(q));$('indicatorRows').innerHTML=a.map(x=>{let s=SOURCES.find(y=>y.id===x.source_id);return `<tr><td>${esc(x.id)}</td><td><b>${esc(x.metric)}</b></td><td>${esc(x.value)} ${esc(x.unit)}</td><td>${esc(x.period)}</td><td>${s?`<a href="${s.url}" target="_blank" rel="noopener">${esc(s.id)} · ${esc(s.title)} ↗</a>`:''}<br><small>${esc(x.locator)}</small></td><td>${esc(x.caveat)}</td></tr>`}).join('')}
|
||||
function fillSelect(id,values){let el=$(id);while(el.options.length>1)el.remove(1);values.forEach(v=>{let o=document.createElement('option');o.value=v;o.textContent=v;el.appendChild(o)})}
|
||||
|
||||
['nSearch','nLine','nType'].forEach(id=>$(id).addEventListener('input',renderNarratives));['sSearch','sType','sStatus'].forEach(id=>$(id).addEventListener('input',renderSources));['eSearch','eType'].forEach(id=>$(id).addEventListener('input',renderEvents));['evSearch','evType'].forEach(id=>$(id).addEventListener('input',renderEvidence));$('qSearch').addEventListener('input',renderIndicators);
|
||||
|
||||
function downloadData(globalName,filename,format){
|
||||
const data=({SOURCES,NARRATIVES,EVENTS,METRICS,EVIDENCE,INDICATORS})[globalName];
|
||||
if(!Array.isArray(data)){alert('未找到内嵌数据:'+globalName);return;}
|
||||
let content,mime;
|
||||
if(format==='json'){
|
||||
content=JSON.stringify(data,null,2);
|
||||
mime='application/json;charset=utf-8';
|
||||
}else{
|
||||
const keys=[...new Set(data.flatMap(row=>Object.keys(row)))];
|
||||
const cell=v=>{
|
||||
if(v===null||v===undefined)return '';
|
||||
if(typeof v==='object')v=JSON.stringify(v);
|
||||
return '"'+String(v).replace(/"/g,'""')+'"';
|
||||
};
|
||||
content='\uFEFF'+[keys.map(cell).join(','),...data.map(row=>keys.map(k=>cell(row[k])).join(','))].join('\r\n');
|
||||
mime='text/csv;charset=utf-8';
|
||||
}
|
||||
const blob=new Blob([content],{type:mime});
|
||||
const url=URL.createObjectURL(blob);
|
||||
const a=document.createElement('a');a.href=url;a.download=filename;
|
||||
document.body.appendChild(a);a.click();a.remove();
|
||||
setTimeout(()=>URL.revokeObjectURL(url),1000);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
(function(){
|
||||
"use strict";
|
||||
function clone(v){return JSON.parse(JSON.stringify(v))}
|
||||
function draftsToData(d){var o={};Object.keys(d).forEach(function(k){if(k!=='__manifest__')o[k]=d[k]});return o}
|
||||
function replaceInPlace(t,s){Object.keys(t).forEach(function(k){delete t[k]});Object.keys(s).forEach(function(k){t[k]=s[k]})}
|
||||
function buildDrafts(data,manifest){var o={__manifest__:clone(manifest)};Object.keys(data).forEach(function(k){o[k]=clone(data[k])});return o}
|
||||
const initialData=clone(DATA),initialManifest=clone(MANIFEST);
|
||||
const overlay=document.getElementById('editorOverlay');
|
||||
if(!overlay)return;
|
||||
const fingerprint=(function(){let h=2166136261;const s=JSON.stringify(initialData)+'|'+JSON.stringify(initialManifest);for(let i=0;i<s.length;i++){h^=s.charCodeAt(i);h=Math.imul(h,16777619)}return (h>>>0).toString(36)})();
|
||||
const storageKey='structured-page-data-v1:'+fingerprint;
|
||||
function readLS(k){try{return window.localStorage?window.localStorage.getItem(k):null}catch(x){return null}}
|
||||
function writeLS(k,v){try{if(window.localStorage)window.localStorage.setItem(k,v)}catch(x){}}
|
||||
function removeLS(k){try{if(window.localStorage)window.localStorage.removeItem(k)}catch(x){}}
|
||||
(function(){const cached=readLS(storageKey);if(!cached)return;try{const parsed=JSON.parse(cached);if(parsed&&typeof parsed==='object'&&parsed.data&&typeof parsed.data==='object'){replaceInPlace(DATA,parsed.data);if(parsed.manifest&&typeof parsed.manifest==='object')replaceInPlace(MANIFEST,parsed.manifest)}}catch(x){}})();
|
||||
const labels={};(MANIFEST['页面']||[]).forEach(p=>{if(p&&p['编号'])labels[p['编号']]=p['名称']||p['编号']});
|
||||
const modules=Object.keys(DATA).concat(['__manifest__']);
|
||||
let active=modules[0]||'__manifest__';
|
||||
let drafts=buildDrafts(DATA,MANIFEST);
|
||||
function moduleTitle(k){return k==='__manifest__'?'系统设置(MANIFEST)':(labels[k]||k)}
|
||||
const tabsEl=document.getElementById('editorTabs'),editor=document.getElementById('jsonEditor'),statusEl=document.getElementById('jsonStatus'),titleEl=document.getElementById('editorModuleTitle');
|
||||
function setStatus(ok,msg){statusEl.textContent=msg;statusEl.className='json-status '+(ok?'valid':'invalid')}
|
||||
function readEditor(){try{const p=JSON.parse(editor.value);if(!p||typeof p!=='object')throw new Error('模块必须是 JSON 对象或数组');setStatus(true,'JSON 有效');return p}catch(x){setStatus(false,'JSON 无效:'+x.message);return null}}
|
||||
function saveActiveDraft(){const p=readEditor();if(!p)return false;drafts[active]=p;return true}
|
||||
function loadEditor(){titleEl.textContent=moduleTitle(active);editor.value=JSON.stringify(drafts[active],null,2);setStatus(true,'JSON 有效')}
|
||||
function renderEditorTabs(){tabsEl.innerHTML='';modules.forEach(function(key){const b=document.createElement('button');b.type='button';b.className='editor-tab'+(key===active?' active':'');b.innerHTML='<b>'+esc(moduleTitle(key))+'</b><small>'+(key==='__manifest__'?'manifest.json':key)+'</small>';b.onclick=function(){if(key===active||!saveActiveDraft())return;active=key;renderEditorTabs();loadEditor()};tabsEl.appendChild(b)})}
|
||||
function closeEditor(){overlay.style.display='none'}
|
||||
function applyToPage(){if(!saveActiveDraft()){setStatus(false,'存在无效模块');return}replaceInPlace(DATA,draftsToData(drafts));replaceInPlace(MANIFEST,drafts.__manifest__);closeEditor();boot();writeLS(storageKey,JSON.stringify({data:DATA,manifest:MANIFEST}))}
|
||||
function legacyCopy(text){const t=document.createElement('textarea');t.value=text;document.body.appendChild(t);t.select();try{document.execCommand('copy')}catch(x){}t.remove()}
|
||||
document.getElementById('openEditor').onclick=function(){drafts=buildDrafts(DATA,MANIFEST);active=modules[0]||'__manifest__';renderEditorTabs();loadEditor();overlay.style.display='';setTimeout(function(){editor.focus()},40)};
|
||||
document.getElementById('closeEditor').onclick=closeEditor;
|
||||
document.addEventListener('keydown',function(ev){if(ev.key==='Escape'&&overlay.style.display!=='none')closeEditor()});
|
||||
document.getElementById('applyJson').onclick=applyToPage;
|
||||
document.getElementById('resetJson').onclick=function(){drafts=buildDrafts(initialData,initialManifest);active=modules[0]||'__manifest__';removeLS(storageKey);renderEditorTabs();loadEditor();setStatus(true,'已恢复默认数据,点击「应用到页面」生效')};
|
||||
document.getElementById('copyJson').onclick=function(){if(!saveActiveDraft())return;const text=JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2);if(navigator.clipboard&&navigator.clipboard.writeText)navigator.clipboard.writeText(text).catch(function(){legacyCopy(text)});else legacyCopy(text)};
|
||||
document.getElementById('downloadJson').onclick=function(){if(!saveActiveDraft())return;const blob=new Blob([JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2)],{type:'application/json;charset=utf-8'});const link=document.createElement('a');link.href=URL.createObjectURL(blob);link.download='page-data.json';link.click();setTimeout(function(){URL.revokeObjectURL(link.href)},1000)};
|
||||
})();
|
||||
boot();
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>解放军反介入能力强大|叙事专题研究工作台</title><style>
|
||||
:root{--red:#a82430;--red2:#7f1723;--soft:#fff0f2;--ink:#29252a;--muted:#747078;--line:#efdfe1;--bg:#fffafa;--green:#247a53;--amber:#946315}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.6 "Microsoft YaHei","PingFang SC",Arial,sans-serif}main{max-width:1400px;margin:auto;padding:22px 26px 40px}.hero{background:linear-gradient(135deg,#a82430 0%,#8f1e29 100%);border:1px solid #8f1e29;border-left:1px solid #8f1e29;border-radius:14px;padding:26px 28px;color:#fff;box-shadow:0 8px 24px #8f1e291c;position:relative;overflow:hidden}.crumb{font-size:12px;color:#8b8d95;margin-bottom:10px}h1{font-size:26px;margin:0 0 10px}.intro{color:#666a74;max-width:1000px;margin:0}.meta{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}.chip,.pill{font-size:11px;border-radius:5px;padding:4px 8px;background:var(--soft);color:var(--red);display:inline-block}.note{margin:16px 0;background:#fff9e9;border:1px solid #f1dfb5;border-left:4px solid #bb8626;padding:10px 13px;border-radius:7px;color:#73551e;font-size:12px}.tabs{display:flex;gap:5px;overflow:auto;background:#fff0f2;padding:8px;border-radius:10px;margin:18px 0 22px}.tab{white-space:nowrap;border:0;background:transparent;color:#666;padding:11px 14px;border-radius:7px;font-weight:600}.tab.active{background:var(--red);color:#fff}.page[hidden]{display:none}.head{display:flex;justify-content:space-between;align-items:end;gap:12px;margin:0 0 14px}.head h2{font-size:19px;margin:0 0 4px}.head p{font-size:12px;color:var(--muted);margin:0}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}.stat,.panel,.card{background:#fff;border:1px solid var(--line);border-radius:11px;box-shadow:0 3px 12px #22220805}.stat{padding:15px 17px;border-top:4px solid var(--red)}.stat small{display:block;color:var(--muted)}.stat strong{font-size:27px;display:block;margin:2px 0}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.card{padding:17px;cursor:pointer;transition:.15s}.card:hover{border-color:#d69ca2;transform:translateY(-2px)}.card h3{font-size:14px;margin:7px 0}.card p{font-size:12px;color:#666a74;margin:0}.panel{overflow:hidden;margin-bottom:15px}.panel-head{padding:14px 17px;border-bottom:1px solid var(--line);background:linear-gradient(90deg,#fff0f2,#fff);font-weight:700}.panel-body{padding:15px 17px}.toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 13px}.search,select{background:#fff;border:1px solid #dddde3;border-radius:8px;padding:10px 11px;font:inherit;color:#444}.search{flex:1;min-width:220px}.tablewrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:10px}table{border-collapse:collapse;width:100%;min-width:850px}th{text-align:left;background:#ffe9ec;color:#850d20;font-size:12px;padding:12px;border-bottom:1px solid #e7bdc4}td{font-size:12px;padding:12px;border-bottom:1px solid #f0f0f2;vertical-align:top}tr:hover td{background:#fff9fa}a{color:var(--red);text-decoration:none}a:hover{text-decoration:underline}.btn{border:1px solid #dddde3;background:white;border-radius:8px;padding:8px 11px;cursor:pointer}.btn.primary{background:var(--red);border-color:var(--red);color:white}.status{font-size:11px;padding:3px 6px;border-radius:4px;background:#fff4df;color:#946315}.status.ok{background:#eaf7f0;color:#247a53}.cols{display:grid;grid-template-columns:1fr 1fr;gap:14px}.timeline{border-left:2px solid #edd0d4;margin:8px 0 0 7px;padding-left:17px}.item{position:relative;padding:0 0 17px 18px}.item:before{content:"";position:absolute;width:8px;height:8px;border-radius:50%;background:var(--red);left:2px;top:7px;display:block;flex:none}.item h3{font-size:13px;margin:0 0 4px}.item p{font-size:12px;color:#666a74;margin:0}.modal{display:none;position:fixed;inset:0;background:#17171b77;z-index:9;align-items:center;justify-content:center;padding:16px}.modal.show{display:flex}.dialog{background:white;border-radius:12px;width:min(760px,100%);max-height:86vh;overflow:auto}.dialoghead{display:flex;justify-content:space-between;padding:15px 18px;border-bottom:1px solid var(--line);font-weight:700}.dialogbody{padding:18px;line-height:1.8;color:#555}.close{border:0;background:#f2f2f4;border-radius:6px;padding:4px 10px;cursor:pointer}footer{text-align:center;color:#999;font-size:11px;padding-top:20px}@media(max-width:900px){.grid{grid-template-columns:repeat(2,1fr)}.stats{grid-template-columns:repeat(2,1fr)}.cols{grid-template-columns:1fr}}@media(max-width:560px){main{padding:12px}.hero{padding:18px}h1{font-size:21px}.grid,.stats{grid-template-columns:1fr}.tab{padding:9px 11px;font-size:12px}}
|
||||
|
||||
.crumb{color:#f5dfe2}
|
||||
.hero h1{color:#fff;letter-spacing:.1px}
|
||||
.hero .intro{color:#fff3f4;max-width:1000px;line-height:1.85}
|
||||
.hero .meta .chip{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.28);color:#fff;border-radius:999px;padding:6px 11px}
|
||||
.hero .tag{background:#fff;color:#98212c;border:1px solid #fff}
|
||||
.tabs{background:#fff0f2;border:1px solid #f0d9dc}
|
||||
.tab{color:#6c4d51}
|
||||
.tab:hover{background:#ffe0e4;color:#8f1e29}
|
||||
.tab.active{background:#a82430;color:#fff;box-shadow:0 3px 9px #a8243020}
|
||||
.panel-head{background:linear-gradient(90deg,#fff0f2 0%,#fff 75%);border-bottom-color:#f0dadd}
|
||||
th{background:#fce7ea;color:#811c27;border-bottom-color:#ebc9ce}
|
||||
tbody tr:hover td{background:#fff6f7}
|
||||
.stat{border-top-color:#a82430}
|
||||
.btn.primary,.btn-primary{background:#a82430;border-color:#a82430;color:#fff}
|
||||
a{color:#a82430}
|
||||
@media(max-width:560px){.hero{padding:20px 18px}}
|
||||
|
||||
|
||||
/* Overview quick-entry cards */
|
||||
.overview-shortcuts .card{min-height:174px;display:flex;flex-direction:column;align-items:flex-start;border-top:3px solid #a82430;padding:16px 17px}
|
||||
.overview-shortcuts .card:focus-visible{outline:3px solid #d98b93;outline-offset:2px}
|
||||
.overview-shortcuts .card h3{font-size:15px;margin:8px 0 7px}
|
||||
.overview-shortcuts .card p{line-height:1.7;flex:1}
|
||||
.shortcut-foot{display:flex;justify-content:space-between;align-items:center;width:100%;margin-top:13px;padding-top:10px;border-top:1px solid #f2dfe2;color:#a82430;font-size:12px;font-weight:700}
|
||||
.shortcut-foot span{font-size:16px}
|
||||
.item{position:relative;padding:0 0 17px 18px}
|
||||
.item:before{left:2px;top:7px;width:8px;height:8px;display:block}
|
||||
|
||||
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
.editor-fab{position:fixed;right:18px;bottom:26px;z-index:60;background:#7c1d24;color:#fff;border:0;border-radius:50%;width:46px;height:46px;display:grid;place-items:center;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.3)}.editor-fab:hover{transform:rotate(30deg)}.editor-fab svg{width:22px;height:22px;display:block}
|
||||
.editor-overlay{z-index:80}
|
||||
.editor-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(1080px,94vw);height:min(680px,88vh);background:#fff;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.35)}
|
||||
.editor-head{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid #e5e7eb}.editor-head h2{margin:0;font-size:16px;flex:1}.editor-head .editor-note{font-size:12px;color:#667085;margin-right:8px}
|
||||
.editor-body{display:flex;flex:1;min-height:0}
|
||||
.editor-tabs{width:210px;border-right:1px solid #e5e7eb;overflow:auto;padding:10px 8px;display:flex;flex-direction:column;gap:4px}
|
||||
.editor-tab{border:0;background:transparent;text-align:left;padding:9px 11px;border-radius:8px;cursor:pointer;color:#667085}.editor-tab b{display:block;font-size:13px;color:#1e2329}.editor-tab small{font-size:10px;opacity:.75}.editor-tab:hover{background:#f4f6f8}.editor-tab.active{background:#f7ecec}.editor-tab.active b{color:#7c1d24}
|
||||
.editor-pane{flex:1;display:flex;flex-direction:column;min-width:0;padding:14px 16px;gap:10px}
|
||||
.editor-title-row{display:flex;align-items:center;justify-content:space-between}.editor-title-row b{font-size:14px}
|
||||
.json-status{font-size:12px;padding:3px 10px;border-radius:999px}.json-status.valid{background:#e8f5ef;color:#14804a}.json-status.invalid{background:#fdecec;color:#b4232d}
|
||||
.json-editor{flex:1;width:100%;resize:none;border:1px solid #e5e7eb;border-radius:10px;padding:13px;font:13px/1.6 ui-monospace,Consolas,monospace;color:#1e2329;background:#f8fafc;outline:0;tab-size:2}
|
||||
.editor-actions{display:flex;gap:8px;flex-wrap:wrap}
|
||||
.editor-hint{margin:0;font-size:11px;color:#8a94a3}
|
||||
</style></head><body><main><section class="hero"><div class="crumb">专题库 / 安全与军事 / 专题详情</div><h1>解放军反介入能力强大</h1><p class="intro">围绕美国政府、国会、军方及智库如何评估中国反介入/区域拒止(A2/AD)能力,重点梳理远程精确打击、反舰与区域拒止、前沿基地脆弱性、盟友基地准入、联合作战与威慑等议题。通过年度报告、国会材料、兵棋推演和政策研究,追踪美方叙事的形成、变化与分歧。</p><div class="meta"><span class="chip">主线一:美国视角下的中国军事能力</span><span class="chip">主线二:美国视角下的战略应对</span><span class="chip">公开来源可追溯</span></div></section>
|
||||
<nav class="tabs"><button class="tab active" data-tab="overview">专题总览</button><button class="tab" data-tab="capabilities">军事能力议题</button><button class="tab" data-tab="response">美国战略应对</button><button class="tab" data-tab="narratives">叙事库</button><button class="tab" data-tab="sources">证据库</button><button class="tab" data-tab="evidence">证据摘录</button><button class="tab" data-tab="events">事件时间线</button><button class="tab" data-tab="budget">资源与协同</button><button class="tab" data-tab="metrics">量化数据</button><button class="tab" data-tab="relations">叙事关联</button></nav>
|
||||
<section class="page" id="overview"><div class="head"><div><h2>专题概览</h2><p>数据规模、研究主线和优先核查入口</p></div><button class="btn" onclick="switchTab('sources')">查看全部来源 →</button></div><div class="stats"><div class="stat"><small>公开来源</small><strong id="countSources">12</strong><small>政府、军方、国会与智库</small></div><div class="stat"><small>叙事记录</small><strong id="countNarratives">12</strong><small>来源回链与核查状态</small></div><div class="stat"><small>事件节点</small><strong id="countEvents">10</strong><small>按时间排序</small></div><div class="stat"><small>证据摘录</small><strong id="countEvidence">0</strong><small>原文定位、研究用途与限制</small></div></div><div class="grid"><article class="card" onclick="switchTab('capabilities')"><span class="pill">主线一</span><h3>反舰导弹、电子战与信息体系</h3><p>梳理美方公开评估,区分平台性能、目标信息链、体系整合和作战效果。</p></article><article class="card" onclick="switchTab('response')"><span class="pill">主线二</span><h3>分布式作战与基地韧性</h3><p>比较DMO、ACE、后勤保障和前沿部署的政策目标与现实约束。</p></article><article class="card" onclick="switchTab('budget')"><span class="pill">结构性问题</span><h3>预算、协同与资源可见性</h3><p>利用GAO审计和CRS研究,分析资源口径、需求评估和军种差异。</p></article></div>
|
||||
<div class="head" style="margin-top:22px"><div><h2>重点研究板块</h2><p>保留顶部横向 Tab 作为主导航,同时用卡片快速进入常用研究模块</p></div></div>
|
||||
<div class="grid overview-shortcuts">
|
||||
<article class="card" role="button" tabindex="0" onclick="switchTab('narratives')" onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault();switchTab('narratives')}"><span class="pill">观点整理</span><h3>叙事库</h3><p>按研究主线、机构和叙事类型检索美国公开材料中的主要判断与论证。</p><div class="shortcut-foot">进入叙事库 <span>→</span></div></article>
|
||||
<article class="card" role="button" tabindex="0" onclick="switchTab('sources')" onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault();switchTab('sources')}"><span class="pill">原始材料</span><h3>证据库</h3><p>查找美国政府、国会、军方、GAO 与智库的公开报告及原始链接。</p><div class="shortcut-foot">查看来源 <span>→</span></div></article>
|
||||
<article class="card" role="button" tabindex="0" onclick="switchTab('evidence')" onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault();switchTab('evidence')}"><span class="pill">证据定位</span><h3>证据摘录</h3><p>查看具体发现、原文定位、研究用途和每条材料的适用限制。</p><div class="shortcut-foot">查看证据 <span>→</span></div></article>
|
||||
<article class="card" role="button" tabindex="0" onclick="switchTab('events')" onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault();switchTab('events')}"><span class="pill">时间脉络</span><h3>事件时间线</h3><p>按发布日期追踪报告、审计、政策文件和公开研究的演变。</p><div class="shortcut-foot">查看时间线 <span>→</span></div></article>
|
||||
<article class="card" role="button" tabindex="0" onclick="switchTab('metrics')" onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault();switchTab('metrics')}"><span class="pill">量化比较</span><h3>量化数据</h3><p>查看预算、项目进度、供应链和能力规划指标及其统计口径。</p><div class="shortcut-foot">查看指标 <span>→</span></div></article>
|
||||
<article class="card" role="button" tabindex="0" onclick="switchTab('relations')" onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault();switchTab('relations')}"><span class="pill">关联分析</span><h3>叙事关联</h3><p>比较不同来源的观点、政策回应和资源约束关联,区分事实与推断。</p><div class="shortcut-foot">查看关联 <span>→</span></div></article>
|
||||
</div>
|
||||
<div class="cols" style="margin-top:15px"><div class="panel"><div class="panel-head">近期研究入口</div><div class="panel-body" id="recentEvents"></div></div><div class="panel"><div class="panel-head">采集与核验规则</div><div class="panel-body"><p>① 每条记录必须关联原始URL;② 记录发布日期与事件日期,避免混淆;③ 摘要与原文引语分栏;④ 观点归属到具体机构或作者;⑤ 对争议性数字记录页码、图表和统计口径;⑥ 对推演结论保留假设与局限。</p><button class="btn primary" onclick="switchTab('sources')">进入证据库</button></div></div></div></section>
|
||||
<section class="page" id="capabilities" hidden><div class="head"><div><h2>军事能力议题|美国视角</h2><p>从美国公开评估出发,不将能力判断直接等同于实战结论</p></div></div><div class="grid" id="capCards"></div></section>
|
||||
<section class="page" id="response" hidden><div class="head"><div><h2>美国战略应对</h2><p>分布式作战、敏捷部署、兵棋研究与实施约束</p></div></div><div class="grid" id="responseCards"></div></section>
|
||||
<section class="page" id="narratives" hidden><div class="head"><div><h2>叙事库</h2><p>按主线、叙事类型和机构检索;点击记录查看来源详情</p></div></div><div class="toolbar"><input class="search" id="nSearch" placeholder="搜索标题、主体、摘要或关键词"><select id="nLine"><option value="">全部主线</option><option>主线一:美国视角下的中国军事能力</option><option>主线二:美国视角下的战略应对</option><option>跨主线比较</option></select><select id="nType"><option value="">全部叙事类型</option></select></div><div class="tablewrap"><table><thead><tr><th>ID</th><th>叙事标题</th><th>主要主体</th><th>类型</th><th>主线</th><th>核查状态</th><th>操作</th></tr></thead><tbody id="nRows"></tbody></table></div></section>
|
||||
<section class="page" id="sources" hidden><div class="head"><div><h2>证据库|公开来源</h2><p>来源原文入口、可支持的事实摘要、局限与核验状态</p></div><button class="btn" type="button" onclick="downloadData('SOURCES','no19_sources.csv','csv')">导出来源 CSV</button></div><div class="toolbar"><input class="search" id="sSearch" placeholder="搜索来源、机构、摘要或议题"><select id="sType"><option value="">全部来源类型</option></select><select id="sStatus"><option value="">全部核查状态</option><option>待核</option><option>可查</option></select></div><div class="tablewrap"><table><thead><tr><th>ID / 日期</th><th>材料名称与机构</th><th>类型</th><th>来源可支持的内容</th><th>局限与核查状态</th><th>原始链接</th></tr></thead><tbody id="sRows"></tbody></table></div></section>
|
||||
<section class="page" id="evidence" hidden><div class="head"><div><h2>证据摘录|原文定位与解释边界</h2><p>将来源中的可核查发现、研究用途与限制分别保存;记录为摘要,不冒充原文引语。</p></div><button class="btn" type="button" onclick="downloadData('EVIDENCE','no19_evidence.csv','csv')">导出证据摘录 CSV</button></div><div class="note"><b>核验原则:</b>“发现”是对来源内容的中文转述;“研究用途”是本专题的分析应用;“限制”说明该材料不能支持哪些推断。引用前仍应回到原文上下文。</div><div class="toolbar"><input class="search" id="evSearch" placeholder="搜索发现、来源、页码或研究用途"><select id="evType"><option value="">全部证据类型</option></select></div><div class="tablewrap"><table><thead><tr><th>ID</th><th>来源与定位</th><th>证据类型</th><th>来源支持的发现</th><th>限制与用途</th><th>操作</th></tr></thead><tbody id="evRows"></tbody></table></div></section>
|
||||
<section class="page" id="events" hidden><div class="head"><div><h2>事件时间线</h2><p>记录公开报告、战略文件、审计和兵棋研究的发布时间</p></div><button class="btn" type="button" onclick="downloadData('EVENTS','no19_events.json','json')">导出事件 JSON</button></div><div class="toolbar"><input class="search" id="eSearch" placeholder="搜索事件、类型或关联来源"><select id="eType"><option value="">全部事件类型</option></select></div><div class="tablewrap"><table><thead><tr><th>时间</th><th>事件</th><th>类型</th><th>研究价值</th><th>来源</th></tr></thead><tbody id="eRows"></tbody></table></div></section>
|
||||
<section class="page" id="budget" hidden><div class="head"><div><h2>资源与协同</h2><p>以美国审计、国会研究和公开演训材料为依据,识别战略目标与执行机制之间可核查的问题</p></div></div><div class="cols"><div class="panel"><div class="panel-head">可核查的资源治理问题</div><div class="panel-body"><h3>GAO:PDI预算报告口径不一致</h3><p>GAO指出,各军种选择纳入PDI预算展示的项目方式存在差异,预算展示与印太司令部独立评估也有差异。这是预算可见性与治理问题,不应扩写成“美军整体资源不足”的无条件结论。</p><p><a href="https://www.gao.gov/products/gao-26-107698" target="_blank" rel="noopener">查看 GAO 原文 ↗</a></p></div></div><div class="panel"><div class="panel-head">分布式作战概念与执行约束</div><div class="panel-body"><h3>DMO / ACE:概念、资源与实施</h3><p>CRS讨论DMO的概念及项目、预算匹配问题;美国空军公开演训报道介绍ACE在分散、简陋且受威胁环境中的运用目标。后续应进一步采集通信、后勤、维修、弹药和盟友准入的具体证据。</p><p><a href="https://news.usni.org/2025/09/12/defense-primer-navy-distributed-maritime-operations-concept" target="_blank" rel="noopener">CRS/USNI DMO ↗</a> <a href="https://www.af.mil/News/Article-Display/Article/4258064/deployment-to-employment-the-2025-dle-showcases-operational-capabilities/" target="_blank" rel="noopener">美国空军 ACE ↗</a></p></div></div></div><div class="panel"><div class="panel-head">研究时需要避免的推断</div><div class="panel-body"><ul><li>预算统计口径不一致 ≠ 已证明某项作战任务无法执行。</li><li>演习报道说明训练目标和官方说法,不自动证明战时效果。</li><li>兵棋结果受假设、规则和参与者决策影响,不是对未来冲突的确定预测。</li><li>盟友合作文件说明政策承诺,不等于所有基地准入、指挥协同和后勤安排均已落实。</li></ul></div></div></section>
|
||||
<section class="page" id="metrics" hidden><div class="head"><div><h2>量化数据|PDI资源可见性</h2><p>根据GAO报告图表转录;单位为十亿美元(USD billions)</p></div><button class="btn" type="button" onclick="downloadData('METRICS','no19_metrics.csv','csv')">导出量化数据 CSV</button></div><div class="note"><b>口径提醒:</b>GAO比较了国防部PDI预算展示与印太司令部独立评估。独立评估基于司令部战略与需求,并假设资源不受限制;各系列不是可直接相加的同口径预算。因此此图用于显示报告中的差异,不应直接解释为“预算缺口”或实际拨款总额。</div><div class="panel"><div class="panel-head">各财年报告数字(十亿美元)</div><div class="panel-body"><div id="metricBars"></div><div class="tablewrap" style="margin-top:14px"><table><thead><tr><th>财年</th><th>PDI预算展示</th><th>INDOPACOM评估:已资助项目</th><th>INDOPACOM评估:未资助需求</th><th>来源</th></tr></thead><tbody id="metricRows"></tbody></table></div></div></div><div class="cols"><div class="panel"><div class="panel-head">可以支持的研究判断</div><div class="panel-body">不同报告口径与项目纳入规则会影响国会对印太资源优先级的可见性。可进一步比较各军种项目选择标准、地理范围与规划周期。</div></div><div class="panel"><div class="panel-head">不能直接推出的结论</div><div class="panel-body">该图不能单独证明美国整体军费不足、具体作战计划必然失败,或某一武器系统一定短缺。相关结论需要采购数量、交付周期、库存和战备数据另行支持。</div></div></div><div class="panel" style="margin-top:14px"><div class="panel-head" style="display:flex;justify-content:space-between;align-items:center"><span>跨主题量化指标|不同口径单独展示</span><button class="btn" type="button" onclick="downloadData('INDICATORS','no19_indicators.csv','csv')">导出指标 CSV</button></div><div class="panel-body"><div class="toolbar"><input class="search" id="qSearch" placeholder="搜索指标、来源或限制说明"></div><div class="tablewrap"><table><thead><tr><th>ID</th><th>指标</th><th>数值</th><th>时间/范围</th><th>来源与定位</th><th>口径限制</th></tr></thead><tbody id="indicatorRows"></tbody></table></div></div></div></section>
|
||||
<section class="page" id="relations" hidden><div class="head"><div><h2>叙事关联与证据链</h2><p>关系类型必须由来源文本支撑;主题相似不等于直接引用或因果关系</p></div></div><div class="grid"><div class="card"><span class="pill">能力评估</span><h3>DoD / CSIS导弹材料</h3><p>为反舰导弹、A2/AD和目标信息链议题提供概览与官方评估入口。</p><p><a href="https://missilethreat.csis.org/country/china/" target="_blank" rel="noopener">CSIS Missile Threat ↗</a></p></div><div class="card"><span class="pill">作战应对</span><h3>CRS DMO / USAF ACE</h3><p>用于比较海军分布式作战与空军敏捷作战运用的目标、任务和公开实施案例。</p><p><a href="https://news.usni.org/2025/09/12/defense-primer-navy-distributed-maritime-operations-concept" target="_blank" rel="noopener">CRS/USNI DMO ↗</a></p></div><div class="card"><span class="pill">资源约束</span><h3>GAO预算审计</h3><p>与作战概念材料关联时,应标记为“议题互补/资源治理关联”,不要标记成直接因果。</p><p><a href="https://www.gao.gov/products/gao-26-107698" target="_blank" rel="noopener">GAO PDI审计 ↗</a></p></div></div><div class="panel" style="margin-top:15px"><div class="panel-head">推荐的关系标签</div><div class="panel-body">直接引用|明确转述|共同来源|观点相似|政策回应|资源约束关联|时间关联|存在分歧。每条关系记录需包含来源A、来源B、原文依据、关系方向和置信说明;证据不足时标记“待核”。</div></div></section>
|
||||
<footer>专题研究工作台 · 第七批数据扩充与测试/远程火力证据 · 统计随内嵌数据更新 · 最后整理:2026-10-26 · 第七批数据扩充</footer></main><div class="modal" id="modal" onclick="if(event.target===this)closeModal()"><div class="dialog"><div class="dialoghead"><span id="mTitle">详情</span><button class="close" onclick="closeModal()">关闭 ×</button></div><div class="dialogbody" id="mBody"></div></div></div>
|
||||
<button type="button" id="openEditor" class="editor-fab" aria-label="JSON 编辑器" title="页面 JSON 编辑器"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg></button>
|
||||
<div id="editorOverlay" class="editor-overlay" style="display:none"><div class="editor-modal">
|
||||
<header class="editor-head"><h2>页面 JSON 编辑器</h2><span class="editor-note">按模块编辑,应用后即时重渲染;修改保存在浏览器本地,不回写服务器</span><button type="button" id="closeEditor" style="border:0;background:none;font-size:14px;cursor:pointer">关闭</button></header>
|
||||
<div class="editor-body">
|
||||
<nav id="editorTabs" class="editor-tabs"></nav>
|
||||
<div class="editor-pane">
|
||||
<div class="editor-title-row"><b id="editorModuleTitle"></b><span id="jsonStatus" class="json-status valid">JSON 有效</span></div>
|
||||
<textarea id="jsonEditor" class="json-editor" spellcheck="false" aria-label="当前模块 JSON"></textarea>
|
||||
<div class="editor-actions"><button type="button" id="applyJson" style="background:#7c1d24;color:#fff;border:0;border-radius:6px;padding:7px 14px;cursor:pointer">应用到页面</button><button type="button" id="resetJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">恢复默认数据</button><button type="button" id="copyJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">复制完整 JSON</button><button type="button" id="downloadJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">下载 JSON</button></div>
|
||||
<p class="editor-hint">模块 = 页面数据(DATA)的顶层键,另附「系统设置」编辑 MANIFEST;沙箱预览无法使用本地缓存时,修改仅当次会话有效。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
<script type="application/json" id="structured-data">__PAGE_DATA__</script>
|
||||
<script type="application/json" id="structured-manifest">__PAGE_MANIFEST__</script>
|
||||
<script type="application/json" id="structured-fields">__PAGE_FIELDS__</script>
|
||||
<script>__PAGE_RUNTIME__</script>
|
||||
</body>
|
||||
</html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"meta": {"title": "台湾飞行部队知识数据展示平台", "version": "原型版 3.2(离线来源内容版)", "updated": "2026-06-23", "notice": "基于公开资料构建;单位级人员、飞机可用数量及实时战备状态未公开时均不作推断。", "offline": true}, "units": [{"profile_id": "UFP-001", "organization_id": "ORG-AF-SONGSHAN", "name": "空军松山基地指挥部", "path": "entities/units/air_force/songshan_base_command.md", "type": "unit_profile", "priority": "P1", "topic_group": "unit_force_profiles", "service": "air_force", "organization_type": "base_command", "parent_id": "ORG-AF-HQ", "status": "CURRENT_CONFIRMED", "confidence": "A", "public_location": "台北松山地区(公开基地层级)", "summary": "松山基地指挥部是空军特种运输、行政航空和首都地区基地运行的公开组织节点,内部同时包含飞行、修护补给和基地勤务功能。", "mission_roles": ["特种/行政运输", "专机与公务航空保障", "基地运行与军民航协调"], "platforms": ["B-737-800", "Fokker 50", "Beech 1900等公开特种运输平台"], "force_structure": "基地指挥部级;公开内部要素包括特种运输队、修护补给队和基地勤务队。飞行单位规模和机组数量未公开。", "personnel_domains": ["特种运输飞行员与机组", "专机任务与服务人员", "机务与航电人员", "航管/基地勤务/消防人员"], "training_profile": "执行机型换装、专机程序、仪表飞行、复杂空域和应急训练;具体课目与资格数量未公开。", "support_profile": "修护补给队承担机务与补给,基地勤务队承担场站运行;涉及军民共用机场协调。", "quantity_reference": "官方沿革明确2000年B-737-800成军;其他平台在官网公开列示。当前各型机确切数量和可用率不公开。", "history": "由松山站、供应分队、机场勤务中队和基地大队等单位演变,1966年扩编为松山基地指挥部。", "source_ids": ["AF-SONGSHAN", "AF-SPECIAL-AIRCRAFT"], "relations": ["ORG-AF-SONGSHAN-SPECIAL-TRANSPORT", "ORG-AF-SONGSHAN-MAINT", "ORG-AF-SONGSHAN-BASE-SERVICE"], "force_level": "基地指挥部级", "readiness_statement": "公开资料可确认单位、平台或任务存在,但不公开实时战备等级、可飞数量和当日人员状态。", "notes": "", "registry_status": "CURRENT_CONFIRMED", "registry_confidence": "A", "last_verified": "2026-06-23", "unit_personnel_strength": "NOT_PUBLIC", "unit_aircraft_strength": "NOT_PUBLIC_OR_NOT_STABLE", "commander_field": "不写入静态档案;需查询单位官网最新公开信息", "do_not_infer": ["实时可飞数量或妥善率", "人员实际员额、值班名单或资格分布", "弹药库存和挂载数量", "飞行频率、值班节奏和临时部署", "基地内部设施、机堡位置和警卫布置"]}, {"profile_id": "UFP-002", "organization_id": "ORG-AF-SONGSHAN-SPECIAL-TRANSPORT", "name": "空军松山基地指挥部特种运输队", "path": "entities/units/air_force/songshan_special_transport_unit.md", "type": "unit_profile", "priority": "P2", "topic_group": "unit_force_profiles", "service": "air_force", "organization_type": "special_transport_unit", "parent_id": "ORG-AF-SONGSHAN", "status": "CURRENT_PROBABLE", "confidence": "B", "public_location": "台北松山地区(公开基地层级)", "summary": "特种运输队是松山基地指挥部内承担专机与行政运输的飞行要素,其档案重点是任务机组、平台构成和特殊服务程序,而不是推断高层行程。", "mission_roles": ["行政运输", "专机运输", "紧急或公务航空支援"], "platforms": ["B-737-800", "Fokker 50", "Beech 1900等"], "force_structure": "队级飞行单位;上级为松山基地指挥部。现行完整内部机组编制和飞机分配未公开。", "personnel_domains": ["固定翼飞行员", "任务机组与客舱服务", "任务规划", "机务与航电专业"], "training_profile": "机型换装、仪表飞行、机场程序、紧急程序和任务服务标准化。", "support_profile": "依托所属联队的修护补给、基地勤务、航管气象和武器保障;单位级确切班组与员额未公开。", "quantity_reference": "单位级飞机编配数、可飞数和飞行员员额未公开;仅确认机型/任务归属,不从联队总量反推。", "history": "其前身与松山基地历次专机/运输编组有关,现行正式名称依据公开组织资料为较高可信。", "source_ids": ["AF-SONGSHAN", "AF-SPECIAL-AIRCRAFT"], "relations": ["ORG-AF-SONGSHAN"], "force_level": "special_transport_unit", "readiness_statement": "公开资料可确认单位、平台或任务存在,但不公开实时战备等级、可飞数量和当日人员状态。", "notes": "", "registry_status": "CURRENT_PROBABLE", "registry_confidence": "B", "last_verified": "2026-06-23", "unit_personnel_strength": "NOT_PUBLIC", "unit_aircraft_strength": "NOT_PUBLIC_OR_NOT_STABLE",Line truncated
|
||||
+954
@@ -0,0 +1,954 @@
|
||||
{
|
||||
"说明": "字段显示目录:控制详情字段渲染 + 是否接受抽取更新(keys=数据字段键)。",
|
||||
"fields": [
|
||||
{
|
||||
"label": "档案编号",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(profile_id)",
|
||||
"keys": [
|
||||
"profile_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "组织编号",
|
||||
"pages": [
|
||||
"organizations",
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(organization_id)",
|
||||
"keys": [
|
||||
"organization_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "名称",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(name)",
|
||||
"keys": [
|
||||
"name"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "名称",
|
||||
"pages": [
|
||||
"装备体系",
|
||||
"organizations",
|
||||
"weapons"
|
||||
],
|
||||
"description": "数据字段(name_zh)",
|
||||
"keys": [
|
||||
"name_zh"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "知识文件路径",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(path)",
|
||||
"keys": [
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "类型",
|
||||
"pages": [
|
||||
"safetyMetrics",
|
||||
"时间线与来源",
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(type)",
|
||||
"keys": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "优先级",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(priority)",
|
||||
"keys": [
|
||||
"priority"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "主题分组",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(topic_group)",
|
||||
"keys": [
|
||||
"topic_group"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "军种/系统",
|
||||
"pages": [
|
||||
"装备体系",
|
||||
"maintenance",
|
||||
"organizations",
|
||||
"safetyEvents",
|
||||
"训练与保障",
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(service)",
|
||||
"keys": [
|
||||
"service"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "组织类型",
|
||||
"pages": [
|
||||
"organizations",
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(organization_type)",
|
||||
"keys": [
|
||||
"organization_type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "上级组织编号",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(parent_id)",
|
||||
"keys": [
|
||||
"parent_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "状态",
|
||||
"pages": [
|
||||
"装备体系",
|
||||
"工业链与外部依赖",
|
||||
"maintenance",
|
||||
"organizationRelations",
|
||||
"organizations",
|
||||
"platformWeapon",
|
||||
"safetyControls",
|
||||
"safetyProcess",
|
||||
"supplierDependencies",
|
||||
"训练与保障",
|
||||
"单位与兵力",
|
||||
"weapons"
|
||||
],
|
||||
"description": "数据字段(status)",
|
||||
"keys": [
|
||||
"status"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "可信度",
|
||||
"pages": [
|
||||
"工业链与外部依赖",
|
||||
"maintenance",
|
||||
"organizationRelations",
|
||||
"organizations",
|
||||
"platformWeapon",
|
||||
"safetyEvents",
|
||||
"simulators",
|
||||
"sources",
|
||||
"supplierDependencies",
|
||||
"训练与保障",
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(confidence)",
|
||||
"keys": [
|
||||
"confidence"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "公开驻地",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(public_location)",
|
||||
"keys": [
|
||||
"public_location"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "摘要",
|
||||
"pages": [
|
||||
"safetyEvents",
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(summary)",
|
||||
"keys": [
|
||||
"summary"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "主要任务",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(mission_roles)",
|
||||
"keys": [
|
||||
"mission_roles"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "平台与系统",
|
||||
"pages": [
|
||||
"工业链与外部依赖",
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(platforms)",
|
||||
"keys": [
|
||||
"platforms"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "兵力结构",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(force_structure)",
|
||||
"keys": [
|
||||
"force_structure"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "人员专业",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(personnel_domains)",
|
||||
"keys": [
|
||||
"personnel_domains"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "训练与资格",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(training_profile)",
|
||||
"keys": [
|
||||
"training_profile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "维修保障",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(support_profile)",
|
||||
"keys": [
|
||||
"support_profile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "数量口径",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(quantity_reference)",
|
||||
"keys": [
|
||||
"quantity_reference"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "沿革",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(history)",
|
||||
"keys": [
|
||||
"history"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "来源编号",
|
||||
"pages": [
|
||||
"装备体系",
|
||||
"externalDependencies",
|
||||
"工业链与外部依赖",
|
||||
"maintenance",
|
||||
"organizationRelations",
|
||||
"organizations",
|
||||
"safetyEvents",
|
||||
"simulators",
|
||||
"supplierDependencies",
|
||||
"时间线与来源",
|
||||
"训练与保障",
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(source_ids)",
|
||||
"keys": [
|
||||
"source_ids"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "关联组织",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(relations)",
|
||||
"keys": [
|
||||
"relations"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "单位层级",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(force_level)",
|
||||
"keys": [
|
||||
"force_level"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "战备信息边界",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(readiness_statement)",
|
||||
"keys": [
|
||||
"readiness_statement"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "备注",
|
||||
"pages": [
|
||||
"organizationRelations",
|
||||
"organizations",
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(notes)",
|
||||
"keys": [
|
||||
"notes"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "登记状态",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(registry_status)",
|
||||
"keys": [
|
||||
"registry_status"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "登记可信度",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(registry_confidence)",
|
||||
"keys": [
|
||||
"registry_confidence"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "最后核验",
|
||||
"pages": [
|
||||
"装备体系",
|
||||
"organizations",
|
||||
"单位与兵力",
|
||||
"weapons"
|
||||
],
|
||||
"description": "数据字段(last_verified)",
|
||||
"keys": [
|
||||
"last_verified"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "人员数量",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(unit_personnel_strength)",
|
||||
"keys": [
|
||||
"unit_personnel_strength"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "飞机数量",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(unit_aircraft_strength)",
|
||||
"keys": [
|
||||
"unit_aircraft_strength"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "主官字段",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(commander_field)",
|
||||
"keys": [
|
||||
"commander_field"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "禁止推断",
|
||||
"pages": [
|
||||
"单位与兵力"
|
||||
],
|
||||
"description": "数据字段(do_not_infer)",
|
||||
"keys": [
|
||||
"do_not_infer"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "单位/机构",
|
||||
"pages": [
|
||||
"工业链与外部依赖",
|
||||
"simulators"
|
||||
],
|
||||
"description": "数据字段(organization)",
|
||||
"keys": [
|
||||
"organization"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "类别",
|
||||
"pages": [
|
||||
"装备体系",
|
||||
"safetyEvents",
|
||||
"simulators",
|
||||
"weapons"
|
||||
],
|
||||
"description": "数据字段(category)",
|
||||
"keys": [
|
||||
"category"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "公开证据",
|
||||
"pages": [
|
||||
"externalDependencies",
|
||||
"safetyControls",
|
||||
"safetyProcess",
|
||||
"simulators"
|
||||
],
|
||||
"description": "数据字段(evidence)",
|
||||
"keys": [
|
||||
"evidence"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "训练阶段",
|
||||
"pages": [
|
||||
"simulators"
|
||||
],
|
||||
"description": "数据字段(training_stage)",
|
||||
"keys": [
|
||||
"training_stage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "教员要求",
|
||||
"pages": [
|
||||
"simulators"
|
||||
],
|
||||
"description": "数据字段(instructor_requirement)",
|
||||
"keys": [
|
||||
"instructor_requirement"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "构型状态",
|
||||
"pages": [
|
||||
"simulators"
|
||||
],
|
||||
"description": "数据字段(configuration_status)",
|
||||
"keys": [
|
||||
"configuration_status"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "交付/使用状态",
|
||||
"pages": [
|
||||
"simulators"
|
||||
],
|
||||
"description": "数据字段(delivery_status)",
|
||||
"keys": [
|
||||
"delivery_status"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "平台或任务",
|
||||
"pages": [
|
||||
"simulators"
|
||||
],
|
||||
"description": "数据字段(platform_or_role)",
|
||||
"keys": [
|
||||
"platform_or_role"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "平台族",
|
||||
"pages": [
|
||||
"maintenance",
|
||||
"supplierDependencies"
|
||||
],
|
||||
"description": "数据字段(platform_family)",
|
||||
"keys": [
|
||||
"platform_family"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "维修层级",
|
||||
"pages": [
|
||||
"externalDependencies",
|
||||
"maintenance"
|
||||
],
|
||||
"description": "数据字段(level)",
|
||||
"keys": [
|
||||
"level"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "任务类别",
|
||||
"pages": [
|
||||
"maintenance"
|
||||
],
|
||||
"description": "数据字段(task_family)",
|
||||
"keys": [
|
||||
"task_family"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "责任单位",
|
||||
"pages": [
|
||||
"maintenance",
|
||||
"训练与保障"
|
||||
],
|
||||
"description": "数据字段(responsible_entity)",
|
||||
"keys": [
|
||||
"responsible_entity"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "主要输出",
|
||||
"pages": [
|
||||
"maintenance"
|
||||
],
|
||||
"description": "数据字段(key_outputs)",
|
||||
"keys": [
|
||||
"key_outputs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "质量关口",
|
||||
"pages": [
|
||||
"maintenance"
|
||||
],
|
||||
"description": "数据字段(quality_gate)",
|
||||
"keys": [
|
||||
"quality_gate"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "技术依赖",
|
||||
"pages": [
|
||||
"maintenance"
|
||||
],
|
||||
"description": "数据字段(technical_dependency)",
|
||||
"keys": [
|
||||
"technical_dependency"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "节点类型",
|
||||
"pages": [
|
||||
"工业链与外部依赖"
|
||||
],
|
||||
"description": "数据字段(node_type)",
|
||||
"keys": [
|
||||
"node_type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "能力范围",
|
||||
"pages": [
|
||||
"工业链与外部依赖"
|
||||
],
|
||||
"description": "数据字段(capabilities)",
|
||||
"keys": [
|
||||
"capabilities"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "成熟度",
|
||||
"pages": [
|
||||
"工业链与外部依赖"
|
||||
],
|
||||
"description": "数据字段(maturity)",
|
||||
"keys": [
|
||||
"maturity"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "国外接口",
|
||||
"pages": [
|
||||
"工业链与外部依赖"
|
||||
],
|
||||
"description": "数据字段(foreign_interface)",
|
||||
"keys": [
|
||||
"foreign_interface"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "平台或系统",
|
||||
"pages": [
|
||||
"externalDependencies"
|
||||
],
|
||||
"description": "数据字段(platform_or_system)",
|
||||
"keys": [
|
||||
"platform_or_system"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "依赖维度",
|
||||
"pages": [
|
||||
"externalDependencies"
|
||||
],
|
||||
"description": "数据字段(dimension)",
|
||||
"keys": [
|
||||
"dimension"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "国内能力",
|
||||
"pages": [
|
||||
"externalDependencies"
|
||||
],
|
||||
"description": "数据字段(domestic_capability)",
|
||||
"keys": [
|
||||
"domestic_capability"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "外部依赖",
|
||||
"pages": [
|
||||
"externalDependencies"
|
||||
],
|
||||
"description": "数据字段(foreign_dependency)",
|
||||
"keys": [
|
||||
"foreign_dependency"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "缓解/自主化措施",
|
||||
"pages": [
|
||||
"externalDependencies"
|
||||
],
|
||||
"description": "数据字段(mitigation)",
|
||||
"keys": [
|
||||
"mitigation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "待核问题",
|
||||
"pages": [
|
||||
"externalDependencies"
|
||||
],
|
||||
"description": "数据字段(unresolved)",
|
||||
"keys": [
|
||||
"unresolved"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "风险描述",
|
||||
"pages": [
|
||||
"safetyRisks"
|
||||
],
|
||||
"description": "数据字段(risk)",
|
||||
"keys": [
|
||||
"risk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "表现或示例",
|
||||
"pages": [
|
||||
"safetyRisks"
|
||||
],
|
||||
"description": "数据字段(examples)",
|
||||
"keys": [
|
||||
"examples"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "控制措施",
|
||||
"pages": [
|
||||
"safetyRisks"
|
||||
],
|
||||
"description": "数据字段(controls)",
|
||||
"keys": [
|
||||
"controls"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "HFACS层级",
|
||||
"pages": [
|
||||
"safetyRisks"
|
||||
],
|
||||
"description": "数据字段(hfacs_level)",
|
||||
"keys": [
|
||||
"hfacs_level"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "治理阶段",
|
||||
"pages": [
|
||||
"safetyProcess"
|
||||
],
|
||||
"description": "数据字段(stage)",
|
||||
"keys": [
|
||||
"stage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "责任主体",
|
||||
"pages": [
|
||||
"safetyProcess"
|
||||
],
|
||||
"description": "数据字段(owner)",
|
||||
"keys": [
|
||||
"owner"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "输入",
|
||||
"pages": [
|
||||
"safetyProcess"
|
||||
],
|
||||
"description": "数据字段(inputs)",
|
||||
"keys": [
|
||||
"inputs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "输出",
|
||||
"pages": [
|
||||
"safetyProcess"
|
||||
],
|
||||
"description": "数据字段(outputs)",
|
||||
"keys": [
|
||||
"outputs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "日期",
|
||||
"pages": [
|
||||
"safetyEvents",
|
||||
"时间线与来源"
|
||||
],
|
||||
"description": "数据字段(date)",
|
||||
"keys": [
|
||||
"date"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "平台",
|
||||
"pages": [
|
||||
"platformWeapon",
|
||||
"safetyEvents"
|
||||
],
|
||||
"description": "数据字段(platform)",
|
||||
"keys": [
|
||||
"platform"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "严重度",
|
||||
"pages": [
|
||||
"safetyEvents"
|
||||
],
|
||||
"description": "数据字段(severity)",
|
||||
"keys": [
|
||||
"severity"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "结果",
|
||||
"pages": [
|
||||
"safetyEvents"
|
||||
],
|
||||
"description": "数据字段(outcome)",
|
||||
"keys": [
|
||||
"outcome"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "停飞/限制",
|
||||
"pages": [
|
||||
"safetyEvents"
|
||||
],
|
||||
"description": "数据字段(grounding)",
|
||||
"keys": [
|
||||
"grounding"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "复飞状态",
|
||||
"pages": [
|
||||
"safetyEvents"
|
||||
],
|
||||
"description": "数据字段(return_to_flight)",
|
||||
"keys": [
|
||||
"return_to_flight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "原因状态",
|
||||
"pages": [
|
||||
"safetyEvents"
|
||||
],
|
||||
"description": "数据字段(cause_status)",
|
||||
"keys": [
|
||||
"cause_status"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "标题",
|
||||
"pages": [
|
||||
"sources",
|
||||
"时间线与来源"
|
||||
],
|
||||
"description": "数据字段(title)",
|
||||
"keys": [
|
||||
"title"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "主要用途",
|
||||
"pages": [
|
||||
"sources"
|
||||
],
|
||||
"description": "数据字段(usage)",
|
||||
"keys": [
|
||||
"usage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "网址",
|
||||
"pages": [
|
||||
"通用"
|
||||
],
|
||||
"description": "数据字段(url)",
|
||||
"keys": [
|
||||
"url"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "核验日期",
|
||||
"pages": [
|
||||
"sources"
|
||||
],
|
||||
"description": "数据字段(verified)",
|
||||
"keys": [
|
||||
"verified"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "Markdown正文",
|
||||
"pages": [
|
||||
"单位详情"
|
||||
],
|
||||
"description": "详情字段(Markdown正文)",
|
||||
"keys": []
|
||||
},
|
||||
{
|
||||
"label": "下级单位数",
|
||||
"pages": [
|
||||
"单位详情"
|
||||
],
|
||||
"description": "详情字段(下级单位数)",
|
||||
"keys": []
|
||||
},
|
||||
{
|
||||
"label": "专题分类",
|
||||
"pages": [
|
||||
"单位详情"
|
||||
],
|
||||
"description": "详情字段(专题分类)",
|
||||
"keys": []
|
||||
},
|
||||
{
|
||||
"label": "公开上级",
|
||||
"pages": [
|
||||
"单位详情"
|
||||
],
|
||||
"description": "详情字段(公开上级)",
|
||||
"keys": []
|
||||
},
|
||||
{
|
||||
"label": "当前阶段",
|
||||
"pages": [
|
||||
"单位详情"
|
||||
],
|
||||
"description": "详情字段(当前阶段)",
|
||||
"keys": []
|
||||
},
|
||||
{
|
||||
"label": "所属体系",
|
||||
"pages": [
|
||||
"单位详情"
|
||||
],
|
||||
"description": "详情字段(所属体系)",
|
||||
"keys": []
|
||||
},
|
||||
{
|
||||
"label": "档案类型",
|
||||
"pages": [
|
||||
"单位详情"
|
||||
],
|
||||
"description": "详情字段(档案类型)",
|
||||
"keys": []
|
||||
},
|
||||
{
|
||||
"label": "正文规模",
|
||||
"pages": [
|
||||
"单位详情"
|
||||
],
|
||||
"description": "详情字段(正文规模)",
|
||||
"keys": []
|
||||
},
|
||||
{
|
||||
"label": "浅红节点",
|
||||
"pages": [
|
||||
"单位详情"
|
||||
],
|
||||
"description": "详情字段(浅红节点)",
|
||||
"keys": []
|
||||
},
|
||||
{
|
||||
"label": "白色节点",
|
||||
"pages": [
|
||||
"单位详情"
|
||||
],
|
||||
"description": "详情字段(白色节点)",
|
||||
"keys": []
|
||||
},
|
||||
{
|
||||
"label": "红色节点",
|
||||
"pages": [
|
||||
"单位详情"
|
||||
],
|
||||
"description": "详情字段(红色节点)",
|
||||
"keys": []
|
||||
},
|
||||
{
|
||||
"label": "结构化数据",
|
||||
"pages": [
|
||||
"单位详情"
|
||||
],
|
||||
"description": "详情字段(结构化数据)",
|
||||
"keys": []
|
||||
}
|
||||
]
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
[{"path": "README.md", "title": "台湾飞行部队综合知识库 v7(单位与兵力档案深化版)", "category": "系统说明", "type": "知识专题", "stage": "持续更新", "confidence": "", "when": "", "summary": "版本 :v6.0 reference style 更新时间 :2026 06 23 条目数 :52 基础版本 :v5飞行安全深化版", "sections": [{"id": "sec-0", "title": "档案元数据与说明", "html": "<p><strong>版本</strong>:v6.0-reference-style<br/>\n<strong>更新时间</strong>:2026-06-23<br/>\n<strong>条目数</strong>:52<br/>\n<strong>基础版本</strong>:v5飞行安全深化版</p>\n"}, {"id": "sec-1", "title": "一、重组方式", "html": "<p>本版按照两个参考文件的组织逻辑重新编排:</p>\n<ol>\n<li><strong>Markdown单主题档案</strong>:每个文件统一包含“类型、当前阶段、何时调用、一句话浓缩、核心知识正文、关联分析、常见陷阱、仍不确定部分、与其他文件关系、末尾浓缩”。</li>\n<li><strong>JSON建设清单</strong>:每个条目统一包含<code>id/path/name/type/priority/topic_group/topic/style_reference/must_cover/key_relations/notes</code>。</li>\n<li><strong>主题目录</strong>:不再依赖00—51的线性顺序,而按实体、能力、飞安、事件、框架和调用规则组织。</li>\n<li><strong>内容保留</strong>:v5全部正文保留于新档案的“核心知识正文”,原始章节另存于<code>legacy_v5/wiki/</code>。</li>\n<li><strong>数据保留</strong>:v5的CSV、JSONL、Schema和来源索引完整保留。</li>\n</ol>\n"}, {"id": "sec-2", "title": "二、主要入口", "html": "<ul>\n<li><code>catalog/taiwan_flight_forces_catalog_v6.json</code>:全库总索引</li>\n<li><code>catalog/P1_catalog.json</code>:核心总览、主干组织、主平台与任务</li>\n<li><code>catalog/P2_catalog.json</code>:装备、组织、训练、保障和工业专题</li>\n<li><code>catalog/P3_catalog.json</code>:审计、规则、本体和待核机制</li>\n<li><code>catalog/P4_catalog.json</code>:飞行安全、事故和风险治理</li>\n<li><code>catalog/v5_to_v6_path_mapping.csv</code>:旧路径到新路径映射</li>\n</ul>\n"}, {"id": "sec-3", "title": "三、主题目录", "html": "<ul>\n<li><code>foundations/</code>:知识库导读与总体画像</li>\n<li><code>entities/organizations/</code>:军种、指挥部、联队、航空旅和航空大队</li>\n<li><code>entities/equipment/</code>:航空器、武器、任务系统和无人装备</li>\n<li><code>capabilities/</code>:任务、训练、人员、维修、航材和工业链</li>\n<li><code>safety/</code>:飞安治理、事故事件和风险框架</li>\n<li><code>events/timelines/</code>:历史和事故时间线</li>\n<li><code>frameworks/assessment/</code>:完整性审计和综合评估</li>\n<li><code>playbooks/</code>:LLM调用、数据本体、更新和条目规则</li>\n<li><code>data/</code>、<code>schemas/</code>、<code>sources/</code>:结构化数据、模式和来源</li>\n<li><code>legacy_v5/</code>:v5原始章节及清单</li>\n</ul>\n"}, {"id": "sec-4", "title": "四、推荐调用流程", "html": "<pre><code class=\"language-text\">总JSON索引\n→ 按topic_group/priority筛选\n→ 打开目标Markdown\n→ 阅读一句话浓缩与当前阶段\n→ 检索核心知识正文\n→ 同步读取key_relations\n→ 检查仍不确定部分与常见陷阱\n→ 回到sources和data验证\n</code></pre>\n"}, {"id": "sec-5", "title": "五、完整性边界", "html": "<p>本版是组织方式重构,不新增未公开事实。原知识库中的公开资料边界、安全限制、状态标签和禁止推断规则继续有效。</p>\n"}, {"id": "sec-6", "title": "v7单位与兵力档案新增", "html": "<p>本版新增<code>entities/units/</code>和<code>catalog/unit_force_profiles_catalog_v7.json</code>,形成<strong>41个逐单位档案</strong>。</p>\n<p>新增结构化数据:</p>\n<ul>\n<li><code>data/unit_force_profiles_v7.jsonl</code></li>\n<li><code>data/unit_force_matrix_v7.csv</code></li>\n<li><code>data/unit_force_relations_v7.csv</code></li>\n<li><code>data/unit_profile_completeness_audit_v6_to_v7.csv</code></li>\n<li><code>schemas/unit_force_profile_v7.schema.json</code></li>\n</ul>\n<p>兵力数量规则:</p>\n<ol>\n<li>官方历史接收数只作为历史参考;</li>\n<li>全军采购或项目总量不等于单位编配;</li>\n<li>单位实际分配、可飞数和人员员额未公开时标记<code>NOT_PUBLIC</code>;</li>\n<li>不使用媒体估算补齐实时兵力。</li>\n</ol>\n"}], "text": "版本 :v6.0-reference-style 更新时间 :2026-06-23 条目数 :52 基础版本 :v5飞行安全深化版 本版按照两个参考文件的组织逻辑重新编排: Markdown单主题档案 :每个文件统一包含“类型、当前阶段、何时调用、一句话浓缩、核心知识正文、关联分析、常见陷阱、仍不确定部分Line truncated
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"系统": {
|
||||
"名称": "台湾飞行部队知识数据展示平台",
|
||||
"版本": "原型版 3.2(离线来源内容版)",
|
||||
"更新时间": "2026-06-23",
|
||||
"说明": "基于公开资料构建;单位级人员、飞机可用数量及实时战备状态未公开时均不作推断。"
|
||||
},
|
||||
"页面": [
|
||||
{
|
||||
"编号": "overview",
|
||||
"名称": "总览"
|
||||
},
|
||||
{
|
||||
"编号": "organization",
|
||||
"名称": "组织机构"
|
||||
},
|
||||
{
|
||||
"编号": "units",
|
||||
"名称": "单位与兵力"
|
||||
},
|
||||
{
|
||||
"编号": "equipment",
|
||||
"名称": "装备体系"
|
||||
},
|
||||
{
|
||||
"编号": "training",
|
||||
"名称": "训练与保障"
|
||||
},
|
||||
{
|
||||
"编号": "industry",
|
||||
"名称": "工业链与外部依赖"
|
||||
},
|
||||
{
|
||||
"编号": "safety",
|
||||
"名称": "飞安与风险治理"
|
||||
},
|
||||
{
|
||||
"编号": "timeline",
|
||||
"名称": "时间线与来源"
|
||||
},
|
||||
{
|
||||
"编号": "knowledge",
|
||||
"名称": "知识专题库"
|
||||
}
|
||||
],
|
||||
"交互规则": {
|
||||
"默认展示": "overview"
|
||||
}
|
||||
}
|
||||
+226
@@ -0,0 +1,226 @@
|
||||
/* no.2 页面运行时(结构化模板)。
|
||||
* 由 template_fill.compose_structured 内联进骨架的运行时注入点。
|
||||
* 数据从骨架 JSON 元素读取:DATA / KNOWLEDGE / SOURCE_LOCAL / MANIFEST。 */
|
||||
const DATA=JSON.parse(document.getElementById("structured-data").textContent);
|
||||
const KNOWLEDGE=JSON.parse(document.getElementById("structured-knowledge").textContent);
|
||||
const SOURCE_LOCAL=JSON.parse(document.getElementById("structured-source-local").textContent);
|
||||
const MANIFEST=JSON.parse(document.getElementById("structured-manifest").textContent);
|
||||
const FIELDS=JSON.parse((document.getElementById("structured-fields")||{textContent:"[]"}).textContent);
|
||||
(()=>{
|
||||
'use strict';
|
||||
const $=s=>document.querySelector(s), $$=s=>[...document.querySelectorAll(s)];
|
||||
const esc=v=>String(v??'').replace(/[&<>"']/g,m=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[m]));
|
||||
const arr=v=>Array.isArray(v)?v:(v?String(v).split(/;|;|、/).map(x=>x.trim()).filter(Boolean):[]);
|
||||
const uniq=a=>[...new Set(a.filter(Boolean))];
|
||||
const clip=(v,n=110)=>String(v||'').length>n?String(v).slice(0,n)+'…':String(v||'');
|
||||
const labels={service:{air_force:'空军',army:'陆军',navy:'海军',civil:'民政航空',other:'其他'},status:{CURRENT_CONFIRMED:'现行确认',CURRENT_PROBABLE:'现行较高可信',CURRENT_CONFIRMED_OR_TRANSITIONING:'现行/转型中',FIELD_CONFIRMED:'现役确认',FUNCTION_CONFIRMED:'功能确认',FUNCTION_INFERRED:'功能推定',PROCUREMENT_TRANSITIONING:'采购转型中',PROCUREMENT_CONFIRMED:'采购确认',PROCUREMENT_PACKAGE_CONFIRMED:'采购包确认',CURRENT_ROLE_CONFIRMED:'岗位确认',CURRENT_USE_CONFIRMED:'使用确认',TRAINING_FUNCTION_CONFIRMED:'训练功能确认',TRAINING_PIPELINE_INFERRED:'训练链推定',ORGANIZATION_UNRESOLVED:'组织待核',CURRENT_CONFIRMED_FUNCTION:'现行功能确认',HISTORICAL_BASELINE:'历史基线',NOT_PUBLIC:'未公开',NOT_PUBLIC_OR_NOT_STABLE:'未公开或非稳定口径',OPEN_SOURCE_LIMITED:'公开资料有限',PARTIALLY_COMPLETE:'部分完整',COMPLETED:'已完成',ANALYTICAL_ASSESSMENT:'分析评估',HIGH_EXTERNAL_DEPENDENCY:'外部依赖较高',OEM_AUTHORIZED_FMS_CONTROLLED:'原厂授权/军售管制',FMS_CONTROLLED:'军售管制',DOMESTIC_INTEGRATOR:'国内系统整合',DOMESTIC_DESIGN_AND_INTEGRATION:'国内设计与整合',JOINT_DEVELOPMENT_EXTERNAL_COMPONENTS:'合作研制/含外部部件',JOINT_OR_FOREIGN_CORE_DEPENDENCY:'合作或外部核心依赖',MIXED_UNRESOLVED:'混合/待核'},category:{FA:'飞行事故',SI:'严重征候',NI:'近失事件',GS:'地面安全',AN:'航管与导航',MQ:'维修质量',US:'无人航空安全',HR:'危险源报告',SAR:'搜救事件'}};
|
||||
const FIELD_LABELS={profile_id:'档案编号',organization_id:'组织编号',name:'名称',name_zh:'名称',path:'知识文件路径',type:'类型',priority:'优先级',topic_group:'主题分组',service:'军种/系统',organization_type:'组织类型',parent_id:'上级组织编号',status:'状态',confidence:'可信度',public_location:'公开驻地',summary:'摘要',mission_roles:'主要任务',platforms:'平台与系统',force_structure:'兵力结构',personnel_domains:'人员专业',training_profile:'训练与资格',support_profile:'维修保障',quantity_reference:'数量口径',history:'沿革',source_ids:'来源编号',relations:'关联组织',force_level:'单位层级',readiness_statement:'战备信息边界',notes:'备注',registry_status:'登记状态',registry_confidence:'登记可信度',last_verified:'最后核验',unit_personnel_strength:'人员数量',unit_aircraft_strength:'飞机数量',commander_field:'主官字段',do_not_infer:'禁止推断',organization:'单位/机构',category:'类别',evidence:'公开证据',training_stage:'训练阶段',instructor_requirement:'教员要求',configuration_status:'构型状态',delivery_status:'交付/使用状态',platform_or_role:'平台或任务',platform_family:'平台族',level:'维修层级',task_family:'任务类别',responsible_entity:'责任单位',key_outputs:'主要输出',quality_gate:'质量关口',technical_dependency:'技术依赖',node_type:'节点类型',capabilities:'能力范围',maturity:'成熟度',foreign_interface:'国外接口',platform_or_system:'平台或系统',dimension:'依赖维度',domestic_capability:'国内能力',foreign_dependency:'外部依赖',mitigation:'缓解/自主化措施',unresolved:'待核问题',risk:'风险描述',examples:'表现或示例',controls:'控制措施',hfacs_level:'HFACS层级',stage:'治理阶段',owner:'责任主体',inputs:'输入',outputs:'输出',date:'日期',platform:'平台',severity:'严重度',outcome:'结果',grounding:'停飞/限制',return_to_flight:'复飞状态',cause_status:'原因状态',title:'标题',usage:'主要用途',url:'网址',verified:'核验日期'};
|
||||
const state={tab:'overview',unitView:'cards',unitPage:1,unitSize:12,unitFilters:{q:'',service:'全部',level:'全部',location:'全部',status:'全部'},equipCat:'全部',orgService:'air_force',orgZoom:1,sourceQ:'',knowledgeCategory:'全部',knowledgeQ:'',knowledgePage:1,knowledgeSize:15};
|
||||
const sourceMap=Object.fromEntries(DATA.sources.map(x=>[x.source_id,x]));const sourceLocalMap=SOURCE_LOCAL||{};
|
||||
const orgMap=Object.fromEntries(DATA.organizations.map(x=>[x.organization_id,x]));
|
||||
const unitMap=Object.fromEntries(DATA.units.map(x=>[x.organization_id,x]));
|
||||
const knowledgeMap=Object.fromEntries(KNOWLEDGE.map(x=>[x.path,x]));
|
||||
const status=v=>labels.status[v]||v||'待核'; const service=v=>labels.service[v]||v||'其他';
|
||||
const badge=(v,kind='status')=>{const t=kind==='confidence'?`可信度 ${v||'待核'}`:status(v);let c=/确认|完成|现役/.test(t)?'green':(/待核|未公开|推定|有限/.test(t)?'amber':'red');return `<span class="badge ${c}">${esc(t)}</span>`};
|
||||
const chips=(xs,limit=8)=>arr(xs).slice(0,limit).map(x=>`<span class="chip red">${esc(x)}</span>`).join('');
|
||||
const F=label=>!(((MANIFEST||{})["字段显示"]||{})[label]===false);
|
||||
const kv=(k,v)=>F(k)?`<div class="kv"><span class="k">${esc(k)}</span><span class="v">${v}</span></div>`:'';
|
||||
const sourcePrefixes=new Set(Object.keys(sourceMap).map(id=>String(id).split('-')[0]));
|
||||
const sourceButton=id=>sourceMap[id]?`<button type="button" class="source-ref-btn" data-action="open-source" data-id="${esc(id)}" title="查看来源详情">${esc(id)}</button>`:`<button type="button" class="source-ref-btn missing-source" data-action="missing-source" data-id="${esc(id)}" title="来源索引中暂未匹配">${esc(id)} · 待补来源</button>`;
|
||||
const unitRefInfo=item=>{if(item===null||item===undefined)return null;let id='',name='',meta='';if(typeof item==='object'){id=item.organization_id||item.org_id||item.id||'';name=item.name||item.name_zh||item.organization_name||'';meta=item.relationship||item.relation||item.status||''}else{const raw=String(item).trim();id=(unitMap[raw]||orgMap[raw])?raw:'';name=unitMap[raw]?.name||orgMap[raw]?.name_zh||raw}if(id){name=name||unitMap[id]?.name||orgMap[id]?.name_zh||id;meta=meta||unitMap[id]?.force_level||orgMap[id]?.organization_type||'关联单位'}return{name:name||'未命名单位',id,meta}};
|
||||
const renderUnitRefs=value=>{const items=arr(value).map(unitRefInfo).filter(Boolean);if(!items.length)return '待核';return `<div class="unit-ref-grid">${items.map(x=>{const action=x.id?(unitMap[x.id]?'open-unit':'open-org'):'';return action?`<button type="button" class="unit-ref-card" data-action="${action}" data-id="${esc(x.id)}"><strong>${esc(x.name)}</strong><small>${esc(x.meta||x.id)}</small></button>`:`<div class="unit-ref-card static"><strong>${esc(x.name)}</strong><small>${esc(x.meta||'公开关联单位')}</small></div>`}).join('')}</div>`};
|
||||
const objectLabel=o=>o?.name||o?.name_zh||o?.title||o?.organization||o?.platform_or_system||o?.platform_or_role||o?.organization_id||o?.id||'结构化对象';
|
||||
const objectSummary=o=>Object.entries(o||{}).filter(([k,v])=>!['name','name_zh','title','organization','platform_or_system','platform_or_role'].includes(k)&&v!==null&&v!==''&&typeof v!=='object').slice(0,3).map(([k,v])=>`${FIELD_LABELS[k]||k}:${String(v)}`).join(';');
|
||||
const humanValue=(k,v)=>{if(v===null||v===undefined||v==='')return '未提供/待核';if(k==='source_ids')return arr(v).map(id=>sourceButton(String(id))).join(' ');if(['related_units','units_public','relations'].includes(k))return renderUnitRefs(v);if(Array.isArray(v)){if(!v.length)return '无';if(v.some(x=>x&&typeof x==='object'))return `<div class="object-value-list">${v.map(x=>typeof x==='object'?`<div class="object-value-item"><strong>${esc(objectLabel(x))}</strong><span>${esc(objectSummary(x)||'结构化关联对象')}</span></div>`:`<span class="chip red">${esc(x)}</span>`).join('')}</div>`;return chips(v,30)}if(typeof v==='object')return `<div class="object-value-list">${Object.entries(v).map(([a,b])=>`<div class="object-value-item"><strong>${esc(FIELD_LABELS[a]||a)}</strong><span>${esc(typeof b==='object'?JSON.stringify(b):String(b))}</span></div>`).join('')}</div>`;if(k==='service')return esc(service(v));if(/status/.test(k))return badge(v);if(k==='confidence')return badge(v,'confidence');return esc(String(v));};
|
||||
const looksLikeSourceId=id=>/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/.test(id)&&sourcePrefixes.has(id.split('-')[0]);
|
||||
function enrichKnowledgeHtml(raw){const box=document.createElement('div');box.innerHTML=raw||'';
|
||||
box.querySelectorAll('[data-source-id]').forEach(n=>{const id=n.getAttribute('data-source-id');n.outerHTML=sourceButton(id)});
|
||||
box.querySelectorAll('[data-knowledge-path]').forEach(n=>{const p=n.getAttribute('data-knowledge-path'),label=n.textContent.trim()||knowledgeMap[p]?.title||p;n.outerHTML=knowledgeMap[p]?`<button type="button" class="org-ref-btn" data-action="open-knowledge" data-path="${esc(p)}">${esc(label)}</button>`:`<span class="offline-link-disabled">${esc(label)}</span>`});
|
||||
box.querySelectorAll('a').forEach(a=>{const label=a.textContent.trim()||'外部资料';a.outerHTML=`<span class="offline-link-disabled" title="离线部署未收录该外部页面内容">${esc(label)}</span>`});
|
||||
box.querySelectorAll('code').forEach(code=>{const id=code.textContent.trim();if(sourceMap[id]||looksLikeSourceId(id)){code.outerHTML=sourceButton(id)}else if(unitMap[id]){code.outerHTML=`<button type="button" class="org-ref-btn" data-action="open-unit" data-id="${esc(id)}">${esc(unitMap[id].name||id)}</button>`}else if(orgMap[id]){code.outerHTML=`<button type="button" class="org-ref-btn" data-action="open-org" data-id="${esc(id)}">${esc(orgMap[id].name_zh||id)}</button>`}});
|
||||
const walker=document.createTreeWalker(box,NodeFilter.SHOW_TEXT);const nodes=[];while(walker.nextNode())nodes.push(walker.currentNode);nodes.forEach(node=>{if(node.parentElement?.closest('button,script,style,code'))return;const text=node.nodeValue||'';const re=/\[([A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+)\]/g;if(!re.test(text))return;re.lastIndex=0;const frag=document.createDocumentFragment();let last=0,m;while((m=re.exec(text))){frag.append(document.createTextNode(text.slice(last,m.index)));const id=m[1];if(sourceMap[id]||looksLikeSourceId(id)){const wrap=document.createElement('span');wrap.innerHTML=sourceButton(id);frag.append(wrap.firstElementChild)}else{frag.append(document.createTextNode(m[0]))}last=re.lastIndex}frag.append(document.createTextNode(text.slice(last)));node.replaceWith(frag)});return box.innerHTML}
|
||||
function pageVisible(key){var p=(MANIFEST['页面']||[]).find(function(x){return x['编号']===key});return !(p&&p['隐藏']===true)}
|
||||
function applyPageVisibility(){
|
||||
(MANIFEST['页面']||[]).forEach(function(p){
|
||||
if(p&&p['隐藏']===true&&p['编号']){
|
||||
var b=document.querySelector('.tab[data-tab="'+p['编号']+'"]');if(b)b.style.display='none';
|
||||
var s=document.getElementById('page-'+p['编号']);if(s)s.style.display='none';
|
||||
}
|
||||
});
|
||||
}
|
||||
function setTab(tab){if(!pageVisible(tab))return;state.tab=tab;$$('.tab').forEach(x=>x.classList.toggle('active',x.dataset.tab===tab));$$('.page').forEach(x=>x.classList.toggle('active',x.id===`page-${tab}`));window.scrollTo(0,0)}
|
||||
function openModal(html){$('#modalBody').innerHTML=html;$('#modal').classList.remove('hidden');document.body.style.overflow='hidden'} function closeModal(){$('#modal').classList.add('hidden');document.body.style.overflow=''}
|
||||
function openDrawer(title,html){$('#drawerTitle').textContent=title;$('#drawerBody').innerHTML=html;$('#drawer').classList.remove('hidden');document.body.style.overflow='hidden'} function closeDrawer(){$('#drawer').classList.add('hidden');document.body.style.overflow=''}
|
||||
function closeDetail(){$('#detail').classList.add('hidden');$('#detail').innerHTML='';document.body.style.overflow=''} function closeQuery(){$('#queryPanel').classList.add('hidden');document.body.style.overflow=''}
|
||||
function relatedDocs(paths){const ds=uniq(paths).map(p=>knowledgeMap[p]).filter(Boolean);return ds.length?`<div class="related-docs">${ds.map(d=>`<div class="related-doc" data-action="open-knowledge" data-path="${esc(d.path)}"><strong>${esc(d.title)}</strong><p>${esc(clip(d.summary,100))}</p></div>`).join('')}</div>`:'<p class="rich">暂无匹配的知识正文。</p>'}
|
||||
function technicalFields(x){return `<details class="technical-details"><summary>查看全部结构化字段(中文字段名)</summary><table class="human-table"><tbody>${Object.entries(x).map(([k,v])=>`<tr><th>${esc(FIELD_LABELS[k]||k)}</th><td>${humanValue(k,v)}</td></tr>`).join('')}</tbody></table></details>`}
|
||||
function infoGroup(title,fields,x){return `<section class="record-group"><h3>${esc(title)}</h3>${fields.filter(k=>k in x&&F(FIELD_LABELS[k]||k)).map(k=>`<div class="record-field"><span class="label">${esc(FIELD_LABELS[k]||k)}</span><span class="value">${humanValue(k,x[k])}</span></div>`).join('')}</section>`}
|
||||
const RELATED={simulator:['capabilities/training/simulators_training_devices_and_digital_training.md','capabilities/training/flight_training_pipeline_and_qualification_generation.md'],maintenance:['capabilities/maintenance/maintenance_levels_airworthiness_quality_and_configuration.md','capabilities/logistics/aviation_materials_suppliers_and_lifecycle_supply_chain.md'],industry:['capabilities/industry/domestic_aviation_industry_and_defense_ecosystem.md','capabilities/industry/external_technology_dependencies_and_autonomy_boundaries.md'],dependency:['capabilities/industry/external_technology_dependencies_and_autonomy_boundaries.md'],risk:['safety/frameworks/human_factors_crm_hfacs_fatigue_and_safety_culture.md','safety/frameworks/environment_atc_base_ground_and_uas_safety.md'],process:['safety/governance/investigation_evidence_grounding_inspection_and_return_to_flight.md','safety/governance/aviation_safety_governance_organizations_and_institutions.md'],training:['capabilities/training/flight_training_pipeline_and_qualification_generation.md'],safety:['safety/events/public_major_aviation_safety_events_timeline.md','safety/governance/investigation_evidence_grounding_inspection_and_return_to_flight.md']};
|
||||
function recordTitle(type,x){return x.name||x.name_zh||x.title||x.organization||x.platform_or_system||x.platform_or_role||x.platform_family||x.domain||x.stage||x.summary||'专题详情'}
|
||||
function openRecord(type,x){let groups=[];if(type==='simulator')groups=[['基本信息',['platform_or_role','category','organization','delivery_status','confidence']],['训练应用',['training_stage','evidence','instructor_requirement']],['构型与保障',['configuration_status','source_ids']]];else if(type==='maintenance')groups=[['维修对象',['platform_family','level','task_family','service','status']],['责任与输出',['responsible_entity','key_outputs','quality_gate']],['技术支撑',['technical_dependency','confidence','source_ids']]];else if(type==='industry')groups=[['产业节点',['organization','node_type','maturity','status','confidence']],['能力范围',['capabilities','platforms']],['外部接口',['foreign_interface','source_ids']]];else if(type==='dependency')groups=[['平台与维度',['platform_or_system','dimension','level']],['国内能力',['domestic_capability','mitigation']],['外部依赖与待核',['foreign_dependency','evidence','unresolved','source_ids']]];else if(type==='risk')groups=[['风险识别',['domain','risk','hfacs_level']],['表现与控制',['examples','controls']]];else if(type==='process')groups=[['治理阶段',['stage','owner','status']],['输入与输出',['inputs','outputs']],['证据依据',['evidence']]];else if(type==='training')groups=[['训练阶段',['stage_name','career_track','stage_order','service','status']],['责任与输入',['responsible_entity','input','academic']],['模拟与实飞',['simulator','flight','output']],['证据',['confidence','source_ids']]];else if(type==='safety')groups=[['事件概览',['date','service','platform','category','severity','summary','outcome']],['处置与恢复',['grounding','return_to_flight']],['调查状态',['cause_status','confidence','source_ids']]];else groups=[['详细字段',Object.keys(x)]];
|
||||
const paths=RELATED[type]||[];openModal(`<div class="record-hero"><h2>${esc(recordTitle(type,x))}</h2><p>以下内容已按业务语义重新分组,原始JSON不再作为默认展示。</p></div><div class="record-grid">${groups.map(g=>infoGroup(g[0],g[1],x)).join('')}</div><section class="detail-section"><h3>关联知识正文</h3>${relatedDocs(paths)}</section>${technicalFields(x)}`)}
|
||||
function renderKnowledgeDetail(doc,unit){if(!doc)return;const heroExtra=unit?`<div class="detail-summary">${kv('单位层级',esc(unit.force_level))}${kv('公开驻地',esc(unit.public_location))}${kv('状态',badge(unit.registry_status||unit.status))}${kv('可信度',badge(unit.registry_confidence||unit.confidence,'confidence'))}</div>`:`<div class="detail-summary">${kv('专题分类',esc(doc.category))}${kv('档案类型',esc(doc.type))}${kv('当前阶段',esc(doc.stage))}${kv('正文规模',`${doc.word_count} 字符`)}</div>`;$('#detail').innerHTML=`<div class="detail-top"><div><strong>${unit?'单位与兵力档案':'知识专题正文'}</strong><span style="opacity:.72;margin-left:12px">Markdown全文呈现</span></div><button class="btn white" data-action="close-detail">返回</button></div><div class="detail-body"><section class="detail-hero"><div><h2>${esc(doc.title)}</h2><p>${esc(doc.summary||doc.when||'知识库专题正文')}</p><div><span class="badge red">${esc(doc.category)}</span><span class="badge red">${esc(doc.type)}</span>${doc.confidence?badge(doc.confidence,'confidence'):''}</div></div>${heroExtra}</section><div class="reader-layout mt"><aside class="reader-toc"><h4>本页目录</h4>${doc.sections.map((s,i)=>`<button class="${i===0?'active':''}" data-action="reader-scroll" data-target="${s.id}">${esc(s.title)}</button>`).join('')}</aside><article class="reader-main">${doc.sections.map(s=>`<section id="${s.id}" class="md-section"><h2>${esc(s.title)}</h2><div class="md-body">${enrichKnowledgeHtml(s.html)}</div></section>`).join('')}</article></div></div>`;$('#detail').classList.remove('hidden');document.body.style.overflow='hidden'}
|
||||
function openKnowledge(path){renderKnowledgeDetail(knowledgeMap[path])} function openUnit(id){const u=unitMap[id];if(!u)return;const d=knowledgeMap[u.path];if(d)renderKnowledgeDetail(d,u);else openRecord('unit',u)}
|
||||
function unitCard(u){return `<article class="unit-card" data-action="open-unit" data-id="${esc(u.organization_id)}"><div class="top"><div><h4>${esc(u.name)}</h4><div class="sub">${esc(service(u.service))} · ${esc(u.force_level||u.organization_type)}</div></div>${badge(u.registry_status||u.status)}</div><div class="mt">${chips(u.platforms,4)}</div><p>${esc(clip(u.summary,145))}</p><div class="foot"><span>${esc(u.public_location||'驻地待核')}</span><button class="btn light sm">阅读完整档案</button></div></article>`}
|
||||
function renderOverview(){const stats=[['单位档案',DATA.units.length,'41篇单位Markdown'],['组织实体',DATA.organizations.length,'组织与支援关系'],['装备平台',DATA.equipment.length,'平台与状态'],['知识专题',KNOWLEDGE.length,'非重复Markdown全文'],['飞安事件',DATA.safetyEvents.length,'公开事件基线'],['官方来源',DATA.sources.length,'一手资料索引']];const entry=[['组织机构','organization','组织架构图','按军种展开联队、旅、大队和队级飞行单位'],['单位兵力','units','完整单位档案','直接阅读对应Markdown全部章节'],['装备体系','equipment','装备专题','结构化装备信息关联知识正文'],['训练保障','training','能力生成','模拟器和维修弹框改为业务详情页'],['工业依赖','industry','产业专题','国内能力、供应商和外部依赖'],['飞安治理','safety','风险闭环','事故、人因、调查与复飞正文'],['知识专题','knowledge','Markdown全文','按分类浏览全部96篇非重复知识文件']];$('#page-overview').innerHTML=`<div class="page-head"><div><h2>全库态势总览</h2><p>结构化JSON用于检索、筛选和关联;Markdown正文作为详情页面的主要内容源,最大限度保留知识深度。</p></div><div class="page-actions"><button class="btn line" data-action="open-query">交互查询</button><button class="btn primary" data-action="goto-tab" data-tab="knowledge">进入知识专题库</button></div></div><div class="stats">${stats.map(s=>`<div class="stat"><div class="label">${s[0]}</div><div class="num">${s[1]}</div><div class="hint">${s[2]}</div></div>`).join('')}</div><div class="section-title"><h3>专题入口</h3><span>详情默认采用中文业务结构与Markdown全文</span></div><div class="grid cols3">${entry.map(e=>`<article class="entry" data-action="goto-tab" data-tab="${e[1]}"><div class="letter">${e[0][0]}</div><strong>${e[0]}</strong><p>${e[3]}</p><span class="badge red">${e[2]}</span></article>`).join('')}</div><div class="grid cols2 mt"><div class="panel"><h3>本版核心变化</h3>${['取消默认原始JSON弹框','单位详情加载完整Markdown','增加96篇知识专题浏览','搜索覆盖Markdown全文','专题详情采用字段分组、流程、关系和来源卡片'].map(x=>`<div class="source-card">${x}</div>`).join('')}</div><div class="panel"><h3>数据边界与口径</h3><div class="notice">${esc(DATA.meta.notice)}</div>${kv('Markdown正文','保留章节、表格、列表、引用、代码块和关联分析')}${kv('结构化数据','用于交互查询和跨实体关联,不替代知识正文')}${kv('数量口径','区分历史接收、项目总量、单位分配与实时可用')}</div></div><div class="section-title"><h3>重点单位</h3><span>进入二级页面阅读单位Markdown全文</span></div><div class="grid cols3">${DATA.units.filter(x=>x.priority==='P1').slice(0,9).map(unitCard).join('')}</div>`}
|
||||
function orgImportant(o){return unitMap[o.organization_id]||['service_headquarters','functional_command','tactical_fighter_wing','tactical_composite_wing','composite_wing','aviation_brigade','aviation_group','training_command','base_command','rescue_squadron'].includes(o.organization_type)}
|
||||
function orgTreeData(svc){const active=DATA.organizations.filter(o=>o.service===svc&&!String(o.status).includes('HISTORICAL')&&!String(o.status).includes('DEPRECATED')&&orgImportant(o));const ids=new Set(active.map(x=>x.organization_id)),roots=active.filter(x=>!x.parent_public||!ids.has(x.parent_public)),children={};active.forEach(x=>(children[x.parent_public]??=[]).push(x));return{roots,children}}
|
||||
function nodeHtml(o,children,depth=0){const kids=(children[o.organization_id]||[]).sort((a,b)=>a.name_zh.localeCompare(b.name_zh,'zh-CN')),cls=depth===0?'root':depth===1?'branch':'';return `<li><button class="org-node ${cls}" data-action="open-org" data-id="${esc(o.organization_id)}"><span>${esc(o.name_zh)}</span><small>${esc(status(o.status))}</small></button>${kids.length?`<ul>${kids.map(k=>nodeHtml(k,children,depth+1)).join('')}</ul>`:''}</li>`}
|
||||
function renderOrganization(){const groups=[['air_force','空军体系'],['army','陆军航空'],['navy','海军航空'],['civil','民政航空支援']],{roots,children}=orgTreeData(state.orgService);$('#page-organization').innerHTML=`<div class="page-head"><div><h2>组织机构图</h2><p>点击节点查看中文组织详情;已有单位Markdown的节点可继续进入全文档案。</p></div></div><div class="org-layout"><aside class="side-nav"><h3 style="margin:5px 8px 12px">组织分类</h3>${groups.map(g=>`<button class="${state.orgService===g[0]?'active':''}" data-action="org-service" data-service="${g[0]}">${g[1]}</button>`).join('')}<div class="notice mt">完整119个组织实体仍可通过交互查询检索。</div></aside><div class="org-canvas"><div class="org-toolbar"><div><strong>${groups.find(x=>x[0]===state.orgService)?.[1]||'组织体系'}</strong><div style="font-size:12px;color:#667085;margin-top:4px">点击组织节点进行下钻</div></div><div class="zoom"><button class="btn light sm" data-action="zoom-out">缩小</button><button class="btn light sm" data-action="zoom-reset">复原</button><button class="btn light sm" data-action="zoom-in">放大</button></div></div><div class="tree" style="--scale:${state.orgZoom}"><ul>${roots.map(r=>nodeHtml(r,children)).join('')||'<div class="empty">暂无主干节点</div>'}</ul></div></div><aside class="side-info"><h3>组织图说明</h3>${kv('红色节点','军种或主干根节点')}${kv('浅红节点','联队、旅、大队等主要分支')}${kv('白色节点','队级飞行单位或专业组织')}<div class="notice mt">组织存在不等于完整兵力公开。</div></aside></div>`}
|
||||
function openOrg(id){const o=orgMap[id];if(!o)return;const u=unitMap[id],parent=orgMap[o.parent_public],childs=DATA.organizations.filter(x=>x.parent_public===id&&!String(x.status).includes('HISTORICAL')).slice(0,18);const orgDocPaths=['entities/organizations/air_force_headquarters_and_four_commands.md','entities/organizations/air_force_wings_1_to_7.md','entities/organizations/army_aviation_special_forces_system.md','entities/organizations/naval_antisubmarine_aviation_system.md'].filter(p=>knowledgeMap[p]);openModal(`<div class="record-hero"><h2>${esc(o.name_zh)}</h2><p>${esc(o.notes||'公开组织实体与关系档案')}</p></div><div class="record-grid">${infoGroup('组织身份',['organization_type','service','status','confidence','last_verified'],o)}<section class="record-group"><h3>隶属与关联</h3>${kv('公开上级',esc(parent?.name_zh||'待核/不适用'))}${kv('下级单位数',String(childs.length))}${childs.map(x=>`<div class="field-item" data-action="open-org" data-id="${esc(x.organization_id)}"><strong>${esc(x.name_zh)}</strong><span>${esc(status(x.status))}</span></div>`).join('')}</section></div>${u?`<button class="btn primary mt" data-action="open-unit" data-id="${esc(id)}">阅读完整单位Markdown档案</button>`:''}<section class="detail-section"><h3>关联组织专题</h3>${relatedDocs(orgDocPaths)}</section>${technicalFields(o)}`)}
|
||||
function filteredUnits(){return DATA.units.filter(u=>{const f=state.unitFilters;return(!f.q||JSON.stringify(u).toLowerCase().includes(f.q.toLowerCase()))&&(f.service==='全部'||service(u.service)===f.service)&&(f.level==='全部'||String(u.force_level).includes(f.level))&&(f.location==='全部'||String(u.public_location).includes(f.location))&&(f.status==='全部'||status(u.registry_status||u.status)===f.status)})}
|
||||
function renderUnits(){const all=filteredUnits(),pages=Math.max(1,Math.ceil(all.length/state.unitSize));state.unitPage=Math.min(state.unitPage,pages);const show=all.slice((state.unitPage-1)*state.unitSize,state.unitPage*state.unitSize),services=['全部',...uniq(DATA.units.map(x=>service(x.service)))],levels=['全部',...uniq(DATA.units.map(x=>x.force_level).filter(Boolean)).slice(0,12)],locs=['全部',...uniq(DATA.units.map(x=>String(x.public_location||'').split('(')[0]).filter(Boolean)).slice(0,15)],sts=['全部',...uniq(DATA.units.map(x=>status(x.registry_status||x.status)))];$('#page-units').innerHTML=`<div class="page-head"><div><h2>单位与兵力档案</h2><p>41个单位均连接对应Markdown全文,卡片摘要不再代替详细知识。</p></div><div class="view-switch"><button class="${state.unitView==='cards'?'active':''}" data-action="unit-view" data-view="cards">卡片</button><button class="${state.unitView==='table'?'active':''}" data-action="unit-view" data-view="table">矩阵</button></div></div><div class="filters"><input class="input" id="uQ" value="${esc(state.unitFilters.q)}" placeholder="查询单位、任务、装备或驻地"><select class="select" id="uService">${services.map(x=>`<option ${state.unitFilters.service===x?'selected':''}>${esc(x)}</option>`).join('')}</select><select class="select" id="uLevel">${levels.map(x=>`<option ${state.unitFilters.level===x?'selected':''}>${esc(x)}</option>`).join('')}</select><select class="select" id="uLoc">${locs.map(x=>`<option ${state.unitFilters.location===x?'selected':''}>${esc(x)}</option>`).join('')}</select><select class="select" id="uStatus">${sts.map(x=>`<option ${state.unitFilters.status===x?'selected':''}>${esc(x)}</option>`).join('')}</select><button class="btn light" data-action="clear-units">清空</button></div>${state.unitView==='cards'?`<div class="grid cols3">${show.map(unitCard).join('')||'<div class="empty">没有匹配单位</div>'}</div>`:`<div class="table-wrap"><table><thead><tr><th>单位名称</th><th>军种</th><th>层级</th><th>驻地</th><th>平台</th><th>任务</th><th>状态</th><th>完整档案</th></tr></thead><tbody>${show.map(u=>`<tr><td><strong>${esc(u.name)}</strong></td><td>${esc(service(u.service))}</td><td>${esc(u.force_level)}</td><td>${esc(u.public_location)}</td><td>${chips(u.platforms,4)}</td><td>${esc(arr(u.mission_roles).slice(0,3).join('、'))}</td><td>${badge(u.registry_status||u.status)}</td><td><button class="btn primary sm" data-action="open-unit" data-id="${esc(u.organization_id)}">阅读全文</button></td></tr>`).join('')}</tbody></table></div>`}<div class="pagination"><button class="btn line sm" data-action="unit-page" data-page="${state.unitPage-1}" ${state.unitPage<=1?'disabled':''}>上一页</button><span>第 ${state.unitPage} / ${pages} 页,共 ${all.length} 个单位</span><button class="btn line sm" data-action="unit-page" data-page="${state.unitPage+1}" ${state.unitPage>=pages?'disabled':''}>下一页</button></div>`;['uQ','uService','uLevel','uLoc','uStatus'].forEach(id=>$('#'+id).addEventListener(id==='uQ'?'input':'change',e=>{const k={uQ:'q',uService:'service',uLevel:'level',uLoc:'location',uStatus:'status'}[id];state.unitFilters[k]=e.target.value;state.unitPage=1;renderUnits()}))}
|
||||
function equipName(x){return x.display_name||x.name_zh||x.platform_name||x.platform_id} function equipCat(x){const n=equipName(x),c=x.category||'';if(/F-16|Mirage|F-CK|战斗/.test(n+c))return'战斗机';if(/T-34|AJT|AT-3|TH-67|教练/.test(n+c))return'教练机';if(/E-2|预警/.test(n+c))return'预警机';if(/C-130|运输|B-737|Fokker|Beech/.test(n+c))return'运输与专机';if(/P-3|反潜巡逻/.test(n+c))return'反潜巡逻机';if(/AH-|UH-|OH-|CH-|S-70|EC225|500MD|直升/.test(n+c))return'直升机';if(/无人|MQ-|腾云|剑翔|锐鸢|Altius|Switchblade/.test(n+c))return'无人航空器';return'其他平台'}
|
||||
function equipDocs(x){const cat=equipCat(x),m={'无人航空器':['entities/equipment/unmanned_aviation_forces.md','entities/equipment/unmanned_equipment_maturity_and_program_status.md'],'直升机':['entities/equipment/aircraft_platform_lineage.md','entities/equipment/army_navy_aviation_weapons_and_mission_systems.md'],'战斗机':['entities/equipment/aircraft_platform_lineage.md','entities/equipment/air_force_airborne_weapons_munitions_and_pods.md'],'教练机':['entities/equipment/aircraft_platform_lineage.md','capabilities/training/flight_training_pipeline_and_qualification_generation.md'],'预警机':['entities/equipment/special_rescue_vip_and_electronic_warfare_aircraft.md','capabilities/missions/mission_system_and_joint_relations.md'],'运输与专机':['entities/equipment/special_rescue_vip_and_electronic_warfare_aircraft.md'],'反潜巡逻机':['entities/equipment/special_rescue_vip_and_electronic_warfare_aircraft.md','entities/equipment/army_navy_aviation_weapons_and_mission_systems.md']};return m[cat]||['entities/equipment/aircraft_platform_lineage.md']}
|
||||
function renderEquipment(){const cats=['全部',...uniq(DATA.equipment.map(equipCat))],list=DATA.equipment.filter(x=>state.equipCat==='全部'||equipCat(x)===state.equipCat);$('#page-equipment').innerHTML=`<div class="page-head"><div><h2>装备体系</h2><p>装备详情采用业务字段、武器关系、来源卡和关联Markdown专题,不再展示裸JSON。</p></div></div><div class="equipment-layout"><aside class="side-nav category-list"><h3 style="margin:5px 8px 12px">装备分类</h3>${cats.map(c=>`<button class="${state.equipCat===c?'active':''}" data-action="equip-cat" data-cat="${esc(c)}"><span>${esc(c)}</span><span>${c==='全部'?DATA.equipment.length:DATA.equipment.filter(x=>equipCat(x)===c).length}</span></button>`).join('')}</aside><div><div class="grid cols3">${list.map(x=>`<article class="equip-card" data-action="open-equip" data-id="${esc(x.platform_id)}"><div class="top"><h4>${esc(equipName(x))}</h4>${badge(x.status)}</div><div>${chips([equipCat(x),service(x.service)],4)}</div><p>公开配属:${esc(arr(x.units_public).join('、')||'待核')}。点击查看任务关系、武器系统、来源和专题正文。</p><div class="foot"><span>${esc(x.last_verified||'')}</span><button class="btn light sm">丰富详情</button></div></article>`).join('')}</div></div></div>`}
|
||||
function openEquip(id){const x=DATA.equipment.find(e=>e.platform_id===id);if(!x)return;const rel=DATA.platformWeapon.filter(r=>String(r.platform).includes(equipName(x))||String(r.platform).includes(x.name_zh||'')),unitValue=(x.related_units&&x.related_units.length?x.related_units:x.units_public),srcs=arr(x.source_ids).map(id=>sourceMap[id]).filter(Boolean);openModal(`<div class="record-hero"><h2>${esc(equipName(x))}</h2><p>平台、任务、配属、武器关系、来源和关联知识正文综合展示。</p><div>${badge(x.status)} ${badge(x.confidence,'confidence')} <span class="badge red">${esc(equipCat(x))}</span></div></div><div class="record-grid"><section class="record-group"><h3>平台身份</h3>${kv('所属体系',esc(service(x.service)))}<div class="record-field"><span class="label">公开单位</span><span class="value">${renderUnitRefs(unitValue)}</span></div>${kv('最后核验',esc(x.last_verified||'待核'))}</section><section class="record-group"><h3>数量与状态边界</h3><p class="rich">军售批准、采购、交付、接装和稳定形成能力属于不同状态;不从全军采购总量推算单位编配或实时可用数量。</p></section></div><section class="detail-section"><h3>武器与任务系统关系</h3>${rel.length?`<div class="table-wrap"><table><thead><tr><th>武器或系统</th><th>用途</th><th>状态</th><th>可信度</th></tr></thead><tbody>${rel.map(r=>`<tr><td>${esc(r.weapon_or_system)}</td><td>${esc(r.role)}</td><td>${badge(r.status)}</td><td>${badge(r.confidence,'confidence')}</td></tr>`).join('')}</tbody></table></div>`:'<p class="rich">当前没有匹配到结构化武器关系,不代表平台没有任务系统。</p>'}</section><section class="detail-section"><h3>公开来源</h3>${srcs.length?srcs.map(s=>`<div class="source-card" data-action="open-source" data-id="${esc(s.source_id)}"><strong>${esc(s.title)}</strong><p>${esc(s.usage)}</p></div>`).join(''):'<p>来源编号已记录或待补充。</p>'}</section><section class="detail-section"><h3>关联知识正文</h3>${relatedDocs(equipDocs(x))}</section>${technicalFields(x)}`)}
|
||||
function renderTraining(){const stages=[...DATA.training].sort((a,b)=>Number(a.stage_order)-Number(b.stage_order));$('#page-training').innerHTML=`<div class="page-head"><div><h2>训练与保障</h2><p>结构化卡片负责概览,点击后进入中文业务详情并可继续阅读训练、模拟器、维修和航材Markdown全文。</p></div></div><div class="panel"><div class="panel-head"><div><h3>飞行训练资格生成链</h3><p>点击任一阶段查看输入、学科、模拟器、实飞、输出和来源</p></div></div><div class="flow">${stages.slice(0,9).map((x,i)=>`<div class="flow-step" data-action="record-detail" data-type="training" data-index="${DATA.training.indexOf(x)}"><div class="no">${i+1}</div><h4>${esc(x.stage_name)}</h4><p>${esc(x.responsible_entity)}</p></div>`).join('')}</div></div><div class="section-title"><h3>模拟训练体系</h3><span>业务字段分组 + 关联Markdown</span></div><div class="grid cols3">${DATA.simulators.map((x,i)=>`<article class="unit-card" data-action="record-detail" data-type="simulator" data-index="${i}"><div class="top"><h4>${esc(x.platform_or_role)}</h4>${badge(x.delivery_status)}</div><div>${chips([x.category],3)}</div><p>${esc(x.evidence)}</p><div class="foot"><span>${esc(x.organization)}</span><button class="btn light sm">查看丰富详情</button></div></article>`).join('')}</div><div class="section-title"><h3>维修层级与保障能力</h3><span>点击查看责任主体、质量关口、技术依赖和全文专题</span></div><div class="grid cols2">${DATA.maintenance.map((x,i)=>`<div class="panel" data-action="record-detail" data-type="maintenance" data-index="${i}"><div class="panel-head"><div><h3>${esc(x.platform_family)}</h3><p>${esc(x.level)} · ${esc(x.task_family)}</p></div>${badge(x.status)}</div><p class="rich">${esc(x.key_outputs)}</p><div>${chips([x.responsible_entity,x.quality_gate],4)}</div></div>`).join('')}</div>`}
|
||||
function renderIndustry(){$('#page-industry').innerHTML=`<div class="page-head"><div><h2>工业链与外部依赖</h2><p>产业节点和依赖矩阵均使用中文详情分组,并链接国产工业、供应链和外部依赖Markdown全文。</p></div></div><div class="industry-stack">${[['政策与军种需求','需求、预算、采购和产业政策'],['总体设计与系统整合','汉翔、中科院及项目主承包'],['专业系统与供应商','发动机、航电、雷达、结构、材料和特殊制程'],['维修与全寿期支援','军方厂库、国内MRO、原厂/FMS和技术资料'],['外部技术与认证','设计权、软件、专用工具、出口管制和适航认证']].map((x,i)=>`<div class="industry-layer"><div><span class="badge red">产业层级 ${i+1}</span><h3 class="mt">${x[0]}</h3></div><p class="rich">${x[1]}</p></div>`).join('')}</div><div class="section-title"><h3>国内产业节点</h3><span>点击查看能力范围、平台、成熟度与关联正文</span></div><div class="grid cols3">${DATA.industry.map((x,i)=>`<article class="unit-card" data-action="record-detail" data-type="industry" data-index="${i}"><div class="top"><h4>${esc(x.organization)}</h4>${badge(x.status)}</div><div>${chips([x.node_type,x.maturity],4)}</div><p>${esc(clip(x.capabilities,150))}</p><div class="foot"><span>${esc(x.foreign_interface)}</span><button class="btn light sm">丰富详情</button></div></article>`).join('')}</div><div class="section-title"><h3>平台级外部依赖矩阵</h3><span>默认不显示原始JSON</span></div><div class="table-wrap"><table><thead><tr><th>平台或系统</th><th>依赖维度</th><th>国内能力</th><th>外部依赖</th><th>等级</th><th>详情</th></tr></thead><tbody>${DATA.externalDependencies.map((x,i)=>`<tr><td><strong>${esc(x.platform_or_system)}</strong></td><td>${esc(x.dimension)}</td><td>${esc(clip(x.domestic_capability,75))}</td><td>${esc(clip(x.foreign_dependency,75))}</td><td><span class="badge red">${esc(x.level)}</span></td><td><button class="btn light sm" data-action="record-detail" data-type="dependency" data-index="${i}">展开</button></td></tr>`).join('')}</tbody></table></div>`}
|
||||
function renderSafety(){$('#page-safety').innerHTML=`<div class="page-head"><div><h2>飞安、事故与风险治理</h2><p>风险和治理环节采用语义详情页面,并连接事故调查、人因、适航、环境和搜救Markdown专题。</p></div></div><div class="grid cols4">${DATA.safetyRisks.slice(0,11).map((x,i)=>`<article class="risk-card" data-action="record-detail" data-type="risk" data-index="${i}"><h4>${esc(x.domain)}</h4><p class="rich">${esc(x.risk)}</p><div>${chips(arr(x.controls),4)}</div></article>`).join('')}</div><div class="section-title"><h3>飞安治理闭环</h3><span>点击阶段查看输入、输出、责任主体与制度正文</span></div><div class="panel"><div class="flow">${DATA.safetyProcess.map((x,i)=>`<div class="flow-step" data-action="record-detail" data-type="process" data-index="${i}"><div class="no">${i+1}</div><h4>${esc(x.stage)}</h4><p>${esc(x.owner)}</p></div>`).join('')}</div></div><div class="section-title"><h3>公开重大飞安事件</h3><span>右侧抽屉提供业务字段和完整专题入口</span></div><div class="timeline">${DATA.safetyEvents.map((x,i)=>`<article class="event" data-action="open-event" data-index="${i}"><span class="date">${esc(x.date)}</span> <span class="badge red">${esc(labels.category[x.category]||x.category)}</span><h4>${esc(x.platform)} · ${esc(x.summary)}</h4><p>${esc(x.outcome)};${esc(x.cause_status)}</p></article>`).join('')}</div>`}
|
||||
function openEvent(i){const x=DATA.safetyEvents[Number(i)];if(!x)return;const ss=arr(x.source_ids).map(id=>sourceMap[id]).filter(Boolean);openDrawer(`${x.date} · ${x.platform}`,`<div class="record-hero"><h2>${esc(x.summary)}</h2><p>事件事实、处置、复飞和原因状态分层展示。</p></div>${infoGroup('事件概览',['date','service','platform','category','severity','outcome'],x)}${infoGroup('停飞、检查与恢复',['grounding','return_to_flight'],x)}${infoGroup('调查与原因状态',['cause_status','confidence','source_ids'],x)}<section class="detail-section"><h3>公开来源</h3>${ss.map(s=>`<div class="source-card" data-action="open-source" data-id="${esc(s.source_id)}"><strong>${esc(s.title)}</strong><p>${esc(s.usage)}</p></div>`).join('')||'<p>来源编号已记录。</p>'}</section><section class="detail-section"><h3>关联知识正文</h3>${relatedDocs(RELATED.safety)}</section><div class="notice">初始通报、监督调查和最终原因属于不同证据层级,不应混写。</div>`)}
|
||||
function renderTimeline(){const sources=DATA.sources.filter(x=>!state.sourceQ||JSON.stringify(x).toLowerCase().includes(state.sourceQ.toLowerCase())).slice(0,70);$('#page-timeline').innerHTML=`<div class="page-head"><div><h2>事件时间线与来源</h2><p>时间线与官方来源卡保持可检索,同时来源索引Markdown也可在知识专题库阅读全文。</p></div></div><div class="source-layout"><div class="panel"><div class="panel-head"><div><h3>重大事件时间线</h3><p>按公开日期倒序</p></div></div><div class="timeline">${DATA.timeline.map(x=>`<article class="event"><span class="date">${esc(x.date)}</span> <span class="badge red">${esc(x.type)}</span><h4>${esc(x.title)}</h4><p>${esc(x.detail||'公开资料未提供更多摘要')}</p></article>`).join('')}</div></div><div><div class="panel mb"><div class="panel-head"><div><h3>官方来源查询</h3><p>共 ${DATA.sources.length} 项来源</p></div></div><input id="sourceQ" class="input" value="${esc(state.sourceQ)}" placeholder="查询来源名称、用途或编号"><button class="btn line mt" data-action="open-knowledge" data-path="sources/官方来源索引_v7.md">阅读来源索引Markdown</button></div>${sources.map(s=>`<article class="source-card" data-action="open-source" data-id="${esc(s.source_id)}"><h4>${esc(s.title)}</h4><p>${esc(s.usage)}</p><div class="mt">${badge(s.confidence,'confidence')} <span class="badge gray">${esc(s.verified)}</span></div></article>`).join('')}</div></div>`;$('#sourceQ').addEventListener('input',e=>{state.sourceQ=e.target.value;renderTimeline()})}
|
||||
function openSource(id){const s=sourceMap[id];if(!s)return;const local=sourceLocalMap[id]||{},contexts=local.citation_contexts||[],mentions=local.structured_mentions||[];
|
||||
const original=local.has_original_content&&local.original_content?`<section class="offline-source-panel"><h3>本地收录的原始内容</h3><div class="md-body">${enrichKnowledgeHtml(local.original_content)}</div></section>`:'';
|
||||
const contextHtml=contexts.length?`<section class="offline-source-panel"><h3>知识库引用上下文</h3><p class="rich">以下内容来自本地Markdown中引用该来源的章节,用于离线核对来源支撑范围;它不是外部网页的完整原文。</p>${contexts.map(c=>`<article class="citation-context" data-action="open-knowledge" data-path="${esc(c.path)}"><h4>${esc(c.title)}</h4><p><strong>${esc(c.section||'相关章节')}</strong>:${esc(c.snippet)}</p></article>`).join('')}</section>`:'';
|
||||
const mentionHtml=mentions.length?`<section class="offline-source-panel"><h3>结构化数据中的使用位置</h3>${mentions.map(m=>`<article class="structured-mention"><span class="dataset">${esc(m.dataset)}</span><div><strong>${esc(m.title)}</strong><p>${esc(m.summary||'该记录引用此来源。')}</p></div></article>`).join('')}</section>`:'';
|
||||
const noOriginal=!local.has_original_content?`<div class="notice mt">本地知识库未保存该官方页面或PDF的完整原文。当前为离线部署版本,因此不显示网址,也不提供外网跳转。</div>`:'';
|
||||
openModal(`<div class="record-hero"><h2>${esc(s.title)}</h2><p>${esc(s.usage)}</p></div>${infoGroup('来源信息',['source_id','verified','confidence'],s)}<section class="offline-source-panel"><h3>离线收录状态</h3><span class="offline-status ${local.has_original_content?'available':(contexts.length||mentions.length?'context':'')}">${esc(local.local_status||'仅收录来源元数据')}</span><p class="offline-reference-note">来源用途摘要:${esc(s.usage||'未提供')}</p></section>${original}${contextHtml}${mentionHtml}${noOriginal}<div class="notice">来源只能支撑其明确记载的字段,不能由单一来源推断完整编制、实时状态或单位级兵力。</div>`)}
|
||||
function knowledgeFiltered(){return KNOWLEDGE.filter(d=>(state.knowledgeCategory==='全部'||d.category===state.knowledgeCategory)&&(!state.knowledgeQ||(d.title+' '+d.summary+' '+d.text+' '+d.path).toLowerCase().includes(state.knowledgeQ.toLowerCase())))}
|
||||
function renderKnowledge(){const cats=['全部',...uniq(KNOWLEDGE.map(x=>x.category))],list=knowledgeFiltered(),pages=Math.max(1,Math.ceil(list.length/state.knowledgeSize));state.knowledgePage=Math.min(state.knowledgePage,pages);const show=list.slice((state.knowledgePage-1)*state.knowledgeSize,state.knowledgePage*state.knowledgeSize),counts=CounterBy(KNOWLEDGE,'category');$('#page-knowledge').innerHTML=`<div class="page-head"><div><h2>知识专题库</h2><p>共 ${KNOWLEDGE.length} 篇非重复Markdown知识文件。可按主题分类、标题和正文全文检索。</p></div><div class="page-actions"><input id="knowledgeQ" class="input" style="width:330px" value="${esc(state.knowledgeQ)}" placeholder="查询标题、摘要、正文或路径"></div></div><div class="knowledge-layout"><aside class="knowledge-side"><h3 style="margin:5px 8px 12px">专题分类</h3>${cats.map(c=>`<button class="${state.knowledgeCategory===c?'active':''}" data-action="knowledge-cat" data-cat="${esc(c)}"><span>${esc(c)}</span><span>${c==='全部'?KNOWLEDGE.length:(counts[c]||0)}</span></button>`).join('')}</aside><div><div class="grid cols3">${show.map(d=>`<article class="knowledge-card" data-action="open-knowledge" data-path="${esc(d.path)}"><h4>${esc(d.title)}</h4><div class="knowledge-meta"><span class="badge red">${esc(d.category)}</span><span class="badge gray">${esc(d.type)}</span></div><p>${esc(clip(d.summary||d.when,155))}</p><div class="knowledge-path">${esc(d.path)}</div><div class="foot mt"><span>${d.sections.length} 个章节</span><button class="btn light sm">阅读全文</button></div></article>`).join('')||'<div class="empty">没有匹配的Markdown专题</div>'}</div><div class="pagination"><button class="btn line sm" data-action="knowledge-page" data-page="${state.knowledgePage-1}" ${state.knowledgePage<=1?'disabled':''}>上一页</button><span>第 ${state.knowledgePage} / ${pages} 页,共 ${list.length} 篇</span><button class="btn line sm" data-action="knowledge-page" data-page="${state.knowledgePage+1}" ${state.knowledgePage>=pages?'disabled':''}>下一页</button></div></div></div>`;$('#knowledgeQ').addEventListener('input',e=>{state.knowledgeQ=e.target.value;state.knowledgePage=1;renderKnowledge()})}
|
||||
function CounterBy(items,key){return items.reduce((a,x)=>(a[x[key]]=(a[x[key]]||0)+1,a),{})}
|
||||
const datasets={units:['单位档案',DATA.units,'unit'],organizations:['组织机构',DATA.organizations,'organization'],equipment:['装备平台',DATA.equipment,'equipment'],training:['训练阶段',DATA.training,'training'],simulators:['模拟器',DATA.simulators,'simulator'],maintenance:['维修能力',DATA.maintenance,'maintenance'],industry:['产业节点',DATA.industry,'industry'],dependencies:['外部依赖',DATA.externalDependencies,'dependency'],safety:['飞安事件',DATA.safetyEvents,'safety'],sources:['官方来源',DATA.sources,'source'],knowledge:['知识专题',KNOWLEDGE,'knowledge']};
|
||||
function openDatasetRecord(key,x){const type=datasets[key][2];if(type==='unit')openUnit(x.organization_id);else if(type==='organization')openOrg(x.organization_id);else if(type==='equipment')openEquip(x.platform_id);else if(type==='source')openSource(x.source_id);else if(type==='knowledge')openKnowledge(x.path);else openRecord(type,x)}
|
||||
function openQuery(){$('#queryPanel').classList.remove('hidden');document.body.style.overflow='hidden';$('#queryForm').innerHTML=`<h2>交互式数据查询</h2><p class="rich">结构化字段用于筛选;结果点击后打开中文业务详情或Markdown全文。</p><label>数据集</label><select id="qDataset" class="select mb">${Object.entries(datasets).map(([k,v])=>`<option value="${k}">${v[0]}</option>`).join('')}</select><label>查询字段</label><select id="qField" class="select mb"></select><label>条件</label><select id="qOp" class="select mb"><option value="contains">包含</option><option value="equals">等于</option></select><label>查询值</label><input id="qValue" class="input mb" placeholder="输入关键词"><button class="btn primary" id="qRun">执行查询</button><button class="btn light" id="qClear">清空</button><div class="notice mt">查询结果默认不显示原始JSON。</div>`;const fields=()=>{const d=datasets[$('#qDataset').value][1],ks=uniq(d.slice(0,50).flatMap(x=>Object.keys(x))).sort();$('#qField').innerHTML='<option value="__all">全部字段</option>'+ks.map(k=>`<option value="${esc(k)}">${esc(FIELD_LABELS[k]||k)}</option>`).join('')};const run=()=>{const key=$('#qDataset').value,d=datasets[key][1],f=$('#qField').value,op=$('#qOp').value,q=$('#qValue').value.trim().toLowerCase(),r=d.filter(x=>{const v=f==='__all'?JSON.stringify(x):JSON.stringify(x[f]??'');return!q||(op==='equals'?v.replace(/^"|"$/g,'').toLowerCase()===q:v.toLowerCase().includes(q))}).slice(0,100);$('#queryResult').innerHTML=`<div class="page-head"><div><h2>查询结果</h2><p>匹配 ${r.length} 条,点击查看业务详情</p></div></div>${r.map((x,i)=>`<div class="query-row" data-action="query-record" data-dataset="${key}" data-index="${d.indexOf(x)}"><strong>${esc(recordTitle(datasets[key][2],x))}</strong><p style="margin:5px 0;color:#667085">${esc(clip(x.summary||x.usage||x.evidence||x.text||JSON.stringify(x),170))}</p></div>`).join('')||'<div class="empty">没有匹配结果</div>'}`};$('#qDataset').addEventListener('change',()=>{fields();run()});$('#qField').addEventListener('change',run);$('#qOp').addEventListener('change',run);$('#qValue').addEventListener('input',run);$('#qRun').onclick=run;$('#qClear').onclick=()=>{$('#qValue').value='';run()};fields();run()}
|
||||
function renderAll(){renderOverview();renderOrganization();renderUnits();renderEquipment();renderTraining();renderIndustry();renderSafety();renderTimeline();renderKnowledge()}
|
||||
document.addEventListener('click',e=>{const el=e.target.closest('[data-action]');if(!el)return;const a=el.dataset.action;if(a==='goto-tab')setTab(el.dataset.tab);if(a==='open-unit')openUnit(el.dataset.id);if(a==='open-org')openOrg(el.dataset.id);if(a==='open-equip')openEquip(el.dataset.id);if(a==='open-event')openEvent(el.dataset.index);if(a==='open-source')openSource(el.dataset.id);if(a==='missing-source')openModal(`<div class="record-hero"><h2>来源待补充</h2><p>当前来源索引中未匹配到该编号。</p></div>${kv('来源编号',esc(el.dataset.id))}<div class="notice mt">该编号已在Markdown正文中出现,但尚未与来源索引建立映射。后续可在离线来源表中补充标题、用途、核验日期、可信度及本地原文或摘录;本页面不展示外部网址。</div>`);if(a==='open-knowledge')openKnowledge(el.dataset.path);if(a==='record-detail'){const map={training:DATA.training,simulator:DATA.simulators,maintenance:DATA.maintenance,industry:DATA.industry,dependency:DATA.externalDependencies,risk:DATA.safetyRisks,process:DATA.safetyProcess};openRecord(el.dataset.type,map[el.dataset.type][Number(el.dataset.index)])}if(a==='query-record'){const key=el.dataset.dataset;openDatasetRecord(key,datasets[key][1][Number(el.dataset.index)])}if(a==='close-modal')closeModal();if(a==='close-drawer')closeDrawer();if(a==='close-detail')closeDetail();if(a==='open-query')openQuery();if(a==='close-query')closeQuery();if(a==='org-service'){state.orgService=el.dataset.service;state.orgZoom=1;renderOrganization()}if(a==='zoom-in'){state.orgZoom=Math.min(1.45,state.orgZoom+.1);renderOrganization()}if(a==='zoom-out'){state.orgZoom=Math.max(.6,state.orgZoom-.1);renderOrganization()}if(a==='zoom-reset'){state.orgZoom=1;renderOrganization()}if(a==='unit-view'){state.unitView=el.dataset.view;renderUnits()}if(a==='unit-page'){state.unitPage=Number(el.dataset.page);renderUnits()}if(a==='clear-units'){state.unitFilters={q:'',service:'全部',level:'全部',location:'全部',status:'全部'};state.unitPage=1;renderUnits()}if(a==='equip-cat'){state.equipCat=el.dataset.cat;renderEquipment()}if(a==='knowledge-cat'){state.knowledgeCategory=el.dataset.cat;state.knowledgePage=1;renderKnowledge()}if(a==='knowledge-page'){state.knowledgePage=Number(el.dataset.page);renderKnowledge()}if(a==='reader-scroll'){const t=document.getElementById(el.dataset.target);if(t)t.scrollIntoView({behavior:'smooth',block:'start'});$$('.reader-toc button').forEach(b=>b.classList.toggle('active',b===el))}if(a==='reset'){state.unitFilters={q:'',service:'全部',level:'全部',location:'全部',status:'全部'};state.unitPage=1;state.equipCat='全部';state.orgService='air_force';state.sourceQ='';state.knowledgeCategory='全部';state.knowledgeQ='';renderAll();setTab('overview')}});
|
||||
$$('.tab').forEach(t=>t.addEventListener('click',()=>setTab(t.dataset.tab)));
|
||||
const gs=$('#globalSearch');function globalResults(q){q=q.trim().toLowerCase();if(!q)return[];const r=[];DATA.units.forEach(x=>{if(JSON.stringify(x).toLowerCase().includes(q))r.push({kind:'单位',title:x.name,desc:x.summary,action:'open-unit',id:x.organization_id})});DATA.equipment.forEach(x=>{if(JSON.stringify(x).toLowerCase().includes(q))r.push({kind:'装备',title:equipName(x),desc:`${equipCat(x)} · ${status(x.status)}`,action:'open-equip',id:x.platform_id})});KNOWLEDGE.forEach(x=>{if((x.title+' '+x.summary+' '+x.text).toLowerCase().includes(q))r.push({kind:'知识正文',title:x.title,desc:x.summary||x.path,action:'open-knowledge',id:x.path})});DATA.safetyEvents.forEach((x,i)=>{if(JSON.stringify(x).toLowerCase().includes(q))r.push({kind:'飞安事件',title:`${x.date} ${x.platform}`,desc:x.summary,action:'open-event',id:i})});DATA.sources.forEach(x=>{if(JSON.stringify(x).toLowerCase().includes(q))r.push({kind:'来源',title:x.title,desc:x.usage,action:'open-source',id:x.source_id})});return r.slice(0,25)}
|
||||
gs.addEventListener('input',()=>{const r=globalResults(gs.value),p=$('#searchPop');if(!gs.value.trim()){p.classList.add('hidden');return}p.innerHTML=r.length?r.map(x=>`<div class="search-item" data-search-action="${x.action}" data-search-id="${esc(x.id)}"><span class="search-kind">${x.kind}</span><div><strong>${esc(x.title)}</strong><small>${esc(clip(x.desc,110))}</small></div></div>`).join(''):'<div class="empty">没有匹配结果</div>';p.classList.remove('hidden')});$('#searchPop').addEventListener('click',e=>{const x=e.target.closest('[data-search-action]');if(!x)return;$('#searchPop').classList.add('hidden');gs.value='';if(x.dataset.searchAction==='open-unit')openUnit(x.dataset.searchId);if(x.dataset.searchAction==='open-equip')openEquip(x.dataset.searchId);if(x.dataset.searchAction==='open-event')openEvent(x.dataset.searchId);if(x.dataset.searchAction==='open-source')openSource(x.dataset.searchId);if(x.dataset.searchAction==='open-knowledge')openKnowledge(x.dataset.searchId)});document.addEventListener('click',e=>{if(!e.target.closest('.search'))$('#searchPop').classList.add('hidden')});/* ── 页头同步(MANIFEST.系统 → title/h1/版本) ── */
|
||||
function syncHeader(){
|
||||
var sys=(MANIFEST||{})["系统"]||{};
|
||||
if(sys["名称"]){document.title=String(sys["名称"]);var h1=document.querySelector(".header h1");if(h1)h1.textContent=String(sys["名称"])}
|
||||
var p=document.querySelector(".header .brand p");
|
||||
if(p&&sys["版本"])p.textContent="结构化数据版 "+String(sys["版本"]);
|
||||
}
|
||||
|
||||
/* ── 自定义模块(MANIFEST.自定义模块 挂到对应页面底部) ── */
|
||||
function renderCustomModules(){
|
||||
var list=arr((MANIFEST||{})["自定义模块"]).filter(function(m){return m&&m["页面"]&&m.html});
|
||||
if(!list.length)return;
|
||||
list.forEach(function(m){
|
||||
var host=document.getElementById("page-"+m["页面"]);
|
||||
if(!host)return;
|
||||
var wrap=document.createElement("section");
|
||||
wrap.className="record-group custom-module";
|
||||
wrap.style.margin="18px 0";
|
||||
wrap.innerHTML="<h3>"+esc(m["标题"]||"自定义模块")+"</h3>"+m.html;
|
||||
host.appendChild(wrap);
|
||||
});
|
||||
}
|
||||
|
||||
/* ── 页面 JSON 编辑器(模块=DATA 顶层键 + 系统设置) ── */
|
||||
(function(){
|
||||
"use strict";
|
||||
function clone(v){return JSON.parse(JSON.stringify(v))}
|
||||
function draftsToData(d){var o={};Object.keys(d).forEach(function(k){if(k!=="__manifest__")o[k]=d[k]});return o}
|
||||
function replaceInPlace(t,s){Object.keys(t).forEach(function(k){delete t[k]});Object.keys(s).forEach(function(k){t[k]=s[k]})}
|
||||
function buildDrafts(data,manifest){var o={__manifest__:clone(manifest)};Object.keys(data).forEach(function(k){o[k]=clone(data[k])});return o}
|
||||
|
||||
var initialData=clone(DATA),initialManifest=clone(MANIFEST);
|
||||
var labels={};arr(MANIFEST["页面"]).forEach(function(p){if(p&&p["编号"])labels[p["编号"]]=p["名称"]||p["编号"]});
|
||||
var fingerprint=(function(){var h=2166136261,s=JSON.stringify(initialData)+"|"+JSON.stringify(initialManifest);for(var i=0;i<s.length;i++){h^=s.charCodeAt(i);h=Math.imul(h,16777619)}return (h>>>0).toString(36)})();
|
||||
var storageKey="structured-page-data-v1:"+fingerprint;
|
||||
function readLS(k){try{return window.localStorage?window.localStorage.getItem(k):null}catch(x){return null}}
|
||||
function writeLS(k,v){try{if(window.localStorage)window.localStorage.setItem(k,v)}catch(x){}}
|
||||
function removeLS(k){try{if(window.localStorage)window.localStorage.removeItem(k)}catch(x){}}
|
||||
|
||||
// 启动恢复:有合法缓存则应用(在首帧渲染前)。
|
||||
(function(){
|
||||
var cached=readLS(storageKey);if(!cached)return;
|
||||
try{
|
||||
var parsed=JSON.parse(cached);
|
||||
if(parsed&&typeof parsed==="object"&&parsed.data&&typeof parsed.data==="object"){
|
||||
replaceInPlace(DATA,parsed.data);
|
||||
if(parsed.manifest&&typeof parsed.manifest==="object")replaceInPlace(MANIFEST,parsed.manifest);
|
||||
}
|
||||
}catch(x){}
|
||||
})();
|
||||
|
||||
var modules=Object.keys(DATA).concat(["__manifest__"]);
|
||||
var active=modules[0]||"__manifest__";
|
||||
var drafts=buildDrafts(DATA,MANIFEST);
|
||||
function moduleTitle(k){return k==="__manifest__"?"系统设置(MANIFEST)":(labels[k]||k)}
|
||||
|
||||
var overlay=document.getElementById("editorOverlay");
|
||||
if(!overlay)return;
|
||||
var tabsEl=document.getElementById("editorTabs"),editor=document.getElementById("jsonEditor"),statusEl=document.getElementById("jsonStatus"),titleEl=document.getElementById("editorModuleTitle");
|
||||
|
||||
function setStatus(ok,msg){statusEl.textContent=msg;statusEl.className="json-status "+(ok?"valid":"invalid")}
|
||||
function readEditor(){
|
||||
try{
|
||||
var p=JSON.parse(editor.value);
|
||||
if(!p||typeof p!=="object")throw new Error("模块必须是 JSON 对象或数组");
|
||||
setStatus(true,"JSON 有效");return p
|
||||
}catch(x){setStatus(false,"JSON 无效:"+x.message);return null}
|
||||
}
|
||||
function saveActiveDraft(){var p=readEditor();if(!p)return false;drafts[active]=p;return true}
|
||||
function loadEditor(){titleEl.textContent=moduleTitle(active);editor.value=JSON.stringify(drafts[active],null,2);setStatus(true,"JSON 有效")}
|
||||
function renderTabs(){
|
||||
tabsEl.innerHTML="";
|
||||
modules.forEach(function(key){
|
||||
var b=document.createElement("button");b.type="button";
|
||||
b.className="editor-tab"+(key===active?" active":"");
|
||||
b.innerHTML="<b>"+esc(moduleTitle(key))+"</b><small>"+(key==="__manifest__"?"manifest.json":key)+"</small>";
|
||||
b.onclick=function(){if(key===active||!saveActiveDraft())return;active=key;renderTabs();loadEditor()};
|
||||
tabsEl.appendChild(b)
|
||||
})
|
||||
}
|
||||
function closeEditor(){overlay.classList.add("hidden")}
|
||||
function applyToPage(){
|
||||
if(!saveActiveDraft()){setStatus(false,"存在无效模块");return}
|
||||
replaceInPlace(DATA,draftsToData(drafts));
|
||||
replaceInPlace(MANIFEST,drafts.__manifest__);
|
||||
state.tab="overview";state.unitView="cards";state.unitPage=1;
|
||||
state.unitFilters={q:"",service:"全部",level:"全部",location:"全部",status:"全部"};
|
||||
closeEditor();syncHeader();renderAll();renderCustomModules();
|
||||
writeLS(storageKey,JSON.stringify({data:DATA,manifest:MANIFEST}))
|
||||
}
|
||||
function legacyCopy(text){var t=document.createElement("textarea");t.value=text;document.body.appendChild(t);t.select();try{document.execCommand("copy")}catch(x){}t.remove()}
|
||||
|
||||
document.getElementById("openEditor").onclick=function(){
|
||||
drafts=buildDrafts(DATA,MANIFEST);
|
||||
active=modules[0]||"__manifest__";
|
||||
renderTabs();loadEditor();
|
||||
overlay.classList.remove("hidden");
|
||||
setTimeout(function(){editor.focus()},40)
|
||||
};
|
||||
document.getElementById("closeEditor").onclick=closeEditor;
|
||||
var backdrop=overlay.querySelector(".backdrop");
|
||||
if(backdrop)backdrop.addEventListener("click",closeEditor);
|
||||
document.addEventListener("keydown",function(ev){if(ev.key==="Escape"&&!overlay.classList.contains("hidden"))closeEditor()});
|
||||
document.getElementById("applyJson").onclick=applyToPage;
|
||||
document.getElementById("resetJson").onclick=function(){
|
||||
drafts=buildDrafts(initialData,initialManifest);
|
||||
active=modules[0]||"__manifest__";
|
||||
removeLS(storageKey);
|
||||
renderTabs();loadEditor();
|
||||
setStatus(true,"已恢复默认数据,点击「应用到页面」生效")
|
||||
};
|
||||
document.getElementById("copyJson").onclick=function(){
|
||||
if(!saveActiveDraft())return;
|
||||
var text=JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2);
|
||||
if(navigator.clipboard&&navigator.clipboard.writeText)navigator.clipboard.writeText(text).catch(function(){legacyCopy(text)});
|
||||
else legacyCopy(text)
|
||||
};
|
||||
document.getElementById("downloadJson").onclick=function(){
|
||||
if(!saveActiveDraft())return;
|
||||
var blob=new Blob([JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2)],{type:"application/json;charset=utf-8"});
|
||||
var link=document.createElement("a");link.href=URL.createObjectURL(blob);link.download="page-data.json";link.click();
|
||||
setTimeout(function(){URL.revokeObjectURL(link.href)},1000)
|
||||
};
|
||||
})();
|
||||
syncHeader();
|
||||
applyPageVisibility();
|
||||
renderAll();
|
||||
renderCustomModules();
|
||||
})();
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"AF-ORG": {"has_original_content": false, "original_content": "", "citation_contexts": [{"path": "entities/organizations/air_force_headquarters_and_four_commands.md", "title": "空军司令部与四大指挥部组织", "section": "一、空军司令部", "snippet": "空军官网2026年说明,司令部本部设置各室、处,另辖作战、防空暨飞弹、教育训练暨准则发展、保修四个指挥部以及作战联队、基地指挥部、学校和科研单位。 [AF-ORG-2026] 1. 本部幕僚功能 公开资料能够确认的功能包括: 政治作战; 督察; 人事军务; 战备训练; 后勤; 计划; 通信资讯; 军事情报; 主计; 司令部勤务和公文管理。 这些功能不等于所有单位名称在每年均不变。v3把它们建模为 staff_function ,而非硬编码完整法定编制。 2. 司令部直属勤务 2024公开聘雇资料出现: 空军司令部勤务队; 文书管理分队。 二者用于说明司令部本部也有行政和勤务支援组织,"}, {"path": "entities/organizations/command_structure_overview.md", "title": "组织指挥体系", "section": "二、空军现行主干组织", "snippet": "─ 第七战术战斗机联队 ├── 空军军官学校 ├── 飞行训练指挥部 ├── 航空技术学院 └── 航空科技研究发展中心等其他单位 官方服务单位名录还确认了战术管制联队、通信航管资讯联队、气象联队及气象中心、第一和第三后勤指挥部、马公基地勤务队等现行单位。 [AF-ORG-2026] [AF-CONTACT-2026]"}], "structured_mentions": [{"dataset": "组织机构", "title": "空军司令部", "summary": "", "unit_id": "ORG-AF-HQ", "platform_id": "", "knowledge_path": ""}, {"dataset": "组织机构", "title": "空军防空暨飞弹指挥部", "summary": "", "unit_id": "ORG-AF-ADMC", "platform_id": "", "knowledge_path": ""}, {"dataset": "组织机构", "title": "空军教育训练暨准则发展指挥部", "summary": "", "unit_id": "ORG-AF-ETD-CMD", "platform_id": "", "knowledge_path": ""}, {"dataset": "组织机构", "title": "空军军官学校", "summary": "", "unit_id": "ORG-AF-ACADEMY", "platform_id": "", "knowledge_path": ""}, {"dataset": "组织机构", "title": "空军飞行训练指挥部", "summary": "", "unit_id": "ORG-AF-FLIGHT-TRAIN-CMD", "platform_id": "", "knowledge_path": ""}, {"dataset": "组织机构", "title": "空军航空技术学院", "summary": "", "unit_id": "ORG-AF-TECH-COLLEGE", "platform_id": "", "knowledge_path": ""}, {"dataset": "组织机构", "title": "空军松山基地指挥部", "summary": "", "unit_id": "ORG-AF-SONGSHAN", "platform_id": "", "knowledge_path": ""}, {"dataset": "组织机构", "title": "空军第一战术战斗机联队", "summary": "", "unit_id": "ORG-AF-W1", "platform_id": "", "knowledge_path": ""}], "related_docs": ["entities/organizations/air_force_headquarters_and_four_commands.md", "entities/organizations/command_structure_overview.md"], "local_status": "已收录知识库引用上下文"}, "AF-W1": {"has_original_content": false, "original_content": "", "citation_contexts": [{"path": "entities/organizations/air_force_wings_1_to_7.md", "title": "空军第一至第七联队内部编制", "section": "二、第一战术战斗机联队", "snippet": "队是F-CK-1经国号体系之一。飞行作战队、修护补给大队、基地勤务大队共同构成: 飞行作战 → 航线/定检修护 → 航电、军械和补给 → 基地航管、消防、设施与医务 马公基地勤务队是公开存在的基地支援单位,但不能据此推断某型飞机长期固定部署数量或值班规律。 [AF-W1] [AF-HR-2024] [AF-CONTACT-2026]"}, {"path": "entities/units/air_force/1st_tactical_fighter_wing.md", "title": "空军第一战术战斗机联队", "section": "单位身份卡", "snippet": "字段 内容 档案ID UFP-003 组织ID ORG-AF-W1 军种/系统 空军 单位层级 联队级 上级单位 空军司令部 公开驻地层级 台南地区(公开联队驻地层级) 当前状态 CURRENT_CONFIRMED 证据可信度 A 单位人员数量 NOT_PUBLIC 单位飞机数量 NOT_PUBLIC_OR_NOT_STABLE 最后核验 2026-06-23 “兵力档案”在本库中指单位层级、飞行要素、平台族、人员专业和保障链。除官方明确公布的历史或机构总量外,不用采购总数、联队总量或媒体估"}, {"path": "entities/units/air_force/1st_tactical_fighter_wing.md", "title": "空军第一战术战斗机联队", "section": "一、组织隶属与兵力结构", "snippet": "公开兵力结构 : 联队级;公开下辖/关联飞行单位包括第一、第三、第九作战队,另有第一修护补给大队、第一基地勤务大队和马公基地勤务队。 组织关系 : 关联单位 组织ID 关系说明 第一联队第一作战队 ORG-AF-W1-OPS-1 关联组织/支援或下级单位 第一联队第三作战队 ORG-AF-W1-OPS-3 关联组织/支援或下级单位 第一联队第九作战队 ORG-AF-W1-OLine truncated
|
||||
+276
@@ -0,0 +1,276 @@
|
||||
<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>台湾飞行部队知识数据展示平台 v3</title><style>
|
||||
:root{
|
||||
--red:#b4232d;--red2:#d94a54;--red3:#fff1f2;--red4:#7e1620;
|
||||
--bg:#f4f6f8;--white:#fff;--text:#1e2329;--muted:#667085;
|
||||
--line:#e5e7eb;--soft:#f8fafc;--green:#14804a;--amber:#b4690e;
|
||||
--shadow:0 12px 36px rgba(31,41,55,.09);
|
||||
}
|
||||
*{box-sizing:border-box}
|
||||
html,body{margin:0;min-height:100%;font-family:"Microsoft YaHei","PingFang SC","Noto Sans CJK SC",Arial,sans-serif;color:var(--text);background:var(--bg)}
|
||||
button,input,select{font:inherit}
|
||||
button{cursor:pointer}
|
||||
a{color:var(--red);text-decoration:none}
|
||||
.hidden{display:none!important}
|
||||
.app{min-height:100vh;display:flex;flex-direction:column}
|
||||
.header{height:76px;background:linear-gradient(120deg,var(--red4),var(--red));color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 28px;box-shadow:0 5px 18px rgba(126,22,32,.22);position:sticky;top:0;z-index:50}
|
||||
.brand{display:flex;align-items:center;gap:14px}
|
||||
.brand-mark{width:45px;height:45px;border:2px solid rgba(255,255,255,.72);border-radius:13px;display:grid;place-items:center;font-weight:800;font-size:21px;background:rgba(255,255,255,.1)}
|
||||
.brand h1{font-size:21px;margin:0 0 4px;letter-spacing:.5px}
|
||||
.brand p{font-size:12px;margin:0;color:rgba(255,255,255,.78)}
|
||||
.header-actions{display:flex;align-items:center;gap:10px}
|
||||
.search{position:relative}
|
||||
.search input{width:330px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.13);color:#fff;border-radius:10px;padding:11px 42px 11px 14px;outline:none}
|
||||
.search input::placeholder{color:rgba(255,255,255,.72)}
|
||||
.search .icon{position:absolute;right:13px;top:10px;font-size:18px}
|
||||
.search-pop{position:absolute;right:0;top:48px;width:460px;max-height:460px;overflow:auto;background:#fff;color:var(--text);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:7px;z-index:120}
|
||||
.search-item{display:flex;gap:10px;padding:11px;border-radius:9px;border-bottom:1px dashed #eee}
|
||||
.search-item:hover{background:var(--red3)}
|
||||
.search-kind{min-width:58px;color:var(--red);font-size:12px;font-weight:700}
|
||||
.search-item strong{display:block;font-size:14px;margin-bottom:4px}
|
||||
.search-item small{color:var(--muted);line-height:1.45}
|
||||
.btn{border:0;border-radius:9px;padding:10px 15px;font-weight:700;transition:.18s}
|
||||
.btn.primary{background:var(--red);color:#fff}
|
||||
.btn.primary:hover{background:var(--red4)}
|
||||
.btn.white{background:#fff;color:var(--red)}
|
||||
.btn.ghost{background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.25)}
|
||||
.btn.light{background:var(--red3);color:var(--red)}
|
||||
.btn.line{background:#fff;color:var(--red);border:1px solid #efb7bc}
|
||||
.btn.sm{padding:7px 11px;font-size:12px}
|
||||
.tabs{height:56px;background:#fff;display:flex;align-items:end;gap:2px;padding:0 24px;border-bottom:1px solid var(--line);position:sticky;top:76px;z-index:40;overflow-x:auto}
|
||||
.tab{border:0;background:transparent;color:#4b5563;font-weight:700;padding:17px 18px 14px;white-space:nowrap;border-bottom:3px solid transparent}
|
||||
.tab:hover{color:var(--red)}
|
||||
.tab.active{color:var(--red);border-bottom-color:var(--red)}
|
||||
.main{width:min(1540px,100%);margin:auto;padding:24px 28px 54px;flex:1}
|
||||
.page{display:none}
|
||||
.page.active{display:block}
|
||||
.page-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:20px}
|
||||
.page-head h2{margin:0 0 7px;font-size:25px}
|
||||
.page-head p{margin:0;color:var(--muted);line-height:1.65}
|
||||
.page-actions{display:flex;gap:9px;flex-wrap:wrap}
|
||||
.stats{display:grid;grid-template-columns:repeat(6,1fr);gap:14px}
|
||||
.stat{background:#fff;border:1px solid var(--line);border-top:4px solid var(--red);border-radius:13px;padding:17px;box-shadow:0 5px 17px rgba(31,41,55,.04)}
|
||||
.stat .label{color:var(--muted);font-size:13px}
|
||||
.stat .num{font-size:29px;font-weight:850;margin:9px 0 3px}
|
||||
.stat .hint{font-size:12px;color:#98a2b3}
|
||||
.grid{display:grid;gap:15px}
|
||||
.grid.cols2{grid-template-columns:repeat(2,minmax(0,1fr))}
|
||||
.grid.cols3{grid-template-columns:repeat(3,minmax(0,1fr))}
|
||||
.grid.cols4{grid-template-columns:repeat(4,minmax(0,1fr))}
|
||||
.panel{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 6px 22px rgba(31,41,55,.045);padding:18px}
|
||||
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
|
||||
.panel h3,.panel h4{margin:0}
|
||||
.panel-head p{margin:4px 0 0;color:var(--muted);font-size:12px}
|
||||
.section-title{display:flex;justify-content:space-between;align-items:end;margin:25px 0 13px}
|
||||
.section-title h3{font-size:18px;margin:0}
|
||||
.section-title span{color:var(--muted);font-size:12px}
|
||||
.entry{background:#fff;border:1px solid var(--line);border-radius:14px;padding:19px;min-height:150px;position:relative;overflow:hidden;box-shadow:0 5px 18px rgba(31,41,55,.045)}
|
||||
.entry:before{content:"";position:absolute;right:-25px;top:-35px;width:110px;height:110px;border-radius:50%;background:var(--red3)}
|
||||
.entry .letter{position:relative;width:39px;height:39px;border-radius:10px;background:var(--red);color:#fff;display:grid;place-items:center;font-weight:800;margin-bottom:16px}
|
||||
.entry strong{font-size:16px}
|
||||
.entry p{color:var(--muted);line-height:1.65;font-size:13px}
|
||||
.entry:hover{transform:translateY(-2px);box-shadow:var(--shadow);border-color:#efb7bc}
|
||||
.notice{background:linear-gradient(120deg,#fff8f8,#fff);border:1px solid #f2c6ca;border-left:4px solid var(--red);border-radius:10px;padding:14px;line-height:1.7;color:#5e3034}
|
||||
.badge,.chip{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:700;margin:2px 4px 2px 0}
|
||||
.badge.red,.chip.red{background:var(--red3);color:var(--red)}
|
||||
.badge.green{background:#e9f8ef;color:var(--green)}
|
||||
.badge.amber{background:#fff5e6;color:var(--amber)}
|
||||
.badge.gray{background:#f1f3f5;color:#667085}
|
||||
.bar-row{display:grid;grid-template-columns:90px 1fr 35px;align-items:center;gap:10px;margin:14px 0;font-size:13px}
|
||||
.bar-track{height:9px;border-radius:8px;background:#f0f1f3;overflow:hidden}
|
||||
.bar-fill{height:100%;background:linear-gradient(90deg,var(--red),var(--red2));border-radius:8px}
|
||||
.unit-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:17px;display:flex;flex-direction:column;min-height:245px;box-shadow:0 5px 18px rgba(31,41,55,.04)}
|
||||
.unit-card:hover{border-color:#e8a2a8;box-shadow:var(--shadow);transform:translateY(-2px)}
|
||||
.unit-card .top{display:flex;justify-content:space-between;gap:12px}
|
||||
.unit-card h4{font-size:16px;margin:0 0 5px}
|
||||
.unit-card .sub{color:var(--muted);font-size:12px}
|
||||
.unit-card p{color:#555f6d;line-height:1.65;font-size:13px;flex:1}
|
||||
.unit-card .foot{display:flex;justify-content:space-between;align-items:center;margin-top:13px}
|
||||
.filters{display:grid;grid-template-columns:1.4fr repeat(4,1fr) auto;gap:10px;background:#fff;border:1px solid var(--line);border-radius:13px;padding:13px;margin-bottom:15px}
|
||||
.input,.select{width:100%;border:1px solid #d8dde4;border-radius:9px;padding:10px 11px;background:#fff;outline:none}
|
||||
.input:focus,.select:focus{border-color:var(--red);box-shadow:0 0 0 3px rgba(180,35,45,.08)}
|
||||
.view-switch{display:flex;gap:5px;background:#f5f6f8;padding:4px;border-radius:9px}
|
||||
.view-switch button{border:0;background:transparent;padding:7px 10px;border-radius:7px;color:#667085}
|
||||
.view-switch button.active{background:#fff;color:var(--red);box-shadow:0 2px 8px rgba(0,0,0,.07)}
|
||||
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px;background:#fff}
|
||||
table{width:100%;border-collapse:collapse;min-width:900px}
|
||||
th{position:sticky;top:0;background:#fff5f5;color:#6e1e24;text-align:left;font-size:13px;padding:12px;border-bottom:1px solid #f1c8cc;z-index:2}
|
||||
td{font-size:13px;padding:12px;border-bottom:1px solid #edf0f2;vertical-align:top;line-height:1.55}
|
||||
tr:hover td{background:#fffafa}
|
||||
.pagination{display:flex;justify-content:center;align-items:center;gap:8px;margin-top:16px}
|
||||
.org-layout{display:grid;grid-template-columns:230px minmax(0,1fr) 305px;gap:15px}
|
||||
.side-nav,.side-info{background:#fff;border:1px solid var(--line);border-radius:13px;padding:14px;height:max-content;position:sticky;top:151px}
|
||||
.side-nav button{width:100%;border:0;background:#fff;text-align:left;padding:11px;border-radius:8px;color:#475467;font-weight:700}
|
||||
.side-nav button.active,.side-nav button:hover{background:var(--red3);color:var(--red)}
|
||||
.org-canvas{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:auto;min-height:610px;padding:22px}
|
||||
.org-toolbar{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:18px}
|
||||
.zoom{display:flex;gap:5px}
|
||||
.tree{--scale:1;transform:scale(var(--scale));transform-origin:top center;min-width:980px;padding:10px 35px 50px}
|
||||
.tree ul{padding-top:24px;position:relative;display:flex;justify-content:center}
|
||||
.tree li{list-style:none;text-align:center;position:relative;padding:24px 7px 0}
|
||||
.tree li:before,.tree li:after{content:"";position:absolute;top:0;width:50%;height:24px;border-top:1px solid #d8a5a9}
|
||||
.tree li:before{right:50%;border-right:1px solid #d8a5a9}
|
||||
.tree li:after{left:50%;border-left:1px solid #d8a5a9}
|
||||
.tree li:only-child:before,.tree li:only-child:after{display:none}
|
||||
.tree li:first-child:before,.tree li:last-child:after{border:0}
|
||||
.tree li:last-child:before{border-radius:0 7px 0 0}
|
||||
.tree li:first-child:after{border-radius:7px 0 0 0}
|
||||
.tree ul ul:before{content:"";position:absolute;top:0;left:50%;height:24px;border-left:1px solid #d8a5a9}
|
||||
.org-node{width:155px;min-height:62px;padding:10px 8px;border:1px solid #e4aab0;background:#fff;border-radius:10px;display:inline-flex;flex-direction:column;justify-content:center;box-shadow:0 4px 12px rgba(31,41,55,.055)}
|
||||
.org-node.root{background:var(--red);color:#fff;border-color:var(--red)}
|
||||
.org-node.branch{background:#fff2f3;color:var(--red4);font-weight:800}
|
||||
.org-node:hover{box-shadow:0 9px 23px rgba(180,35,45,.15);transform:translateY(-2px)}
|
||||
.org-node small{font-size:10px;margin-top:5px;color:#8b8f99}
|
||||
.org-node.root small{color:rgba(255,255,255,.75)}
|
||||
.kv{display:grid;grid-template-columns:86px 1fr;gap:9px;padding:10px 0;border-bottom:1px dashed #e7e8eb;font-size:13px}
|
||||
.kv .k{color:var(--muted)}
|
||||
.kv .v{font-weight:650;line-height:1.55}
|
||||
.equipment-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:15px}
|
||||
.category-list button{width:100%;display:flex;justify-content:space-between;border:0;background:#fff;padding:11px;border-radius:8px;margin:3px 0;color:#475467}
|
||||
.category-list button.active,.category-list button:hover{background:var(--red3);color:var(--red);font-weight:700}
|
||||
.equip-card{background:#fff;border:1px solid var(--line);border-radius:13px;padding:16px;min-height:190px;display:flex;flex-direction:column}
|
||||
.equip-card h4{margin:0 0 5px}
|
||||
.equip-card p{font-size:13px;color:var(--muted);line-height:1.6;flex:1}
|
||||
.flow{display:flex;align-items:stretch;gap:9px;overflow:auto;padding:5px 0 15px}
|
||||
.flow-step{min-width:150px;background:#fff;border:1px solid #efb9be;border-radius:12px;padding:14px;position:relative}
|
||||
.flow-step:not(:last-child):after{content:"›";position:absolute;right:-10px;top:40%;font-size:25px;color:var(--red)}
|
||||
.flow-step .no{width:26px;height:26px;border-radius:50%;background:var(--red);color:#fff;display:grid;place-items:center;font-size:12px;font-weight:800}
|
||||
.flow-step h4{margin:10px 0 5px}
|
||||
.flow-step p{font-size:12px;color:var(--muted);line-height:1.55}
|
||||
.lane{display:grid;grid-template-columns:140px 1fr;gap:12px;align-items:start;margin-bottom:12px}
|
||||
.lane-title{background:var(--red);color:#fff;border-radius:10px;padding:14px;font-weight:800}
|
||||
.lane-items{display:flex;gap:9px;flex-wrap:wrap}
|
||||
.lane-item{background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px;min-width:150px;flex:1}
|
||||
.industry-stack{display:grid;gap:12px}
|
||||
.industry-layer{background:#fff;border:1px solid var(--line);border-left:5px solid var(--red);border-radius:12px;padding:15px;display:grid;grid-template-columns:190px 1fr;gap:14px}
|
||||
.risk-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:15px}
|
||||
.risk-card h4{margin:0 0 8px;color:var(--red4)}
|
||||
.timeline{position:relative;padding-left:27px}
|
||||
.timeline:before{content:"";position:absolute;left:8px;top:7px;bottom:5px;width:2px;background:#e6b3b8}
|
||||
.event{position:relative;background:#fff;border:1px solid var(--line);border-radius:11px;padding:14px;margin-bottom:12px}
|
||||
.event:before{content:"";position:absolute;left:-25px;top:17px;width:12px;height:12px;border-radius:50%;background:var(--red);border:3px solid #ffd8dc}
|
||||
.event .date{font-size:12px;color:var(--red);font-weight:800}
|
||||
.event h4{margin:5px 0}
|
||||
.event p{margin:0;color:var(--muted);font-size:13px;line-height:1.6}
|
||||
.source-layout{display:grid;grid-template-columns:1.15fr .85fr;gap:15px}
|
||||
.source-card{border:1px solid var(--line);background:#fff;border-radius:11px;padding:14px;margin-bottom:10px}
|
||||
.source-card:hover{border-color:#e5a4aa;background:#fffafa}
|
||||
.source-card h4{margin:0 0 7px}
|
||||
.source-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.55}
|
||||
.empty{padding:40px;text-align:center;color:var(--muted)}
|
||||
.modal,.drawer,.detail,.query-panel{position:fixed;inset:0}.detail{z-index:200}.drawer{z-index:320}.modal{z-index:420}.query-panel{z-index:500}
|
||||
.backdrop{position:absolute;inset:0;background:rgba(20,24,31,.52);backdrop-filter:blur(2px)}
|
||||
.modal-card{position:relative;width:min(820px,calc(100% - 34px));max-height:86vh;overflow:auto;margin:7vh auto;background:#fff;border-radius:16px;box-shadow:0 24px 80px rgba(0,0,0,.24);padding:26px}
|
||||
.close{position:absolute;right:15px;top:14px;border:0;width:34px;height:34px;border-radius:9px;background:#f2f4f7;font-size:21px;color:#667085}
|
||||
.drawer-card{position:absolute;right:0;top:0;height:100%;width:min(650px,92vw);background:#fff;box-shadow:-12px 0 45px rgba(0,0,0,.2);overflow:auto;padding:68px 25px 30px}
|
||||
.drawer-head{position:absolute;right:0;top:0;width:min(650px,92vw);height:58px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 20px;z-index:3}
|
||||
.detail{background:#f4f6f8;overflow:auto}
|
||||
.detail-top{height:72px;background:var(--red4);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 25px;position:sticky;top:0;z-index:3}
|
||||
.detail-body{width:min(1320px,100%);margin:auto;padding:24px}
|
||||
.detail-hero{background:linear-gradient(120deg,var(--red),#d84955);color:#fff;border-radius:16px;padding:25px;display:grid;grid-template-columns:1fr 330px;gap:20px;box-shadow:var(--shadow)}
|
||||
.detail-hero h2{font-size:27px;margin:0 0 9px}
|
||||
.detail-hero p{line-height:1.7;color:rgba(255,255,255,.86)}
|
||||
.detail-summary{background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.2);border-radius:12px;padding:13px}
|
||||
.detail-nav{display:flex;gap:4px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:6px;margin:15px 0;position:sticky;top:84px;z-index:2;overflow:auto}
|
||||
.detail-nav button{border:0;background:transparent;padding:10px 14px;border-radius:8px;font-weight:700;color:#667085;white-space:nowrap}
|
||||
.detail-nav button.active{background:var(--red3);color:var(--red)}
|
||||
.detail-section{scroll-margin-top:150px;margin-bottom:15px}
|
||||
.detail-section h3{border-left:4px solid var(--red);padding-left:10px}
|
||||
.rich{line-height:1.82;color:#475467}
|
||||
.query-card{position:relative;width:min(1180px,calc(100% - 30px));height:88vh;margin:6vh auto;background:#fff;border-radius:16px;box-shadow:0 24px 80px rgba(0,0,0,.24);display:grid;grid-template-columns:310px 1fr;overflow:hidden}
|
||||
.query-form{background:#fff8f8;border-right:1px solid #f2c9cd;padding:25px}
|
||||
.query-result{padding:25px;overflow:auto}
|
||||
.query-row{border:1px solid var(--line);border-radius:10px;padding:12px;margin-bottom:9px}
|
||||
.query-row:hover{border-color:#e4a3aa;background:#fffafa}
|
||||
.json{white-space:pre-wrap;word-break:break-word;background:#1f242b;color:#f5f7fa;padding:16px;border-radius:10px;font:12px/1.65 Consolas,monospace}
|
||||
.footer{background:#fff;border-top:1px solid var(--line);color:#777f8b;padding:16px 28px;display:flex;justify-content:space-between;font-size:12px}
|
||||
.mt{margin-top:15px}.mb{margin-bottom:15px}
|
||||
@media(max-width:1180px){.stats{grid-template-columns:repeat(3,1fr)}.org-layout{grid-template-columns:200px 1fr}.side-info{display:none}.grid.cols4{grid-template-columns:repeat(2,1fr)}}
|
||||
@media(max-width:820px){.header{height:auto;padding:13px 16px;align-items:flex-start}.brand p{display:none}.header-actions{display:none}.tabs{top:69px;padding-left:8px}.main{padding:17px 12px 45px}.stats{grid-template-columns:repeat(2,1fr)}.grid.cols2,.grid.cols3,.grid.cols4{grid-template-columns:1fr}.filters{grid-template-columns:1fr 1fr}.org-layout,.equipment-layout,.source-layout{grid-template-columns:1fr}.side-nav{position:static}.org-canvas{min-height:500px}.detail-hero{grid-template-columns:1fr}.query-card{grid-template-columns:1fr;height:94vh;margin:3vh auto}.query-form{border-right:0;border-bottom:1px solid #f2c9cd}.footer{display:block;line-height:1.8}}
|
||||
|
||||
.knowledge-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:16px}
|
||||
.knowledge-side{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;height:max-content;position:sticky;top:151px}
|
||||
.knowledge-side button{width:100%;border:0;background:#fff;text-align:left;padding:10px 11px;border-radius:8px;color:#475467;display:flex;justify-content:space-between;gap:8px}
|
||||
.knowledge-side button:hover,.knowledge-side button.active{background:var(--red3);color:var(--red);font-weight:750}
|
||||
.knowledge-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px;display:flex;flex-direction:column;min-height:220px;box-shadow:0 5px 18px rgba(31,41,55,.04)}
|
||||
.knowledge-card:hover{border-color:#e5a3a9;box-shadow:var(--shadow);transform:translateY(-2px)}
|
||||
.knowledge-card h4{margin:0 0 8px;font-size:16px}.knowledge-card p{color:var(--muted);line-height:1.7;font-size:13px;flex:1}
|
||||
.knowledge-meta{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.knowledge-path{font:11px Consolas,monospace;color:#8b929d;word-break:break-all;margin-top:8px}
|
||||
.reader-layout{display:grid;grid-template-columns:245px minmax(0,1fr);gap:17px;align-items:start}
|
||||
.reader-toc{background:#fff;border:1px solid var(--line);border-radius:13px;padding:13px;position:sticky;top:95px;max-height:calc(100vh - 120px);overflow:auto}
|
||||
.reader-toc h4{margin:4px 8px 10px}.reader-toc button{width:100%;border:0;background:#fff;text-align:left;padding:9px 10px;border-radius:7px;color:#596273;font-size:13px;line-height:1.45}
|
||||
.reader-toc button:hover,.reader-toc button.active{background:var(--red3);color:var(--red);font-weight:750}
|
||||
.reader-main{min-width:0}.md-section{background:#fff;border:1px solid var(--line);border-radius:14px;padding:22px 25px;margin-bottom:15px;scroll-margin-top:95px;box-shadow:0 4px 16px rgba(31,41,55,.035)}
|
||||
.md-section>h2{margin:0 -25px 19px;padding:0 25px 14px;border-bottom:1px solid #eee;font-size:20px;color:#6f1820}
|
||||
.md-body{font-size:14px;line-height:1.92;color:#394150}.md-body h1,.md-body h2{color:#741923}.md-body h3{margin-top:25px;color:#8f2029;font-size:17px}.md-body h4{color:#333b46}
|
||||
.md-body p{margin:10px 0}.md-body ul,.md-body ol{padding-left:25px}.md-body li{margin:5px 0}.md-body blockquote{margin:14px 0;padding:12px 15px;border-left:4px solid var(--red);background:#fff6f7;color:#5c3437;border-radius:0 8px 8px 0}
|
||||
.md-body table{min-width:0;width:100%;display:table;margin:15px 0;border:1px solid var(--line);border-radius:9px;overflow:hidden}.md-body th{position:static;background:#fff1f2;color:#701920}.md-body td,.md-body th{border:1px solid #eceff2;padding:9px 11px}
|
||||
.md-body pre{background:#20252c;color:#f5f6f7;border-radius:10px;padding:15px;overflow:auto;line-height:1.65}.md-body code{background:#f1f2f4;border-radius:5px;padding:2px 5px;font-family:Consolas,monospace;color:#8d2630}.md-body pre code{background:transparent;color:inherit;padding:0}
|
||||
.md-body hr{border:0;border-top:1px solid #eceef1;margin:22px 0}.md-body strong{color:#252a31}.inline-ref,.inline-doc{border:0;border-radius:5px;background:#fff0f1;color:var(--red);padding:2px 6px;font:inherit;cursor:pointer}.inline-doc{font-family:Consolas,monospace;word-break:break-all}
|
||||
.record-hero{background:linear-gradient(120deg,#fff5f6,#fff);border:1px solid #efc5c9;border-left:5px solid var(--red);border-radius:13px;padding:18px;margin:12px 0 17px}.record-hero h2{margin:0 0 8px}.record-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.record-group{background:#fff;border:1px solid var(--line);border-radius:12px;padding:15px}.record-group h3{margin:0 0 12px;color:#751b23}.record-field{display:grid;grid-template-columns:125px 1fr;gap:10px;padding:10px 0;border-bottom:1px dashed #e7e9ed;font-size:13px;line-height:1.65}.record-field:last-child{border-bottom:0}.record-field .label{color:#737b88}.record-field .value{font-weight:600;word-break:break-word}
|
||||
.related-docs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.related-doc{border:1px solid #ecd1d4;background:#fffafa;border-radius:10px;padding:12px;cursor:pointer}.related-doc:hover{border-color:var(--red)}.related-doc strong{display:block;margin-bottom:6px;color:#741b23}.related-doc p{margin:0;color:#69717e;font-size:12px;line-height:1.55}
|
||||
.field-list{display:grid;gap:9px}.field-item{border:1px solid var(--line);border-radius:10px;padding:11px;background:#fff}.field-item strong{display:block;color:#7a1e26;margin-bottom:5px}.human-table{width:100%;min-width:0}.human-table th{position:static;width:170px}.technical-details{margin-top:15px;border:1px solid #e1e4e8;border-radius:10px;background:#fafbfc;padding:10px 13px}.technical-details summary{cursor:pointer;color:#666f7c;font-weight:700}.technical-details table{margin-top:10px}
|
||||
.knowledge-preview{background:#fff;border:1px solid var(--line);border-radius:13px;padding:16px;margin-top:14px}.knowledge-preview h3{margin-top:0}.knowledge-preview .md-body{max-height:470px;overflow:auto;padding-right:6px}
|
||||
.source-ref-btn{display:inline-flex;align-items:center;gap:5px;border:1px solid #e6aeb3;border-radius:7px;background:#fff4f5;color:var(--red);padding:3px 8px;margin:1px 3px;font:inherit;font-size:12px;font-weight:700;vertical-align:middle}.source-ref-btn:hover{background:var(--red);color:#fff}.source-ref-btn:before{content:"源";display:grid;place-items:center;width:18px;height:18px;border-radius:5px;background:rgba(180,35,45,.12);font-size:10px}.source-ref-btn:hover:before{background:rgba(255,255,255,.2)}
|
||||
.missing-source{border-style:dashed;color:#9a6700;background:#fff8e6}.missing-source:before{content:"待";background:#fff0c2}
|
||||
.org-ref-btn{display:inline-flex;align-items:center;border:1px solid #d7dce2;border-radius:7px;background:#f7f8fa;color:#344054;padding:3px 8px;margin:1px 3px;font:inherit;font-size:12px;font-weight:700}.org-ref-btn:hover{border-color:var(--red);color:var(--red);background:#fff5f6}
|
||||
.unit-ref-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:5px}.unit-ref-card{border:1px solid #ead0d3;border-radius:10px;background:#fffafa;padding:10px 11px;text-align:left;color:#303640;min-width:0}.unit-ref-card:hover{border-color:var(--red);box-shadow:0 5px 15px rgba(180,35,45,.1)}.unit-ref-card strong{display:block;color:#771b24;margin-bottom:4px;white-space:normal}.unit-ref-card small{display:block;color:#747c89;line-height:1.45;white-space:normal}.unit-ref-card.static{cursor:default}.unit-ref-card.static:hover{box-shadow:none;border-color:#ead0d3}
|
||||
.object-value-list{display:grid;gap:7px}.object-value-item{border:1px solid #e2e5e9;border-radius:8px;background:#fafbfc;padding:8px 10px}.object-value-item strong{display:block;color:#771b24;margin-bottom:3px}.object-value-item span{display:block;color:#69717e;font-size:12px;line-height:1.5}
|
||||
@media(max-width:760px){.unit-ref-grid{grid-template-columns:1fr}}
|
||||
@media(max-width:900px){.knowledge-layout,.reader-layout{grid-template-columns:1fr}.knowledge-side,.reader-toc{position:static;max-height:none}.record-grid,.related-docs{grid-template-columns:1fr}.md-section{padding:17px}.md-section>h2{margin-left:-17px;margin-right:-17px;padding-left:17px;padding-right:17px}}
|
||||
|
||||
.offline-source-panel{border:1px solid #efc1c5;background:#fffafa;border-radius:13px;padding:16px;margin:14px 0}
|
||||
.offline-source-panel h3{margin:0 0 10px;color:var(--red4)}
|
||||
.offline-status{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:5px 10px;background:#f2f4f7;color:#475467;font-size:12px;font-weight:700}
|
||||
.offline-status.available{background:#e9f8ef;color:#14804a}.offline-status.context{background:#fff3e8;color:#a55a08}
|
||||
.citation-context{border:1px solid var(--line);border-left:4px solid var(--red);background:#fff;border-radius:10px;padding:13px;margin:10px 0;cursor:pointer}
|
||||
.citation-context:hover{border-color:#dfa0a6;background:#fff8f8}.citation-context h4{margin:0 0 5px}.citation-context p{margin:0;color:#667085;line-height:1.7;font-size:13px}
|
||||
.offline-link-disabled{color:#667085;border-bottom:1px dotted #98a2b3;cursor:default}.offline-reference-note{font-size:12px;color:#667085;margin-top:6px}
|
||||
.structured-mention{display:grid;grid-template-columns:92px 1fr;gap:10px;border:1px solid var(--line);border-radius:10px;padding:12px;margin:9px 0;background:#fff}
|
||||
.structured-mention .dataset{color:var(--red);font-weight:800;font-size:12px}.structured-mention strong{display:block;margin-bottom:4px}.structured-mention p{margin:0;color:#667085;font-size:13px;line-height:1.55}
|
||||
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
.editor-fab{position:fixed;right:18px;bottom:26px;z-index:60;background:var(--red);color:#fff;border:0;border-radius:50%;width:46px;height:46px;display:grid;place-items:center;cursor:pointer;box-shadow:0 6px 18px rgba(126,22,32,.35)}.editor-fab:hover{background:var(--red4);transform:rotate(30deg)}.editor-fab svg{width:22px;height:22px;display:block}
|
||||
.editor-overlay{z-index:80;background:rgba(16,24,40,.5)}
|
||||
.editor-modal{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(1080px,94vw);height:min(680px,88vh);background:var(--white);border-radius:14px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 60px rgba(16,24,40,.35)}
|
||||
.editor-head{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid var(--line)}.editor-head h2{margin:0;font-size:16px;flex:1}.editor-head .editor-note{font-size:12px;color:var(--muted);margin-right:8px}
|
||||
.editor-body{display:flex;flex:1;min-height:0}
|
||||
.editor-tabs{width:210px;border-right:1px solid var(--line);overflow:auto;padding:10px 8px;display:flex;flex-direction:column;gap:4px}
|
||||
.editor-tab{border:0;background:transparent;text-align:left;padding:9px 11px;border-radius:8px;cursor:pointer;color:var(--muted)}.editor-tab b{display:block;font-size:13px;color:var(--text)}.editor-tab small{font-size:10px;opacity:.75}.editor-tab:hover{background:var(--red3)}.editor-tab.active{background:var(--red3)}.editor-tab.active b{color:var(--red)}
|
||||
.editor-pane{flex:1;display:flex;flex-direction:column;min-width:0;padding:14px 16px;gap:10px}
|
||||
.editor-title-row{display:flex;align-items:center;justify-content:space-between}.editor-title-row b{font-size:14px}
|
||||
.json-status{font-size:12px;padding:3px 10px;border-radius:999px}.json-status.valid{background:#e8f5ef;color:var(--green)}.json-status.invalid{background:var(--red3);color:var(--red)}
|
||||
.json-editor{flex:1;width:100%;resize:none;border:1px solid var(--line);border-radius:10px;padding:13px;font:13px/1.6 ui-monospace,Consolas,"Courier New",monospace;color:var(--text);background:var(--soft);outline:0;tab-size:2}.json-editor:focus{border-color:var(--red);box-shadow:0 0 0 3px rgba(180,35,45,.1)}
|
||||
.editor-actions{display:flex;gap:8px;flex-wrap:wrap}
|
||||
.editor-hint{margin:0;font-size:11px;color:var(--muted)}
|
||||
@media(max-width:720px){.editor-modal{width:96vw;height:92vh}.editor-body{flex-direction:column}.editor-tabs{width:auto;flex-direction:row;overflow-x:auto;border-right:0;border-bottom:1px solid var(--line)}.editor-tab{white-space:nowrap}}
|
||||
</style></head><body>
|
||||
<div class="app">
|
||||
<header class="header"><div class="brand"><div class="brand-mark">航</div><div><h1>台湾飞行部队知识数据展示平台</h1><p>结构化数据检索 + Markdown全文 + 可点击来源与单位关系</p></div></div><div class="header-actions"><div class="search"><input id="globalSearch" placeholder="查询单位、装备、专题正文或来源"><span class="icon">⌕</span><div id="searchPop" class="search-pop hidden"></div></div><button class="btn white" data-action="open-query">交互查询</button><button class="btn ghost" data-action="reset">重置</button></div></header>
|
||||
<nav class="tabs" id="tabs"><button class="tab active" data-tab="overview">总览</button><button class="tab" data-tab="organization">组织机构</button><button class="tab" data-tab="units">单位与兵力</button><button class="tab" data-tab="equipment">装备体系</button><button class="tab" data-tab="training">训练与保障</button><button class="tab" data-tab="industry">工业链与外部依赖</button><button class="tab" data-tab="safety">飞安与风险治理</button><button class="tab" data-tab="timeline">时间线与来源</button><button class="tab" data-tab="knowledge">知识专题库</button></nav>
|
||||
<main class="main"><section id="page-overview" class="page active"></section><section id="page-organization" class="page"></section><section id="page-units" class="page"></section><section id="page-equipment" class="page"></section><section id="page-training" class="page"></section><section id="page-industry" class="page"></section><section id="page-safety" class="page"></section><section id="page-timeline" class="page"></section><section id="page-knowledge" class="page"></section></main>
|
||||
<footer class="footer"><span>单文件离线原型 v3.1 · Markdown全文与来源链接修复版</span><span>公开资料边界:不展示实时战备、人员员额、可飞数量、弹药库存和内部设施</span></footer></div>
|
||||
<div id="modal" class="modal hidden"><div class="backdrop" data-action="close-modal"></div><div class="modal-card"><button class="close" data-action="close-modal">×</button><div id="modalBody"></div></div></div>
|
||||
<div id="drawer" class="drawer hidden"><div class="backdrop" data-action="close-drawer"></div><div class="drawer-head"><strong id="drawerTitle">详情</strong><button class="close" style="position:static" data-action="close-drawer">×</button></div><div class="drawer-card" id="drawerBody"></div></div>
|
||||
<div id="detail" class="detail hidden"></div>
|
||||
<div id="queryPanel" class="query-panel hidden"><div class="backdrop" data-action="close-query"></div><div class="query-card"><button class="close" data-action="close-query">×</button><div class="query-form" id="queryForm"></div><div class="query-result" id="queryResult"></div></div></div>
|
||||
<button type="button" id="openEditor" class="editor-fab" aria-label="JSON 编辑器" title="页面 JSON 编辑器"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg></button>
|
||||
<div id="editorOverlay" class="modal editor-overlay hidden"><div class="editor-modal">
|
||||
<header class="editor-head"><h2>页面 JSON 编辑器</h2><span class="editor-note">按模块编辑,应用后即时重渲染;修改保存在浏览器本地,不回写服务器</span><button type="button" class="close" id="closeEditor">关闭</button></header>
|
||||
<div class="editor-body">
|
||||
<nav id="editorTabs" class="editor-tabs"></nav>
|
||||
<div class="editor-pane">
|
||||
<div class="editor-title-row"><b id="editorModuleTitle"></b><span id="jsonStatus" class="json-status valid">JSON 有效</span></div>
|
||||
<textarea id="jsonEditor" class="json-editor" spellcheck="false" aria-label="当前模块 JSON"></textarea>
|
||||
<div class="editor-actions"><button type="button" class="btn primary" id="applyJson">应用到页面</button><button type="button" id="resetJson">恢复默认数据</button><button type="button" id="copyJson">复制完整 JSON</button><button type="button" id="downloadJson">下载 JSON</button></div>
|
||||
<p class="editor-hint">模块 = 页面数据(DATA)的顶层键,另附「系统设置」编辑 MANIFEST;沙箱预览无法使用本地缓存时,修改仅当次会话有效。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
<script type="application/json" id="structured-data">__PAGE_DATA__</script>
|
||||
<script type="application/json" id="structured-knowledge">__PAGE_KNOWLEDGE__</script>
|
||||
<script type="application/json" id="structured-source-local">__PAGE_SOURCE_LOCAL__</script>
|
||||
<script type="application/json" id="structured-manifest">__PAGE_MANIFEST__</script>
|
||||
<script type="application/json" id="structured-fields">__PAGE_FIELDS__</script>
|
||||
<script>__PAGE_RUNTIME__</script>
|
||||
</body>
|
||||
</html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"meta": {"title": "日本反修宪、反战护宪与左翼市民社会生态资料库", "subtitle": "基于既有LLMWiki/Skill资料整理的结构化展示数据", "version": "1.0", "language": "zh-CN", "last_updated": "2026-06-30", "description": "围绕日本反修宪、反战护宪、左翼在野党及其支持者、市民运动、工会、法律界、媒体知识分子、反基地与反核网络建立的专题研究数据库。", "research_scope": ["日本反修宪群体", "反战护宪运动", "左翼在野党及其支持者", "市民运动", "工会", "法律界", "媒体知识分子", "反基地网络", "反核与反原发和平网络"], "safety_note": "本资料库仅用于公开资料研究、群体生态分析、政策与叙事结构化整理;不用于欺骗性政治动员、定向操纵、骚扰攻击或利用个人隐私。人物资料仅记录公开身份、公开职务、公开言论和公开行动。"}, "tabs": [{"id": "overview", "label": "总览与制度背景", "datasets": ["policy_triggers", "narratives", "relations"], "description": "展示整体生态、第九条、第九十六条、国民投票法、高市路线触发点和群体关系。"}, {"id": "anti_revision_orgs", "label": "反修宪护宪组织", "datasets": ["organizations", "events", "narratives"], "description": "九条会、市民联合、宪法共同中心、9条改宪NO等护宪组织。"}, {"id": "antiwar_movements", "label": "反战护宪运动", "datasets": ["events", "organizations", "audiences"], "description": "反安保法制、19日行动、SEALDs、妈妈之会等反战护宪运动。"}, {"id": "left_parties", "label": "左翼在野党", "datasets": ["persons", "organizations", "policy_triggers"], "description": "日本共产党、社民党、令和新选组、立宪民主党护宪派及其支持者。"}, {"id": "citizen_networks", "label": "市民运动网络", "datasets": ["organizations", "events", "audiences"], "description": "街头行动、署名、青年网络、女性家庭网络和学习会。"}, {"id": "labor_networks", "label": "工会劳动者网络", "datasets": ["organizations", "audiences", "narratives"], "description": "全労连、民医连、教师工会、青年工会和民生财政叙事。"}, {"id": "legal_networks", "label": "法律界网络", "datasets": ["organizations", "persons", "narratives"], "description": "日弁连、地方律师会、自由法曹团和宪法学者网络。"}, {"id": "media_intellectuals", "label": "媒体知识分子", "datasets": ["media_sources", "persons", "organizations"], "description": "政党机关报、独立媒体、冲绳地方媒体、记者与学者。"}, {"id": "anti_base_networks", "label": "反基地地方网络", "datasets": ["regions", "organizations", "events"], "description": "冲绳、边野古、南西诸岛、基地负担、地方自治与地方前线化。"}, {"id": "anti_nuclear_networks", "label": "反核和平网络", "datasets": ["organizations", "events", "narratives"], "description": "原水协、原水禁、被团协、福岛反原发、宗教和平组织。"}, {"id": "sources_index", "label": "数据来源与索引", "datasets": ["sources", "media_sources", "relations"], "description": "来源可信度、人物索引、组织索引、事件索引与关系表。"}], "organizations": [{"id": "org_001", "name_cn": "九条会", "name_jp": "九条の会", "type": "护宪市民组织", "category": "日本反修宪与护宪组织", "region": "全国", "founded": "2004", "core_issues": ["第九条", "反修宪", "反自卫队明记", "反战争国家化"], "key_narratives": ["nar_001", "nar_002"], "key_actions": ["署名", "学习会", "地方九条会活动", "公开声明"], "related_policy_triggers": ["trigger_001", "trigger_005"], "related_events": ["evt_005", "evt_004"], "summary": "以守护日本国宪法第九条为核心的全国性护宪市民网络。", "detail": {"background": "围绕战后和平主义、第九条改宪争议和自卫队宪法地位问题形成。", "position_on_takaichi_route": "反对高市早苗推动修宪发议、自卫队明记和第九条改恶。", "main_risks_identified": ["第九条空洞化", "战争国家化", "修宪程序加速"]}, "sources": ["src_001"]}, {"id": "org_002", "name_cn": "总动员行动实行委员会", "name_jp": "戦争させない・9条壊すな!総がかり行動実行委員会", "type": "市民行动平台", "category": "反战护宪与和平运动群体", "region": "全国/东京国会前", "founded": "2015前后", "core_issues": ["反安保法制", "第九条", "反军扩", "反战争国家化"], "key_narratives": ["nar_002", "nar_007"], "key_actions": ["19日行动", "国会前集会", "街头动员", "共同声明"], "related_policy_triggers": ["trigger_001", "trigger_004", "trigger_008"], "related_events": ["evt_001", "evt_004"], "summary": "反安保法制、反修宪和反战争国家化的街头行动网络。", "detail": {"background": "2015年安保法制争议后Line truncated
|
||||
+970
@@ -0,0 +1,970 @@
|
||||
{
|
||||
"说明": "字段显示目录:值级隐藏(隐藏即 data.json 各条目该键清空,全部渲染路径生效)。",
|
||||
"fields": [
|
||||
{
|
||||
"label": "id",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(id,出现 442 条)",
|
||||
"keys": [
|
||||
"id"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "name",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"反基地地方网络",
|
||||
"反核和平网络",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(name,出现 180 条)",
|
||||
"keys": [
|
||||
"name"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "category",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(category,出现 198 条)",
|
||||
"keys": [
|
||||
"category"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "date",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(date,出现 73 条)",
|
||||
"keys": [
|
||||
"date"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "actor",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"左翼在野党"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(actor,出现 18 条)",
|
||||
"keys": [
|
||||
"actor"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "summary",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(summary,出现 296 条)",
|
||||
"keys": [
|
||||
"summary"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "activated_groups",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"左翼在野党"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(activated_groups,出现 18 条)",
|
||||
"keys": [
|
||||
"activated_groups"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "activated_organizations",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"左翼在野党"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(activated_organizations,出现 18 条)",
|
||||
"keys": [
|
||||
"activated_organizations"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "main_counter_narratives",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"左翼在野党"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(main_counter_narratives,出现 18 条)",
|
||||
"keys": [
|
||||
"main_counter_narratives"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "related_events",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(related_events,出现 169 条)",
|
||||
"keys": [
|
||||
"related_events"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "data_points",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"左翼在野党"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(data_points,出现 18 条)",
|
||||
"keys": [
|
||||
"data_points"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "display_priority",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"左翼在野党"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(display_priority,出现 18 条)",
|
||||
"keys": [
|
||||
"display_priority"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "sources",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(sources,出现 381 条)",
|
||||
"keys": [
|
||||
"sources"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "activated_audiences",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"左翼在野党"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(activated_audiences,出现 2 条)",
|
||||
"keys": [
|
||||
"activated_audiences"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "core_claim",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(core_claim,出现 45 条)",
|
||||
"keys": [
|
||||
"core_claim"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "carriers",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(carriers,出现 45 条)",
|
||||
"keys": [
|
||||
"carriers"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "target_audiences",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(target_audiences,出现 45 条)",
|
||||
"keys": [
|
||||
"target_audiences"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "trigger_issues",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(trigger_issues,出现 45 条)",
|
||||
"keys": [
|
||||
"trigger_issues"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "typical_expressions",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(typical_expressions,出现 45 条)",
|
||||
"keys": [
|
||||
"typical_expressions"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "counter_frame",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(counter_frame,出现 45 条)",
|
||||
"keys": [
|
||||
"counter_frame"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "related_policy_triggers",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(related_policy_triggers,出现 323 条)",
|
||||
"keys": [
|
||||
"related_policy_triggers"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "related_organizations",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"反修宪护宪组织",
|
||||
"左翼在野党",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(related_organizations,出现 81 条)",
|
||||
"keys": [
|
||||
"related_organizations"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "source_type",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(source_type,出现 30 条)",
|
||||
"keys": [
|
||||
"source_type"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "source_id",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(source_id,出现 30 条)",
|
||||
"keys": [
|
||||
"source_id"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "target_type",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(target_type,出现 30 条)",
|
||||
"keys": [
|
||||
"target_type"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "target_id",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(target_id,出现 30 条)",
|
||||
"keys": [
|
||||
"target_id"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "relation_type",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(relation_type,出现 30 条)",
|
||||
"keys": [
|
||||
"relation_type"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "description",
|
||||
"pages": [
|
||||
"总览与制度背景",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "总览与制度背景 数据字段(description,出现 30 条)",
|
||||
"keys": [
|
||||
"description"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "name_cn",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(name_cn,出现 232 条)",
|
||||
"keys": [
|
||||
"name_cn"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "name_jp",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(name_jp,出现 232 条)",
|
||||
"keys": [
|
||||
"name_jp"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "type",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(type,出现 325 条)",
|
||||
"keys": [
|
||||
"type"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "region",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(region,出现 180 条)",
|
||||
"keys": [
|
||||
"region"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "founded",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(founded,出现 180 条)",
|
||||
"keys": [
|
||||
"founded"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "core_issues",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(core_issues,出现 223 条)",
|
||||
"keys": [
|
||||
"core_issues"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "key_narratives",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(key_narratives,出现 180 条)",
|
||||
"keys": [
|
||||
"key_narratives"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "key_actions",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(key_actions,出现 180 条)",
|
||||
"keys": [
|
||||
"key_actions"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "detail",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(detail,出现 271 条)",
|
||||
"keys": [
|
||||
"detail"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "related_persons",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(related_persons,出现 45 条)",
|
||||
"keys": [
|
||||
"related_persons"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "location",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"市民运动网络",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(location,出现 55 条)",
|
||||
"keys": [
|
||||
"location"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "organizers",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"市民运动网络",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(organizers,出现 55 条)",
|
||||
"keys": [
|
||||
"organizers"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "participants",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"市民运动网络",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(participants,出现 55 条)",
|
||||
"keys": [
|
||||
"participants"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "main_issues",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"市民运动网络",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(main_issues,出现 55 条)",
|
||||
"keys": [
|
||||
"main_issues"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "related_groups",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"市民运动网络",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(related_groups,出现 55 条)",
|
||||
"keys": [
|
||||
"related_groups"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "related_narratives",
|
||||
"pages": [
|
||||
"反修宪护宪组织",
|
||||
"反战护宪运动",
|
||||
"左翼在野党",
|
||||
"市民运动网络",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"反基地地方网络",
|
||||
"反核和平网络"
|
||||
],
|
||||
"description": "反修宪护宪组织 数据字段(related_narratives,出现 91 条)",
|
||||
"keys": [
|
||||
"related_narratives"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "composition",
|
||||
"pages": [
|
||||
"反战护宪运动",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络"
|
||||
],
|
||||
"description": "反战护宪运动 数据字段(composition,出现 24 条)",
|
||||
"keys": [
|
||||
"composition"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "core_concerns",
|
||||
"pages": [
|
||||
"反战护宪运动",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络"
|
||||
],
|
||||
"description": "反战护宪运动 数据字段(core_concerns,出现 24 条)",
|
||||
"keys": [
|
||||
"core_concerns"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "responsive_narratives",
|
||||
"pages": [
|
||||
"反战护宪运动",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络"
|
||||
],
|
||||
"description": "反战护宪运动 数据字段(responsive_narratives,出现 24 条)",
|
||||
"keys": [
|
||||
"responsive_narratives"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "entry_organizations",
|
||||
"pages": [
|
||||
"反战护宪运动",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络"
|
||||
],
|
||||
"description": "反战护宪运动 数据字段(entry_organizations,出现 24 条)",
|
||||
"keys": [
|
||||
"entry_organizations"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "typical_actions",
|
||||
"pages": [
|
||||
"反战护宪运动",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络"
|
||||
],
|
||||
"description": "反战护宪运动 数据字段(typical_actions,出现 24 条)",
|
||||
"keys": [
|
||||
"typical_actions"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "trigger_points",
|
||||
"pages": [
|
||||
"反战护宪运动",
|
||||
"市民运动网络",
|
||||
"工会劳动者网络"
|
||||
],
|
||||
"description": "反战护宪运动 数据字段(trigger_points,出现 24 条)",
|
||||
"keys": [
|
||||
"trigger_points"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "affiliation",
|
||||
"pages": [
|
||||
"左翼在野党",
|
||||
"法律界网络",
|
||||
"媒体知识分子",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "左翼在野党 数据字段(affiliation,出现 52 条)",
|
||||
"keys": [
|
||||
"affiliation"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "role",
|
||||
"pages": [
|
||||
"左翼在野党",
|
||||
"法律界网络",
|
||||
"媒体知识分子"
|
||||
],
|
||||
"description": "左翼在野党 数据字段(role,出现 36 条)",
|
||||
"keys": [
|
||||
"role"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "categories",
|
||||
"pages": [
|
||||
"左翼在野党",
|
||||
"法律界网络",
|
||||
"媒体知识分子"
|
||||
],
|
||||
"description": "左翼在野党 数据字段(categories,出现 36 条)",
|
||||
"keys": [
|
||||
"categories"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "public_position",
|
||||
"pages": [
|
||||
"左翼在野党",
|
||||
"法律界网络",
|
||||
"媒体知识分子"
|
||||
],
|
||||
"description": "左翼在野党 数据字段(public_position,出现 36 条)",
|
||||
"keys": [
|
||||
"public_position"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "main_topics",
|
||||
"pages": [
|
||||
"媒体知识分子",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "媒体知识分子 数据字段(main_topics,出现 16 条)",
|
||||
"keys": [
|
||||
"main_topics"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "source_value",
|
||||
"pages": [
|
||||
"媒体知识分子",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "媒体知识分子 数据字段(source_value,出现 16 条)",
|
||||
"keys": [
|
||||
"source_value"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "bias_note",
|
||||
"pages": [
|
||||
"媒体知识分子",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "媒体知识分子 数据字段(bias_note,出现 47 条)",
|
||||
"keys": [
|
||||
"bias_note"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "reliability_level",
|
||||
"pages": [
|
||||
"媒体知识分子",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "媒体知识分子 数据字段(reliability_level,出现 47 条)",
|
||||
"keys": [
|
||||
"reliability_level"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "related_columns",
|
||||
"pages": [
|
||||
"媒体知识分子",
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "媒体知识分子 数据字段(related_columns,出现 16 条)",
|
||||
"keys": [
|
||||
"related_columns"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "key_organizations",
|
||||
"pages": [
|
||||
"反基地地方网络"
|
||||
],
|
||||
"description": "反基地地方网络 数据字段(key_organizations,出现 7 条)",
|
||||
"keys": [
|
||||
"key_organizations"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "key_persons",
|
||||
"pages": [
|
||||
"反基地地方网络"
|
||||
],
|
||||
"description": "反基地地方网络 数据字段(key_persons,出现 7 条)",
|
||||
"keys": [
|
||||
"key_persons"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "main_narratives",
|
||||
"pages": [
|
||||
"反基地地方网络"
|
||||
],
|
||||
"description": "反基地地方网络 数据字段(main_narratives,出现 7 条)",
|
||||
"keys": [
|
||||
"main_narratives"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "related_media",
|
||||
"pages": [
|
||||
"反基地地方网络"
|
||||
],
|
||||
"description": "反基地地方网络 数据字段(related_media,出现 1 条)",
|
||||
"keys": [
|
||||
"related_media"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "supports",
|
||||
"pages": [
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "数据来源与索引 数据字段(supports,出现 31 条)",
|
||||
"keys": [
|
||||
"supports"
|
||||
],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"label": "cross_check_needed",
|
||||
"pages": [
|
||||
"数据来源与索引"
|
||||
],
|
||||
"description": "数据来源与索引 数据字段(cross_check_needed,出现 31 条)",
|
||||
"keys": [
|
||||
"cross_check_needed"
|
||||
],
|
||||
"custom": false
|
||||
}
|
||||
]
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"系统": {
|
||||
"名称": "日本反修宪、反战护宪与左翼市民社会生态资料库",
|
||||
"说明": "围绕日本反修宪、反战护宪、左翼在野党及其支持者、市民运动、工会、法律界、媒体知识分子、反基地与反核网络建立的专题研究数据库。",
|
||||
"版本": "1.0"
|
||||
},
|
||||
"页面": [
|
||||
{
|
||||
"编号": "overview",
|
||||
"名称": "总览与制度背景"
|
||||
},
|
||||
{
|
||||
"编号": "anti_revision_orgs",
|
||||
"名称": "反修宪护宪组织"
|
||||
},
|
||||
{
|
||||
"编号": "antiwar_movements",
|
||||
"名称": "反战护宪运动"
|
||||
},
|
||||
{
|
||||
"编号": "left_parties",
|
||||
"名称": "左翼在野党"
|
||||
},
|
||||
{
|
||||
"编号": "citizen_networks",
|
||||
"名称": "市民运动网络"
|
||||
},
|
||||
{
|
||||
"编号": "labor_networks",
|
||||
"名称": "工会劳动者网络"
|
||||
},
|
||||
{
|
||||
"编号": "legal_networks",
|
||||
"名称": "法律界网络"
|
||||
},
|
||||
{
|
||||
"编号": "media_intellectuals",
|
||||
"名称": "媒体知识分子"
|
||||
},
|
||||
{
|
||||
"编号": "anti_base_networks",
|
||||
"名称": "反基地地方网络"
|
||||
},
|
||||
{
|
||||
"编号": "anti_nuclear_networks",
|
||||
"名称": "反核和平网络"
|
||||
},
|
||||
{
|
||||
"编号": "sources_index",
|
||||
"名称": "数据来源与索引"
|
||||
}
|
||||
],
|
||||
"交互规则": {
|
||||
"默认展示": "overview"
|
||||
}
|
||||
}
|
||||
+307
@@ -0,0 +1,307 @@
|
||||
/* no.20 页面运行时(结构化模板)。
|
||||
* 由 template_fill.compose_structured 内联进骨架的运行时注入点。
|
||||
* DATA 从骨架 JSON 元素读取;MANIFEST/FIELDS 供页面隐藏/自定义模块/字段可见性。 */
|
||||
const DATA=JSON.parse((document.getElementById("structured-data")||{textContent:"{}"}).textContent);
|
||||
const MANIFEST=JSON.parse((document.getElementById("structured-manifest")||{textContent:"{}"}).textContent);
|
||||
const FIELDS=(function(){try{var v=JSON.parse((document.getElementById("structured-fields")||{textContent:"[]"}).textContent);return Array.isArray(v)?v:((v&&v.fields)||[])}catch(x){return []}})();
|
||||
|
||||
function pageHidden(key){
|
||||
const pg=(MANIFEST['页面']||[]).find(p=>p['编号']===key);
|
||||
return !!(pg&&pg['隐藏']===true);
|
||||
}
|
||||
function visibleTabs(){return (DB.tabs||[]).filter(t=>!pageHidden(t.id))}
|
||||
function syncHeader(){
|
||||
const sys=(MANIFEST['系统']||{});
|
||||
if(sys['名称']){document.title=String(sys['名称']);const h1=document.getElementById('pageTitle');if(h1)h1.textContent=String(sys['名称'])}
|
||||
const sub=document.getElementById('pageSubtitle');if(sub&&sys['说明'])sub.textContent=String(sys['说明']);
|
||||
}
|
||||
function renderCustomModules(pageId){
|
||||
const host=document.getElementById('content');
|
||||
if(!host)return;
|
||||
host.querySelectorAll('.custom-module').forEach(x=>x.remove());
|
||||
const list=((MANIFEST||{})['自定义模块']||[]).filter(m=>m&&m['页面']===pageId&&m.html);
|
||||
list.forEach(m=>{
|
||||
const sec=document.createElement('section');sec.className='custom-module';sec.style.margin='18px 0';
|
||||
sec.innerHTML='<h2 class="section-title">'+escapeHtml(m['标题']||'自定义模块')+'</h2>'+m.html;
|
||||
host.appendChild(sec);
|
||||
});
|
||||
}
|
||||
function applyPageVisibility(){
|
||||
if(pageHidden(currentTab)){const first=visibleTabs()[0];if(first)currentTab=first.id}
|
||||
}
|
||||
|
||||
const DB = DATA;
|
||||
const DATASETS = ['organizations','persons','policy_triggers','narratives','events','audiences','regions','media_sources','sources','relations'];
|
||||
const DATASET_LABELS = {
|
||||
organizations:'组织', persons:'人物', policy_triggers:'政策触发', narratives:'叙事', events:'事件', audiences:'受众', regions:'地域', media_sources:'媒体来源', sources:'来源', relations:'关系'
|
||||
};
|
||||
let currentTab = 'overview';
|
||||
let state = { q:'', type:'', issue:'', region:'', reliability:'' };
|
||||
|
||||
const byId = {};
|
||||
function refreshIndex(){
|
||||
Object.keys(byId).forEach(k=>delete byId[k]);
|
||||
DATASETS.forEach(ds => (DB[ds] || []).forEach(item => { if(item.id) byId[item.id] = {...item, __dataset: ds}; }));
|
||||
}
|
||||
|
||||
function init() {
|
||||
refreshIndex();
|
||||
applyPageVisibility();
|
||||
document.getElementById('pageTitle').textContent = DB.meta.title;
|
||||
document.getElementById('pageSubtitle').textContent = DB.meta.description;
|
||||
document.getElementById('scopePills').innerHTML = DB.meta.research_scope.map(x => `<span class="pill">${escapeHtml(x)}</span>`).join('');
|
||||
renderStats();
|
||||
populateFilters();
|
||||
renderTabs();
|
||||
bindControls();
|
||||
render();
|
||||
}
|
||||
function renderStats() {
|
||||
const stats = [
|
||||
['组织', DB.organizations.length], ['人物', DB.persons.length], ['政策触发', DB.policy_triggers.length],
|
||||
['叙事', DB.narratives.length], ['事件', DB.events.length], ['来源', DB.sources.length]
|
||||
];
|
||||
document.getElementById('stats').innerHTML = stats.map(([label,num]) => `<div class="stat"><div class="num">${num}</div><div class="label">${label}</div></div>`).join('');
|
||||
}
|
||||
function populateFilters() {
|
||||
['typeFilter','issueFilter','regionFilter','reliabilityFilter'].forEach(id=>{const el=document.getElementById(id);while(el.options.length>1)el.remove(1)});
|
||||
const typeSel = document.getElementById('typeFilter');
|
||||
Object.entries(DATASET_LABELS).forEach(([k,v]) => { if(k !== 'relations') typeSel.insertAdjacentHTML('beforeend', `<option value="${k}">${v}</option>`); });
|
||||
const issueSet = new Set();
|
||||
const regionSet = new Set();
|
||||
const relSet = new Set();
|
||||
collectAll().forEach(o => {
|
||||
[...arr(o.core_issues), ...arr(o.main_issues), ...arr(o.trigger_issues), ...arr(o.core_concerns)].forEach(x => issueSet.add(x));
|
||||
if(o.region) regionSet.add(o.region);
|
||||
if(o.location) regionSet.add(o.location);
|
||||
if(o.name && (o.__dataset === 'regions')) regionSet.add(o.name);
|
||||
if(o.reliability_level) relSet.add(o.reliability_level);
|
||||
});
|
||||
fillSelect('issueFilter', issueSet);
|
||||
fillSelect('regionFilter', regionSet);
|
||||
fillSelect('reliabilityFilter', relSet);
|
||||
}
|
||||
function fillSelect(id, set) {
|
||||
const el = document.getElementById(id);
|
||||
[...set].sort().forEach(v => el.insertAdjacentHTML('beforeend', `<option value="${escapeAttr(v)}">${escapeHtml(v)}</option>`));
|
||||
}
|
||||
function renderTabs() {
|
||||
document.getElementById('tabs').innerHTML = visibleTabs().map(t => `<button class="tab ${t.id===currentTab?'active':''}" onclick="setTab('${t.id}')">${escapeHtml(t.label)}</button>`).join('');
|
||||
}
|
||||
function bindControls() {
|
||||
document.getElementById('searchInput').addEventListener('input', e => { state.q = e.target.value.trim(); render(); });
|
||||
document.getElementById('typeFilter').addEventListener('change', e => { state.type = e.target.value; render(); });
|
||||
document.getElementById('issueFilter').addEventListener('change', e => { state.issue = e.target.value; render(); });
|
||||
document.getElementById('regionFilter').addEventListener('change', e => { state.region = e.target.value; render(); });
|
||||
document.getElementById('reliabilityFilter').addEventListener('change', e => { state.reliability = e.target.value; render(); });
|
||||
}
|
||||
function setTab(id) { if(pageHidden(id))return; currentTab = id; render(); window.scrollTo({top:0, behavior:'smooth'}); }
|
||||
function render() {
|
||||
const tab = DB.tabs.find(t => t.id === currentTab) || DB.tabs[0];
|
||||
const content = document.getElementById('content');
|
||||
if (state.q || state.type || state.issue || state.region || state.reliability) {
|
||||
const results = filterItems(collectAll());
|
||||
content.innerHTML = `<div class="section-title"><div><h2>交互查询结果</h2><p>当前筛选返回 ${results.length} 条数据。点击卡片可查看弹框详情与关联关系。</p></div></div>` + renderCards(results);
|
||||
return;
|
||||
}
|
||||
let html = `<div class="section-title"><div><h2>${escapeHtml(tab.label)}</h2><p>${escapeHtml(tab.description)}</p></div></div>`;
|
||||
if (currentTab === 'overview') html += renderOverview();
|
||||
else if (currentTab === 'sources_index') html += renderSourcesIndex();
|
||||
else html += renderTabData(currentTab);
|
||||
content.innerHTML = html;
|
||||
}
|
||||
function renderOverview() {
|
||||
return `
|
||||
<div class="relation-box">
|
||||
<div class="relation-item"><b>研究对象</b><br>${escapeHtml(DB.meta.subtitle)}<br><br>${escapeHtml(DB.meta.safety_note)}</div>
|
||||
<div class="relation-item"><b>核心链条</b><br>高市路线/修宪政策触发 → 群体反应 → 叙事激活 → 行动节点 → 媒体传播 → 来源核验</div>
|
||||
</div>
|
||||
<div class="section-title"><div><h2>高市路线触发矩阵</h2><p>点击任意政策触发卡片查看激活群体、叙事、事件和来源。</p></div></div>
|
||||
${renderCards(DB.policy_triggers.map(x => attachDataset(x, 'policy_triggers')))}
|
||||
<div class="section-title"><div><h2>群体反应总表</h2><p>从政策触发、主要激活群体和核心叙事三个维度观察资料库结构。</p></div></div>
|
||||
${renderTriggerMatrix()}
|
||||
`;
|
||||
}
|
||||
function renderTriggerMatrix() {
|
||||
return `<table class="matrix"><thead><tr><th>政策触发</th><th>主要激活群体</th><th>核心叙事</th><th>相关行动</th></tr></thead><tbody>` +
|
||||
DB.policy_triggers.map(t => `<tr onclick="openModal('policy_triggers','${t.id}')" style="cursor:pointer"><td><b>${escapeHtml(t.name)}</b><br><span class="sub">${escapeHtml(t.category)}</span></td><td>${tags(t.activated_groups || [])}</td><td>${linkObjects(t.main_counter_narratives || [])}</td><td>${linkObjects(t.related_events || [])}</td></tr>`).join('') +
|
||||
`</tbody></table>`;
|
||||
}
|
||||
function renderTabData(tabId) {
|
||||
const map = {
|
||||
anti_revision_orgs: {datasets:['organizations','narratives','events'], categories:['日本反修宪与护宪组织']},
|
||||
antiwar_movements: {datasets:['events','organizations','audiences'], categories:['反战护宪与和平运动群体']},
|
||||
left_parties: {datasets:['organizations','persons','policy_triggers'], categories:['左翼在野党及其支持者']},
|
||||
citizen_networks: {datasets:['organizations','events','audiences'], categories:['市民运动与街头行动网络']},
|
||||
labor_networks: {datasets:['organizations','audiences','narratives'], categories:['工会与劳动者网络']},
|
||||
legal_networks: {datasets:['organizations','persons','narratives'], categories:['法律界与宪法学者网络']},
|
||||
media_intellectuals: {datasets:['media_sources','persons','organizations'], categories:['媒体记者与知识分子网络']},
|
||||
anti_base_networks: {datasets:['regions','organizations','events','persons'], categories:['反基地与地方前线化网络']},
|
||||
anti_nuclear_networks: {datasets:['organizations','events','narratives','audiences'], categories:['反核、反原发与和平网络']}
|
||||
};
|
||||
const cfg = map[tabId];
|
||||
let items = [];
|
||||
cfg.datasets.forEach(ds => {
|
||||
(DB[ds]||[]).forEach(o => {
|
||||
const cats = [...arr(o.category), ...arr(o.categories), ...arr(o.related_groups)];
|
||||
const matchCat = cats.some(c => cfg.categories.includes(c));
|
||||
const issueMatch = cfg.categories.some(c => textOf(o).includes(c.replace('网络','').replace('群体','')));
|
||||
if(matchCat || issueMatch) items.push(attachDataset(o, ds));
|
||||
});
|
||||
});
|
||||
items = uniqueById(items);
|
||||
if(tabId === 'antiwar_movements' || tabId === 'citizen_networks') {
|
||||
return renderTimeline(items.filter(x=>x.__dataset==='events')) + renderCards(items.filter(x=>x.__dataset!=='events'));
|
||||
}
|
||||
return renderCards(items);
|
||||
}
|
||||
function renderSourcesIndex() {
|
||||
return `<div class="section-title"><div><h2>来源可信度与索引</h2><p>来源分级用于提示资料用途和核验要求,不代表政治立场评价。</p></div></div>` + renderSourceTable() + `<div class="section-title"><div><h2>关系索引</h2><p>点击关系项可回溯关联对象。</p></div></div>` + renderRelations();
|
||||
}
|
||||
function renderSourceTable() {
|
||||
return `<table class="matrix"><thead><tr><th>来源</th><th>类型</th><th>可信度</th><th>支持事实</th><th>备注</th></tr></thead><tbody>` +
|
||||
DB.sources.map(s => `<tr onclick="openModal('sources','${s.id}')" style="cursor:pointer"><td><b>${escapeHtml(s.name)}</b></td><td>${escapeHtml(s.type)}</td><td><span class="badge">${escapeHtml(s.reliability_level)}</span></td><td>${escapeHtml(s.supports)}</td><td>${escapeHtml(s.bias_note || '')}</td></tr>`).join('') + `</tbody></table>`;
|
||||
}
|
||||
function renderRelations() {
|
||||
return `<div class="grid">` + DB.relations.map(r => `<div class="card" onclick="openModal('relations','${r.id}')"><div class="card-head"><h3>${escapeHtml(r.relation_type)}</h3><span class="badge">关系</span></div><p class="summary">${escapeHtml(r.description)}</p><div class="tags">${objectChip(r.source_id)} ${objectChip(r.target_id)}</div></div>`).join('') + `</div>`;
|
||||
}
|
||||
function renderTimeline(items) {
|
||||
if(!items.length) return '';
|
||||
items.sort((a,b)=>String(a.date||'').localeCompare(String(b.date||'')));
|
||||
return `<div class="timeline">` + items.map(e => `<div class="timeline-item" onclick="openModal('${e.__dataset}','${e.id}')"><b>${escapeHtml(e.name)}</b><div class="sub">${escapeHtml(e.date || '')} · ${escapeHtml(e.location || e.type || '')}</div><div class="summary">${escapeHtml(e.summary || '')}</div>${tags(e.main_issues || [])}</div>`).join('') + `</div>`;
|
||||
}
|
||||
function renderCards(items) {
|
||||
items = uniqueById(items).filter(Boolean);
|
||||
if(!items.length) return `<div class="empty">暂无匹配数据</div>`;
|
||||
return `<div class="grid">` + items.map(o => card(o)).join('') + `</div>`;
|
||||
}
|
||||
function card(o) {
|
||||
const title = o.name_cn || o.name || o.name_jp || o.id;
|
||||
const sub = [DATASET_LABELS[o.__dataset], o.type || o.category || o.role || o.affiliation || o.date].filter(Boolean).join(' · ');
|
||||
const summary = o.summary || o.core_claim || o.description || o.public_position || o.source_value || o.supports || o.detail?.background || '';
|
||||
const tagArr = [...arr(o.core_issues), ...arr(o.main_issues), ...arr(o.core_concerns), ...arr(o.key_narratives).map(id=>byId[id]?.name || id), ...arr(o.activated_groups)].slice(0,6);
|
||||
const badge = o.reliability_level || o.display_priority || '';
|
||||
return `<div class="card" onclick="openModal('${o.__dataset}','${o.id}')"><div class="card-head"><h3>${escapeHtml(title)}</h3>${badge ? `<span class="badge">${escapeHtml(badge)}</span>` : ''}</div><div class="sub">${escapeHtml(sub)}</div><p class="summary">${escapeHtml(summary).slice(0,180)}${summary.length>180?'…':''}</p><div class="tags">${tags(tagArr)}</div></div>`;
|
||||
}
|
||||
function openModal(ds, id) {
|
||||
const obj = (DB[ds] || []).find(x => x.id === id);
|
||||
if(!obj) return;
|
||||
document.getElementById('modalTitle').textContent = obj.name_cn || obj.name || obj.name_jp || id;
|
||||
document.getElementById('modalSub').textContent = [DATASET_LABELS[ds], obj.type || obj.category || obj.role || obj.affiliation || obj.date || ''].filter(Boolean).join(' · ');
|
||||
document.getElementById('modalBody').innerHTML = renderDetail(obj, ds) + renderObjectRelations(ds, id);
|
||||
document.getElementById('modal').classList.add('open');
|
||||
}
|
||||
function closeModal() { document.getElementById('modal').classList.remove('open'); }
|
||||
function renderDetail(obj, ds) {
|
||||
const rows = [];
|
||||
Object.entries(obj).forEach(([k,v]) => {
|
||||
if(k.startsWith('__')) return;
|
||||
rows.push(`<div>${escapeHtml(labelKey(k))}</div><div>${valueHtml(v)}</div>`);
|
||||
});
|
||||
return `<div class="detail-grid">${rows.join('')}</div>`;
|
||||
}
|
||||
function renderObjectRelations(ds, id) {
|
||||
const rels = DB.relations.filter(r => r.source_id === id || r.target_id === id);
|
||||
const implicit = [];
|
||||
const obj = (DB[ds] || []).find(x => x.id === id);
|
||||
if(obj) {
|
||||
['related_policy_triggers','related_events','related_organizations','related_persons','related_narratives','activated_organizations','main_counter_narratives','target_audiences','entry_organizations'].forEach(k => arr(obj[k]).forEach(x => implicit.push(x)));
|
||||
}
|
||||
const relHtml = rels.map(r => `<div class="relation-item"><b>${escapeHtml(r.relation_type)}</b><br>${escapeHtml(r.description)}<br>${objectChip(r.source_id)} ${objectChip(r.target_id)}</div>`).join('');
|
||||
const impHtml = implicit.length ? `<div class="relation-item"><b>字段关联对象</b><br>${[...new Set(implicit)].map(objectChip).join(' ')}</div>` : '';
|
||||
return `<div class="section-title"><div><h2>关联关系</h2><p>由关系表和对象字段自动生成。</p></div></div><div class="relation-box">${relHtml || ''}${impHtml || ''}${(!relHtml && !impHtml) ? '<div class="empty">暂无关联数据</div>' : ''}</div>`;
|
||||
}
|
||||
function objectChip(id) {
|
||||
const o = byId[id];
|
||||
if(!o) return `<span class="object-link">${escapeHtml(id)}</span>`;
|
||||
const label = o.name_cn || o.name || o.name_jp || id;
|
||||
return `<span class="object-link" onclick="event.stopPropagation(); openModal('${o.__dataset}','${id}')">${escapeHtml(label)}</span>`;
|
||||
}
|
||||
function linkObjects(ids) { return arr(ids).map(objectChip).join(' '); }
|
||||
function tags(xs) { return arr(xs).filter(Boolean).slice(0,8).map(x => `<span class="tag">${escapeHtml(String(x))}</span>`).join(''); }
|
||||
function valueHtml(v) {
|
||||
if(v === null || v === undefined) return '<span class="sub">未记录</span>';
|
||||
if(Array.isArray(v)) return v.length ? v.map(x => typeof x === 'string' && byId[x] ? objectChip(x) : `<span class="tag">${escapeHtml(String(x))}</span>`).join(' ') : '<span class="sub">空</span>';
|
||||
if(typeof v === 'object') return Object.entries(v).map(([k,val]) => `<b>${escapeHtml(labelKey(k))}:</b>${valueHtml(val)}`).join('<br>');
|
||||
if(byId[v]) return objectChip(v);
|
||||
return escapeHtml(String(v));
|
||||
}
|
||||
function collectAll() {
|
||||
let arrs = [];
|
||||
DATASETS.forEach(ds => { if(ds !== 'relations') arrs = arrs.concat((DB[ds]||[]).map(o=>attachDataset(o,ds))); });
|
||||
return arrs;
|
||||
}
|
||||
function attachDataset(o, ds) { return {...o, __dataset: ds}; }
|
||||
function filterItems(items) {
|
||||
return items.filter(o => {
|
||||
const text = textOf(o).toLowerCase();
|
||||
if(state.q && !text.includes(state.q.toLowerCase())) return false;
|
||||
if(state.type && o.__dataset !== state.type) return false;
|
||||
if(state.issue && !text.includes(state.issue.toLowerCase())) return false;
|
||||
if(state.region && !text.includes(state.region.toLowerCase())) return false;
|
||||
if(state.reliability && String(o.reliability_level || '').toLowerCase() !== state.reliability.toLowerCase()) return false;
|
||||
return true;
|
||||
});
|
||||
}
|
||||
function textOf(o) { return JSON.stringify(o, null, 0); }
|
||||
function uniqueById(items) { const seen = new Set(); return items.filter(x => { const key = `${x.__dataset}:${x.id || JSON.stringify(x)}`; if(seen.has(key)) return false; seen.add(key); return true; }); }
|
||||
function arr(x) { if(!x) return []; return Array.isArray(x) ? x : [x]; }
|
||||
function labelKey(k) {
|
||||
const map = {id:'ID', name_cn:'中文名称', name_jp:'日文名称', name:'名称', type:'类型', category:'栏目分类', categories:'栏目分类', region:'地域', founded:'成立时间', core_issues:'核心议题', main_issues:'主要议题', key_narratives:'核心叙事', key_actions:'主要行动', related_policy_triggers:'相关政策触发', related_events:'相关事件', related_persons:'相关人物', related_organizations:'相关组织', summary:'摘要', detail:'详细信息', sources:'来源', role:'公开职务', affiliation:'所属组织', public_position:'公开立场', core_claim:'核心命题', carriers:'承载者', target_audiences:'目标受众', trigger_issues:'触发议题', typical_expressions:'典型表达', counter_frame:'对应反叙事', date:'日期', location:'地点', organizers:'组织者', participants:'参与人数', related_groups:'相关群体', actor:'行为体', activated_groups:'激活群体', activated_organizations:'激活组织', activated_audiences:'激活受众', main_counter_narratives:'主要反叙事', data_points:'关键数据', display_priority:'显示优先级', composition:'构成', core_concerns:'核心关切', responsive_narratives:'响应叙事', entry_organizations:'入口组织', typical_actions:'典型行动', trigger_points:'触发点', source_value:'资料价值', bias_note:'偏向说明', reliability_level:'可信度', supports:'支持事实', cross_check_needed:'是否需交叉验证', source_type:'来源类型', source_id:'来源ID', target_type:'目标类型', target_id:'目标ID', relation_type:'关系类型', description:'说明' };
|
||||
return map[k] || k;
|
||||
}
|
||||
function escapeHtml(str) { return String(str).replace(/[&<>"']/g, s => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[s])); }
|
||||
function escapeAttr(str) { return escapeHtml(str).replace(/"/g,'"'); }
|
||||
|
||||
document.addEventListener('keydown', e => { if(e.key === 'Escape') closeModal(); });
|
||||
|
||||
(function(){
|
||||
const _render=render;
|
||||
render=function(){
|
||||
refreshIndex();
|
||||
applyPageVisibility();
|
||||
renderTabs();
|
||||
_render();
|
||||
syncHeader();
|
||||
renderCustomModules(currentTab);
|
||||
};
|
||||
})();
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
(function(){
|
||||
"use strict";
|
||||
function clone(v){return JSON.parse(JSON.stringify(v))}
|
||||
function draftsToData(d){var o={};Object.keys(d).forEach(function(k){if(k!=='__manifest__')o[k]=d[k]});return o}
|
||||
function replaceInPlace(t,s){Object.keys(t).forEach(function(k){delete t[k]});Object.keys(s).forEach(function(k){t[k]=s[k]})}
|
||||
function buildDrafts(data,manifest){var o={__manifest__:clone(manifest)};Object.keys(data).forEach(function(k){o[k]=clone(data[k])});return o}
|
||||
const initialData=clone(DATA),initialManifest=clone(MANIFEST);
|
||||
const overlay=document.getElementById('editorOverlay');
|
||||
if(!overlay)return;
|
||||
const fingerprint=(function(){let h=2166136261;const s=JSON.stringify(initialData)+'|'+JSON.stringify(initialManifest);for(let i=0;i<s.length;i++){h^=s.charCodeAt(i);h=Math.imul(h,16777619)}return (h>>>0).toString(36)})();
|
||||
const storageKey='structured-page-data-v1:'+fingerprint;
|
||||
function readLS(k){try{return window.localStorage?window.localStorage.getItem(k):null}catch(x){return null}}
|
||||
function writeLS(k,v){try{if(window.localStorage)window.localStorage.setItem(k,v)}catch(x){}}
|
||||
function removeLS(k){try{if(window.localStorage)window.localStorage.removeItem(k)}catch(x){}}
|
||||
(function(){const cached=readLS(storageKey);if(!cached)return;try{const parsed=JSON.parse(cached);if(parsed&&typeof parsed==='object'&&parsed.data&&typeof parsed.data==='object'){replaceInPlace(DATA,parsed.data);if(parsed.manifest&&typeof parsed.manifest==='object')replaceInPlace(MANIFEST,parsed.manifest)}}catch(x){}})();
|
||||
const labels={};(MANIFEST['页面']||[]).forEach(p=>{if(p&&p['编号'])labels[p['编号']]=p['名称']||p['编号']});
|
||||
const modules=Object.keys(DATA).concat(['__manifest__']);
|
||||
let active=modules[0]||'__manifest__';
|
||||
let drafts=buildDrafts(DATA,MANIFEST);
|
||||
function moduleTitle(k){return k==='__manifest__'?'系统设置(MANIFEST)':(labels[k]||k)}
|
||||
const tabsEl=document.getElementById('editorTabs'),editor=document.getElementById('jsonEditor'),statusEl=document.getElementById('jsonStatus'),titleEl=document.getElementById('editorModuleTitle');
|
||||
function setStatus(ok,msg){statusEl.textContent=msg;statusEl.className='json-status '+(ok?'valid':'invalid')}
|
||||
function readEditor(){try{const p=JSON.parse(editor.value);if(!p||typeof p!=='object')throw new Error('模块必须是 JSON 对象或数组');setStatus(true,'JSON 有效');return p}catch(x){setStatus(false,'JSON 无效:'+x.message);return null}}
|
||||
function saveActiveDraft(){const p=readEditor();if(!p)return false;drafts[active]=p;return true}
|
||||
function loadEditor(){titleEl.textContent=moduleTitle(active);editor.value=JSON.stringify(drafts[active],null,2);setStatus(true,'JSON 有效')}
|
||||
function renderEditorTabs(){tabsEl.innerHTML='';modules.forEach(function(key){const b=document.createElement('button');b.type='button';b.className='editor-tab'+(key===active?' active':'');b.innerHTML='<b>'+esc(moduleTitle(key))+'</b><small>'+(key==='__manifest__'?'manifest.json':key)+'</small>';b.onclick=function(){if(key===active||!saveActiveDraft())return;active=key;renderEditorTabs();loadEditor()};tabsEl.appendChild(b)})}
|
||||
function closeEditor(){overlay.style.display='none'}
|
||||
function applyToPage(){if(!saveActiveDraft()){setStatus(false,'存在无效模块');return}replaceInPlace(DATA,draftsToData(drafts));replaceInPlace(MANIFEST,drafts.__manifest__);closeEditor();refreshIndex();populateFilters();renderStats();document.getElementById('scopePills').innerHTML=(DB.meta.research_scope||[]).map(x=>`<span class="pill">${escapeHtml(x)}</span>`).join('');render();writeLS(storageKey,JSON.stringify({data:DATA,manifest:MANIFEST}))}
|
||||
function legacyCopy(text){const t=document.createElement('textarea');t.value=text;document.body.appendChild(t);t.select();try{document.execCommand('copy')}catch(x){}t.remove()}
|
||||
document.getElementById('openEditor').onclick=function(){drafts=buildDrafts(DATA,MANIFEST);active=modules[0]||'__manifest__';renderEditorTabs();loadEditor();overlay.style.display='';setTimeout(function(){editor.focus()},40)};
|
||||
document.getElementById('closeEditor').onclick=closeEditor;
|
||||
document.addEventListener('keydown',function(ev){if(ev.key==='Escape'&&overlay.style.display!=='none')closeEditor()});
|
||||
document.getElementById('applyJson').onclick=applyToPage;
|
||||
document.getElementById('resetJson').onclick=function(){drafts=buildDrafts(initialData,initialManifest);active=modules[0]||'__manifest__';removeLS(storageKey);renderEditorTabs();loadEditor();setStatus(true,'已恢复默认数据,点击「应用到页面」生效')};
|
||||
document.getElementById('copyJson').onclick=function(){if(!saveActiveDraft())return;const text=JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2);if(navigator.clipboard&&navigator.clipboard.writeText)navigator.clipboard.writeText(text).catch(function(){legacyCopy(text)});else legacyCopy(text)};
|
||||
document.getElementById('downloadJson').onclick=function(){if(!saveActiveDraft())return;const blob=new Blob([JSON.stringify({data:draftsToData(drafts),manifest:drafts.__manifest__},null,2)],{type:'application/json;charset=utf-8'});const link=document.createElement('a');link.href=URL.createObjectURL(blob);link.download='page-data.json';link.click();setTimeout(function(){URL.revokeObjectURL(link.href)},1000)};
|
||||
})();
|
||||
init();
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
<!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 {
|
||||
--bg: #8d1118;
|
||||
--bg2: #b6232d;
|
||||
--card: #fffdf8;
|
||||
--card2: #fff7ef;
|
||||
--ink: #241b1d;
|
||||
--muted: #6d5f62;
|
||||
--line: rgba(90, 20, 25, .16);
|
||||
--accent: #b71c2b;
|
||||
--accent2: #f1d7c8;
|
||||
--tag: #f6e7df;
|
||||
--shadow: 0 16px 40px rgba(60,0,0,.18);
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
|
||||
color: var(--ink);
|
||||
background: linear-gradient(135deg, var(--bg), #6b0d13 42%, #a01822);
|
||||
min-height: 100vh;
|
||||
}
|
||||
.app { max-width: 1440px; margin: 0 auto; padding: 22px; }
|
||||
.hero {
|
||||
color: #fff; padding: 26px 28px; border-radius: 28px;
|
||||
background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
|
||||
border: 1px solid rgba(255,255,255,.22);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
.hero h1 { margin: 0 0 10px; font-size: clamp(24px, 4vw, 42px); letter-spacing: .02em; }
|
||||
.hero p { margin: 0; max-width: 980px; color: rgba(255,255,255,.88); line-height: 1.8; }
|
||||
.meta-line { display:flex; flex-wrap:wrap; gap: 10px; margin-top: 18px; }
|
||||
.pill { display:inline-flex; align-items:center; gap:6px; padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); font-size: 13px; }
|
||||
.stats { display:grid; grid-template-columns: repeat(6, minmax(130px,1fr)); gap: 12px; margin: 18px 0; }
|
||||
.stat { background: var(--card); border-radius: 18px; padding: 15px; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
|
||||
.stat .num { font-size: 26px; font-weight: 800; color: var(--accent); }
|
||||
.stat .label { color: var(--muted); font-size: 13px; margin-top: 2px; }
|
||||
.panel { background: var(--card); border-radius: 24px; padding: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); }
|
||||
.toolbar { display:grid; grid-template-columns: 1.5fr repeat(4, minmax(150px, .7fr)); gap: 10px; margin: 16px 0; }
|
||||
input, select {
|
||||
width:100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background:#fff; color:var(--ink); outline:none; font-size: 14px;
|
||||
}
|
||||
input:focus, select:focus { border-color: rgba(183,28,43,.6); box-shadow: 0 0 0 3px rgba(183,28,43,.08); }
|
||||
.tabs { display:flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 8px; }
|
||||
.tab {
|
||||
white-space: nowrap; border: 1px solid var(--line); color: #5e272c; background:#fff;
|
||||
padding: 10px 14px; border-radius: 999px; cursor:pointer; font-weight: 700; font-size: 14px;
|
||||
}
|
||||
.tab.active { background: var(--accent); color:#fff; border-color: var(--accent); }
|
||||
.tab:hover { transform: translateY(-1px); }
|
||||
.section-title { display:flex; justify-content:space-between; align-items:flex-end; gap: 10px; margin: 16px 0 10px; }
|
||||
.section-title h2 { margin:0; font-size: 22px; color:#3a1217; }
|
||||
.section-title p { margin: 6px 0 0; color:var(--muted); line-height:1.6; }
|
||||
.grid { display:grid; grid-template-columns: repeat(3, minmax(260px,1fr)); gap: 14px; }
|
||||
.card {
|
||||
background: linear-gradient(180deg, #fff, var(--card2)); border: 1px solid var(--line); border-radius: 20px;
|
||||
padding: 16px; cursor:pointer; transition: .15s ease; min-height: 180px;
|
||||
}
|
||||
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(100,0,0,.12); border-color: rgba(183,28,43,.28); }
|
||||
.card-head { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
|
||||
.card h3 { margin:0; font-size: 18px; color:#3a1217; }
|
||||
.card .sub { margin-top: 5px; color:var(--muted); font-size:13px; }
|
||||
.card .summary { margin: 12px 0; line-height:1.65; color:#3b3032; font-size:14px; }
|
||||
.tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
|
||||
.tag { font-size:12px; padding: 5px 8px; border-radius: 999px; background: var(--tag); color:#7a3038; border: 1px solid rgba(183,28,43,.08); }
|
||||
.badge { padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight:700; background:#f4ded5; color:#8d1118; }
|
||||
.matrix { width:100%; border-collapse: collapse; background:#fff; border-radius:18px; overflow:hidden; border: 1px solid var(--line); }
|
||||
.matrix th, .matrix td { padding: 12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; font-size:14px; line-height:1.55; }
|
||||
.matrix th { background:#f6e7df; color:#5b1720; }
|
||||
.relation-box { display:grid; grid-template-columns: repeat(2, minmax(260px,1fr)); gap:12px; }
|
||||
.relation-item { background:#fff7ef; border:1px solid var(--line); border-radius:18px; padding:13px; line-height:1.6; }
|
||||
.timeline { position:relative; padding-left: 18px; }
|
||||
.timeline:before { content:""; position:absolute; left:6px; top:0; bottom:0; width:2px; background:#e4b7aa; }
|
||||
.timeline-item { position:relative; margin: 0 0 12px; background:#fff; border:1px solid var(--line); border-radius:16px; padding:14px; }
|
||||
.timeline-item:before { content:""; position:absolute; left:-18px; top:18px; width:10px; height:10px; background:var(--accent); border-radius:50%; }
|
||||
.empty { padding: 34px; text-align:center; color: var(--muted); background:#fff; border-radius:18px; border: 1px dashed var(--line); }
|
||||
.modal { position:fixed; inset:0; background:rgba(20,0,0,.58); display:none; align-items:center; justify-content:center; padding:18px; z-index: 50; }
|
||||
.modal.open { display:flex; }
|
||||
.modal-card { background:#fffdf8; max-width: 980px; width: min(980px, 96vw); max-height: 88vh; overflow:auto; border-radius: 26px; box-shadow: 0 28px 80px rgba(0,0,0,.35); border:1px solid rgba(255,255,255,.4); }
|
||||
.modal-head { position:sticky; top:0; background:#fffdf8; padding:20px 22px 14px; border-bottom:1px solid var(--line); z-index:2; }
|
||||
.modal-head h2 { margin:0; color:#3a1217; }
|
||||
.close { float:right; border:none; background:#8d1118; color:#fff; width:34px; height:34px; border-radius:50%; cursor:pointer; font-size:18px; }
|
||||
.modal-body { padding: 18px 22px 24px; }
|
||||
.detail-grid { display:grid; grid-template-columns: 180px 1fr; gap: 0; border:1px solid var(--line); border-radius:18px; overflow:hidden; }
|
||||
.detail-grid div { padding: 12px; border-bottom:1px solid var(--line); line-height:1.65; }
|
||||
.detail-grid div:nth-child(odd) { background:#f6e7df; font-weight:700; color:#5b1720; }
|
||||
.detail-grid div:nth-child(even) { background:#fff; }
|
||||
.object-link { display:inline-block; margin: 3px 4px 3px 0; padding: 5px 8px; border-radius:999px; background:#fff; border:1px solid var(--line); color:#7a1e29; cursor:pointer; font-size:12px; }
|
||||
.footer-note { color:rgba(255,255,255,.75); font-size:12px; margin: 18px 4px; line-height:1.7; }
|
||||
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(3,1fr); } .toolbar { grid-template-columns: 1fr 1fr; } .grid { grid-template-columns: repeat(2,1fr); } }
|
||||
@media (max-width: 720px) { .app { padding:12px; } .stats { grid-template-columns: repeat(2,1fr); } .toolbar { grid-template-columns: 1fr; } .grid, .relation-box { grid-template-columns: 1fr; } .detail-grid { grid-template-columns:1fr; } .detail-grid div:nth-child(odd) { border-bottom:0; } }
|
||||
|
||||
/* ── 页面 JSON 编辑器 ── */
|
||||
.editor-fab{position:fixed;right:18px;bottom:26px;z-index:60;background:#7c1d24;color:#fff;border:0;border-radius:50%;width:46px;height:46px;display:grid;place-items:center;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.3)}.editor-fab:hover{transform:rotate(30deg)}.editor-fab svg{width:22px;height:22px;display:block}
|
||||
.editor-overlay{z-index:80}
|
||||
.editor-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(1080px,94vw);height:min(680px,88vh);background:#fff;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.35)}
|
||||
.editor-head{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid #e5e7eb}.editor-head h2{margin:0;font-size:16px;flex:1}.editor-head .editor-note{font-size:12px;color:#667085;margin-right:8px}
|
||||
.editor-body{display:flex;flex:1;min-height:0}
|
||||
.editor-tabs{width:210px;border-right:1px solid #e5e7eb;overflow:auto;padding:10px 8px;display:flex;flex-direction:column;gap:4px}
|
||||
.editor-tab{border:0;background:transparent;text-align:left;padding:9px 11px;border-radius:8px;cursor:pointer;color:#667085}.editor-tab b{display:block;font-size:13px;color:#1e2329}.editor-tab small{font-size:10px;opacity:.75}.editor-tab:hover{background:#f4f6f8}.editor-tab.active{background:#f7ecec}.editor-tab.active b{color:#7c1d24}
|
||||
.editor-pane{flex:1;display:flex;flex-direction:column;min-width:0;padding:14px 16px;gap:10px}
|
||||
.editor-title-row{display:flex;align-items:center;justify-content:space-between}.editor-title-row b{font-size:14px}
|
||||
.json-status{font-size:12px;padding:3px 10px;border-radius:999px}.json-status.valid{background:#e8f5ef;color:#14804a}.json-status.invalid{background:#fdecec;color:#b4232d}
|
||||
.json-editor{flex:1;width:100%;resize:none;border:1px solid #e5e7eb;border-radius:10px;padding:13px;font:13px/1.6 ui-monospace,Consolas,monospace;color:#1e2329;background:#f8fafc;outline:0;tab-size:2}
|
||||
.editor-actions{display:flex;gap:8px;flex-wrap:wrap}
|
||||
.editor-hint{margin:0;font-size:11px;color:#8a94a3}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="app">
|
||||
<section class="hero">
|
||||
<h1 id="pageTitle"></h1>
|
||||
<p id="pageSubtitle"></p>
|
||||
<div class="meta-line" id="scopePills"></div>
|
||||
</section>
|
||||
|
||||
<div class="stats" id="stats"></div>
|
||||
|
||||
<section class="panel">
|
||||
<div class="toolbar">
|
||||
<input id="searchInput" placeholder="全局搜索:九条会 / 高市 / 防卫费 / 冲绳 / 国民投票法 / 田村智子" />
|
||||
<select id="typeFilter"><option value="">全部数据类型</option></select>
|
||||
<select id="issueFilter"><option value="">全部议题</option></select>
|
||||
<select id="regionFilter"><option value="">全部地域</option></select>
|
||||
<select id="reliabilityFilter"><option value="">全部可信度</option></select>
|
||||
</div>
|
||||
<div class="tabs" id="tabs"></div>
|
||||
<div id="content"></div>
|
||||
</section>
|
||||
|
||||
<div class="footer-note">说明:本页面为离线可运行的研究展示页面,数据来自当前LLMWiki/Skill整理成果;来源字段用于资料追踪和可信度管理,具体事实在正式研究中应继续进行多源核验。</div>
|
||||
</div>
|
||||
|
||||
<div class="modal" id="modal" onclick="if(event.target.id==='modal') closeModal()">
|
||||
<div class="modal-card">
|
||||
<div class="modal-head"><button class="close" onclick="closeModal()">×</button><h2 id="modalTitle"></h2><div class="sub" id="modalSub"></div></div>
|
||||
<div class="modal-body" id="modalBody"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" id="openEditor" class="editor-fab" aria-label="JSON 编辑器" title="页面 JSON 编辑器"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg></button>
|
||||
<div id="editorOverlay" class="editor-overlay" style="display:none"><div class="editor-modal">
|
||||
<header class="editor-head"><h2>页面 JSON 编辑器</h2><span class="editor-note">按模块编辑,应用后即时重渲染;修改保存在浏览器本地,不回写服务器</span><button type="button" id="closeEditor" style="border:0;background:none;font-size:14px;cursor:pointer">关闭</button></header>
|
||||
<div class="editor-body">
|
||||
<nav id="editorTabs" class="editor-tabs"></nav>
|
||||
<div class="editor-pane">
|
||||
<div class="editor-title-row"><b id="editorModuleTitle"></b><span id="jsonStatus" class="json-status valid">JSON 有效</span></div>
|
||||
<textarea id="jsonEditor" class="json-editor" spellcheck="false" aria-label="当前模块 JSON"></textarea>
|
||||
<div class="editor-actions"><button type="button" id="applyJson" style="background:#7c1d24;color:#fff;border:0;border-radius:6px;padding:7px 14px;cursor:pointer">应用到页面</button><button type="button" id="resetJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">恢复默认数据</button><button type="button" id="copyJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">复制完整 JSON</button><button type="button" id="downloadJson" style="border:1px solid #e5e7eb;background:#fff;border-radius:6px;padding:7px 14px;cursor:pointer">下载 JSON</button></div>
|
||||
<p class="editor-hint">模块 = 页面数据(DATA)的顶层键,另附「系统设置」编辑 MANIFEST;沙箱预览无法使用本地缓存时,修改仅当次会话有效。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
<script type="application/json" id="structured-data">__PAGE_DATA__</script>
|
||||
<script type="application/json" id="structured-manifest">__PAGE_MANIFEST__</script>
|
||||
<script type="application/json" id="structured-fields">__PAGE_FIELDS__</script>
|
||||
<script>__PAGE_RUNTIME__</script>
|
||||
</body>
|
||||
</html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"meta": {"title": "日本左翼在野党涉华涉台政治生态知识库", "subtitle": "政党、社会运动、冲绳地方网络与台湾有事议题研究", "version": "1.0", "updated_at": "2026-06-30", "language": "zh-CN", "description": "用于展示日本左翼在野党及其关联社会网络在涉华涉台议题上的组织结构、立场、行动路径、接受边界、舆情生态和冲绳地方风险。", "core_judgement": "该群体不能简单概括为亲中或反台。更准确的判断是:反对中国对台军事威慑,也反对日本、美国以台湾有事为名推动军扩、日美军事一体化、南西诸岛军事化和冲绳前线化。"}, "dashboard": {"summary_cards": [{"id": "card_groups", "label": "群体类型", "value": 9, "unit": "类", "description": "政党、工会、市民运动、冲绳网络、媒体与知识人网络"}, {"id": "card_parties", "label": "核心政党", "value": 4, "unit": "个", "description": "立宪民主党、日本共产党、社会民主党、令和新选组"}, {"id": "card_persons", "label": "关键人物", "value": 18, "unit": "人", "description": "党首、国会议员、政策负责人、街宣传播节点"}, {"id": "card_issue", "label": "核心议题", "value": "台湾有事", "unit": "", "description": "日本左翼涉华涉台研究的政策枢纽"}, {"id": "card_okinawa", "label": "地方焦点", "value": "冲绳 / 先岛", "unit": "", "description": "台海危机地方化、基地化、避难化的核心区域"}, {"id": "card_tabs", "label": "展示栏目", "value": 12, "unit": "栏", "description": "支持 Tab 切换、搜索、筛选和弹框详情"}], "main_tags": ["护宪", "反战", "反军扩", "反基地", "台湾有事", "日美同盟", "冲绳", "南西诸岛", "防卫费", "民生财政", "存立危机事态", "反击能力"]}, "tabs": [{"id": "tab_groups", "title": "群体总览与分类", "dataset": "groups", "view_type": "cards_table", "description": "展示日本左翼在野党及关联社会网络的总体分类。", "filters": ["type", "influence_level", "activity_level", "main_issues"], "detail_modal": true}, {"id": "tab_parties", "title": "主要政党画像", "dataset": "parties", "view_type": "party_cards_compare", "description": "展示四个核心政党的组织结构、涉华涉台立场和安保政策差异。", "filters": ["party_type", "taiwan_position", "us_japan_alliance_position", "military_expansion_position"], "detail_modal": true}, {"id": "tab_persons", "title": "代表人物与关键节点", "dataset": "persons", "view_type": "person_cards_table", "description": "展示党首、议员、组织者、传播节点和地方人物。", "filters": ["party_or_org", "role", "core_issues", "influence_channels"], "detail_modal": true}, {"id": "tab_networks", "title": "组织网络与动员结构", "dataset": "networks", "view_type": "network_chain", "description": "展示政党、工会、市民运动、冲绳网络之间的关系。", "filters": ["relationship_type", "issue_area", "cooperation_form", "mobilization_capacity"], "detail_modal": true}, {"id": "tab_history", "title": "历史演化与政治基因", "dataset": "history", "view_type": "timeline", "description": "展示战后和平主义、安保斗争、冲绳基地、2015安保法制与台湾有事之间的历史链条。", "filters": ["period", "issue_area", "main_actors"], "detail_modal": true}, {"id": "tab_statements", "title": "涉华涉台立场", "dataset": "statements", "view_type": "position_matrix_table", "description": "展示不同主体对中国、台湾、日美同盟、军扩和冲绳议题的立场。", "filters": ["actor_type", "issue_tags", "position_code", "tone_intensity"], "detail_modal": true}, {"id": "tab_taiwan_contingency", "title": "台湾有事与日美同盟", "dataset": "taiwan_contingency", "view_type": "policy_chain", "description": "展示台湾有事在日本法律、日美同盟、自卫队角色和冲绳避难中的政策链条。", "filters": ["legal_category", "us_japan_alliance_link", "okinawa_link", "risk_assessment"], "detail_modal": true}, {"id": "tab_boundaries", "title": "接受边界与反弹红线", "dataset": "boundaries", "view_type": "risk_matrix", "description": "展示不同表述在左翼群体中的接受度、风险点和反弹红线。", "filters": ["actor_group", "acceptance_level", "risk_level", "issue"], "detail_modal": true}, {"id": "tab_influence", "title": "影响链条与破圈机制", "dataset": "influence_chains", "view_type": "flow_cards", "description": "展示议题如何从政府文件、冲绳事件、日美声明扩散到国会、媒体和社交平台。", "filters": ["trigger_event", "issue_category", "frame_transformation", "media_visibility"], "detail_modal": true}, {"id": "tab_crisis", "title": "危机触发与行动路径", "dataset": "crisis_actions", "view_type": "trigger_action_table", "description": "展示不同危机等级下左翼政党、市民团体和冲绳网络的行Line truncated
|
||||
+1234
File diff suppressed because it is too large.
Load diff
Loaded 100 of 431 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user