fix(frontend): codex review——弹药行字段级渲染(tAll=null 单独显示—,其余字段照常,区分无报告与样本不足) [vps]
This commit is contained in:
@@ -155,4 +155,18 @@ describe('FactorDetail.vue 全期弹药+疑似换皮(spec §4.2 2026-10-10)', ()
|
||||
expect(w.text()).toContain('月度点不足或首班未跑')
|
||||
expect(w.findAll('.sim-chip').length).toBe(0)
|
||||
})
|
||||
it('codex review:tAll=null(样本不足/方差0)时其余弹药字段照常渲染,合成t 单独 —', async () => {
|
||||
const w = await mountDetail({
|
||||
factor: { ...DETAIL.factor,
|
||||
icStats: { icAll: 0.04, tAll: null, positiveRatio: 0.8,
|
||||
byYear: { 2025: 0.05 } } },
|
||||
birth: null,
|
||||
})
|
||||
expect(w.text()).toContain('全期IC 0.0400')
|
||||
expect(w.text()).toContain('合成t —')
|
||||
expect(w.text()).toContain('正IC占比 80%')
|
||||
expect(w.text()).toContain('2025:0.0500')
|
||||
// 区分「无报告」:此态不再出占位文案
|
||||
expect(w.text()).not.toContain('月度点不足或首班未跑')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -126,10 +126,10 @@ function goFactor(n: string): void {
|
||||
</div>
|
||||
<div class="brow"><span class="bk">全期弹药</span>
|
||||
<span class="val">
|
||||
<template v-if="detail.factor.icStats && detail.factor.icStats.tAll !== null">
|
||||
全期IC {{ detail.factor.icStats.icAll?.toFixed(4) }} ·
|
||||
合成t {{ detail.factor.icStats.tAll?.toFixed(2) }} ·
|
||||
正IC占比 {{ ((detail.factor.icStats.positiveRatio ?? 0) * 100).toFixed(0) }}% ·
|
||||
<template v-if="detail.factor.icStats">
|
||||
全期IC {{ detail.factor.icStats.icAll?.toFixed(4) ?? '—' }} ·
|
||||
合成t <span :title="detail.factor.icStats.tAll === null ? 'n<2 或方差为 0,如实不算' : ''">{{ detail.factor.icStats.tAll !== null && detail.factor.icStats.tAll !== undefined ? detail.factor.icStats.tAll.toFixed(2) : '—' }}</span> ·
|
||||
正IC占比 {{ detail.factor.icStats.positiveRatio !== null && detail.factor.icStats.positiveRatio !== undefined ? `${(detail.factor.icStats.positiveRatio * 100).toFixed(0)}%` : '—' }} ·
|
||||
逐年 {{ Object.entries(detail.factor.icStats.byYear).map(([y, v]) => `${y}:${v.toFixed(4)}`).join(' ') || '—' }}
|
||||
</template>
|
||||
<template v-else>—(月度点不足或首班未跑)</template>
|
||||
|
||||
Reference in New Issue
Block a user