This commit is contained in:
@@ -314,7 +314,7 @@
|
||||
{{ scope.row.gateway_extend || '-' }}
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="操作" width="280" fixed="right">
|
||||
<ElTableColumn label="操作" width="260" fixed="right">
|
||||
<template #default="scope">
|
||||
<!-- 根据网络状态显示启用或停用按钮 -->
|
||||
<ElButton
|
||||
@@ -357,15 +357,6 @@
|
||||
>
|
||||
卡审计
|
||||
</ElButton>
|
||||
<ElButton
|
||||
v-if="getBindingAuditTarget(scope.row)"
|
||||
type="primary"
|
||||
size="small"
|
||||
link
|
||||
@click="openBindingAudit(scope.row)"
|
||||
>
|
||||
绑定审计
|
||||
</ElButton>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
</ElTable>
|
||||
@@ -616,7 +607,6 @@
|
||||
|
||||
// Props
|
||||
interface BindingCard {
|
||||
id: number
|
||||
card_id?: number
|
||||
iccid: string
|
||||
msisdn?: string
|
||||
@@ -747,14 +737,17 @@
|
||||
const isSubjectActivityView = computed(() => [3, 4].includes(Number(userStore.info.user_type)))
|
||||
const auditTarget = computed(() => {
|
||||
const userType = Number(userStore.info.user_type)
|
||||
const isCard = props.cardInfo.asset_type === 'card'
|
||||
const permission =
|
||||
userType === 3
|
||||
? AUDIT_PERMISSIONS.agentActivity
|
||||
? isCard
|
||||
? AUDIT_PERMISSIONS.agentAssetInfoCardActivity
|
||||
: AUDIT_PERMISSIONS.agentAssetInfoDeviceActivity
|
||||
: userType === 4
|
||||
? AUDIT_PERMISSIONS.enterpriseActivity
|
||||
: props.cardInfo.asset_type === 'card'
|
||||
? AUDIT_PERMISSIONS.cardEntry
|
||||
: AUDIT_PERMISSIONS.deviceEntry
|
||||
? isCard
|
||||
? AUDIT_PERMISSIONS.enterpriseAssetInfoCardActivity
|
||||
: AUDIT_PERMISSIONS.enterpriseAssetInfoDeviceActivity
|
||||
: AUDIT_PERMISSIONS.assetInfoEntry
|
||||
if (!hasAuth(permission)) return null
|
||||
return resolveAuditResourceTarget({
|
||||
userType,
|
||||
@@ -771,10 +764,10 @@
|
||||
const userType = Number(userStore.info.user_type)
|
||||
const permission =
|
||||
userType === 3
|
||||
? AUDIT_PERMISSIONS.agentActivity
|
||||
? AUDIT_PERMISSIONS.agentAssetInfoBindingCardActivity
|
||||
: userType === 4
|
||||
? AUDIT_PERMISSIONS.enterpriseActivity
|
||||
: AUDIT_PERMISSIONS.cardEntry
|
||||
? AUDIT_PERMISSIONS.enterpriseAssetInfoBindingCardActivity
|
||||
: AUDIT_PERMISSIONS.assetInfoBindingCardEntry
|
||||
if (!hasAuth(permission)) return null
|
||||
return resolveAuditResourceTarget({
|
||||
userType,
|
||||
@@ -783,25 +776,10 @@
|
||||
businessIdentifier: card.iccid
|
||||
})
|
||||
}
|
||||
const getBindingAuditTarget = (card: BindingCard) => {
|
||||
if (
|
||||
![1, 2].includes(Number(userStore.info.user_type)) ||
|
||||
!hasAuth(AUDIT_PERMISSIONS.resourceTimeline)
|
||||
)
|
||||
return null
|
||||
return resolveAuditResourceTarget({
|
||||
resourceType: 'device_sim_binding',
|
||||
internalId: card.id
|
||||
})
|
||||
}
|
||||
const openBindingCardAudit = (card: BindingCard) => {
|
||||
const target = getBindingCardAuditTarget(card)
|
||||
if (target) openAuditInvestigation(target)
|
||||
}
|
||||
const openBindingAudit = (card: BindingCard) => {
|
||||
const target = getBindingAuditTarget(card)
|
||||
if (target) openAuditInvestigation(target)
|
||||
}
|
||||
const { width } = useWindowSize()
|
||||
|
||||
const CARD_MONTH_USAGE_PERMISSION = 'asset_info:view_card_month_usage'
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
const descriptionsColumn = computed(() => {
|
||||
if (width.value <= 640) return 1
|
||||
if (width.value <= 1024) return 2
|
||||
return 4
|
||||
return 3
|
||||
})
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
||||
@@ -45,15 +45,20 @@
|
||||
<ElButton type="primary" @click="handleQuery">查询</ElButton>
|
||||
<ElButton @click="handleReset()">重置</ElButton>
|
||||
<ElButton
|
||||
v-if="walletInfo?.wallet_id && hasAuth(AUDIT_PERMISSIONS.financeTimeline)"
|
||||
v-if="
|
||||
isPlatformAuditUser &&
|
||||
walletInfo?.wallet_id &&
|
||||
hasAuth(AUDIT_PERMISSIONS.assetInfoWalletFinance)
|
||||
"
|
||||
@click="openWalletAudit"
|
||||
>资金链路</ElButton
|
||||
>
|
||||
<ElButton
|
||||
v-if="
|
||||
isPlatformAuditUser &&
|
||||
walletInfo?.resource_type &&
|
||||
walletInfo?.resource_id &&
|
||||
hasAuth(AUDIT_PERMISSIONS.resourceTimeline)
|
||||
hasAuth(AUDIT_PERMISSIONS.assetInfoWalletAsset)
|
||||
"
|
||||
@click="openAssetAudit"
|
||||
>资产审计</ElButton
|
||||
@@ -182,7 +187,9 @@
|
||||
TransactionType
|
||||
} from '@/types/api'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { AUDIT_PERMISSIONS } from '@/config/constants/audit'
|
||||
import { isPlatformAuditAccount } from '@/utils/business/auditAccess'
|
||||
import {
|
||||
resolveAuditResourceTarget,
|
||||
resolveFinanceAuditTarget
|
||||
@@ -204,6 +211,10 @@
|
||||
boundDeviceNo: ''
|
||||
})
|
||||
const { hasAuth } = useAuth()
|
||||
const userStore = useUserStore()
|
||||
const isPlatformAuditUser = computed(() =>
|
||||
isPlatformAuditAccount(userStore.info.user_type, userStore.isSuperAdmin)
|
||||
)
|
||||
|
||||
const openWalletAudit = () => {
|
||||
const target = resolveFinanceAuditTarget('wallet_id', props.walletInfo?.wallet_id)
|
||||
|
||||
Reference in New Issue
Block a user