This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user