This commit is contained in:
@@ -94,28 +94,28 @@
|
||||
<template #header>调查入口</template>
|
||||
<div v-if="hasAssociations" class="link-actions">
|
||||
<ElButton
|
||||
v-if="requestReference"
|
||||
v-if="canViewRequestTimeline"
|
||||
type="primary"
|
||||
plain
|
||||
@click="openAuditInvestigation({ mode: 'request', id: requestReference })"
|
||||
@click="openAuditInvestigation({ mode: 'request', id: requestReference || '' })"
|
||||
>
|
||||
请求链路
|
||||
</ElButton>
|
||||
<ElButton
|
||||
v-if="correlationReference"
|
||||
v-if="canViewCorrelationTimeline"
|
||||
type="primary"
|
||||
plain
|
||||
@click="
|
||||
openAuditInvestigation({
|
||||
mode: 'correlation',
|
||||
id: correlationReference
|
||||
id: correlationReference || ''
|
||||
})
|
||||
"
|
||||
>
|
||||
业务关联链路
|
||||
</ElButton>
|
||||
<ElButton
|
||||
v-if="detail.resource?.type && resourceReference"
|
||||
v-if="canViewResourceTimeline"
|
||||
type="primary"
|
||||
plain
|
||||
@click="openResourceTimeline"
|
||||
@@ -257,11 +257,14 @@
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
import { openAuditInvestigation } from '@/components/business/audit/investigationController'
|
||||
import { resolveInvestigationReference } from '@/utils/business/auditNavigation'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import { AUDIT_PERMISSIONS } from '@/config/constants/audit'
|
||||
|
||||
defineOptions({ name: 'AuditIntegrationDetail' })
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const { hasAuth } = useAuth()
|
||||
const loading = ref(false)
|
||||
const detail = ref<IntegrationDetailResponse>()
|
||||
|
||||
@@ -284,11 +287,25 @@
|
||||
fidelity: detail.value?.fidelity.resource_id_available
|
||||
})
|
||||
)
|
||||
const canViewRequestTimeline = computed(
|
||||
() =>
|
||||
Boolean(requestReference.value) && hasAuth(AUDIT_PERMISSIONS.integrationDetailRequestTimeline)
|
||||
)
|
||||
const canViewCorrelationTimeline = computed(
|
||||
() =>
|
||||
Boolean(correlationReference.value) &&
|
||||
hasAuth(AUDIT_PERMISSIONS.integrationDetailCorrelationTimeline)
|
||||
)
|
||||
const canViewResourceTimeline = computed(
|
||||
() =>
|
||||
Boolean(detail.value?.resource?.type && resourceReference.value) &&
|
||||
hasAuth(AUDIT_PERMISSIONS.integrationDetailResourceTimeline)
|
||||
)
|
||||
const hasAssociations = computed(() =>
|
||||
Boolean(
|
||||
requestReference.value ||
|
||||
correlationReference.value ||
|
||||
(detail.value?.resource?.type && resourceReference.value)
|
||||
canViewRequestTimeline.value ||
|
||||
canViewCorrelationTimeline.value ||
|
||||
canViewResourceTimeline.value
|
||||
)
|
||||
)
|
||||
const hasJsonContent = (value?: Record<string, unknown> | null) =>
|
||||
|
||||
@@ -180,9 +180,16 @@
|
||||
><ElTableColumn label="方向" prop="direction_name" width="90" /><ElTableColumn
|
||||
label="操作"
|
||||
min-width="190"
|
||||
><template #default="{ row }">{{
|
||||
row.operation_name || row.operation
|
||||
}}</template></ElTableColumn
|
||||
><template #default="{ row }"
|
||||
><ElButton
|
||||
link
|
||||
type="primary"
|
||||
@click="
|
||||
router.push(`/audit/integrations/${encodeURIComponent(row.integration_id)}`)
|
||||
"
|
||||
>{{ row.operation_name || row.operation || '-' }}</ElButton
|
||||
></template
|
||||
></ElTableColumn
|
||||
><ElTableColumn label="结果" width="120"
|
||||
><template #default="{ row }"
|
||||
><ElTag :type="categoryMeta(row).type">{{
|
||||
@@ -197,17 +204,6 @@
|
||||
><template #default="{ row }">{{
|
||||
row.resource?.key || row.resource?.id || '-'
|
||||
}}</template></ElTableColumn
|
||||
><ElTableColumn label="操作" width="100" fixed="right"
|
||||
><template #default="{ row }"
|
||||
><ElButton
|
||||
link
|
||||
type="primary"
|
||||
@click="
|
||||
router.push(`/audit/integrations/${encodeURIComponent(row.integration_id)}`)
|
||||
"
|
||||
>查看详情</ElButton
|
||||
></template
|
||||
></ElTableColumn
|
||||
></template
|
||||
></ArtTable
|
||||
></ElCard
|
||||
|
||||
Reference in New Issue
Block a user