This commit is contained in:
@@ -44,6 +44,20 @@
|
||||
/>
|
||||
<ElButton type="primary" @click="handleQuery">查询</ElButton>
|
||||
<ElButton @click="handleReset()">重置</ElButton>
|
||||
<ElButton
|
||||
v-if="walletInfo?.wallet_id && hasAuth(AUDIT_PERMISSIONS.financeTimeline)"
|
||||
@click="openWalletAudit"
|
||||
>资金链路</ElButton
|
||||
>
|
||||
<ElButton
|
||||
v-if="
|
||||
walletInfo?.resource_type &&
|
||||
walletInfo?.resource_id &&
|
||||
hasAuth(AUDIT_PERMISSIONS.resourceTimeline)
|
||||
"
|
||||
@click="openAssetAudit"
|
||||
>资产审计</ElButton
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -167,6 +181,13 @@
|
||||
AssetWalletTransactionParams,
|
||||
TransactionType
|
||||
} from '@/types/api'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import { AUDIT_PERMISSIONS } from '@/config/constants/audit'
|
||||
import {
|
||||
resolveAuditResourceTarget,
|
||||
resolveFinanceAuditTarget
|
||||
} from '@/utils/business/auditNavigation'
|
||||
import { openAuditInvestigation } from '@/components/business/audit/investigationController'
|
||||
|
||||
interface Props {
|
||||
assetIdentifier: string
|
||||
@@ -182,6 +203,19 @@
|
||||
boundDeviceId: undefined,
|
||||
boundDeviceNo: ''
|
||||
})
|
||||
const { hasAuth } = useAuth()
|
||||
|
||||
const openWalletAudit = () => {
|
||||
const target = resolveFinanceAuditTarget('wallet_id', props.walletInfo?.wallet_id)
|
||||
if (target) openAuditInvestigation(target)
|
||||
}
|
||||
const openAssetAudit = () => {
|
||||
const target = resolveAuditResourceTarget({
|
||||
resourceType: props.walletInfo?.resource_type || '',
|
||||
internalId: props.walletInfo?.resource_id
|
||||
})
|
||||
if (target) openAuditInvestigation(target)
|
||||
}
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'navigateToDevice', deviceNo: string): void
|
||||
|
||||
Reference in New Issue
Block a user