From 390f3e62e1e5ff27b26d0914acd78862b030e632 Mon Sep 17 00:00:00 2001 From: chenjw28 <792430652@qq.com> Date: Thu, 14 May 2026 18:09:12 +0800 Subject: [PATCH] x --- static/style.css | 76 +++++++++++++++++++ static/vue-app.js | 185 +++++++++++++++++++++++++++------------------- 2 files changed, 183 insertions(+), 78 deletions(-) diff --git a/static/style.css b/static/style.css index 8ef0e5c..963f955 100644 --- a/static/style.css +++ b/static/style.css @@ -828,6 +828,51 @@ optgroup { padding: 0 var(--space-4) var(--space-4); } +.advanced-param-grid { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: var(--space-4); + margin-top: var(--space-4); +} + +.param-input-card { + background: var(--bg-secondary); + border: 1px solid var(--border-light); + border-radius: var(--radius-lg); + padding: var(--space-4); +} + +.param-input-row { + display: flex; + align-items: center; + gap: var(--space-3); +} + +.param-number-input { + flex: 1; +} + +.param-unit { + min-width: 2.5rem; + font-size: var(--text-sm); + color: var(--text-secondary); + font-weight: var(--font-semibold); +} + +.param-meta-row { + display: flex; + gap: var(--space-3); + flex-wrap: wrap; + margin-top: var(--space-2); +} + +.param-hint { + margin-top: var(--space-2); + font-size: var(--text-xs); + color: var(--text-tertiary); + line-height: 1.6; +} + .upload-submit-btn { width: 100%; margin-top: var(--space-4); @@ -1311,6 +1356,33 @@ optgroup { margin-bottom: var(--space-6); } +.result-anchor-nav { + display: flex; + gap: var(--space-2); + flex-wrap: wrap; + margin-bottom: var(--space-5); +} + +.anchor-pill { + display: inline-flex; + align-items: center; + padding: var(--space-2) var(--space-4); + border-radius: var(--radius-full); + background: var(--bg-primary); + border: 1px solid var(--border-default); + color: var(--text-secondary); + font-size: var(--text-sm); + font-weight: var(--font-medium); + text-decoration: none; + transition: all var(--duration-fast) var(--ease-default); +} + +.anchor-pill:hover { + background: var(--primary-50); + border-color: var(--primary-200); + color: var(--primary-700); +} + .single-scheme-grid { grid-template-columns: 1fr !important; } @@ -2841,6 +2913,10 @@ select.form-input { .upload-layout { grid-template-columns: 1fr; } + + .advanced-param-grid { + grid-template-columns: 1fr; + } } /* ================================ diff --git a/static/vue-app.js b/static/vue-app.js index 33ace19..6909396 100644 --- a/static/vue-app.js +++ b/static/vue-app.js @@ -1156,6 +1156,49 @@ const MoldInsightView = { loadHistory(); }); + const moldParamFields = [ + { + key: 'draftAngle', + label: '拔模角', + unit: '°', + min: 1, + max: 10, + step: 0.5, + defaultValue: 2.0, + hint: '常规注塑件建议从 1.5° 到 3° 起步' + }, + { + key: 'shrinkageRate', + label: '收缩率', + unit: '%', + min: 0.5, + max: 3.0, + step: 0.1, + defaultValue: 0.5, + hint: '按材料牌号校核,默认值用于首轮方案评估' + }, + { + key: 'partingPrecision', + label: '分型精度', + unit: 'mm', + min: 0.01, + max: 1.0, + step: 0.01, + defaultValue: 0.1, + hint: '用于控制分型面拟合与边界容差' + }, + { + key: 'cavityMatch', + label: '型腔匹配度', + unit: '%', + min: 80, + max: 100, + step: 1, + defaultValue: 95, + hint: '数值越高越偏向紧配合与严格封合' + } + ]; + return { state, handleFileChange, @@ -1164,6 +1207,7 @@ const MoldInsightView = { formatFileSize, formatDateTime, formatNumber, + moldParamFields, toggleFileHistory, viewResult }; @@ -1248,31 +1292,25 @@ const MoldInsightView = { 高级工艺参数
默认值适用于多数注塑件;仅在已知工艺约束时再调整。
-
-
- - - {{ state.moldParams.draftAngle }}° -
- -
- - - {{ state.moldParams.shrinkageRate }}% -
-
- -
-
- - - {{ state.moldParams.partingPrecision }} mm -
- -
- - - {{ state.moldParams.cavityMatch }}% +
+
+ +
+ + {{ field.unit }} +
+
+ 默认 {{ field.defaultValue }}{{ field.unit }} + 范围 {{ field.min }} - {{ field.max }}{{ field.unit }} +
+
{{ field.hint }}
@@ -1497,6 +1535,15 @@ const ResultView = { if (selectedDfmCount.value >= 2) return '中风险'; return '低风险'; }); + const resultAnchorLinks = [ + { id: 'candidate-schemes', label: '方案' }, + { id: 'engineering-summary', label: '工程摘要' }, + { id: 'dfm-check', label: 'DFM' }, + { id: 'preview-3d', label: '预览' }, + { id: 'export-cam', label: '导出/CAM' }, + { id: 'analysis-details', label: '分析详情' }, + { id: 'diagnostic-info', label: '诊断' } + ]; const selectScheme = (schemeId) => { state.selectedSchemeId = schemeId; @@ -1659,6 +1706,7 @@ const ResultView = { selectedDfmCount, selectedCavityCount, selectedRiskLabel, + resultAnchorLinks, formatFileSize, formatDateTime, formatNumber, @@ -1697,6 +1745,17 @@ const ResultView = {
+
+ + {{ anchor.label }} + +
+
@@ -1822,7 +1881,7 @@ const ResultView = {
-
+

候选分模方案

先切换并确认推荐方案,再进入后续工程判断、导出与 CAM。
@@ -1938,7 +1997,7 @@ const ResultView = {
-
+

工程摘要

@@ -2003,7 +2062,7 @@ const ResultView = {
-
+

DFM 检查

未发现显著 DFM 违规项
@@ -2029,7 +2088,7 @@ const ResultView = {
-
+

3D 预览

预览加载失败
@@ -2044,7 +2103,7 @@ const ResultView = { >
-
+

3D 预览

预览未生成
@@ -2052,7 +2111,7 @@ const ResultView = {
-
+

导出与 CAM

CAM 参数

@@ -2165,7 +2224,7 @@ const ResultView = {
-
+

分析结果详情

@@ -2179,7 +2238,7 @@ const ResultView = {
-

1. 产品特征识别

+

几何与特征摘要

整体轮廓和尺寸比例 @@ -2219,7 +2278,7 @@ const ResultView = {
-

2. 注塑模设计决策

+

工程建议与质量指标

高优先级工艺建议 @@ -2245,50 +2304,9 @@ const ResultView = { 分型面选择 基于产品几何:自动推荐最优分型面
- - -
-
详细设计建议
-
-
- {{ getPriorityText(rec.priority) }} - {{ rec.description }} - ({{ rec.reason }}) -
-
-
-
-
- -
-

3. 模具工程决策

-
-
- 型腔数量建议 - {{ selectedCavityData?.mold_cavities ? Object.keys(selectedCavityData.mold_cavities).length : 1 }} 腔 -
-
+
模架尺寸 - {{ selectedCavityData?.manufacturing_info?.estimated_mold_size ? - (selectedCavityData.manufacturing_info.estimated_mold_size.length || 0) + ' × ' + - (selectedCavityData.manufacturing_info.estimated_mold_size.width || 0) + ' × ' + - (selectedCavityData.manufacturing_info.estimated_mold_size.height || 0) + ' mm' : '基于泡沫外形自动计算' }} -
-
- 预估锁模力 - {{ selectedCavityData?.manufacturing_info?.estimated_clamping_force || '自动计算' }} -
-
- 顶出系统 - 顶针顶出(自动布局) -
-
- 冷却水路设计 - {{ state.task.analysis_result.geometry_data?.volume > 1000000 ? '需要冷却水路' : '自然冷却' }} -
-
- 材料选择 - {{ state.task.analysis_result.quality_metrics?.volume ? '根据产量和精度自动推荐' : '7075 铝合金' }} + {{ (selectedCavityData.manufacturing_info.estimated_mold_size.length || 0) + ' × ' + (selectedCavityData.manufacturing_info.estimated_mold_size.width || 0) + ' × ' + (selectedCavityData.manufacturing_info.estimated_mold_size.height || 0) + ' mm' }}
体积利用率 @@ -2310,12 +2328,23 @@ const ResultView = { 潜在焊缝线 {{ selectedKeyInfo.quality_considerations.potential_weld_lines || 0 }} 条
+ +
+
详细设计建议
+
+
+ {{ getPriorityText(rec.priority) }} + {{ rec.description }} + ({{ rec.reason }}) +
+
+
-
+
诊断信息