diff --git a/frontend/src/views/live/Monitor.vue b/frontend/src/views/live/Monitor.vue index 3f61b6e..9cb2cf5 100644 --- a/frontend/src/views/live/Monitor.vue +++ b/frontend/src/views/live/Monitor.vue @@ -81,6 +81,18 @@ function pct(v: number | null): string { return (v * 100).toFixed(2) + '%' } +/** 价格/成本统一 2 位小数(原始浮点透出会 14.6 / 23.577 混杂) */ +function fmtPrice(v: number | null | undefined): string { + if (v == null || !Number.isFinite(v)) return '—' + return v.toFixed(2) +} + +/** 成交时间:兼容 'YYYY-MM-DD HH:MM:SS'(组合实盘) 与 ISO 'T'(supervisor) 两种落库格式 */ +function fmtTradeTime(v: string | null | undefined): string { + if (!v) return '—' + return String(v).replace('T', ' ').slice(0, 19) +} + async function load(): Promise { try { const [acc, st, bal, pos, tr] = await Promise.all([ @@ -240,14 +252,20 @@ async function onStop(): Promise { - - - - - + + + - - + + + + + + + + + + @@ -257,19 +275,25 @@ async function onStop(): Promise { - - - - + + + + + + - - - + + + + + + + @@ -277,19 +301,25 @@ async function onStop(): Promise { - - - - + + + + + + - - - + + + + + + + @@ -331,34 +361,40 @@ async function onStop(): Promise {
实例分解
- - - + + + - + - + - + - +
账户持仓(QMT 全账户)
- - - - - + + + + + + + + + + +