fix: some
All checks were successful
构建并部署前端到测试环境 / deploy (push) Successful in 54s

This commit is contained in:
luo
2026-10-28 15:18:44 +08:00
parent 06684e1fc0
commit f2614d8efb
99 changed files with 11511 additions and 132 deletions

View File

@@ -48,6 +48,7 @@
} from '@/config/constants'
import { useUserStore } from '@/store/modules/user'
import { isPollingPlatform } from '@/utils/business/pollingScheduler'
import { canAccessExportTaskScene } from '@/config/constants/exportTask'
import { formatDateTime } from '@/utils/business/format'
import type { ExportTaskDetail } from '@/types/api'
import { ExportTaskStatus } from '@/types/api'
@@ -70,6 +71,8 @@
throw error
}
if (res.code !== 0 || !res.data) throw new Error(res.msg || '获取导出任务详情失败')
if (!canAccessExportTaskScene(res.data.scene, user.info.user_type))
throw Object.assign(new Error('当前账号无权访问该类订单导出'), { status: 403 })
if (isPollingPlatformExport(res.data.scene) && !isPollingPlatform(user.info.user_type))
throw Object.assign(new Error('仅平台账号可查看该导出任务'), { status: 403 })
return res.data
@@ -84,6 +87,7 @@
const canViewDetail = computed(
() =>
!!taskPermissions.value &&
canAccessExportTaskScene(taskDetail.value?.scene, user.info.user_type) &&
hasAuth(taskPermissions.value.detail) &&
(!isPollingPlatformExport(taskDetail.value?.scene) || isPollingPlatform(user.info.user_type))
)