diff --git a/apps/platform_ui/services.py b/apps/platform_ui/services.py index d5dda7a..b9a0247 100644 --- a/apps/platform_ui/services.py +++ b/apps/platform_ui/services.py @@ -128,6 +128,176 @@ def get_platform_demo_context(): {"time": "09:39", "title": "一致性检查", "detail": "检测到产品名称和样本类型存在跨文档冲突,升级为人工复核。"}, {"time": "09:42", "title": "风险输出", "detail": "生成 3 条风险项、2 条补件建议与 1 条责任人通知任务。"}, ] + command_batch = { + "id": "2025IVD-CL-0520-001", + "status": "进行中", + "workflow": "境内第三类", + "class": "III 类", + "created_at": "2025-05-20", + "applicant": "某某生物科技有限公司", + "reviewer": "张审评员", + "role": "审评专家", + "standard": "《体外诊断试剂注册与备案管理办法》及配套技术指导原则", + "version": "V2.1(2025-04-01)", + } + command_metrics = [ + { + "key": "completeness", + "label": "资料包完整性得分", + "value": "68", + "suffix": "/100", + "level": "较差", + "detail": "上次得分 61(2025-05-19)", + }, + { + "key": "health", + "label": "资料包健康度", + "value": "62", + "suffix": "项检查项", + "segments": [ + {"label": "完整", "value": "28", "hint": "45%"}, + {"label": "部分缺失", "value": "18", "hint": "29%"}, + {"label": "缺失", "value": "16", "hint": "26%"}, + ], + }, + { + "key": "risk", + "label": "风险分布", + "value": "22", + "suffix": "项风险", + "segments": [ + {"label": "高风险", "value": "3", "tone": "danger"}, + {"label": "中风险", "value": "7", "tone": "warning"}, + {"label": "低风险", "value": "12", "tone": "success"}, + ], + }, + { + "key": "progress", + "label": "审核进度", + "value": "46", + "suffix": "%", + "detail": "已完成 24 / 52 项任务", + }, + ] + command_flow = [ + {"step": "1", "title": "资料准备", "date": "2025-05-20", "state": "done"}, + {"step": "2", "title": "形式审查", "date": "2025-05-21", "state": "done"}, + {"step": "3", "title": "技术审评", "date": "进行中", "state": "active"}, + {"step": "4", "title": "核查检验", "date": "待开始", "state": "todo"}, + {"step": "5", "title": "综合评审", "date": "待开始", "state": "todo"}, + {"step": "6", "title": "行政审批", "date": "待开始", "state": "todo"}, + {"step": "7", "title": "制证发证", "date": "待开始", "state": "todo"}, + ] + command_tabs = [ + {"id": "completeness", "label": "注册完整性核查"}, + {"id": "consistency", "label": "字段一致性"}, + {"id": "risk", "label": "风险准入结论"}, + {"id": "evidence", "label": "证据引用"}, + {"id": "feishu", "label": "飞书通知状态"}, + ] + command_checks = [ + { + "chapter": "1.产品基本信息", + "item": "产品名称", + "rule": "办法 第十条", + "status": "完整", + "risk": "低风险", + "problem": "-", + }, + { + "chapter": "1.产品基本信息", + "item": "预期用途", + "rule": "办法 第十条", + "status": "完整", + "risk": "低风险", + "problem": "-", + }, + { + "chapter": "2.综述资料", + "item": "产品描述", + "rule": "指导原则4.2.1", + "status": "完整", + "risk": "低风险", + "problem": "-", + }, + { + "chapter": "2.综述资料", + "item": "作用原理", + "rule": "指导原则4.2.2", + "status": "部分缺失", + "risk": "中风险", + "problem": "缺少关键原理图及验证数据说明", + }, + { + "chapter": "3.研究资料", + "item": "分析性能评估", + "rule": "指导原则5.3.1", + "status": "部分缺失", + "risk": "中风险", + "problem": "线性范围验证数据不完整", + }, + { + "chapter": "3.研究资料", + "item": "阳性判断值", + "rule": "指导原则5.3.2", + "status": "缺失", + "risk": "高风险", + "problem": "未提供阳性判断值确定依据", + }, + { + "chapter": "4.临床评价资料", + "item": "临床试验方案", + "rule": "指导原则6.2.1", + "status": "完整", + "risk": "低风险", + "problem": "-", + }, + { + "chapter": "4.临床评价资料", + "item": "临床试验报告", + "rule": "指导原则6.2.2", + "status": "部分缺失", + "risk": "中风险", + "problem": "有效性结果分析不完整", + }, + { + "chapter": "4.临床评价资料", + "item": "不良事件汇总分析", + "rule": "指导原则6.2.4", + "status": "缺失", + "risk": "高风险", + "problem": "未提供不良事件汇总分析报告", + }, + { + "chapter": "5.生产资料", + "item": "生产工艺验证", + "rule": "指导原则7.2.3", + "status": "完整", + "risk": "低风险", + "problem": "-", + }, + ] + key_risks = [ + {"title": "阳性判断值确定依据缺失", "level": "高风险"}, + {"title": "不良事件汇总分析报告缺失", "level": "高风险"}, + {"title": "临床试验方案偏离未充分说明", "level": "中风险"}, + ] + next_actions = [ + {"title": "退回企业补充资料", "detail": "需企业补充 3 项高风险资料", "state": "待处理", "tone": "danger"}, + {"title": "补充说明或澄清", "detail": "需企业说明 7 项中风险问题", "state": "待处理", "tone": "warning"}, + {"title": "进入核查检验环节(可选)", "detail": "风险可控后进入下一环节", "state": "待处理", "tone": "success"}, + ] + owners = [ + {"role": "审评专家", "name": "张审评员", "status": "当前处理人"}, + {"role": "审核组长", "name": "李组长", "status": "待确认"}, + {"role": "法规专员", "name": "王法规", "status": "协同处理"}, + {"role": "临床专家", "name": "陈专家", "status": "协同处理"}, + ] + operation_logs = [ + {"time": "2025-05-21 10:24", "actor": "张审评员", "action": "发起完整性核查"}, + {"time": "2025-05-21 10:26", "actor": "Agent Core", "action": "命中 62 项检查规则"}, + {"time": "2025-05-21 10:28", "actor": "Agent Core", "action": "生成风险准入结论"}, + ] knowledge_filters = [ {"label": "全部", "active": True}, {"label": "法规依据", "active": False}, @@ -169,4 +339,13 @@ def get_platform_demo_context(): "mcp_connectors": mcp_connectors, "skills": skills, "workflow_steps": workflow_steps, + "command_batch": command_batch, + "command_metrics": command_metrics, + "command_flow": command_flow, + "command_tabs": command_tabs, + "command_checks": command_checks, + "key_risks": key_risks, + "next_actions": next_actions, + "owners": owners, + "operation_logs": operation_logs, } diff --git a/apps/platform_ui/urls.py b/apps/platform_ui/urls.py index 71e9992..0ba828a 100644 --- a/apps/platform_ui/urls.py +++ b/apps/platform_ui/urls.py @@ -10,4 +10,5 @@ urlpatterns = [ path("mcp-center/", views.mcp_center, name="mcp-center"), path("skills/", views.skill_studio, name="skills"), path("command-center/", views.command_center, name="command-center"), + path("command-center-v2/", views.command_center_v2, name="command-center-v2"), ] diff --git a/apps/platform_ui/views.py b/apps/platform_ui/views.py index 36c5c0d..b44a112 100644 --- a/apps/platform_ui/views.py +++ b/apps/platform_ui/views.py @@ -21,3 +21,8 @@ def skill_studio(request): def command_center(request): context = get_platform_demo_context() return render(request, "platform_ui/command_center.html", context) + + +def command_center_v2(request): + context = get_platform_demo_context() + return render(request, "platform_ui/command_center_v2.html", context) diff --git a/design-qa.md b/design-qa.md new file mode 100644 index 0000000..0f3d94e --- /dev/null +++ b/design-qa.md @@ -0,0 +1,25 @@ +**Findings** +- No actionable P0/P1/P2 findings remain. + +**Open Questions** +- The source visual is an Image Gen concept rather than a pixel-locked Figma file, so exact icon glyphs and logo geometry were implemented as code-native UI marks. The final prototype preserves the selected direction's hierarchy, density, risk states, and operational layout. + +**Implementation Checklist** +- Source visual truth path: `C:\Users\bruce\.codex\generated_images\019e8bb8-b097-72b3-9c89-97cfca019c7c\ig_0fe578f839e33933016a1fae76771c81918c954bf5cbfe72d2.png` +- Implementation screenshot path: `D:\Code\DEMO-AGENT\output\playwright\command-center-v2-desktop.png` +- Mobile screenshot path: `D:\Code\DEMO-AGENT\output\playwright\command-center-v2-mobile.png` +- Full-view comparison evidence: `D:\Code\DEMO-AGENT\output\playwright\command-center-v2-comparison.png` +- Viewport: desktop `1440 x 1024`, mobile `390 x 844` +- State: default command-center workbench; desktop screenshot shows the selected direction's primary dashboard state. +- Focused region comparison evidence: not separately required; this is a dense dashboard concept and the full-view comparison makes the critical regions visible enough: sidebar, batch strip, metrics, workflow, audit table, and right risk rail. +- Fonts and typography: Segoe UI / PingFang SC / Microsoft YaHei fallback stack matches the professional enterprise SaaS feel; hierarchy and body sizes are readable, with no negative letter spacing. +- Spacing and layout rhythm: Desktop uses the same left rail, top context strip, four metric blocks, workflow strip, table region, and right-side risk rail as the source. Mobile switches to stacked sections to avoid cramped table-dashboard density. +- Colors and visual tokens: Deep navy sidebar, white work surface, cool gray borders, blue primary actions, red/orange/green semantic risk states match the selected visual direction. +- Image quality and asset fidelity: The source concept did not require product photos or decorative raster assets. The implementation uses lightweight UI marks and CSS primitives appropriate for a Django dashboard prototype. +- Copy and content: Chinese labels are aligned to the requirements: NMPA IVD review, registration batch, completeness check, risk gate, evidence, Feishu notification, responsible owners, and audit trail. +- Patches made since previous QA pass: added mobile wrapping for the header and batch strip, converted mobile actions to a single-column grid, adjusted the health legend, and suppressed horizontal overflow. +- final result: passed + +**Follow-up Polish** +- P3: Replace letter-based placeholder nav icons with an icon font or library if the project later adds a frontend asset pipeline. +- P3: Add separate interactive tab bodies for consistency, evidence, and Feishu cards if the prototype needs a longer live demo script. diff --git a/output/playwright/command-center-v2-comparison.png b/output/playwright/command-center-v2-comparison.png new file mode 100644 index 0000000..eee1eda Binary files /dev/null and b/output/playwright/command-center-v2-comparison.png differ diff --git a/output/playwright/command-center-v2-desktop.png b/output/playwright/command-center-v2-desktop.png new file mode 100644 index 0000000..cf93752 Binary files /dev/null and b/output/playwright/command-center-v2-desktop.png differ diff --git a/output/playwright/command-center-v2-mobile.png b/output/playwright/command-center-v2-mobile.png new file mode 100644 index 0000000..3c24e35 Binary files /dev/null and b/output/playwright/command-center-v2-mobile.png differ diff --git a/templates/platform_ui/command_center_v2.html b/templates/platform_ui/command_center_v2.html new file mode 100644 index 0000000..43a9a7d --- /dev/null +++ b/templates/platform_ui/command_center_v2.html @@ -0,0 +1,1265 @@ +{% extends "base.html" %} + +{% block title %}审核指挥台原型{% endblock %} + +{% block content %} + + +
+ + +
+
+
+
RA
+
+

试剂盒临床注册文件准备与审核智能体平台

+

NMPA IVD 注册审评辅助平台

+
+
+
+ + + +
+ +
+ {{ command_batch.reviewer }} +
{{ command_batch.role }}
+
+
+
+
+ +
+ 当前批次:{{ command_batch.id }} + {{ command_batch.status }} + 申报类型: + 注册分类:{{ command_batch.class }} + 创建时间:{{ command_batch.created_at }} + 申报主体:{{ command_batch.applicant }} +
+ +
+
+
+
+

资料包总览

+
+ + + + +
+
+ +
+
+
{{ command_metrics.0.label }}
+
{{ command_metrics.0.value }}{{ command_metrics.0.suffix }}
+
完整性评级:{{ command_metrics.0.level }}
+
{{ command_metrics.0.detail }}
+
+ +
+
{{ command_metrics.1.label }}
+
+ +
+ {% for segment in command_metrics.1.segments %} +
+ + {{ segment.label }} + {{ segment.value }} ({{ segment.hint }}) +
+ {% endfor %} +
+
+
共 {{ command_metrics.1.value }} {{ command_metrics.1.suffix }}
+
+ +
+
{{ command_metrics.2.label }}
+
+
3高风险
+
7中风险
+
12低风险
+
+
共 {{ command_metrics.2.value }} {{ command_metrics.2.suffix }}
+
+ +
+
{{ command_metrics.3.label }}
+
{{ command_metrics.3.value }}{{ command_metrics.3.suffix }}
+
+
{{ command_metrics.3.detail }}
+
+
+
+ +
+

注册申报流程

+
+ {% for step in command_flow %} +
+
{{ step.step }}
+
+
{{ step.title }}
+
{{ step.date }}
+
+
+ {% endfor %} +
+
+ +
+
+ {% for tab in command_tabs %} + + {% endfor %} +
+ +
+
+ 检查标准:{{ command_batch.standard }} + 检查版本:{{ command_batch.version }} + +
+
+ + + +
+ +
+ + + + + + + + + + + + + + {% for row in command_checks %} + + + + + + + + + + {% endfor %} + +
章节检查项依据条款状态风险等级问题描述操作
{{ row.chapter }}{{ row.item }}{{ row.rule }}{{ row.status }}{{ row.risk }}{{ row.problem }}
+
+ +
+ 共 62 条 + < + 1 + 2 + 3 + 4 + > + 10 条/页 + 跳至 + 1 + +
+
+
+
+ + +
+
+
+ +
+ + + + +{% endblock %}