This commit is contained in:
Your Name
2026-08-08 15:42:45 +08:00
parent a968945057
commit d10f213573
21 changed files with 2610 additions and 279 deletions
@@ -318,15 +318,22 @@ const targetChartOption = computed(() => ({
]
}))
let latestDashboardRequestId = 0
async function loadDashboard() {
const requestId = ++latestDashboardRequestId
loading.value = true
try {
const result: any = await firstVisitConversionOverview(query)
const result: any = await firstVisitConversionOverview({ ...query })
if (requestId !== latestDashboardRequestId) return
Object.assign(dashboard, emptyDashboard(), result || {})
// 服务端会规范化失效渠道;同步真实生效值,避免筛选框与数据口径不一致。
query.media_channel_code = dashboard.meta.selected_media_channel_code || ''
} catch (error: any) {
if (requestId !== latestDashboardRequestId) return
ElMessage.error(error?.message || '综合数据加载失败')
} finally {
loading.value = false
if (requestId === latestDashboardRequestId) loading.value = false
}
}