Expand options review table columns and color result tags.

Show direction, hold time, and entry logic; paint 盈利 green and 亏损 red.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-19 16:49:35 +08:00
parent 3c21680763
commit debfb116fd
3 changed files with 43 additions and 8 deletions
+4
View File
@@ -581,11 +581,15 @@ def enrich_trade_row(row: dict[str, Any], entry: dict[str, Any] | None = None) -
out["entry"] = dict(entry)
out["entry"]["images"] = parse_options_review_images_json(entry.get("images_json"))
out["strategy_tag"] = entry.get("strategy_tag")
out["direction_view"] = entry.get("direction_view")
out["entry_logic"] = entry.get("entry_logic")
out["result_tag"] = entry.get("result_tag")
out["reviewed_at"] = entry.get("reviewed_at") or entry.get("updated_at")
else:
out["entry"] = None
out["strategy_tag"] = None
out["direction_view"] = None
out["entry_logic"] = None
out["result_tag"] = None
out["reviewed_at"] = None
return out
@@ -70,7 +70,8 @@
padding-top:8px;border-top:1px dashed rgba(127,127,127,.2);font-size:.74rem;
}
.or-list-loading{opacity:.55;pointer-events:none;transition:opacity .12s ease}
.or-trades-table-wrap,.or-reviewed-table-wrap{min-height:9.5rem}
.or-trades-table-wrap,.or-reviewed-table-wrap{min-height:9.5rem;overflow-x:auto}
.or-reviewed-table{min-width:980px}
.or-kpi-row{
display:grid;grid-template-columns:repeat(6,minmax(0,1fr));
gap:8px;margin-bottom:12px;
@@ -343,16 +344,19 @@
<tr>
<th>类型</th>
<th>标的/合约</th>
<th>方向</th>
<th>盈亏</th>
<th>开仓时间</th>
<th>平仓时间</th>
<th>持仓时长</th>
<th>策略</th>
<th>入场逻辑</th>
<th>结果</th>
<th>复盘时间</th>
</tr>
</thead>
<tbody id="or-reviewed-tbody">
<tr><td colspan="8" class="muted">加载中…</td></tr>
<tr><td colspan="11" class="muted">加载中…</td></tr>
</tbody>
</table>
</div>
@@ -394,4 +398,4 @@
</section>
</div>
<script src="/static/options_review.js?v=19"></script>
<script src="/static/options_review.js?v=20"></script>