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.
 
 
 
 

23 regels
3.1 KiB

  1. import fs from 'node:fs';
  2. import assert from 'node:assert/strict';
  3. const dir='reports/bridge-installation-fixes-20260925';
  4. const reports=['bridge-installation-fixes-20260925-007','bridge-installation-fixes-20260925-008'];
  5. const results=reports.map(name=>({name,result:JSON.parse(fs.readFileSync(`reports/${name}/result.json`,'utf8'))}));
  6. for(const {name,result} of results)assert.equal(result.pass,true,name);
  7. fs.mkdirSync(dir,{recursive:true});
  8. const figures=[
  9. ['007','88',8,1,'007:新泵安装后的第一颗螺栓,已到孔位,等待拖入扳手。'],
  10. ['008','89',10,2,'008 第 10 步:大腔螺栓在安装位置等待工具,暂存台上的其余零件保持原位。'],
  11. ['008','89',14,3,'008 第 14 步:第 3 颗小腔螺栓,从安装面正面观察。'],
  12. ];
  13. for(const [suffix,id,step,bolt] of figures)assert.ok(fs.existsSync(`reports/bridge-installation-fixes-20260925-${suffix}/task-${id}-mount-step-${step}-bolt-${bolt}.png`));
  14. fs.writeFileSync(`${dir}/index.html`,`<!doctype html><html lang="zh-CN"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>螺栓安装、油堵拆卸与平衡阀视角修正</title>
  15. <style>body{margin:0;background:#eef5f2;color:#173f37;font:16px/1.75 system-ui,"Microsoft YaHei",sans-serif}main{max-width:1160px;margin:auto;padding:32px 24px}section,figure{background:white;border:1px solid #ccdfd7;border-radius:12px;padding:24px;margin:18px 0}img{width:100%;height:auto}a{color:#087b65}h1{line-height:1.4}figcaption{margin-top:12px}</style>
  16. <main><h1>螺栓安装、油堵拆卸与平衡阀视角修正</h1><p>2026-09-25 · 本地 6180 → 6100 Gateway · 维护账号教员预览 · 真实鼠标点击、工具拖放和服务端预览校验。</p>
  17. <section><h2>完成内容</h2><ul><li>007、008 回装螺栓时,先把当前螺栓从暂存台送到安装孔,再等待学员用扳手紧固。搬运不完成子操作,不生成紧固证据。</li><li>008 第 9、13 步的油堵直接点击或拖动取下;第 4、8 步封堵仍使用工具箱油堵。</li><li>008 两侧螺栓按真实安装面法线设置视角,互换后的阀体跟随目的安装面。被交换阀体遮住的螺栓仍可见、可拾取。</li><li>保存失败恢复到待紧固位置,允许再次使用工具;不改写已发布任务、步骤数量或评分规则。</li></ul></section>
  18. <section><h2>验证</h2><p>相关 Node 自动测试、正式路由契约和前端生产构建通过。007、008 全流程使用正式页面与预览接口;模拟最后一颗安装螺栓保存失败并重试。未创建学员成绩或测试教学任务。</p><ul>${results.map(({name,result})=>`<li><a href="../${name}/result.json">${name}</a>:通过,${result.checks.length} 条检查,${result.errors.length} 个页面脚本错误。</li>`).join('')}</ul></section>
  19. ${figures.map(([suffix,id,step,bolt,caption])=>`<figure><img src="../bridge-installation-fixes-20260925-${suffix}/task-${id}-mount-step-${step}-bolt-${bolt}.png" alt="${caption}"><figcaption>${caption}</figcaption></figure>`).join('')}
  20. </main></html>`);
  21. console.log(`${dir}/index.html`);