This commit is contained in:
@@ -94,30 +94,28 @@
|
||||
<template #header>调查入口</template>
|
||||
<div v-if="hasAssociations" class="link-actions">
|
||||
<ElButton
|
||||
v-if="detail.linkage.request_id"
|
||||
v-if="requestReference"
|
||||
type="primary"
|
||||
plain
|
||||
@click="
|
||||
openAuditInvestigation({ mode: 'request', id: detail.linkage.request_id })
|
||||
"
|
||||
@click="openAuditInvestigation({ mode: 'request', id: requestReference })"
|
||||
>
|
||||
请求链路
|
||||
</ElButton>
|
||||
<ElButton
|
||||
v-if="detail.linkage.correlation_id"
|
||||
v-if="correlationReference"
|
||||
type="primary"
|
||||
plain
|
||||
@click="
|
||||
openAuditInvestigation({
|
||||
mode: 'correlation',
|
||||
id: detail.linkage.correlation_id
|
||||
id: correlationReference
|
||||
})
|
||||
"
|
||||
>
|
||||
业务关联链路
|
||||
</ElButton>
|
||||
<ElButton
|
||||
v-if="detail.resource?.type && detail.resource?.id"
|
||||
v-if="detail.resource?.type && resourceReference"
|
||||
type="primary"
|
||||
plain
|
||||
@click="openResourceTimeline"
|
||||
@@ -258,6 +256,7 @@
|
||||
} from '@/utils/business/audit'
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
import { openAuditInvestigation } from '@/components/business/audit/investigationController'
|
||||
import { resolveInvestigationReference } from '@/utils/business/auditNavigation'
|
||||
|
||||
defineOptions({ name: 'AuditIntegrationDetail' })
|
||||
|
||||
@@ -272,11 +271,24 @@
|
||||
const hasResource = computed(() =>
|
||||
Boolean(detail.value?.resource?.type || detail.value?.resource?.key)
|
||||
)
|
||||
const requestReference = computed(() =>
|
||||
resolveInvestigationReference(detail.value?.linkage.request_id)
|
||||
)
|
||||
const correlationReference = computed(() =>
|
||||
resolveInvestigationReference(detail.value?.linkage.correlation_id, {
|
||||
fidelity: detail.value?.fidelity.correlation_available
|
||||
})
|
||||
)
|
||||
const resourceReference = computed(() =>
|
||||
resolveInvestigationReference(detail.value?.resource?.id, {
|
||||
fidelity: detail.value?.fidelity.resource_id_available
|
||||
})
|
||||
)
|
||||
const hasAssociations = computed(() =>
|
||||
Boolean(
|
||||
detail.value?.linkage.request_id ||
|
||||
detail.value?.linkage.correlation_id ||
|
||||
(detail.value?.resource?.type && detail.value?.resource?.id)
|
||||
requestReference.value ||
|
||||
correlationReference.value ||
|
||||
(detail.value?.resource?.type && resourceReference.value)
|
||||
)
|
||||
)
|
||||
const hasJsonContent = (value?: Record<string, unknown> | null) =>
|
||||
@@ -294,11 +306,11 @@
|
||||
integrationCategoryMeta[category as keyof typeof integrationCategoryMeta]?.type || 'info'
|
||||
const formatOptionalDate = (value?: string | null) => (value ? formatDateTime(value) : '-')
|
||||
const openResourceTimeline = () => {
|
||||
if (!detail.value?.resource?.type || !detail.value.resource.id) return
|
||||
if (!detail.value?.resource?.type || !resourceReference.value) return
|
||||
openAuditInvestigation({
|
||||
mode: 'resource',
|
||||
resourceType: detail.value.resource.type,
|
||||
id: detail.value.resource.id
|
||||
id: resourceReference.value
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user