fix(sj_map_reduce): 修复工作流批次详情页面刷新频繁问题

This commit is contained in:
xlsea 2024-07-03 17:20:40 +08:00
parent d0b6fa5fea
commit 910530dd03

View File

@ -36,7 +36,7 @@ const getBatchDetail = async () => {
if (!error) { if (!error) {
node.value = data; node.value = data;
finished.value = !(data.workflowBatchStatus && [1, 2].includes(data.workflowBatchStatus)); finished.value = !(data.workflowBatchStatus && [1, 2].includes(data.workflowBatchStatus));
if (!finished.value) { if (!finished.value && syncTime.value !== 0) {
clearTimeout(interval.value); clearTimeout(interval.value);
interval.value = setTimeout(getBatchDetail, syncTime.value * 1000); interval.value = setTimeout(getBatchDetail, syncTime.value * 1000);
} }
@ -78,12 +78,12 @@ onBeforeUnmount(() => {
const syncOptions = ref([ const syncOptions = ref([
{ {
label: 'Off', label: 'Auto(off)',
key: 0 key: 0
}, },
{ {
label: 'Auto(3s)', label: '1s',
key: 3 key: 1
}, },
{ {
label: '5s', label: '5s',