From 3732dafb956391904b6b991368d4f023976bab24 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Mon, 25 May 2026 17:23:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20=5Funused=5FCityGroupedTab?= =?UTF-8?q?le(137=E8=A1=8C)=20+=20KoyfinRowsTable=20=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=A4=96=E9=83=A8=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ScanTerminalDashboard 1060→841 行。 --- .../dashboard/ScanTerminalDashboard.tsx | 221 +----------------- web/scan_terminal_city_row.py | 13 +- 2 files changed, 11 insertions(+), 223 deletions(-) diff --git a/frontend/components/dashboard/ScanTerminalDashboard.tsx b/frontend/components/dashboard/ScanTerminalDashboard.tsx index 938c9d40..f2ef4d44 100644 --- a/frontend/components/dashboard/ScanTerminalDashboard.tsx +++ b/frontend/components/dashboard/ScanTerminalDashboard.tsx @@ -47,6 +47,7 @@ import { Panel } from "@/components/dashboard/scan-terminal/Panel"; import { TrainingDashboard } from "@/components/dashboard/scan-terminal/TrainingDashboard"; import { LiveTemperatureThresholdChart } from "@/components/dashboard/scan-terminal/LiveTemperatureThresholdChart"; import { MarketOverviewView } from "@/components/dashboard/scan-terminal/MarketOverviewView"; +import { KoyfinRowsTable } from "@/components/dashboard/scan-terminal/KoyfinRowsTable"; import { rowName, pct, money, temp, edgeClass } from "@/components/dashboard/scan-terminal/utils"; function createEmptyAccess(loading = true): ProAccessState { @@ -168,89 +169,6 @@ function tablePrice(row: ScanOpportunityRow) { return formatPrice(row.midpoint, row.ask, row.bid); } -function KoyfinRowsTable({ - compact = false, - isEn, - onSelect, - rows, - selectedId, -}: { - compact?: boolean; - isEn: boolean; - onSelect: (row: ScanOpportunityRow) => void; - rows: ScanOpportunityRow[]; - selectedId?: string | null; -}) { - return ( -
| - - | -- {isEn ? "City" : "城市"} - | -- {isEn ? "Price" : "价格"} - | -- {isEn ? "Chg" : "变化"} - | -% | -
|---|---|---|---|---|
| - - | -
-
- {rowName(row)}
-
-
- {row.target_label || row.market_question || row.airport || "--"}
-
- |
- - {tablePrice(row)} - | -- {Number.isFinite(edge) ? `${positive ? "+" : ""}${edge.toFixed(1)}` : "--"} - | -- {pct(row.market_probability ?? row.market_event_probability ?? row.model_probability)} - | -
| - | - {isEn ? "City / Best Signal" : "城市 / 最佳信号"} - | -{isEn ? "Edge" : "优势"} | -{isEn ? "Model" : "模型"} | -Live | -DEB | -{isEn ? "Mkt" : "盘口"} | -{isEn ? "Spr/Liq" : "价差/流动性"} | -
|---|---|---|---|---|---|---|---|
| - - | -
- {displayName}
-
- {best.target_label || ""}
- {hasMultiple && !isExpanded ? ` +${buckets.length - 1}` : ""}
-
- |
- - {pct(best.edge_percent)} - | -{pct(best.model_probability ?? best.model_event_probability)} | -{temp(best.current_temp || best.current_max_so_far, best.temp_symbol)} | -{temp(best.deb_prediction, best.temp_symbol)} | -{formatPrice(best.midpoint, best.ask, best.bid)} | -{formatSpreadLiquidity(best.spread, best.book_liquidity ?? best.market_liquidity)} | -
| - | - {row.target_label || "--"} - | -- {pct(row.edge_percent)} - | -{pct(row.model_probability ?? row.model_event_probability)} | -{temp(row.current_temp || row.current_max_so_far, row.temp_symbol)} | -{temp(row.deb_prediction, row.temp_symbol)} | -{formatPrice(row.midpoint, row.ask, row.bid)} | -{formatSpreadLiquidity(row.spread, row.book_liquidity ?? row.market_liquidity)} | -