From c8b08add76b7a8a72de877939dbccf273f924f9a Mon Sep 17 00:00:00 2001 From: yuxuanhui Date: Tue, 1 Sep 2026 11:12:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(selection):=20=E5=88=97=E8=A1=A8=E4=BB=85?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=8D=95=E4=B8=AA=20J=20=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../selection/components/selection-presentation.ts | 8 ++++++++ .../features/selection/components/signal-record-list.tsx | 6 ++---- .../src/features/selection/components/signal-table.tsx | 8 ++------ .../selection/pages/selection-results-page.test.tsx | 6 +++++- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/zhixing-web/src/features/selection/components/selection-presentation.ts b/zhixing-web/src/features/selection/components/selection-presentation.ts index 5cb9d50..f88c6aa 100644 --- a/zhixing-web/src/features/selection/components/selection-presentation.ts +++ b/zhixing-web/src/features/selection/components/selection-presentation.ts @@ -90,6 +90,14 @@ export function getSignalJValue(details: SelectionSignal["details"]) { return formatSignalDetailValue("j", details.j) } +export function getStockJValue(stock: SelectionStockResult) { + const signal = stock.signals.find( + ({ details }) => + details.j !== null && details.j !== undefined && details.j !== "", + ) + return getSignalJValue(signal?.details ?? {}) +} + function formatSignalDetailValue( key: string, value: number | string | null | undefined, diff --git a/zhixing-web/src/features/selection/components/signal-record-list.tsx b/zhixing-web/src/features/selection/components/signal-record-list.tsx index 8a235f3..1b8e6d0 100644 --- a/zhixing-web/src/features/selection/components/signal-record-list.tsx +++ b/zhixing-web/src/features/selection/components/signal-record-list.tsx @@ -8,7 +8,7 @@ import { PatternScoreDetails, PatternScoreSummary } from "./pattern-score" import { categoryToneClass, getCategoryLabel, - getSignalJValue, + getStockJValue, getStockKey, } from "./selection-presentation" import { SignalDetails } from "./signal-details" @@ -77,9 +77,7 @@ export function SignalRecordList({ J  - {stock.signals - .map((signal) => getSignalJValue(signal.details)) - .join(" / ")} + {getStockJValue(stock)}