feat: 批量处理页面与导航

- 新增 web/batch.html + batch.js:目录树选择器(懒加载,本地后端
  提供 roots/dirs 接口)、工作流下拉、进度与产物下载
- 四个页面导航栏增加"批量处理"入口;styles.css 补齐批量页样式
This commit is contained in:
2026-08-23 16:25:11 +08:00
parent 711867e79f
commit cc707dda75
7 changed files with 587 additions and 0 deletions
+91
View File
@@ -0,0 +1,91 @@
<!doctype html>
<!-- VRSub 批量处理页:输入文件夹路径批量处理全部视频,不上传副本。 -->
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>VRSub - 批量处理</title>
<link rel="stylesheet" href="/assets/styles.css?v=3" />
</head>
<body>
<header class="topbar">
<a class="brand" href="/">VRSub</a>
<nav>
<a href="/">发起任务</a>
<a href="/tasks.html">任务管理</a>
<a href="/batch.html">批量处理</a>
<a href="/admin.html">管理后台</a>
<a href="/workflow.html">工作流</a>
</nav>
</header>
<main class="container">
<h1>批量处理</h1>
<p class="muted">
直接读取所选文件夹下的全部视频(<b>不上传副本</b>),逐个执行所选流水线;
每个视频的中间态数据与最终产物存放在视频旁边的同名文件夹(如 movie.mp4 →
movie/)。已处理过的视频自动跳过;暂停后重新开始时,从未完成的视频继续。
</p>
<!-- 创建批量任务:文件夹路径 + 工作流选择 + 是否递归。 -->
<section class="panel">
<h2>创建批量任务</h2>
<div class="form-row">
<label for="batchFolder">视频文件夹路径</label>
<div class="path-picker">
<input id="batchFolder" type="text" readonly placeholder="点击右侧按钮选择文件夹" />
<button id="batchBrowse" type="button">选择文件夹…</button>
</div>
</div>
<div class="form-row">
<label for="batchWorkflow">处理流水线</label>
<select id="batchWorkflow"></select>
<label class="inline"><input id="batchRecursive" type="checkbox" checked /> 包含子文件夹</label>
</div>
<div class="form-row">
<button id="batchStart" class="primary">开始批量处理</button>
<span id="batchCreateHint" class="muted"></span>
</div>
</section>
<!-- 目录树选择器:点击"选择文件夹"按钮弹出,懒加载浏览本地目录。 -->
<div id="dirPicker" class="dir-picker hidden">
<div class="dir-picker-panel">
<div class="dir-picker-head">
<b>选择视频文件夹</b>
<button id="dirPickerClose" type="button" class="plain"></button>
</div>
<div id="dirTree" class="dir-tree"></div>
<div class="dir-picker-foot">
<span id="dirPickerSelected" class="muted"></span>
<button id="dirPickerUse" type="button" disabled>使用此文件夹</button>
</div>
</div>
</div>
<!-- 批量任务列表:状态、进度与暂停/继续操作,可展开查看每视频明细。 -->
<section class="panel">
<div class="table-wrap">
<table>
<thead>
<tr>
<th>任务 ID</th>
<th>文件夹</th>
<th>工作流</th>
<th>状态</th>
<th>进度</th>
<th>当前视频</th>
<th>创建时间</th>
<th>操作</th>
</tr>
</thead>
<tbody id="batchJobList"></tbody>
</table>
</div>
</section>
</main>
<script src="/assets/app.js?v=3"></script>
<script src="/assets/batch.js?v=1"></script>
</body>
</html>