No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 

20 líneas
3.0 KiB

  1. import fs from 'node:fs';
  2. import assert from 'node:assert/strict';
  3. const dir='reports/bridge-bolt-pick-20260925';
  4. const results=['007','008'].map(script=>{
  5. const result=JSON.parse(fs.readFileSync(`${dir}-${script}/result.json`,'utf8'));
  6. assert.equal(result.pass,true,script);
  7. return {script,...result};
  8. });
  9. const figures=[['007','88',8,1],['008','89',10,2],['008','89',14,3]];
  10. for(const [script,id,step,bolt] of figures)for(const phase of ['pick','mount'])assert.ok(fs.existsSync(`${dir}-${script}/task-${id}-${phase}-step-${step}-bolt-${bolt}.png`));
  11. fs.mkdirSync(dir,{recursive:true});
  12. 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>
  13. <style>body{margin:0;background:#eef5f2;color:#173f37;font:16px/1.7 system-ui,"Microsoft YaHei",sans-serif}main{max-width:1380px;margin:auto;padding:24px}section,figure{background:white;border:1px solid #ccdfd7;border-radius:12px;padding:20px;margin:18px 0}img{width:100%;height:auto}.pair{display:grid;grid-template-columns:1fr 1fr;gap:14px}h1{line-height:1.4}a{color:#087b65}@media(max-width:900px){.pair{grid-template-columns:1fr}}</style>
  14. <main><h1>螺栓:工作台取件 → 孔位就位 → 扳手紧固</h1><p>2026-09-25 · 本地 6180 / 6100 Gateway · 管理员教员预览 · 1440×900</p>
  15. <section><p>进入回装子操作时,螺栓留在工作台,视角聚焦待取件。点击原螺栓后播放就位动画,随后使用扳手完成紧固。查看标签只聚焦,不移动零件;就位不计为紧固完成。每颗螺栓分别执行这三个阶段。</p><p>保存准备记录、紧固提交失败时保留已就位的状态;允许再次拖入扳手重试。油堵直接拆卸和第 14 步安装面的正面视角继续保留。</p></section>
  16. <section><h2>验证结果</h2><p>007 从第 1 步走到第 8 步,008 从第 1 步走到第 14 步,覆盖全部 12 颗回装螺栓。使用真实模型点击、工具拖放及预览校验接口。检查取件前工具禁用、点击后仍未紧固、保存准备记录后位置保持、最后一颗螺栓提交失败后重试。相关 Node 测试及 pnpm run build 通过。没有创建学员成绩或测试任务。</p><ul>${results.map(r=>`<li>${r.script}:${r.checks.length} 条检查通过,${r.errors.length} 个页面脚本错误。<a href="../bridge-bolt-pick-20260925-${r.script}/result.json">JSON 记录</a></li>`).join('')}</ul></section>
  17. ${figures.map(([script,id,step,bolt])=>`<section><h2>${script} 第 ${step} 步 · 螺栓 ${bolt}</h2><div class="pair">${[['pick','点击前:工作台取件,工具暂不可用'],['mount','点击后:安装孔位就位,等待扳手紧固']].map(([phase,title])=>`<figure><img src="../bridge-bolt-pick-20260925-${script}/task-${id}-${phase}-step-${step}-bolt-${bolt}.png" alt="${title}"><figcaption>${title}</figcaption></figure>`).join('')}</div></section>`).join('')}</main></html>`);
  18. console.log(`${dir}/index.html`);