diff --git a/static/style.css b/static/style.css index 8149276..84301de 100644 --- a/static/style.css +++ b/static/style.css @@ -1318,6 +1318,16 @@ optgroup { border-radius: var(--radius-lg); } +.viewer-section-hero { + border-color: var(--primary-200); + box-shadow: var(--shadow-md); +} + +.viewer-frame-hero { + height: 680px; + background: var(--bg-secondary); +} + /* ================================ 结果网格 ================================ */ @@ -1381,6 +1391,12 @@ optgroup { border-top: 1px solid var(--border-light); } +.mechanism-actions { + margin-top: var(--space-4); + display: flex; + justify-content: flex-end; +} + .mechanism-note-list { margin: 0; padding-left: 1.1rem; @@ -1428,6 +1444,10 @@ optgroup { color: var(--primary-700); } +.mechanism-modal { + max-width: 860px; +} + .single-scheme-grid { grid-template-columns: 1fr !important; } @@ -2962,6 +2982,10 @@ select.form-input { .advanced-param-grid { grid-template-columns: 1fr; } + + .viewer-frame-hero { + height: 520px; + } } /* ================================ diff --git a/static/vue-app.js b/static/vue-app.js index 726d294..27c32d4 100644 --- a/static/vue-app.js +++ b/static/vue-app.js @@ -1425,6 +1425,7 @@ const ResultView = { error: '', selectedSchemeId: null, previewStatus: 'idle', + activeMechanismDetail: null, camLoading: false, camError: '', camPlan: null, @@ -1547,10 +1548,10 @@ const ResultView = { }); const resultAnchorLinks = [ { id: 'candidate-schemes', label: '方案' }, + { id: 'preview-3d', label: '预览' }, { id: 'engineering-summary', label: '工程摘要' }, { id: 'side-actions', label: '抽芯建议' }, { id: 'dfm-check', label: 'DFM' }, - { id: 'preview-3d', label: '预览' }, { id: 'export-cam', label: '导出/CAM' }, { id: 'analysis-details', label: '分析详情' }, { id: 'diagnostic-info', label: '诊断' } @@ -1621,6 +1622,21 @@ const ResultView = { const keys = Object.keys(size); return keys.map(key => `${key}:${Number(size[key]).toFixed(1)} mm`).join(' / '); }; + const formatMechanismType = (type) => { + if (type === 'slider') return '滑块抽芯'; + if (type === 'lifter') return '斜顶抽芯'; + return type || '机构'; + }; + const openMechanismDetail = (type, index, item) => { + state.activeMechanismDetail = { + type, + index, + item, + }; + }; + const closeMechanismDetail = () => { + state.activeMechanismDetail = null; + }; const exportCAD = async (format) => { try { @@ -1728,6 +1744,9 @@ const ResultView = { formatTiming, formatVector, formatMechanismSize, + formatMechanismType, + openMechanismDetail, + closeMechanismDetail, primaryRecommendation, sortedRecommendations, selectedDfmCount, @@ -1907,6 +1926,35 @@ const ResultView = { + +
+
+

3D 预览

+ 重点区域 +
+
+
预览加载失败
+
HTML 已生成但加载异常,请检查该链接是否可访问:{{ selectedHtmlFile }}
+
+ +
+ +
+
+

3D 预览

+ 未生成 +
+
+
预览未生成
+
当前任务没有返回 HTML 预览链接,属于未生成状态。
+
+

候选分模方案

@@ -2144,28 +2192,9 @@ const ResultView = { 驱动方式 {{ item.actuation || 'N/A' }}
-
- 导滑方式 - {{ item.guide_type || 'N/A' }} -
-
- 锁紧方式 - {{ item.locking_mechanism || 'N/A' }} -
-
- 机构尺寸 - {{ formatMechanismSize(item.block_size) }} -
-
- 机构位置 - {{ formatVector(item.location) }} -
-
-
注意事项
- +
+
@@ -2193,20 +2222,9 @@ const ResultView = { 导向方式 {{ item.guide_type || 'N/A' }} -
- 机构尺寸 - {{ formatMechanismSize(item.block_size) }} -
-
- 机构位置 - {{ formatVector(item.location) }} -
-
-
注意事项
- +
+
@@ -2249,29 +2267,6 @@ const ResultView = { -
-

3D 预览

-
-
预览加载失败
-
HTML 已生成但加载异常,请检查该链接是否可访问:{{ selectedHtmlFile }}
-
- -
- -
-

3D 预览

-
-
预览未生成
-
当前任务没有返回 HTML 预览链接,属于未生成状态。
-
-
-

导出与 CAM

@@ -2563,6 +2558,79 @@ const ResultView = {
+ + `