From 1539f54301ca71398d11c1100b978992ef87af73 Mon Sep 17 00:00:00 2001 From: cjw <792430652@qq.com> Date: Mon, 16 Feb 2026 17:10:28 +0800 Subject: [PATCH] deving --- src/api/routes.py | 4 +++- src/models/database.py | 2 ++ static/style.css | 20 +------------------- templates/result.html | 21 +++++++++++++++------ 4 files changed, 21 insertions(+), 26 deletions(-) diff --git a/src/api/routes.py b/src/api/routes.py index 33931c7..dc5715f 100644 --- a/src/api/routes.py +++ b/src/api/routes.py @@ -446,7 +446,9 @@ async def result_page(request: Request, task_id: str, db_session: AsyncSession = "manufacturing_info": { "mold_material": mold_cavity_data.mold_material, "estimated_clamping_force": mold_cavity_data.estimated_clamping_force, - "parting_line_length": mold_cavity_data.parting_line_length + "parting_line_length": mold_cavity_data.parting_line_length, + "estimated_cycle_time": mold_cavity_data.estimated_cycle_time, + "manufacturing_tolerance": mold_cavity_data.manufacturing_tolerance }, "mold_cavities": { "cavity_key_info": { diff --git a/src/models/database.py b/src/models/database.py index e83405a..b527c66 100644 --- a/src/models/database.py +++ b/src/models/database.py @@ -199,6 +199,8 @@ class MoldCavityData(Base): product_volume = Column(Float, nullable=True) wall_thickness_range = Column(String(50), nullable=True) complexity_score = Column(Float, nullable=True) + estimated_cycle_time = Column(String(50), nullable=True) + manufacturing_tolerance = Column(String(50), nullable=True # 质量评估 weld_line_risk = Column(String(50), nullable=True) # 熔接痕风险 diff --git a/static/style.css b/static/style.css index 8eee08d..8716efe 100644 --- a/static/style.css +++ b/static/style.css @@ -173,25 +173,7 @@ body { gap: 12px; } -/* 关键工艺参数三列布局 - 使用最高优先级 */ -.key-info-categories { - display: grid !important; - grid-template-columns: repeat(3, 1fr) !important; - gap: 20px !important; - margin-bottom: 20px !important; - width: 100% !important; -} - -/* 确保所有子元素正确布局 */ -.key-info-categories > .category-section { - display: block !important; -} - -.key-info-categories > .category-section .category-content { - display: flex !important; - flex-direction: column !important; - gap: 12px !important; -} +/* 关键工艺参数布局由result.html内联样式控制 */ .data-grid { display: grid; diff --git a/templates/result.html b/templates/result.html index 2c9b50d..287f7e8 100644 --- a/templates/result.html +++ b/templates/result.html @@ -107,24 +107,33 @@ gap: 10px; } - /* 强制关键工艺参数三列布局 */ + /* 强制关键工艺参数一行显示 - 三列并排 */ .key-info-categories { - display: grid !important; - grid-template-columns: repeat(3, 1fr) !important; + display: flex !important; + flex-direction: row !important; + justify-content: space-between !important; + align-items: flex-start !important; gap: 20px !important; margin-bottom: 20px !important; width: 100% !important; - align-items: start !important; + min-height: 200px !important; + flex-wrap: nowrap !important; + overflow-x: visible !important; + white-space: nowrap !important; } .key-info-categories .category-section { display: block !important; - width: 100% !important; + width: calc(33.333% - 14px) !important; + min-width: 250px !important; + max-width: 400px !important; min-height: 200px !important; background: #f8f9fa !important; border: 1px solid #e0e0e0 !important; border-radius: 8px !important; padding: 15px !important; + flex-shrink: 0 !important; + flex-grow: 0 !important; } .key-info-categories .category-title { @@ -221,7 +230,7 @@