Skip to content

Commit 7babed3

Browse files
fix: 修复历史发布数据问题
1 parent 0147a3e commit 7babed3

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

ui/src/views/application-workflow/index.vue

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,17 @@ const currentVersion = ref<any>({})
176176
function clickoutsideHistory() {
177177
if (!disablePublic.value) {
178178
showHistory.value = false
179+
disablePublic.value = false
179180
}
180181
}
181182
182183
function refreshVersion(item?: any) {
183184
if (item) {
184185
getHistortyDetail(item.id)
185186
}
186-
initInterval()
187+
if (hasPermission(`APPLICATION:MANAGE:${id}`, 'AND') && isSave.value) {
188+
initInterval()
189+
}
187190
showHistory.value = false
188191
disablePublic.value = false
189192
}
@@ -204,13 +207,19 @@ function getHistortyDetail(versionId: string) {
204207
detail.value.tts_model_id = res.data.tts_model
205208
detail.value.tts_type = res.data.tts_type
206209
saveTime.value = res.data?.update_time
207-
workflowRef.value?.renderGraphData()
210+
setTimeout(() => {
211+
workflowRef.value?.renderGraphData()
212+
}, 200)
208213
})
209214
}
210215
211216
function closeHistory() {
212217
getDetail()
218+
if (hasPermission(`APPLICATION:MANAGE:${id}`, 'AND') && isSave.value) {
219+
initInterval()
220+
}
213221
showHistory.value = false
222+
disablePublic.value = false
214223
}
215224
216225
function openHistory() {
@@ -317,6 +326,9 @@ function getDetail() {
317326
detail.value.tts_model_id = res.data.tts_model
318327
detail.value.tts_type = res.data.tts_type
319328
saveTime.value = res.data?.update_time
329+
setTimeout(() => {
330+
workflowRef.value?.renderGraphData()
331+
}, 200)
320332
})
321333
}
322334
@@ -355,7 +367,7 @@ onMounted(() => {
355367
const workflowAutoSave = localStorage.getItem('workflowAutoSave')
356368
isSave.value = workflowAutoSave === 'true' ? true : false
357369
// 初始化定时任务
358-
if (hasPermission(`APPLICATION:MANAGE:${id}`, 'AND') && workflowAutoSave) {
370+
if (hasPermission(`APPLICATION:MANAGE:${id}`, 'AND') && isSave.value) {
359371
initInterval()
360372
}
361373
})

ui/src/workflow/nodes/search-dataset-node/index.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</el-text>
2626
<template v-for="(item, index) in form_data.dataset_id_list" :key="index" v-else>
2727
<div class="flex-between border border-r-4 white-bg mb-4" style="padding: 5px 8px">
28-
<div class="flex align-center" style="line-height: 20px">
28+
<div class="flex align-center" style="line-height: 20px; width: 80%">
2929
<AppAvatar
3030
v-if="relatedObject(datasetList, item, 'id')?.type === '1'"
3131
class="mr-8 avatar-purple"
@@ -39,10 +39,7 @@
3939
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
4040
</AppAvatar>
4141

42-
<auto-tooltip
43-
:content="relatedObject(datasetList, item, 'id')?.name"
44-
style="width: 80%"
45-
>
42+
<auto-tooltip :content="relatedObject(datasetList, item, 'id')?.name">
4643
{{ relatedObject(datasetList, item, 'id')?.name }}
4744
</auto-tooltip>
4845
</div>

0 commit comments

Comments
 (0)