采集数据进度条改为按关键词计算:processedRows/totalRows,标签改为关键词进度
Build Backend JAR / build (push) Has been cancelled
Build Backend JAR / build (push) Has been cancelled
This commit is contained in:
@@ -156,7 +156,7 @@
|
||||
<div v-if="taskKeywordProgress(item)" class="files">{{ taskKeywordProgress(item) }}</div>
|
||||
<div v-if="taskStageProgress(item)" class="files">{{ taskStageProgress(item) }}</div>
|
||||
<div class="task-progress">
|
||||
<div class="task-progress-meta"><span>任务进度</span><span>{{ taskProgressPercent(item) }}%</span></div>
|
||||
<div class="task-progress-meta"><span>关键词进度</span><span>{{ taskProgressPercent(item) }}%</span></div>
|
||||
<div class="task-progress-track"><div class="task-progress-fill" :style="{ width: `${taskProgressPercent(item)}%` }"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -188,7 +188,7 @@
|
||||
<div v-if="item.resultFilename" class="files">{{ item.resultFilename }}</div>
|
||||
<div v-if="item.error" class="files">错误:{{ item.error }}</div>
|
||||
<div class="task-progress">
|
||||
<div class="task-progress-meta"><span>任务进度</span><span>{{ taskProgressPercent(item) }}%</span></div>
|
||||
<div class="task-progress-meta"><span>关键词进度</span><span>{{ taskProgressPercent(item) }}%</span></div>
|
||||
<div class="task-progress-track"><div class="task-progress-fill" :style="{ width: `${taskProgressPercent(item)}%` }"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -583,6 +583,11 @@ function taskFilterSummary(item: CollectDataHistoryItem) {
|
||||
}
|
||||
|
||||
function taskProgressPercent(item: CollectDataHistoryItem) {
|
||||
const total = Number(item.totalRows)
|
||||
const processed = Number(item.processedRows)
|
||||
if (Number.isFinite(total) && total > 0 && Number.isFinite(processed) && processed >= 0) {
|
||||
return Math.max(0, Math.min(100, Math.round((processed / total) * 100)))
|
||||
}
|
||||
const value = Number(item.progressPercent)
|
||||
if (Number.isFinite(value)) return Math.max(0, Math.min(100, Math.round(value)))
|
||||
const status = normalizeTaskStatus(item)
|
||||
|
||||
Reference in New Issue
Block a user