You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

25 regels
7.5 KiB

  1. import fs from 'node:fs';
  2. import assert from 'node:assert/strict';
  3. const dir='reports/bridge-content-authoring-20260924';
  4. const read=file=>JSON.parse(fs.readFileSync(`${dir}/${file}.json`,'utf8'));
  5. const ui=read('ui-result'),lan=read('ui-lan-result'),actions=read('actions-result'),integration=read('integration-result');
  6. assert.ok(ui.pass&&lan.pass&&actions.pass&&integration.pass);
  7. const escape=value=>String(value).replace(/[&<>"']/g,c=>({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]));
  8. const url=(stage,id)=>`http://127.0.0.1:6180/content/${stage}/${id}/production`;
  9. const rows=integration.current.map(item=>`<tr><td><b>${escape(item.taskCode)}</b><br>${escape(item.training.name)}</td><td><a href="${url('models',item.model.id)}">机构模型 · ${escape(item.model.versionCode)}</a></td><td><a href="${url('scenes',item.scene.id)}">训练场景 · ${escape(item.scene.versionCode)}</a></td><td><a href="${url('training-projects',item.training.id)}">训练编排 · ${escape(item.training.versionCode)}</a></td><td>${item.steps} 步 / ${item.actions} 动作</td><td><a href="http://127.0.0.1:6180/teaching/virtual-training/preview/${item.taskId}">进入仿真</a></td></tr>`).join('');
  10. const panels=integration.current.map(item=>`<section><h2>${escape(item.training.name)}</h2><div class="gallery">${[['model','机构模型与动作库'],['action-'+(item.taskCode.endsWith('005')?'5':item.taskCode.endsWith('006')?'5':item.taskCode.endsWith('007')?'8':'36'),'部件操作动画'],['scene','场景组成与位置配置'],['training','背景与讲解编排']].map(([suffix,title])=>`<figure><a href="${item.taskCode}-${suffix}.png"><img loading="lazy" src="${item.taskCode}-${suffix}.png" alt="${title}"></a><figcaption>${title}</figcaption></figure>`).join('')}</div></section>`).join('');
  11. const checks=[...ui.checks,...lan.checks.map(x=>({...x,name:'局域网 1366×768 · '+x.stage})),...integration.checks];
  12. const html=`<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>005~008 内容制作全流程验收</title><style>
  13. *{box-sizing:border-box}body{margin:0;background:#f2f6f5;color:#163c38;font:15px/1.7 "Microsoft YaHei",sans-serif}main{max-width:1480px;margin:auto;padding:36px}header{background:#0c594e;color:white;padding:32px;border-radius:14px}h1{font-size:28px;margin:0}h2{font-size:21px}header p{margin:8px 0 0;color:#d4e9e2}.stats{display:flex;gap:12px;flex-wrap:wrap;margin:22px 0}.stats span{padding:13px 22px;background:white;border:1px solid #ccded8;border-radius:9px}.stats b{font-size:24px;color:#078c70;margin-right:8px}section{background:white;padding:24px;margin:20px 0;border:1px solid #d4e3de;border-radius:12px}table{width:100%;border-collapse:collapse}td,th{border-bottom:1px solid #e0eae7;padding:14px;text-align:left}th{background:#edf5f2}a{color:#087c67;text-decoration:none}a:hover{text-decoration:underline}.gallery{display:grid;grid-template-columns:1fr 1fr;gap:18px}figure{margin:0}figure img{display:block;width:100%;border:1px solid #d3e2dd;border-radius:7px}figcaption{padding:8px 0;color:#607f77}.note{border-left:4px solid #e7af51;padding-left:16px}.checks{columns:2}.checks p{margin:6px 0}.pass{color:#058565}code{background:#eff4f2;padding:2px 5px}li{margin:8px 0}@media(max-width:900px){main{padding:15px}.gallery{grid-template-columns:1fr}.table{overflow:auto}.checks{columns:1}}
  14. </style></head><body><main><header><h1>005~008 内容制作全流程验收</h1><p>2026-09-24 · 模型动作 → 场景组成 → 训练编排 → 现有虚拟仿真</p></header>
  15. <div class="stats"><span><b>4</b>机构模型</span><span><b>4</b>训练场景</span><span><b>38</b>操作步骤</span><span><b>98</b>部件子动作</span><span><b>5</b>原任务快照未变</span></div>
  16. <section><h2>演示入口</h2><p>登录数字车间后,从“内容制作 → 模型制作”进入对应机构模型,或打开下表链接。四套名称均采用实际训练名称。</p><div class="table"><table><thead><tr><th>训练内容</th><th>模型制作</th><th>场景制作</th><th>训练编排</th><th>规模</th><th>现有入口</th></tr></thead><tbody>${rows}</tbody></table></div></section>
  17. <section><h2>建议演示顺序</h2><ol><li>打开 005 机构模型,选择球阀或盒盖动作;调整旋转轴、方向、中心点、角度和时长,点击“播放动作”。</li><li>保存、刷新确认参数,再点击“发布并进入场景”。场景显示实际装备、环境和已绑定模型版本。</li><li>修改场景对象位置、旋转或缩放,应用预览;发布并进入编排。</li><li>查看对应步骤、模型动作和数字教员讲解,切到“背景与讲解”编辑图文或视频内容。</li><li>发布训练内容,再点击“虚拟仿真”查看原任务的背景、讲解和操作流程。</li></ol><p class="note">本次建立可保存、可发布的制作链。现有虚拟仿真继续使用固定静态脚本,新参数不会即时改写已发布任务。005 制作链使用已走通的新模型,原 005 与独立新模型入口都保留。</p></section>
  18. ${panels}
  19. <section><h2>笔记本与局域网</h2><p>通过 192.168.31.168:6180 在 1366×768 验证,动作参数面板独立滚动,画布按可用宽度取景。</p><figure><a href="lan-TASK-VIRTUAL-005-action-3.png"><img src="lan-TASK-VIRTUAL-005-action-3.png" alt="小屏球阀动作参数"></a></figure></section>
  20. <section><h2>验证结果</h2><p class="pass">Web 构建及后处理通过;25 项相关前端测试通过;Java 17 下 ut-tran 与依赖模块 package 通过,440 项测试无失败。</p><div class="checks">${checks.map(x=>`<p>✓ ${escape(x.name||x.task+' · '+x.stage)}</p>`).join('')}</div><p>98 个动作逐一验证目标存在、聚焦居中、变换有限;旋转/移动动作确实改变姿态,并检查暂停、恢复、取消动画及场景位置增量。少量目标沿用原有补充示意,页面明确标注来源。</p><p>构建仍有现有的大包体积提示,不影响通过。验收使用本地管理员业务账号、Edge headless、真实 API;内置浏览器当前不可用。变更未部署测试环境,也未提交推送。</p><p><a href="ui-result.json">页面验收 JSON</a> · <a href="ui-lan-result.json">局域网结果</a> · <a href="actions-result.json">98 个动作记录</a> · <a href="integration-result.json">四套版本依赖</a> · <a href="health.json">服务健康检查</a></p></section>
  21. <section><h2>数据与回退</h2><p>保留 4 个新模型、4 个新场景和 4 个原编排的内容版本。测试角度、场景位置已恢复。原任务 86、87、88、89、116 完整快照未改;备份位于本目录的 before-task-*.json 与 before-project-*.json。历史失败截图保留供排查,以上最终结果均已重跑通过。</p><p>后续部署需要更新 Web、ut-tran,并在目标环境登记业务工程。当前工程 ID 为本环境专用,不应直接当作另一环境的固定 ID。</p></section></main></body></html>`;
  22. fs.writeFileSync(dir+'/index.html',html);
  23. fs.writeFileSync(dir+'/README.md',`# 005~008 内容制作全流程\n\n打开 [验收报告](index.html) 查看入口、演示步骤和截图。\n\n已建立 4 个模型、4 个场景,关联 4 个编排;38 步、98 个动作。模型/场景/编排发布不更新现有教学任务。005 采用新模型制作,原任务与独立入口保留。\n\n验证:25 项前端测试、440 项后端测试、四套发布链、98 个动作和局域网 1366×768 页面通过。详细字段与回退说明见 API Wiki《41-桥梁内容制作关联》。\n`);
  24. console.log(dir+'/index.html');