feat: 审计链路
Some checks failed
构建并部署前端到测试环境 / build-and-deploy (push) Failing after 18s

This commit is contained in:
luo
2026-08-07 18:38:28 +08:00
parent b8b2854aa6
commit 9f7f619083
7 changed files with 105 additions and 54 deletions

View File

@@ -20,19 +20,14 @@
>
精确注册资源
</ElButton>
<ElButton
v-if="refs?.request_id"
link
type="primary"
@click="openTimeline('request', refs.request_id)"
>
<ElButton v-if="requestId" link type="primary" @click="openTimeline('request', requestId)">
请求链路
</ElButton>
<ElButton
v-if="refs?.correlation_id"
v-if="correlationId"
link
type="primary"
@click="openTimeline('correlation', refs.correlation_id)"
@click="openTimeline('correlation', correlationId)"
>
业务关联链路
</ElButton>
@@ -57,6 +52,7 @@
AuditSearchResourceType
} from '@/types/api'
import { openAuditInvestigation, openAuditResourceSearch } from './investigationController'
import { resolveInvestigationReference } from '@/utils/business/auditNavigation'
const props = withDefaults(
defineProps<{
@@ -73,10 +69,16 @@
'order',
'refund'
])
const eventId = computed(() => {
const id = props.refs?.event_id?.trim()
return id && id !== props.currentEventId ? id : ''
})
const eventId = computed(
() =>
resolveInvestigationReference(props.refs?.event_id, {
currentId: props.currentEventId
}) || ''
)
const requestId = computed(() => resolveInvestigationReference(props.refs?.request_id) || '')
const correlationId = computed(
() => resolveInvestigationReference(props.refs?.correlation_id) || ''
)
const actorRef = computed(() => {
const actor = props.refs?.actor_ref
return actor?.kind && actor.id ? actor : null
@@ -107,8 +109,8 @@
Boolean(
eventId.value ||
actorRef.value ||
props.refs?.request_id ||
props.refs?.correlation_id ||
requestId.value ||
correlationId.value ||
stableResourceRefs.value.length ||
searchableResourceRefs.value.length ||
stableIntegrationRefs.value.length