From 7babed349acacd416bccc15c825820dea7d04483 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 28 Oct 2024 19:18:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=95=B0=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/application-workflow/index.vue | 18 +++++++++++++++--- .../nodes/search-dataset-node/index.vue | 7 ++----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ui/src/views/application-workflow/index.vue b/ui/src/views/application-workflow/index.vue index 4fd5e0203..546763ae1 100644 --- a/ui/src/views/application-workflow/index.vue +++ b/ui/src/views/application-workflow/index.vue @@ -176,6 +176,7 @@ const currentVersion = ref({}) function clickoutsideHistory() { if (!disablePublic.value) { showHistory.value = false + disablePublic.value = false } } @@ -183,7 +184,9 @@ function refreshVersion(item?: any) { if (item) { getHistortyDetail(item.id) } - initInterval() + if (hasPermission(`APPLICATION:MANAGE:${id}`, 'AND') && isSave.value) { + initInterval() + } showHistory.value = false disablePublic.value = false } @@ -204,13 +207,19 @@ function getHistortyDetail(versionId: string) { detail.value.tts_model_id = res.data.tts_model detail.value.tts_type = res.data.tts_type saveTime.value = res.data?.update_time - workflowRef.value?.renderGraphData() + setTimeout(() => { + workflowRef.value?.renderGraphData() + }, 200) }) } function closeHistory() { getDetail() + if (hasPermission(`APPLICATION:MANAGE:${id}`, 'AND') && isSave.value) { + initInterval() + } showHistory.value = false + disablePublic.value = false } function openHistory() { @@ -317,6 +326,9 @@ function getDetail() { detail.value.tts_model_id = res.data.tts_model detail.value.tts_type = res.data.tts_type saveTime.value = res.data?.update_time + setTimeout(() => { + workflowRef.value?.renderGraphData() + }, 200) }) } @@ -355,7 +367,7 @@ onMounted(() => { const workflowAutoSave = localStorage.getItem('workflowAutoSave') isSave.value = workflowAutoSave === 'true' ? true : false // 初始化定时任务 - if (hasPermission(`APPLICATION:MANAGE:${id}`, 'AND') && workflowAutoSave) { + if (hasPermission(`APPLICATION:MANAGE:${id}`, 'AND') && isSave.value) { initInterval() } }) diff --git a/ui/src/workflow/nodes/search-dataset-node/index.vue b/ui/src/workflow/nodes/search-dataset-node/index.vue index bbe5e40cb..97f01a599 100644 --- a/ui/src/workflow/nodes/search-dataset-node/index.vue +++ b/ui/src/workflow/nodes/search-dataset-node/index.vue @@ -25,7 +25,7 @@