Preserve frame position order for auto insertion

- Allow system frame position percentages to keep two decimal places without reordering saved values.

- Stop frontend and backend settings normalization from sorting framePositions on load or save.

- Capture automatic video frames in timeline order while retaining each configured position index.

- Insert automatically selected frames into report placeholders according to the configured percentage order.

- Add frame position utilities and unit coverage for two-decimal rounding, clamping, order preservation, and timeline capture planning.

- Update README, AGENTS, feature, requirement, report editor, system settings, progress, and testing docs for the new frame ordering behavior.
This commit is contained in:
2026-05-02 05:10:39 +08:00
parent 3774657ef5
commit 2cabe7e4fd
13 changed files with 106 additions and 55 deletions

View File

@@ -39,7 +39,7 @@
| 部门模板授权 | 真实集成 | 后端提供 `/api/departments``/api/departments/:id/template-permissions`,超级管理员可通过管理员模板权限更新部门授权。 |
| 电子签名 | 真实集成 | 用户管理页上传后压缩为 Data URL再调用 `/api/users/:id/signature` 写入后端文件资源;报告中有对应绑定字段时通过受控文件 URL 展示。只有开发/显式回退模式下 API 不可用才保留本地签名回退。 |
| 视频上传 | 真实集成 | 使用浏览器 File API 和对象 URL即时预览并优先通过 `/api/files``kind = VIDEO` 写入后端文件资源。 |
| 自动抽帧 | 真实集成 | 使用 `<video>` + `<canvas>` 按百分比截取 JPEG关键帧优先通过 `/api/files``kind = FRAME` 写入后端文件资源。 |
| 自动抽帧 | 真实集成 | 使用 `<video>` + `<canvas>` 按百分比截取 JPEG关键帧优先通过 `/api/files``kind = FRAME` 写入后端文件资源;百分比支持两位小数并保留配置顺序,实际截图按时间顺序执行,自动插入按配置顺序执行。 |
| 关键帧插入 | 真实集成 | 关键帧可点击插入或拖入图片占位符;上传成功后编辑器会把插入图片从 Data URL 替换为受控文件 URL。 |
| AI 辅助撰写 | 真实集成 | 前端调用 `/api/ai/chat`,后端使用全局共用 Provider Key 代理 OpenAI 兼容 `/chat/completions`AI 可编辑区域插入后会立即同步到目标下拉栏;需要有效 Provider 配置、模型和网络。 |
| AI 差异确认 | 真实可用 | 使用 `diff` 生成左右差异,确认后写入 AI 区域。 |