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