fix: 优化审计
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 3m42s

This commit is contained in:
luo
2026-08-11 16:47:58 +08:00
parent 9599a4d52b
commit 33485b137f
49 changed files with 1263 additions and 212 deletions

View File

@@ -19,7 +19,7 @@
{{ userType === 3 ? '活动记录' : '分配审计' }}
</ElButton>
<ElButton
v-if="assetAuditTarget && hasAuth(AUDIT_PERMISSIONS.resourceTimeline)"
v-if="assetAuditTarget && hasAuth(AUDIT_PERMISSIONS.assetAllocationAssetEntry)"
type="primary"
plain
@click="openAuditInvestigation(assetAuditTarget)"
@@ -67,10 +67,12 @@
const detailData = ref<AssetAllocationRecord | null>(null)
const userType = computed(() => Number(userStore.info.user_type))
const recordAuditPermission = computed(() =>
userType.value === 3 ? AUDIT_PERMISSIONS.agentActivity : AUDIT_PERMISSIONS.resourceTimeline
userType.value === 3
? AUDIT_PERMISSIONS.agentAssetAllocationActivity
: AUDIT_PERMISSIONS.assetAllocationEntry
)
const recordAuditTarget = computed(() => {
if (!detailData.value || userType.value === 4) return null
if (!detailData.value || ![1, 2, 3].includes(userType.value)) return null
return resolveAuditResourceTarget({
userType: userType.value,
resourceType: 'asset_allocation_record',

View File

@@ -232,8 +232,10 @@
const actions: Array<{ label: string; handler: () => void; type: 'primary' }> = []
const userType = Number(userStore.info.user_type)
const entryPermission =
userType === 3 ? AUDIT_PERMISSIONS.agentActivity : AUDIT_PERMISSIONS.resourceTimeline
if (!hasAuth(entryPermission) || userType === 4) return actions
userType === 3
? AUDIT_PERMISSIONS.agentAssetAllocationActivity
: AUDIT_PERMISSIONS.assetAllocationEntry
if (!hasAuth(entryPermission) || ![1, 2, 3].includes(userType)) return actions
const recordTarget = resolveAuditResourceTarget({
userType,
resourceType: 'asset_allocation_record',
@@ -252,7 +254,7 @@
resourceType: row.asset_type,
internalId: row.asset_id
})
if (assetTarget)
if (assetTarget && hasAuth(AUDIT_PERMISSIONS.assetAllocationAssetEntry))
actions.push({
label: '资产审计',
handler: () => openAuditInvestigation(assetTarget),