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); +}