fix: 修复历史发布数据问题
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run

This commit is contained in:
wangdan-fit2cloud 2024-10-28 19:18:27 +08:00
parent 0147a3efd0
commit 7babed349a
2 changed files with 17 additions and 8 deletions

View File

@ -176,6 +176,7 @@ const currentVersion = ref<any>({})
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()
}
})

View File

@ -25,7 +25,7 @@
</el-text>
<template v-for="(item, index) in form_data.dataset_id_list" :key="index" v-else>
<div class="flex-between border border-r-4 white-bg mb-4" style="padding: 5px 8px">
<div class="flex align-center" style="line-height: 20px">
<div class="flex align-center" style="line-height: 20px; width: 80%">
<AppAvatar
v-if="relatedObject(datasetList, item, 'id')?.type === '1'"
class="mr-8 avatar-purple"
@ -39,10 +39,7 @@
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
</AppAvatar>
<auto-tooltip
:content="relatedObject(datasetList, item, 'id')?.name"
style="width: 80%"
>
<auto-tooltip :content="relatedObject(datasetList, item, 'id')?.name">
{{ relatedObject(datasetList, item, 'id')?.name }}
</auto-tooltip>
</div>