fix: pagetype详情页上传文件后底部活动区域没有同步更新记录
This commit is contained in:
parent
018171b9d2
commit
a63e476909
@ -266,6 +266,7 @@
|
||||
</div>
|
||||
<!-- Activity Section: Like + Comment + Timeline -->
|
||||
<ActivitySection
|
||||
ref="activitySectionRef"
|
||||
:entity="entity"
|
||||
:id="id"
|
||||
:record="record"
|
||||
@ -376,6 +377,7 @@ const dialog = useDialog()
|
||||
const permissionStore = usePermissionStore()
|
||||
const authStore = useAuthStore()
|
||||
const attachmentSectionRef = ref()
|
||||
const activitySectionRef = ref()
|
||||
|
||||
// 使用组合式函数处理URL slug
|
||||
const { pagetypeSlug, entity } = usePageTypeSlug(route)
|
||||
@ -769,7 +771,8 @@ async function handleAddAttachment() {
|
||||
|
||||
// 重新加载附件列表
|
||||
await loadDetail()
|
||||
|
||||
// 重新加载活动记录
|
||||
activitySectionRef.value?.loadDocinfo()
|
||||
} catch (error: any) {
|
||||
message.destroyAll()
|
||||
message.error(error.message || t('Failed to upload attachment'))
|
||||
@ -788,6 +791,8 @@ async function handleDeleteAttachment(attachment: any) {
|
||||
message.success(t('Attachment deleted successfully'))
|
||||
// 重新加载附件列表
|
||||
await loadDetail()
|
||||
// 重新加载活动记录
|
||||
activitySectionRef.value?.loadDocinfo()
|
||||
} else {
|
||||
message.error(result.message || t('Failed to delete attachment'))
|
||||
}
|
||||
|
||||
@ -498,6 +498,8 @@ watch(() => [props.entity, props.id], () => {
|
||||
}
|
||||
}, { immediate: true })
|
||||
|
||||
defineExpose({ loadDocinfo })
|
||||
|
||||
// ===== Email Compose =====
|
||||
const emailComposeRef = ref<InstanceType<typeof EmailComposeModal> | null>(null)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user