sync update from LAN repo (source master @ 6e3f02a2)

This commit is contained in:
gozeros committed 2026-11-17 11:28:22 +08:00
1 parent 66a443e915
commit 6c25c89d93
431 files changed
+68511 -2240

No files matched your search

@@ -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)
@@ -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()
@@ -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": {}
}
}
}
@@ -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": {}
}
}
}
@@ -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": {}
}
}
}
@@ -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": {}
}
}
}
@@ -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",