c95ca6ac35
Co-authored-by: Cursor <cursoragent@cursor.com>
659 lines
38 KiB
HTML
659 lines
38 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN" data-theme="dark">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<script src="/assets/theme.js?v=20260604-hub-inst-theme"></script>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content" />
|
||
<meta name="theme-color" content="#0b0e18" />
|
||
<meta name="apple-mobile-web-app-title" content="中控" />
|
||
<link rel="icon" href="/assets/icons/favicon.ico" sizes="32x32" />
|
||
<link rel="icon" href="/assets/icons/icon.svg" type="image/svg+xml" />
|
||
<link rel="apple-touch-icon" href="/assets/icons/apple-touch-icon.png" />
|
||
<link rel="manifest" href="/assets/icons/manifest.webmanifest" />
|
||
<title>复盘系统中控</title>
|
||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Orbitron:wght@500;600;700&display=swap" rel="stylesheet" media="print" onload="this.media='all'" />
|
||
<noscript><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Orbitron:wght@500;600;700&display=swap" rel="stylesheet" /></noscript>
|
||
<link rel="stylesheet" href="/assets/app.css?v=20260613-host-status-tone" />
|
||
<link rel="stylesheet" href="/assets/dashboard.css?v=20260612-dash-monitor-count" />
|
||
</head>
|
||
<body>
|
||
<div class="app-bg" aria-hidden="true"></div>
|
||
<div class="app-shell">
|
||
<header class="app-header">
|
||
<div class="brand">
|
||
<span class="brand-mark" aria-hidden="true"></span>
|
||
<div>
|
||
<div class="brand-title">复盘系统中控</div>
|
||
<div class="brand-sub">MULTI-EXCHANGE · OPS</div>
|
||
</div>
|
||
</div>
|
||
<div class="header-right">
|
||
<div class="theme-toggle" role="group" aria-label="界面主题">
|
||
<button type="button" class="theme-toggle-btn is-active" data-theme-value="dark" aria-pressed="true" title="暗色主题">
|
||
<svg class="theme-icon" viewBox="0 0 24 24" width="18" height="18" aria-hidden="true">
|
||
<path fill="currentColor" d="M12.1 3a9 9 0 1 0 8.9 11 6.5 6.5 0 1 1-8.9-11z"/>
|
||
</svg>
|
||
</button>
|
||
<button type="button" class="theme-toggle-btn" data-theme-value="light" aria-pressed="false" title="亮色主题">
|
||
<svg class="theme-icon" viewBox="0 0 24 24" width="18" height="18" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
||
<circle cx="12" cy="12" r="4"/>
|
||
<path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/>
|
||
</svg>
|
||
</button>
|
||
</div>
|
||
<span id="sys-status" class="sys-pill" title="系统状态">SYNC</span>
|
||
<nav class="top-nav">
|
||
<a href="/funds" id="nav-funds">资金概况</a>
|
||
<a href="/monitor" id="nav-monitor">监控区</a>
|
||
<a href="/market" id="nav-market">行情区</a>
|
||
<a href="/archive" id="nav-archive">内照明心</a>
|
||
<a href="/dashboard" id="nav-dashboard">数据看板</a>
|
||
<a href="/ai" id="nav-ai">AI 教练</a>
|
||
<a href="/settings" id="nav-settings">系统设置</a>
|
||
</nav>
|
||
<button type="button" id="btn-logout" class="ghost" title="退出登录">退出</button>
|
||
</div>
|
||
</header>
|
||
|
||
<div id="page-monitor" class="page">
|
||
<div class="page-head">
|
||
<h1><span class="head-tag">MON</span> 监控区</h1>
|
||
</div>
|
||
<details id="host-status-panel" class="host-status-panel" aria-label="服务器运行状态">
|
||
<summary class="host-status-summary">
|
||
<span class="host-status-dot ok" id="host-status-dot" aria-hidden="true"></span>
|
||
<span class="host-status-summary-title">服务器状态</span>
|
||
<span class="host-status-summary-text" id="host-status-summary-text">加载中…</span>
|
||
</summary>
|
||
<div id="host-status-bar" class="host-status-bar" aria-live="polite">
|
||
<div class="host-status-top">
|
||
<div class="host-status-head">
|
||
<span class="host-status-name" id="host-status-name" title="">服务器</span>
|
||
</div>
|
||
<div class="host-status-meta">
|
||
<span class="host-status-uptime" id="host-status-uptime"></span>
|
||
<span class="host-status-updated" id="host-status-updated"></span>
|
||
</div>
|
||
</div>
|
||
<div class="host-status-metrics">
|
||
<div class="host-metric-card" id="host-metric-cpu">
|
||
<div class="host-metric-head">
|
||
<span class="host-metric-label">CPU</span>
|
||
<span class="host-metric-val" id="host-cpu-val">—</span>
|
||
</div>
|
||
<div class="host-metric-bar"><span class="host-metric-fill" id="host-cpu-fill"></span></div>
|
||
<span class="host-metric-sub" id="host-cpu-sub">—</span>
|
||
</div>
|
||
<div class="host-metric-card" id="host-metric-mem">
|
||
<div class="host-metric-head">
|
||
<span class="host-metric-label">内存</span>
|
||
<span class="host-metric-val" id="host-mem-val">—</span>
|
||
</div>
|
||
<div class="host-metric-bar"><span class="host-metric-fill" id="host-mem-fill"></span></div>
|
||
<span class="host-metric-sub" id="host-mem-sub">—</span>
|
||
</div>
|
||
<div class="host-metric-card" id="host-metric-disk">
|
||
<div class="host-metric-head">
|
||
<span class="host-metric-label">硬盘</span>
|
||
<span class="host-metric-val" id="host-disk-val">—</span>
|
||
</div>
|
||
<div class="host-metric-bar"><span class="host-metric-fill" id="host-disk-fill"></span></div>
|
||
<span class="host-metric-sub" id="host-disk-sub">—</span>
|
||
</div>
|
||
<div class="host-metric-card host-metric-card-net" id="host-metric-net">
|
||
<div class="host-metric-head">
|
||
<span class="host-metric-label">网络</span>
|
||
<span class="host-metric-val host-metric-val-net" id="host-net-val">实时</span>
|
||
</div>
|
||
<div class="host-net-lines">
|
||
<span class="host-net-line" id="host-net-up">↑ —</span>
|
||
<span class="host-net-line" id="host-net-down">↓ —</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</details>
|
||
<div id="monitor-alert-summary" class="monitor-alert-summary hidden" aria-live="polite"></div>
|
||
<div class="toolbar">
|
||
<button type="button" id="btn-monitor-refresh" class="primary">立即刷新</button>
|
||
<label class="chk-label">
|
||
<input type="checkbox" id="auto-monitor" checked /> 后台每 5 秒聚合 · SSE 自动更新
|
||
</label>
|
||
<button type="button" id="btn-close-all" class="danger">全局紧急全平</button>
|
||
<span class="toolbar-spacer"></span>
|
||
<span id="monitor-updated" class="toolbar-meta"></span>
|
||
</div>
|
||
<div id="monitor-grid" class="grid-monitor"></div>
|
||
</div>
|
||
|
||
<div id="page-market" class="page hidden">
|
||
<div class="page-head">
|
||
<h1><span class="head-tag">MKT</span> 行情区</h1>
|
||
</div>
|
||
<div class="market-toolbar toolbar">
|
||
<label class="market-field">
|
||
<span>交易所</span>
|
||
<select id="market-exchange"></select>
|
||
</label>
|
||
<label class="market-field market-field-symbol">
|
||
<span>币种</span>
|
||
<div class="market-symbol-wrap">
|
||
<input id="market-symbol" type="text" value="BTC/USDT" placeholder="BTC/USDT" autocomplete="off" />
|
||
<button
|
||
type="button"
|
||
id="market-vol-rank-btn"
|
||
class="market-vol-rank-btn"
|
||
title="昨日成交额 Top20(每早8点更新)"
|
||
aria-expanded="false"
|
||
aria-controls="market-vol-rank-sheet"
|
||
>
|
||
Top20
|
||
</button>
|
||
</div>
|
||
</label>
|
||
<label class="market-field">
|
||
<span>周期</span>
|
||
<select id="market-timeframe">
|
||
<option value="1m">1m</option>
|
||
<option value="5m">5m</option>
|
||
<option value="15m">15m</option>
|
||
<option value="1h">1h</option>
|
||
<option value="2h">2h</option>
|
||
<option value="4h">4h</option>
|
||
<option value="1d" selected>1d</option>
|
||
<option value="1w">1w</option>
|
||
</select>
|
||
</label>
|
||
<button type="button" id="market-load" class="primary">加载</button>
|
||
<button type="button" id="market-refresh" class="ghost" title="清空该币种本周期 K 线缓存并从交易所重新拉取">清库重拉</button>
|
||
<span class="toolbar-spacer"></span>
|
||
<span id="market-bar-countdown" class="toolbar-meta market-countdown"></span>
|
||
<span id="market-updated" class="toolbar-meta"></span>
|
||
</div>
|
||
<div id="market-vol-rank-anchor" class="market-vol-rank-anchor">
|
||
<div id="market-vol-rank-sheet" class="market-vol-rank-sheet hidden" aria-hidden="true">
|
||
<div id="market-vol-rank-meta" class="market-vol-rank-meta">加载中…</div>
|
||
<ol id="market-vol-rank-list" class="market-vol-rank-list"></ol>
|
||
</div>
|
||
</div>
|
||
<p id="market-status" class="market-status"></p>
|
||
<div id="market-chart-wrap" class="market-chart-wrap">
|
||
<div class="market-ohlcv-bar" aria-label="K线详情">
|
||
<div class="market-ohlcv-title">
|
||
<span id="mkt-exchange-label" class="mkt-exchange-tag"></span>
|
||
<span id="mkt-symbol-label">—</span>
|
||
<span id="mkt-tf-label">1d</span>
|
||
<div class="market-chart-actions">
|
||
<label class="market-day-split-opt" title="上一交易日收盘价水平线(北京切日)">
|
||
<input type="checkbox" id="market-prev-close-line" /> 昨日收盘价
|
||
</label>
|
||
<label class="market-day-split-opt" title="上一交易日最高/最低价水平线(北京切日)">
|
||
<input type="checkbox" id="market-prev-hl-lines" /> 昨日高低点
|
||
</label>
|
||
<label class="market-day-split-opt" title="北京时间 8:00 交易切日竖线">
|
||
<input type="checkbox" id="market-day-split" /> 交易间隔日
|
||
</label>
|
||
<details class="market-ind-menu">
|
||
<summary>技术指标</summary>
|
||
<div class="market-ind-options">
|
||
<label class="market-ind-opt"><input type="checkbox" id="market-ind-ema" value="ema" /> EMA交叉(21/55)</label>
|
||
<label class="market-ind-opt"><input type="checkbox" id="market-ind-macd" value="macd" /> MACD</label>
|
||
<label class="market-ind-opt"><input type="checkbox" id="market-ind-rsi" value="rsi" /> RSI</label>
|
||
</div>
|
||
</details>
|
||
<button type="button" id="market-chart-fullscreen" class="ghost market-fs-btn" title="K线全屏(按 F)">全屏</button>
|
||
</div>
|
||
</div>
|
||
<div class="market-ohlcv-row">
|
||
<span class="ohlcv-item"><span class="k">开</span><span id="mkt-o">—</span></span>
|
||
<span class="ohlcv-item"><span class="k">高</span><span id="mkt-h">—</span></span>
|
||
<span class="ohlcv-item"><span class="k">低</span><span id="mkt-l">—</span></span>
|
||
<span class="ohlcv-item"><span class="k">收</span><span id="mkt-c">—</span></span>
|
||
<span class="ohlcv-item market-vol"><span class="k">量</span><span id="mkt-v">—</span></span>
|
||
<span class="ohlcv-item"><span class="k">振幅</span><span id="mkt-amp">—</span></span>
|
||
</div>
|
||
<div id="market-div-legend" class="market-div-legend hidden" aria-live="polite"></div>
|
||
<div id="market-fs-toolbar" class="market-fs-toolbar hidden" aria-label="全屏行情控制">
|
||
<label class="market-field market-fs-field">
|
||
<span>交易所</span>
|
||
<select id="market-fs-exchange"></select>
|
||
</label>
|
||
<label class="market-field market-fs-field market-field-symbol">
|
||
<span>币种</span>
|
||
<div class="market-symbol-wrap">
|
||
<input id="market-fs-symbol" type="text" placeholder="BTC/USDT" autocomplete="off" />
|
||
<button
|
||
type="button"
|
||
id="market-fs-vol-rank-btn"
|
||
class="market-vol-rank-btn"
|
||
title="昨日成交额 Top20(每早8点更新)"
|
||
aria-expanded="false"
|
||
aria-controls="market-vol-rank-sheet"
|
||
>
|
||
Top20
|
||
</button>
|
||
</div>
|
||
</label>
|
||
<label class="market-field market-fs-field">
|
||
<span>周期</span>
|
||
<select id="market-fs-timeframe">
|
||
<option value="1m">1m</option>
|
||
<option value="5m">5m</option>
|
||
<option value="15m">15m</option>
|
||
<option value="1h">1h</option>
|
||
<option value="2h">2h</option>
|
||
<option value="4h">4h</option>
|
||
<option value="1d">1d</option>
|
||
<option value="1w">1w</option>
|
||
</select>
|
||
</label>
|
||
<button type="button" id="market-fs-load" class="primary">加载</button>
|
||
</div>
|
||
</div>
|
||
<div id="market-vol-rank-anchor-fs" class="market-vol-rank-anchor-fs" aria-hidden="true"></div>
|
||
<div id="market-pos-panel" class="market-pos-panel hidden" aria-label="持仓标记">
|
||
<div class="market-pos-row">
|
||
<span id="mkt-pos-side" class="market-pos-side"></span>
|
||
<span class="ohlcv-item"><span class="k">入场</span><span id="mkt-pos-entry">—</span></span>
|
||
<span class="ohlcv-item"><span class="k">止损</span><span id="mkt-pos-sl">—</span></span>
|
||
<span class="ohlcv-item"><span class="k">止盈</span><span id="mkt-pos-tp">—</span></span>
|
||
<span class="ohlcv-item"><span class="k">张数</span><span id="mkt-pos-size">—</span></span>
|
||
<span class="ohlcv-item"><span class="k">浮盈亏</span><span id="mkt-pos-pnl" class="market-pos-pnl">—</span></span>
|
||
<button type="button" id="market-pos-clear" class="ghost market-pos-clear" title="清除 K 线上的持仓价格线">清除标记</button>
|
||
</div>
|
||
<div id="market-pos-orders" class="market-pos-orders"></div>
|
||
</div>
|
||
<div class="market-chart-body">
|
||
<aside id="market-draw-toolbar" class="market-draw-toolbar" aria-label="画线工具">
|
||
<button type="button" class="market-draw-btn is-active" data-tool="cursor" title="光标(点击选中,右键管理,Del 删除)">
|
||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="M4 4l7 16 2.5-5.5L20 12z"/></svg>
|
||
</button>
|
||
<button type="button" class="market-draw-btn" data-tool="hline" title="水平线">
|
||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.8" d="M4 12h16"/><circle cx="12" cy="12" r="2" fill="currentColor"/></svg>
|
||
</button>
|
||
<button type="button" class="market-draw-btn" data-tool="rect" title="矩形">
|
||
<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="5" y="7" width="14" height="10" fill="none" stroke="currentColor" stroke-width="1.6"/><circle cx="5" cy="7" r="1.3" fill="currentColor"/><circle cx="19" cy="17" r="1.3" fill="currentColor"/></svg>
|
||
</button>
|
||
<button type="button" class="market-draw-btn" data-tool="brush" title="画笔">
|
||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="M4 18l8-2 2-8 6-2-2 6-8 2z"/></svg>
|
||
</button>
|
||
<button type="button" class="market-draw-btn" data-tool="range" title="价格测距(按住拖动)">
|
||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.6" d="M12 5v14M8 8h8M8 16h8"/><path fill="currentColor" d="M11 4h2v3h-2zm0 13h2v3h-2z"/></svg>
|
||
</button>
|
||
<button type="button" class="market-draw-btn" data-tool="fib" title="斐波那契(按住拖动)">
|
||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.4" d="M4 6h16M4 10h16M4 14h16M4 18h16"/><circle cx="20" cy="6" r="1.2" fill="currentColor"/><circle cx="20" cy="18" r="1.2" fill="currentColor"/></svg>
|
||
</button>
|
||
<button type="button" class="market-draw-btn" data-tool="trend" title="趋势线(按住拖动)">
|
||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.8" d="M5 18L19 6"/><circle cx="5" cy="18" r="1.5" fill="currentColor"/><circle cx="19" cy="6" r="1.5" fill="currentColor"/></svg>
|
||
</button>
|
||
<button type="button" class="market-draw-btn" data-tool="path" title="折线(连续点击,双击/右键/回车结束)">
|
||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.6" d="M5 16L10 12L14 15L19 7"/><path fill="currentColor" d="M17 5l3 3-3 1z"/></svg>
|
||
</button>
|
||
<span class="market-draw-sep" aria-hidden="true"></span>
|
||
<button type="button" class="market-draw-btn" data-tool="erase" title="删除选中">
|
||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="M9 3h6l1 2h4v2H4V5h4zm1 6h2v9h-2zm4 0h2v9h-2zM7 7h10l-1 14H8z"/></svg>
|
||
</button>
|
||
<button type="button" class="market-draw-btn" data-tool="clear" title="清除全部画线">
|
||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.8" d="M6 6l12 12M18 6L6 18"/></svg>
|
||
</button>
|
||
</aside>
|
||
<div class="market-chart-main">
|
||
<button type="button" id="market-chart-fs-exit" class="ghost market-fs-exit hidden" title="退出全屏 (Esc)">退出全屏</button>
|
||
<div id="market-exchange-badge" class="market-exchange-badge" aria-hidden="true"></div>
|
||
<div id="market-chart" class="market-chart-host"></div>
|
||
<canvas id="market-draw-canvas" class="market-draw-canvas" aria-hidden="true"></canvas>
|
||
<div id="market-price-tag" class="market-price-tag hidden" aria-hidden="true">
|
||
<div class="market-price-tag-head">
|
||
<span class="market-price-tag-label">现价</span>
|
||
<span id="market-price-tag-value" class="market-price-tag-value"></span>
|
||
</div>
|
||
<div id="market-price-tag-time" class="market-price-tag-time"></div>
|
||
</div>
|
||
<button type="button" id="market-price-auto" class="market-price-auto is-on" title="开启:价格轴与视口随刷新自动调整;关闭:后台静默更新,保留当前缩放">自动</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="page-archive" class="page hidden">
|
||
<div class="page-head">
|
||
<h1><span class="head-tag">IN</span> 内照明心</h1>
|
||
<p class="page-desc">复盘语录 · 当日交易记录 · 按需查看 K 线</p>
|
||
</div>
|
||
<div class="archive-toolbar toolbar">
|
||
<label class="chk-label archive-toolbar-desktop"><input type="checkbox" id="archive-filter-profit" /> 盈利单</label>
|
||
<label class="chk-label archive-toolbar-desktop"><input type="checkbox" id="archive-filter-loss" /> 亏损单</label>
|
||
<label class="chk-label archive-toolbar-desktop"><input type="checkbox" id="archive-filter-sick" /> 犯病</label>
|
||
<div class="archive-period-bar archive-field">
|
||
<span>日期</span>
|
||
<div class="archive-period-tabs" id="archive-period-tabs" role="tablist">
|
||
<button type="button" class="archive-period-btn is-active" data-period="today">本日</button>
|
||
<button type="button" class="archive-period-btn" data-period="week">本周</button>
|
||
<button type="button" class="archive-period-btn" data-period="month">本月</button>
|
||
<button type="button" class="archive-period-btn" data-period="range">区间</button>
|
||
</div>
|
||
<input id="archive-trading-day" type="date" class="archive-period-day-input" title="本日交易日" />
|
||
<span id="archive-period-range-wrap" class="archive-period-range hidden">
|
||
<input id="archive-date-from" type="date" title="起始日" />
|
||
<span class="archive-period-sep">~</span>
|
||
<input id="archive-date-to" type="date" title="结束日" />
|
||
</span>
|
||
</div>
|
||
<button type="button" id="archive-btn-chart-toggle" class="ghost archive-toolbar-desktop">图表</button>
|
||
<label class="archive-field archive-search-field archive-toolbar-desktop">
|
||
<span>搜索</span>
|
||
<input id="archive-search" type="search" placeholder="合约 / 交易所 / 备注" autocomplete="off" />
|
||
</label>
|
||
<label class="archive-field archive-toolbar-desktop">
|
||
<span>交易所</span>
|
||
<select id="archive-exchange"><option value="">全部</option></select>
|
||
</label>
|
||
<button type="button" id="archive-btn-refresh" class="primary">刷新</button>
|
||
<button type="button" id="archive-btn-sync" class="ghost">同步</button>
|
||
<span id="archive-status" class="toolbar-meta"></span>
|
||
</div>
|
||
<div class="archive-layout">
|
||
<aside class="archive-quotes-panel">
|
||
<div class="archive-panel-head">
|
||
<h2>复盘语录</h2>
|
||
<span id="archive-quotes-count" class="archive-panel-meta"></span>
|
||
</div>
|
||
<form id="archive-quote-form" class="archive-quote-form">
|
||
<input id="archive-quote-date" type="date" required />
|
||
<textarea id="archive-quote-content" rows="5" placeholder="今日复盘心得…" required></textarea>
|
||
<button type="submit" id="archive-quote-submit" class="primary">添加语录</button>
|
||
</form>
|
||
<div id="archive-quotes-list" class="archive-quotes-list"></div>
|
||
</aside>
|
||
<main class="archive-main-panel">
|
||
<section class="archive-overview-panel">
|
||
<div class="archive-panel-head">
|
||
<h2>数据总览</h2>
|
||
</div>
|
||
<div id="archive-stats" class="archive-stats-bar"></div>
|
||
</section>
|
||
<details id="archive-chart-section" class="archive-acc-section archive-chart-section archive-panel-desktop">
|
||
<summary class="archive-acc-summary">K 线图表 <span id="archive-chart-title" class="archive-acc-sub">—</span></summary>
|
||
<div class="archive-chart-toolbar toolbar">
|
||
<div class="archive-tf-tabs" id="archive-tf-tabs" role="tablist">
|
||
<button type="button" class="archive-tf-btn" data-tf="5m">5m</button>
|
||
<button type="button" class="archive-tf-btn is-active" data-tf="15m">15m</button>
|
||
<button type="button" class="archive-tf-btn" data-tf="1h">1h</button>
|
||
<button type="button" class="archive-tf-btn" data-tf="4h">4h</button>
|
||
</div>
|
||
<label class="archive-field">
|
||
<span>视窗</span>
|
||
<select id="archive-view-mode">
|
||
<option value="hold">持仓过程(锚平仓)</option>
|
||
<option value="entry">进场决策(锚开仓)</option>
|
||
</select>
|
||
</label>
|
||
<label class="archive-field">
|
||
<span>跳转时间</span>
|
||
<input id="archive-jump-at" type="text" placeholder="2026-06-07 14:30" autocomplete="off" />
|
||
</label>
|
||
<button type="button" id="archive-btn-jump" class="ghost">跳转</button>
|
||
<button type="button" id="archive-btn-reload-chart" class="primary">重载图表</button>
|
||
</div>
|
||
<div class="archive-chart-wrap">
|
||
<div id="archive-chart" class="archive-chart-host"></div>
|
||
<button type="button" id="archive-mark-auto" class="archive-mark-auto is-on" title="开启:该币种全部交易均标注开/平;关闭:仅当前选中一笔">自动</button>
|
||
</div>
|
||
</details>
|
||
<details id="archive-trades-section" class="archive-acc-section archive-trades-section archive-panel-desktop" open>
|
||
<summary class="archive-acc-summary">交易记录</summary>
|
||
<div id="archive-trades" class="archive-trades"></div>
|
||
</details>
|
||
</main>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="page-dashboard" class="page hidden">
|
||
<div class="dash-bg-grid" aria-hidden="true"></div>
|
||
<div class="dash-wrap">
|
||
<div class="dash-head">
|
||
<div>
|
||
<h1><span class="dash-head-tag">DASH</span>数据看板</h1>
|
||
<p class="page-desc">四户当日总览 · 分户明细 · 平仓流水 · SSE 推送更新</p>
|
||
</div>
|
||
<div class="dash-head-meta">
|
||
<div><span class="dash-pulse-dot" aria-hidden="true"></span><strong>LIVE</strong> · 交易日 <span id="dash-trading-day">—</span></div>
|
||
<div>更新 <span id="dash-updated-at">—</span></div>
|
||
<button type="button" id="dash-btn-refresh" class="ghost" style="margin-top:8px">立即刷新</button>
|
||
</div>
|
||
</div>
|
||
<div id="dash-alert-banner" class="dash-alert-banner" role="alert">
|
||
<strong>⚠ 风险预警</strong>
|
||
<span id="dash-alert-banner-text"></span>
|
||
</div>
|
||
<div id="dash-kpi-row" class="dash-kpi-row"></div>
|
||
<section class="dash-section">
|
||
<div class="dash-section-head">分户明细 · ACCOUNTS</div>
|
||
<div class="dash-section-body"><div id="dash-accounts" class="dash-ac-grid"></div></div>
|
||
</section>
|
||
<section class="dash-section">
|
||
<div class="dash-section-head">平仓明细 · CLOSED TRADES</div>
|
||
<div class="dash-section-body" id="dash-trades-body"></div>
|
||
</section>
|
||
<p id="dash-status" class="dash-status"></p>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="instance-frame-shell" class="instance-frame-shell hidden" aria-hidden="true">
|
||
<div class="instance-frame-toolbar">
|
||
<button type="button" id="instance-frame-back" class="ghost">← 返回监控</button>
|
||
<span id="instance-frame-title" class="instance-frame-title"></span>
|
||
<div class="instance-frame-actions">
|
||
<button type="button" id="instance-frame-refresh" class="ghost">刷新</button>
|
||
<button type="button" id="instance-frame-newtab" class="ghost">新标签打开</button>
|
||
</div>
|
||
</div>
|
||
<iframe id="instance-frame" class="instance-frame" title="交易所实例"></iframe>
|
||
</div>
|
||
|
||
<div id="exchange-fullscreen" class="exchange-fullscreen hidden" aria-hidden="true">
|
||
<button type="button" id="exchange-fullscreen-backdrop" class="exchange-fullscreen-backdrop" aria-label="关闭全屏"></button>
|
||
<div class="exchange-fullscreen-panel">
|
||
<div id="exchange-fullscreen-inner"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="page-funds" class="page hidden">
|
||
<div class="funds-stage">
|
||
<div class="funds-stage-grid" aria-hidden="true"></div>
|
||
<div class="funds-stage-glow" aria-hidden="true"></div>
|
||
<div class="funds-stage-inner">
|
||
<div class="page-head funds-head">
|
||
<div class="funds-head-main">
|
||
<h1><span class="head-tag funds-tag">CAP</span> 资金概况</h1>
|
||
<details class="funds-desc-fold">
|
||
<summary class="funds-desc-toggle">统计说明</summary>
|
||
<p id="funds-desc-body" class="page-desc funds-desc">加载配置中…</p>
|
||
</details>
|
||
</div>
|
||
<div class="funds-live-pill" aria-hidden="true">
|
||
<span class="funds-live-dot"></span>
|
||
<span>EQUITY FEED</span>
|
||
</div>
|
||
</div>
|
||
<div class="funds-toolbar toolbar">
|
||
<button type="button" id="funds-btn-refresh" class="primary funds-btn-refresh">同步快照</button>
|
||
<span id="funds-status" class="toolbar-meta funds-status"></span>
|
||
</div>
|
||
<section class="funds-summary">
|
||
<div class="funds-stat-card funds-stat-card-primary">
|
||
<div class="funds-stat-label">总资金 · TOTAL</div>
|
||
<div id="funds-total-usdt" class="funds-stat-value">—</div>
|
||
</div>
|
||
<div class="funds-stat-card">
|
||
<div class="funds-stat-label">较昨日 · Δ24H</div>
|
||
<div id="funds-total-delta" class="funds-stat-val">—</div>
|
||
</div>
|
||
<div class="funds-stat-card">
|
||
<div class="funds-stat-label">最大回撤 · MDD</div>
|
||
<div class="funds-stat-value"><span id="funds-total-dd-u">—</span> <small id="funds-total-dd-pct" class="funds-dd-pct">—</small></div>
|
||
</div>
|
||
</section>
|
||
<p id="funds-meta" class="funds-meta"></p>
|
||
<div class="funds-chart-panel">
|
||
<div class="funds-chart-head">
|
||
<span class="funds-chart-tag">EQUITY CURVE</span>
|
||
<span id="funds-chart-sub" class="funds-chart-sub">— TRADING DAYS</span>
|
||
</div>
|
||
<div id="funds-chart-total" class="funds-chart-host"></div>
|
||
</div>
|
||
<div class="funds-section-head">
|
||
<h2 class="funds-section-title"><span class="funds-section-mark">//</span> 分户资金</h2>
|
||
<p class="funds-section-hint">点击卡片放大查看资金曲线与回撤</p>
|
||
</div>
|
||
<div id="funds-accounts" class="funds-accounts"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="funds-fullscreen" class="funds-fullscreen hidden" aria-hidden="true">
|
||
<button type="button" id="funds-fs-backdrop" class="funds-fs-backdrop" aria-label="关闭全屏"></button>
|
||
<div class="funds-fs-panel">
|
||
<div class="funds-fs-head">
|
||
<div>
|
||
<h2 id="funds-fs-title" class="funds-fs-title">—</h2>
|
||
<p id="funds-fs-sub" class="funds-fs-sub"></p>
|
||
</div>
|
||
<button type="button" id="funds-fs-close" class="ghost">关闭</button>
|
||
</div>
|
||
<section class="funds-fs-summary">
|
||
<div class="funds-fs-stat"><span class="k">总资金</span><span id="funds-fs-total" class="v">—</span></div>
|
||
<div class="funds-fs-stat"><span class="k">资金户</span><span id="funds-fs-funding" class="v">—</span></div>
|
||
<div class="funds-fs-stat"><span class="k">交易户</span><span id="funds-fs-trading" class="v">—</span></div>
|
||
<div class="funds-fs-stat"><span class="k">较昨日</span><span id="funds-fs-delta" class="v">—</span></div>
|
||
<div class="funds-fs-stat"><span class="k">最大回撤</span><span id="funds-fs-dd" class="v">—</span></div>
|
||
</section>
|
||
<div id="funds-fs-chart" class="funds-fs-chart-host"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="page-ai" class="page hidden">
|
||
<div class="page-head">
|
||
<h1><span class="head-tag">AI</span> 教练</h1>
|
||
<p class="page-desc">交易教练 / 普通聊天 · 右侧可回看历史会话</p>
|
||
</div>
|
||
<div class="ai-mobile-tabs" role="tablist" aria-label="AI 教练视图">
|
||
<button type="button" class="ai-mobile-tab is-active" data-ai-tab="trading" role="tab" aria-selected="true">交易教练</button>
|
||
<button type="button" class="ai-mobile-tab" data-ai-tab="general" role="tab" aria-selected="false">普通聊天</button>
|
||
<button type="button" class="ai-mobile-tab" data-ai-tab="history" role="tab" aria-selected="false">历史</button>
|
||
<button type="button" class="ai-mobile-tab ai-mobile-tab-action" data-ai-tab="new" role="tab" aria-selected="false" title="新开对话">新开</button>
|
||
</div>
|
||
<div class="ai-layout" data-ai-mobile-tab="trading">
|
||
<section class="ai-panel ai-chat-panel" data-ai-panel="chat">
|
||
<div class="ai-chat-topbar">
|
||
<div class="ai-bot-bar" role="tablist" aria-label="聊天机器人">
|
||
<button type="button" class="ai-bot-tab is-active" data-bot="trading" role="tab" aria-selected="true">交易教练</button>
|
||
<button type="button" class="ai-bot-tab" data-bot="general" role="tab" aria-selected="false">普通聊天</button>
|
||
</div>
|
||
<button type="button" id="btn-ai-chat-new" class="primary ai-chat-new-btn">新开对话</button>
|
||
</div>
|
||
<div class="ai-chat-split">
|
||
<div class="ai-chat-main">
|
||
<div class="ai-panel-head ai-chat-session-head">
|
||
<h2 id="ai-chat-title">聊天</h2>
|
||
</div>
|
||
<div id="ai-chat-messages" class="ai-panel-scroll ai-chat-messages" aria-live="polite"></div>
|
||
<form id="ai-chat-form" class="ai-chat-form">
|
||
<div class="ai-chat-compose">
|
||
<textarea id="ai-chat-input" rows="2" placeholder="聊聊行情、心态、纪律、执行…" autocomplete="off"></textarea>
|
||
<div class="ai-chat-compose-actions">
|
||
<label class="ai-chat-upload-btn" title="上传图片或 txt/md/json 文档">
|
||
<input type="file" id="ai-chat-files" accept="image/*,.txt,.md,.markdown,.json" multiple hidden />
|
||
附件
|
||
</label>
|
||
<span id="ai-chat-files-label" class="ai-chat-files-label"></span>
|
||
<button type="submit" id="btn-ai-chat-send" class="primary">发送</button>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
<aside class="ai-chat-history-panel" aria-label="聊天历史">
|
||
<div class="ai-chat-history-head">
|
||
<h3>聊天历史</h3>
|
||
</div>
|
||
<div id="ai-chat-history-list" class="ai-panel-scroll ai-chat-history-list" role="list"></div>
|
||
</aside>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="page-settings" class="page hidden">
|
||
<div class="page-head">
|
||
<h1><span class="head-tag">CFG</span> 系统设置</h1>
|
||
<p class="page-desc">交易所地址、启用状态与监控能力</p>
|
||
</div>
|
||
<details class="hint-box">
|
||
<summary>配置说明</summary>
|
||
<div class="hint-body">
|
||
保存后写入 <code>hub_settings.json</code>。Flask / Agent 填本机地址即可;复盘链接可留空(由 Flask 地址自动生成)。<br />
|
||
<code>HUB_DISABLED_IDS</code> 可强制关闭账户;<code>HUB_BRIDGE_TOKEN</code> 与实例一致,或实例 <code>APP_AUTH_DISABLED=true</code>。<br />
|
||
公网反代请在 hub <code>.env</code> 设置 <code>HUB_USERNAME</code> 与 <code>HUB_PASSWORD</code>;HTTPS 反代建议 <code>HUB_COOKIE_SECURE=true</code>。
|
||
</div>
|
||
</details>
|
||
<p id="settings-meta-line" class="settings-meta-line"></p>
|
||
<div class="settings-display-panel card">
|
||
<h3 class="settings-display-title">显示与导航</h3>
|
||
<label class="chk-label settings-display-chk">
|
||
<input type="checkbox" id="pref-show-account-pnl" checked />
|
||
监控区显示资金账户、交易账户与浮动盈亏
|
||
</label>
|
||
<label class="chk-label settings-display-chk">
|
||
<input type="checkbox" id="pref-show-nav-funds" checked />
|
||
顶栏显示「资金概况」
|
||
</label>
|
||
<label class="chk-label settings-display-chk">
|
||
<input type="checkbox" id="pref-show-nav-dashboard" checked />
|
||
顶栏显示「数据看板」
|
||
</label>
|
||
<p class="settings-display-hint">保存至 hub_settings.json,换浏览器同样生效。关闭导航后对应页面将不可从顶栏进入。</p>
|
||
</div>
|
||
<div class="toolbar">
|
||
<button type="button" id="btn-settings-save" class="primary">保存设置</button>
|
||
<button type="button" id="btn-settings-add">添加交易所</button>
|
||
<button type="button" id="btn-settings-reload">重新加载</button>
|
||
</div>
|
||
<div id="settings-list" class="settings-grid-wrap"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="tpsl-modal" class="modal hidden" aria-hidden="true">
|
||
<div class="modal-backdrop" id="tpsl-modal-backdrop"></div>
|
||
<div class="modal-panel" role="dialog" aria-labelledby="tpsl-modal-title">
|
||
<h3 id="tpsl-modal-title">挂止盈 / 止损</h3>
|
||
<p id="tpsl-modal-meta" class="modal-meta"></p>
|
||
<div class="modal-field">
|
||
<label for="tpsl-sl">止损价</label>
|
||
<input id="tpsl-sl" type="number" step="any" autocomplete="off" />
|
||
</div>
|
||
<div class="modal-field">
|
||
<label for="tpsl-tp">止盈价</label>
|
||
<input id="tpsl-tp" type="number" step="any" autocomplete="off" />
|
||
</div>
|
||
<p class="modal-hint">先撤销该合约全部条件单,再挂新止盈与止损(四所统一)。</p>
|
||
<div class="modal-actions">
|
||
<button type="button" id="tpsl-cancel" class="ghost">取消</button>
|
||
<button type="button" id="tpsl-submit" class="primary">确认挂单</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="toast"></div>
|
||
<script src="https://unpkg.com/lightweight-charts@4.2.0/dist/lightweight-charts.standalone.production.js"></script>
|
||
<script src="/assets/chart_draw.js?v=20260609-market-day-split"></script>
|
||
<script src="/assets/chart.js?v=20260609-prev-day-lines"></script>
|
||
<script src="/assets/archive.js?v=20260612-archive-ai-chat"></script>
|
||
<script src="/assets/funds.js?v=20260609-hub-funds-fold"></script>
|
||
<script src="/assets/dashboard.js?v=20260612-dash-monitor-count"></script>
|
||
<script src="/assets/ai_review_render.js?v=3"></script>
|
||
<script src="/assets/time_close_ui.js?v=2"></script>
|
||
<script src="/assets/app.js?v=20260613-host-status-tone"></script>
|
||
</body>
|
||
</html>
|