From bd48887b88912cf619770d40dbf0633e8a676ac1 Mon Sep 17 00:00:00 2001 From: fish Date: Mon, 11 May 2026 21:39:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=86=85=E6=96=B9=E5=90=91=E5=88=86?= =?UTF-8?q?=E6=9E=90=E8=AF=A6=E6=83=85=E6=94=B9=E7=94=A8=E6=8A=BD=E5=B1=89?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E5=B1=95=E7=A4=BA=EF=BC=8C=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E8=A1=8C=E6=9F=A5=E7=9C=8B=E5=AE=8C=E6=95=B4?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=B8=8E=E9=A3=8E=E9=99=A9=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/frontend/src/views/DailyDirectionView.vue | 127 ++++++++++++++++-- 1 file changed, 118 insertions(+), 9 deletions(-) diff --git a/web/frontend/src/views/DailyDirectionView.vue b/web/frontend/src/views/DailyDirectionView.vue index b3b581f..3dad98c 100644 --- a/web/frontend/src/views/DailyDirectionView.vue +++ b/web/frontend/src/views/DailyDirectionView.vue @@ -14,6 +14,8 @@ const loading = ref(false) const running = ref(false) const runStep = ref('') const runResult = ref(null) +const selectedRow = ref(null) +const drawerOpen = ref(false) const symbolNames: Record = { FG: '玻璃', SA: '纯碱', RB: '螺纹钢', MA: '甲醇', CF: '棉花', M: '豆粕', @@ -46,6 +48,12 @@ const runSummary = computed(() => { return parts.join(' | ') }) +const drawerTitle = computed(() => { + if (!selectedRow.value) return '' + const name = symbolNames[selectedRow.value.symbol] ?? selectedRow.value.symbol + return `${name}(${selectedRow.value.symbol}) · ${selectedRow.value.trade_date}` +}) + async function fetchList() { loading.value = true try { @@ -89,6 +97,11 @@ function formatLevels(json: string): string { } } +function openDrawer(row: DailyDirection) { + selectedRow.value = row + drawerOpen.value = true +} + onMounted(fetchList) @@ -101,7 +114,6 @@ onMounted(fetchList) - - - + - + - + - + - - + + + + + + @@ -161,4 +215,59 @@ onMounted(fetchList) margin: 0; font-size: 18px; } + +.drawer-section { + margin-bottom: 20px; +} +.drawer-label { + font-size: 13px; + color: var(--el-text-color-secondary); + margin-bottom: 6px; +} +.drawer-confidence { + margin-left: 12px; + font-size: 16px; + font-weight: bold; +} +.drawer-text { + font-size: 15px; + line-height: 1.8; + white-space: pre-wrap; + color: var(--el-text-color-primary); +} +.drawer-text.risk { + color: var(--el-color-warning); +} +.drawer-levels { + display: flex; + gap: 24px; +} +.level-block { + display: flex; + align-items: center; + gap: 8px; +} +.level-tag { + font-size: 12px; + padding: 2px 8px; + border-radius: 4px; + font-weight: 600; +} +.support .level-tag { + background: #ecf5ff; + color: #409eff; +} +.resistance .level-tag { + background: #fef0f0; + color: #f56c6c; +} +.drawer-section.meta { + margin-top: 24px; + padding-top: 16px; + border-top: 1px solid var(--el-border-color-light); + display: flex; + gap: 24px; + font-size: 13px; + color: var(--el-text-color-secondary); +}