fix(cma): T4 residual bugs - predict 500 + reports restateDiffClass (cma-t4-residual-bugs-20260916)
ci/woodpecker/push/main Pipeline failed
ci/woodpecker/push/main Pipeline failed
B1: /api/cma/dashboard/predict hand-rolled threshold parsing called float() on the whole
expression -> ValueError on multi-clause thresholds like '<=36|>=124' -> 500. Now routes
through app.utils.threshold_parser.eval_threshold (single source of truth; red then yellow,
invalid/blank expr -> False, no crash).
B2: ReportCenter.vue restatement tab template called restateDiffClass while the script
defines restatementDiffClass (name mismatch since ec6af75) -> TypeError on render.
Verified: predict 200 on new code vs 500 on live code; /reports A/B browser run shows 0 vs 3
occurrences of the TypeError; pytest 1113 passed / 1 xfailed; vite build OK.
This commit is contained in:
@@ -396,7 +396,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="差异" width="140" align="right">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.difference != null" :class="restateDiffClass(row.difference)">
|
||||
<span v-if="row.difference != null" :class="restatementDiffClass(row.difference)">
|
||||
{{ row.difference > 0 ? '+' : '' }}{{ formatMoney(row.difference) }}
|
||||
</span>
|
||||
<span v-else-if="row.needs_adjustment" class="restate-new-badge">新</span>
|
||||
|
||||
Reference in New Issue
Block a user