This commit is contained in:
@@ -969,6 +969,10 @@
|
||||
import { computed, h } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { RoutesAlias } from '@/router/routesAlias'
|
||||
import { AUDIT_PERMISSIONS } from '@/config/constants/audit'
|
||||
import { resolveAuditResourceTarget } from '@/utils/business/auditNavigation'
|
||||
import { openAuditInvestigation } from '@/components/business/audit/investigationController'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import {
|
||||
DeviceService,
|
||||
ShopService,
|
||||
@@ -1027,6 +1031,7 @@
|
||||
|
||||
const { hasAuth } = useAuth()
|
||||
const router = useRouter()
|
||||
const userStore = useUserStore()
|
||||
|
||||
const loading = ref(false)
|
||||
const allocateLoading = ref(false)
|
||||
@@ -3173,6 +3178,27 @@
|
||||
})
|
||||
}
|
||||
|
||||
const userType = Number(userStore.getUserInfo.user_type)
|
||||
const auditPermission =
|
||||
userType === 3
|
||||
? AUDIT_PERMISSIONS.agentActivity
|
||||
: userType === 4
|
||||
? AUDIT_PERMISSIONS.enterpriseActivity
|
||||
: AUDIT_PERMISSIONS.deviceEntry
|
||||
if (hasAuth(auditPermission)) {
|
||||
const auditTarget = resolveAuditResourceTarget({
|
||||
userType,
|
||||
resourceType: 'device',
|
||||
internalId: row.id,
|
||||
businessIdentifier: row.virtual_no
|
||||
})
|
||||
if (auditTarget)
|
||||
moreActions.push({
|
||||
label: userType >= 3 ? '活动记录' : '审计记录',
|
||||
handler: () => openAuditInvestigation(auditTarget),
|
||||
type: 'primary'
|
||||
})
|
||||
}
|
||||
// 如果有更多操作,添加到 actions 中
|
||||
if (moreActions.length > 0) {
|
||||
actions.push(...moreActions)
|
||||
|
||||
Reference in New Issue
Block a user