feat(采集数据): 等待中卡片给出排队位;启动入口补到「当前任务」区
装机截图(任务 33462)暴露上一笔的漏改:「启动任务」只加在历史区插槽 #history-item-actions, 而等待中的单实际出现在「当前任务」卡片(走 #item-actions,那里只有重试/删除)—— 于是"历史行可补点"这句话对用户真正看到的那一屏不成立。两个插槽现在都有入口。 排队位显示按本账号数:COLLECT_DATA 是各客户端 activate 后入本机队列,别人的 PENDING 不占你这台 机器。现网全表 4 支 PENDING、33462 前面 3 支,但那 3 支属于 1293/1312/1318;报一个跨账号的 「前面还有 3 个」会把人引去等一个不会来的位置。N=0 时文案直接说「这一单还没被启动」—— 数字本身就是答案,并跟着给下一步(点「启动任务」)。 计算搬进 useCollectDataDispatch(组件 846 行,仍在可读棘轮基线 861 之下,未动基线)。 判据两格新增并反向验过:摘掉 #item-actions 的按钮/把排队数改成连 RUNNING 一起数,各出真红。 用户端 npm test 1024、test:mount 66、vue-tsc rc=0。
This commit is contained in:
@@ -120,6 +120,8 @@
|
||||
history-empty-text="暂无历史记录"
|
||||
>
|
||||
<template #item-actions="{ item }">
|
||||
<button v-if="canStartTask(itemSource(item))" type="button" class="btn-run"
|
||||
@click="startPendingTask(itemSource(item))">启动任务</button>
|
||||
<button v-if="canRetryTask(itemSource(item))" type="button" class="btn-retry"
|
||||
@click="retryTaskRecord(itemSource(item))">重试</button>
|
||||
<button type="button" class="btn-delete" @click="deleteTaskRecord(itemSource(item))">删除</button>
|
||||
@@ -156,7 +158,7 @@ import { useTaskProgressLoop } from '@/shared/composables/useTaskProgressLoop'
|
||||
import { createCategorizedTimers } from '@/shared/utils/categorized-timers'
|
||||
import { saveUrlWithProgress } from '@/shared/utils/download-progress'
|
||||
import { checkParseResult } from '@/shared/dispatch-guard'
|
||||
import { useCollectDataDispatch } from '@/shared/composables/useCollectDataDispatch'
|
||||
import { pendingQueueText, useCollectDataDispatch } from '@/shared/composables/useCollectDataDispatch'
|
||||
import { passGuard } from '@/shared/dispatch-guard-ui'
|
||||
import {
|
||||
parseCollectData,
|
||||
@@ -702,9 +704,11 @@ function toCollectTaskView(item: CollectDataHistoryItem): TaskItemView {
|
||||
+ `${item.brandQueryFailedReason ? `(${item.brandQueryFailedReason})` : ''}`
|
||||
: ''
|
||||
const percent = taskProgressPercent(item)
|
||||
const pendingQueueLine = pendingQueueText(item, currentItems.value)
|
||||
const finishedAt = item.finishedAt ? formatDateTime(item.finishedAt) : isActive ? '进行中' : '-'
|
||||
const extraLines: string[] = isActive
|
||||
? [
|
||||
...(pendingQueueLine ? [pendingQueueLine] : []),
|
||||
...(item.rowCount != null ? [`行数:${item.rowCount}`] : []),
|
||||
`总数据去重过滤:${item.dedupeFilteredCount ?? 0}`,
|
||||
`无效品牌过滤:${item.invalidFilteredCount ?? 0}`,
|
||||
|
||||
Reference in New Issue
Block a user