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 @@