mirror of
https://github.com/primedigitaltech/market-assistant.git
synced 2026-07-22 08:01:34 +08:00
fix(frontend): disable report regen while any job regen is in flight
Made-with: Cursor
This commit is contained in:
parent
134faffbe8
commit
cd863864a0
@ -24,6 +24,8 @@ const regenPendingJobId = computed(() => {
|
|||||||
const regenBusyThisTask = computed(
|
const regenBusyThisTask = computed(
|
||||||
() => regenPendingJobId.value != null && regenPendingJobId.value === selectedId.value,
|
() => regenPendingJobId.value != null && regenPendingJobId.value === selectedId.value,
|
||||||
)
|
)
|
||||||
|
/** 任意任务正在重新生成时都应禁用按钮,避免切换页签后 selectedId 被重置导致误判可点 */
|
||||||
|
const regenBusyAny = computed(() => regenPendingJobId.value != null)
|
||||||
const regenBusyOtherTask = computed(
|
const regenBusyOtherTask = computed(
|
||||||
() => regenPendingJobId.value != null && regenPendingJobId.value !== selectedId.value,
|
() => regenPendingJobId.value != null && regenPendingJobId.value !== selectedId.value,
|
||||||
)
|
)
|
||||||
@ -237,7 +239,7 @@ watch(
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="ma-btn ma-btn-primary"
|
class="ma-btn ma-btn-primary"
|
||||||
:disabled="!selectedId || regenBusyThisTask"
|
:disabled="!selectedId || regenBusyAny"
|
||||||
title="不重新爬取,仅根据本批次已有数据更新报告文件"
|
title="不重新爬取,仅根据本批次已有数据更新报告文件"
|
||||||
@click="regenerateReport"
|
@click="regenerateReport"
|
||||||
>
|
>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user