修改页面布局样式
This commit is contained in:
parent
df0f1dbec5
commit
7b7eef674d
|
|
@ -101,6 +101,11 @@ pre.json{background:var(--surface-2);border:1px solid var(--hair);border-radius:
|
||||||
.el-tabs__item.is-active{color:var(--ink);}
|
.el-tabs__item.is-active{color:var(--ink);}
|
||||||
.el-tabs__active-bar{background:var(--accent);}
|
.el-tabs__active-bar{background:var(--accent);}
|
||||||
.el-tabs__nav-wrap::after{background:var(--hair);height:1px;}
|
.el-tabs__nav-wrap::after{background:var(--hair);height:1px;}
|
||||||
|
.pos-exp{display:grid;grid-template-columns:minmax(0,540px) minmax(0,1fr);gap:26px;padding:10px 16px 12px;}
|
||||||
|
.pos-exp .exp-h{font-size:13px;font-weight:600;color:var(--ink-2);margin-bottom:8px;}
|
||||||
|
.exp-led{padding:5px 0;border-bottom:1px solid var(--hair);font-size:12.5px;line-height:1.5;}
|
||||||
|
.exp-led:last-child{border-bottom:none;}
|
||||||
|
@media(max-width:900px){.pos-exp{grid-template-columns:1fr;gap:14px;}}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
@ -206,25 +211,28 @@ pre.json{background:var(--surface-2);border:1px solid var(--hair);border-radius:
|
||||||
<el-table :data="heldPositions" size="small" border max-height="460" @expand-change="onPosExpand">
|
<el-table :data="heldPositions" size="small" border max-height="460" @expand-change="onPosExpand">
|
||||||
<el-table-column type="expand">
|
<el-table-column type="expand">
|
||||||
<template #default="s">
|
<template #default="s">
|
||||||
<div style="padding:6px 16px">
|
<div class="pos-exp">
|
||||||
<div class="muted" style="margin-bottom:6px">持仓批次 + 账本(展开即载入,无需再点按钮)</div>
|
<div>
|
||||||
<el-table v-if="lotsOf===s.row.ts_code && lots.length" :data="lots" size="small" border>
|
<div class="exp-h">持仓批次</div>
|
||||||
<el-table-column label="批次" width="100"><template #default="l">{{ tx('lot', l.row.lot_type) }}</template></el-table-column>
|
<el-table v-if="lotsOf===s.row.ts_code && lots.length" :data="lots" size="small">
|
||||||
<el-table-column prop="qty" label="剩余" width="80"></el-table-column>
|
<el-table-column label="批次" min-width="84"><template #default="l">{{ tx('lot', l.row.lot_type) }}</template></el-table-column>
|
||||||
<el-table-column prop="open_price" label="开仓价" width="90"></el-table-column>
|
<el-table-column prop="qty" label="剩余" width="72" align="right"></el-table-column>
|
||||||
<el-table-column prop="open_date" label="开仓日" width="110"></el-table-column>
|
<el-table-column prop="open_price" label="开仓价" width="80" align="right"></el-table-column>
|
||||||
<el-table-column prop="realized_pnl" label="已实现" width="90"></el-table-column>
|
<el-table-column prop="open_date" label="开仓日" width="104"></el-table-column>
|
||||||
|
<el-table-column prop="realized_pnl" label="已实现" width="84" align="right"></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="muted" v-else-if="lotsOf===s.row.ts_code" style="padding:2px 0">无持仓批次</div>
|
<div class="muted" v-else-if="lotsOf===s.row.ts_code" style="padding:4px 0">无持仓批次</div>
|
||||||
<div class="muted" v-else style="padding:2px 0">载入中…</div>
|
<div class="muted" v-else style="padding:4px 0">载入中…</div>
|
||||||
<div style="border-top:1px solid #333;margin:8px 0 4px"></div>
|
</div>
|
||||||
<div class="muted" style="margin-bottom:2px">该股账本</div>
|
<div>
|
||||||
<div class="muted" v-if="!ledger.filter(x=>x.ts_code===s.row.ts_code).length">今日暂无记录</div>
|
<div class="exp-h">该股账本</div>
|
||||||
<div v-for="(l,i) in ledger.filter(x=>x.ts_code===s.row.ts_code)" :key="i" style="padding:2px 0">
|
<div class="muted" v-if="!ledger.filter(x=>x.ts_code===s.row.ts_code).length" style="padding:4px 0">今日暂无记录</div>
|
||||||
<span class="muted">{{ (l.decided_at||'').slice(5,16) }}</span>
|
<div v-for="(l,i) in ledger.filter(x=>x.ts_code===s.row.ts_code)" :key="i" class="exp-led">
|
||||||
|
<span class="muted mono">{{ (l.decided_at||'').slice(5,16) }}</span>
|
||||||
{{ tx('arbiter', l.arbiter) }}{{ tx('verdict', l.verdict) }} {{ tx('action', l.action) }}<span v-if="l.reason" class="muted"> — {{ l.reason }}</span>
|
{{ tx('arbiter', l.arbiter) }}{{ tx('verdict', l.verdict) }} {{ tx('action', l.action) }}<span v-if="l.reason" class="muted"> — {{ l.reason }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="股票" width="150">
|
<el-table-column label="股票" width="150">
|
||||||
|
|
@ -248,7 +256,7 @@ pre.json{background:var(--surface-2);border:1px solid var(--hair);border-radius:
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" width="120">
|
<el-table-column label="状态" width="120">
|
||||||
<template #default="s">{{ tx('posStatus', s.row.status) }}
|
<template #default="s">{{ tx('posStatus', s.row.status) }}
|
||||||
<div v-if="s.row.frozen_reason && s.row.frozen_reason!=='NONE'" style="color:#f56c6c">{{ tx('frozen', s.row.frozen_reason) }}</div></template>
|
<div v-if="s.row.frozen_reason && s.row.frozen_reason!=='NONE'" style="color:var(--warn)">{{ tx('frozen', s.row.frozen_reason) }}</div></template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="下一步" min-width="150"><template #default="s"><span class="muted">{{ nextStep(s.row) }}</span></template></el-table-column>
|
<el-table-column label="下一步" min-width="150"><template #default="s"><span class="muted">{{ nextStep(s.row) }}</span></template></el-table-column>
|
||||||
<el-table-column label="操作" width="220">
|
<el-table-column label="操作" width="220">
|
||||||
|
|
@ -350,15 +358,17 @@ pre.json{background:var(--surface-2);border:1px solid var(--hair);border-radius:
|
||||||
</template></el-table-column>
|
</template></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<h3 style="margin-top:14px">操作日志 · 最近 {{ opLog.length }} 条</h3>
|
<h3 style="margin-top:14px;cursor:pointer" @click="showOpLog=!showOpLog">操作日志 · {{ opLog.length }} 条 <span class="muted" style="font-size:12px;font-weight:normal">{{ showOpLog?'▲ 收起':'▼ 展开' }}</span></h3>
|
||||||
|
<template v-if="showOpLog">
|
||||||
<div class="muted" style="margin-bottom:6px">每一次页面写操作都留一行;被仓位 / 盈亏 / T+1 可卖 / 单股上限挡下的,连原因一起记,不静默。</div>
|
<div class="muted" style="margin-bottom:6px">每一次页面写操作都留一行;被仓位 / 盈亏 / T+1 可卖 / 单股上限挡下的,连原因一起记,不静默。</div>
|
||||||
<div class="muted" v-if="!opLog.length">还没有操作记录。</div>
|
<div class="muted" v-if="!opLog.length">还没有操作记录。</div>
|
||||||
<div v-for="(o,i) in opLog" :key="i" style="padding:3px 0;border-bottom:1px solid #262626">
|
<div v-for="(o,i) in opLog" :key="i" class="feed-row">
|
||||||
<span class="muted">{{ (o.at||'').slice(11,16) }}</span>
|
<span class="muted mono">{{ (o.at||'').slice(11,16) }}</span>
|
||||||
<el-tag size="small" :type="o.result==='OK'?'primary':(o.result==='BLOCKED'?'warning':'info')" style="margin:0 6px">{{ o.result }}</el-tag>
|
<el-tag size="small" :type="o.result==='OK'?'primary':(o.result==='BLOCKED'?'warning':'info')" style="margin:0 6px">{{ o.result }}</el-tag>
|
||||||
<b>{{ o.op }}</b><span v-if="o.ts_code" class="muted"> · {{ nm(o.ts_code) }}</span>
|
<b>{{ o.op }}</b><span v-if="o.ts_code" class="muted"> · {{ nm(o.ts_code) }}</span>
|
||||||
<span v-if="o.reason" style="color:#f56c6c"> — {{ o.reason }}</span>
|
<span v-if="o.reason" style="color:var(--warn)"> — {{ o.reason }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 挂交易方案 对话框 (非盲填: 现价/持仓/可卖/浮盈都摆出来) -->
|
<!-- 挂交易方案 对话框 (非盲填: 现价/持仓/可卖/浮盈都摆出来) -->
|
||||||
|
|
@ -488,7 +498,8 @@ pre.json{background:var(--surface-2);border:1px solid var(--hair);border-radius:
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel tblk">
|
<div class="panel tblk">
|
||||||
<h3>设置</h3>
|
<h3 style="cursor:pointer" @click="showSettings=!showSettings">设置 <span class="muted" style="font-size:12px;font-weight:normal">{{ showSettings?'▲ 收起':'▼ 展开' }}</span></h3>
|
||||||
|
<template v-if="showSettings">
|
||||||
<div class="muted" style="margin-bottom:8px">每组先给一句「现在是什么状态」的合成说明,再让你改其中的项。改完点保存即时生效。</div>
|
<div class="muted" style="margin-bottom:8px">每组先给一句「现在是什么状态」的合成说明,再让你改其中的项。改完点保存即时生效。</div>
|
||||||
<div class="set-card">
|
<div class="set-card">
|
||||||
<div class="set-sum">资金与仓位纪律:{{ sumPosition }}</div>
|
<div class="set-sum">资金与仓位纪律:{{ sumPosition }}</div>
|
||||||
|
|
@ -527,15 +538,16 @@ pre.json{background:var(--surface-2);border:1px solid var(--hair);border-radius:
|
||||||
<el-button size="small" @click="loadParams">放弃</el-button>
|
<el-button size="small" @click="loadParams">放弃</el-button>
|
||||||
<span class="muted">关闭补仓=把「补仓上限」设为 0;调低总仓上限可能触发降仓提议。</span>
|
<span class="muted">关闭补仓=把「补仓上限」设为 0;调低总仓上限可能触发降仓提议。</span>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 6) 系统在盯的候选 -->
|
<!-- 6) 系统在盯的候选 -->
|
||||||
<div class="panel tblk">
|
<div class="panel tblk">
|
||||||
<h3>系统在盯的候选 <span class="muted" style="font-weight:400">· 今日选股计划 · 计划日 {{ planStatus.date || '—' }}</span></h3>
|
<h3>系统在盯的候选 <span class="muted" style="font-weight:400">· 今日选股计划 · 计划日 {{ planStatus.date || '—' }}</span></h3>
|
||||||
<div class="sub2">决策系统盯着、可能冒出建仓提议的票。<b style="color:var(--ink-2)">每只都标了今天为什么下单、或为什么没下单。</b></div>
|
<div class="sub2">系统还在盯、可能建仓的票。已下单 / 待你确认 / 被否决的,见上方「今日在办」与「等我拍板」。</div>
|
||||||
<div class="pool-note" v-if="(openScan.notes||[]).length"><span v-for="(n,i) in openScan.notes" :key="i">{{ n }}<span v-if="i < openScan.notes.length-1">;</span></span></div>
|
<div class="pool-note" v-if="(openScan.notes||[]).length"><span v-for="(n,i) in openScan.notes" :key="i">{{ n }}<span v-if="i < openScan.notes.length-1">;</span></span></div>
|
||||||
<div class="muted" v-if="planStatus.ok===false">上游计划暂不可用。</div>
|
<div class="muted" v-if="planStatus.ok===false">上游计划暂不可用。</div>
|
||||||
<el-table v-else :data="planRows.slice(0,20)" size="small" max-height="360" empty-text="暂无">
|
<el-table v-else :data="watchCandidates" size="small" max-height="360" empty-text="今天没有在盯待建的候选(都已处理,见上方)">
|
||||||
<el-table-column label="#" width="52" align="right"><template #default="s"><span class="mono muted">{{ s.row.rank }}</span></template></el-table-column>
|
<el-table-column label="#" width="52" align="right"><template #default="s"><span class="mono muted">{{ s.row.rank }}</span></template></el-table-column>
|
||||||
<el-table-column label="股票" min-width="150"><template #default="s"><b>{{ s.row.name || nm(s.row.ts_code) }}</b> <span class="muted mono">{{ s.row.ts_code }}</span></template></el-table-column>
|
<el-table-column label="股票" min-width="150"><template #default="s"><b>{{ s.row.name || nm(s.row.ts_code) }}</b> <span class="muted mono">{{ s.row.ts_code }}</span></template></el-table-column>
|
||||||
<el-table-column label="主题" width="130"><template #default="s"><span class="tag" v-if="s.row.theme">{{ s.row.theme }}</span><span v-else class="muted">—</span></template></el-table-column>
|
<el-table-column label="主题" width="130"><template #default="s"><span class="tag" v-if="s.row.theme">{{ s.row.theme }}</span><span v-else class="muted">—</span></template></el-table-column>
|
||||||
|
|
@ -1238,6 +1250,8 @@ createApp({
|
||||||
const instructions = ref([]), ledger = ref([]), proposals = ref([]);
|
const instructions = ref([]), ledger = ref([]), proposals = ref([]);
|
||||||
const strategies = ref([]), stratEnabled = ref(false), opLog = ref([]);
|
const strategies = ref([]), stratEnabled = ref(false), opLog = ref([]);
|
||||||
const showLedger = ref(false); // 「今天发生了什么」默认折叠
|
const showLedger = ref(false); // 「今天发生了什么」默认折叠
|
||||||
|
const showOpLog = ref(false); // 操作日志默认折叠
|
||||||
|
const showSettings = ref(false); // 设置默认折叠
|
||||||
const openScan = ref({ by_code: {}, notes: [] });
|
const openScan = ref({ by_code: {}, notes: [] });
|
||||||
const insTab = ref('live');
|
const insTab = ref('live');
|
||||||
const stratDlg = reactive({ visible:false, busy:false, reasons:[], ts_code:'', price:0,
|
const stratDlg = reactive({ visible:false, busy:false, reasons:[], ts_code:'', price:0,
|
||||||
|
|
@ -1417,6 +1431,8 @@ createApp({
|
||||||
const d = dispOf(r.ts_code);
|
const d = dispOf(r.ts_code);
|
||||||
return d.cls === 'deny' ? { ts_code: r.ts_code, name: (r.name || nm(r.ts_code)), why: d.why } : null;
|
return d.cls === 'deny' ? { ts_code: r.ts_code, name: (r.name || nm(r.ts_code)), why: d.why } : null;
|
||||||
}).filter(Boolean));
|
}).filter(Boolean));
|
||||||
|
const watchCandidates = computed(() => (planRows.value || []).filter(r =>
|
||||||
|
['would', 'wait'].includes(dispOf(r.ts_code).cls)).slice(0, 20));
|
||||||
|
|
||||||
const settingKeys = ['PMS_TOTAL_SCALE', 'PMS_PORTFOLIO_CAP', 'PMS_STOCK_CAP',
|
const settingKeys = ['PMS_TOTAL_SCALE', 'PMS_PORTFOLIO_CAP', 'PMS_STOCK_CAP',
|
||||||
'PMS_MAX_NAMES', 'PMS_CASH_RESERVE',
|
'PMS_MAX_NAMES', 'PMS_CASH_RESERVE',
|
||||||
|
|
@ -1901,7 +1917,8 @@ createApp({
|
||||||
strategies, stratEnabled, opLog, stratDlg, stratQty, loadStrategies, loadOpLog,
|
strategies, stratEnabled, opLog, stratDlg, stratQty, loadStrategies, loadOpLog,
|
||||||
openStrategy, validateStrategy, attachStrategy, setStrategyStatus, stratStateText, resumeBuy,
|
openStrategy, validateStrategy, attachStrategy, setStrategyStatus, stratStateText, resumeBuy,
|
||||||
showLedger, onPosExpand,
|
showLedger, onPosExpand,
|
||||||
openScan, insTab, todayYmd, insLive, insDone, insEnd, dispOf, loadOpenScan, denyToday };
|
openScan, insTab, todayYmd, insLive, insDone, insEnd, dispOf, loadOpenScan, denyToday,
|
||||||
|
showOpLog, showSettings, watchCandidates };
|
||||||
}
|
}
|
||||||
}).use(ElementPlus).mount('#app');
|
}).use(ElementPlus).mount('#app');
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue