feat(web): 前端 SPA 化 + 工具页任务面板统一与历史批量删除
- SPA 化:22 个 MPA html 入口与 *-main.ts 合并为 index.html + vue-router(URL 无 .html 后缀), 页面跳转全部 router-link,/new_web_source/xxx.html 旧路径归一为 /xxx - 任务面板统一:共享 TaskCenterPanel/TaskItemCard/TaskStatCards/HistoryTaskLayer, 16 个工具页右侧统一为统计卡 + 当前任务 + 历史任务弹层(任务ID/开始/结束/状态必展示) - 历史记录支持单条删除 + 批量勾选删除(确认框/全选/失败提示) - Java 7 模块(dedupe/convert/split/productrisk/shopmatch/pricetrack/deletebrand) history 接口补齐任务时间字段(VO+Service,复用 biz_file_task 列) - 图片工作台/API 层(brand/permission/user)既有未提交改动一并提交
This commit is contained in:
@@ -66,14 +66,14 @@ test('权限过滤:工作流时间线按工具权限截断', () => {
|
||||
|
||||
test('工具目录:页面链接与现有 BrandTopBar 导航映射一致', () => {
|
||||
const expectHref = new Map<string, string>([
|
||||
['collect', '/new_web_source/collect-data.html'],
|
||||
['dedupe', '/new_web_source/dedupe.html'],
|
||||
['source', '/new_web_source/similar-asin.html'],
|
||||
['collect', '/collect-data'],
|
||||
['dedupe', '/dedupe'],
|
||||
['source', '/similar-asin'],
|
||||
['brand', '/brand'],
|
||||
['list', '/new_web_source/publish.html'],
|
||||
['follow', '/new_web_source/price-track.html'],
|
||||
['scrape', '/new_web_source/shop-data-crawl.html'],
|
||||
['cash', '/new_web_source/withdraw.html'],
|
||||
['list', '/publish'],
|
||||
['follow', '/price-track'],
|
||||
['scrape', '/shop-data-crawl'],
|
||||
['cash', '/withdraw'],
|
||||
])
|
||||
for (const [id, href] of expectHref) {
|
||||
assert.equal(TOOL_MAP.get(id)?.href, href, `工具 ${id} 应指向 ${href}`)
|
||||
|
||||
@@ -73,7 +73,8 @@ test('test_no_unused_import', () => {
|
||||
test('test_entry_points_compile', () => {
|
||||
const viteConfig = readFileSync(resolve(repoRoot, 'vite.config.ts'), 'utf-8')
|
||||
const entries = [...viteConfig.matchAll(/['"]([^'"]+\.html)['"]/g)].map((m) => m[1])
|
||||
assert.ok(entries.length >= 16, `应 ≥16 个 HTML 入口,实际 ${entries.length}`)
|
||||
// SPA(2026-09-08):单入口 index.html,页面由 vue-router 渲染
|
||||
assert.deepEqual(entries, ['index.html'], `应仅 index.html 单入口,实际 ${entries.join(', ')}`)
|
||||
for (const entry of entries) {
|
||||
assert.ok(existsSync(resolve(repoRoot, entry)), `入口 ${entry} 应存在`)
|
||||
}
|
||||
@@ -82,8 +83,8 @@ test('test_entry_points_compile', () => {
|
||||
test('test_bundle_build', () => {
|
||||
const outDir = resolve(repoRoot, 'new_web_source')
|
||||
assert.ok(existsSync(outDir), '构建产物目录应存在')
|
||||
const htmlCount = readdirSync(outDir).filter((f) => f.endsWith('.html')).length
|
||||
assert.ok(htmlCount >= 16, `构建产物应有 ≥16 个 HTML,实际 ${htmlCount}`)
|
||||
assert.ok(existsSync(resolve(outDir, 'index.html')), 'SPA 产物应包含 index.html')
|
||||
assert.ok(existsSync(resolve(outDir, 'assets')), 'SPA 产物应包含 assets/')
|
||||
})
|
||||
|
||||
test('test_git_diff_scope', () => {
|
||||
|
||||
Reference in New Issue
Block a user