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

@@ -0,0 +1,14 @@
import type { AuditInvestigationTarget } from '@/components/business/audit/types'
export const isPlatformAuditAccount = (userType?: number | null, isSuperAdmin = false) =>
isSuperAdmin || [1, 2].includes(Number(userType))
export const canLoadAuditInvestigation = (
target: AuditInvestigationTarget,
userType?: number | null,
isSuperAdmin = false
) => {
if (target.mode === 'agent') return Number(userType) === 3
if (target.mode === 'enterprise') return Number(userType) === 4
return isPlatformAuditAccount(userType, isSuperAdmin)
}