fix(mileage): fall through ineffective priority sources

This commit is contained in:
lingniu
2026-07-19 21:28:11 +08:00
parent 5539c5e0c2
commit d0c2bb3316
4 changed files with 36 additions and 5 deletions

View File

@@ -210,7 +210,7 @@ function SourceStrategy({ value, onChange }: { value: MileageSourceOption[]; onC
width={mobileLayout ? undefined : 430}
height={mobileLayout ? 'min(58dvh, 500px)' : undefined}
title="数据源策略"
description="同车同日优先级选择一个里程来源"
description="同车同日优先采用靠前且有有效增量的里程来源"
badge={`${enabled.length}/3 已启用`}
badgeColor={enabled.length === 3 ? 'green' : 'blue'}
summaryItems={[
@@ -219,7 +219,7 @@ function SourceStrategy({ value, onChange }: { value: MileageSourceOption[]; onC
{ label: '统计口径', value: '单车单日', detail: '仅采用一个优先来源' }
]}
onCancel={() => setOpen(false)}
footerNote="避免多协议重复累计;至少保留一个来源。"
footerNote="首选来源为 0、其他来源有有效增量时会自动降级全部为 0 时仍按优先级选择。"
primaryAction={{ label: '完成', onClick: () => setOpen(false) }}
>
<div className="v2-mileage-source-list">{value.map((source, index) => <Card key={source.protocol} className={`v2-mileage-source-card${source.enabled ? '' : ' is-disabled'}`} bodyStyle={{ padding: 0 }}>