This commit is contained in:
2026-05-27 17:08:56 +08:00
parent 8da6b0b832
commit 843af3b8d1
+58 -45
View File
@@ -1994,7 +1994,7 @@ const ResultView = {
</div>
<div class="result-grid result-priority-grid">
<div class="result-card result-card-highlight">
<div class="result-card result-card-highlight" style="cursor: pointer;" @click="selectScheme(selectedScheme?.scheme_id)">
<div class="summary-header">
<h3>推荐方案</h3>
<span class="badge badge-info">{{ selectedScheme?.title || selectedScheme?.scheme_id || '方案待定' }}</span>
@@ -2027,22 +2027,35 @@ const ResultView = {
</div>
</div>
<div class="result-card result-card-highlight" v-if="candidateSchemes.length > 1">
<div class="result-card result-card-highlight" v-if="candidateSchemes.length > 1" style="cursor: pointer;" @click="selectScheme(candidateSchemes[1]?.scheme_id)">
<div class="summary-header">
<h3>备选方案</h3>
<span class="badge badge-warning">1 个备选</span>
</div>
<div class="info-list">
<template v-for="scheme in candidateSchemes.slice(1, 2)" :key="'alt-' + scheme.scheme_id">
<div class="info-item" style="padding: var(--space-1) 0; border-bottom: 1px solid var(--border-light);">
<span class="info-label" style="cursor: pointer;" @click="selectScheme(scheme.scheme_id)">
{{ scheme.title || scheme.scheme_id }}
</span>
<span class="info-value">{{ scheme.offset_label || '中面' }} · 总分 {{ formatNumber(scheme.score) }}</span>
<div class="info-item">
<span class="info-label">方案说明</span>
<span class="info-value">{{ scheme.summary || scheme.reason || '暂无说明' }}</span>
</div>
<div class="info-item">
<span class="info-label">分型方向</span>
<span class="info-value">{{ formatSchemeDirection(scheme) }}</span>
</div>
<div class="info-item">
<span class="info-label">模具结构</span>
<span class="info-value">{{ scheme.mold_structure_type === 'two_half_cavity' ? '两板半腔(无独立模芯)' : '型腔 + 模芯' }}</span>
</div>
<div class="info-item">
<span class="info-label">分型面位置</span>
<span class="info-value">{{ scheme.offset_label || '中面' }}</span>
</div>
<div class="info-item">
<span class="info-label">方案总分</span>
<span class="info-value">{{ formatNumber(scheme.score) }}</span>
</div>
</template>
</div>
<div class="inline-note" style="margin-top: var(--space-2);">点击方案名称可切换查看详情与 3D 预览</div>
</div>
<div class="result-card result-card-highlight" v-else>
<div class="summary-header">
@@ -2119,6 +2132,43 @@ const ResultView = {
</button>
</div>
<div id="candidate-schemes" v-if="candidateSchemes.length > 1" class="viewer-section diagnostic-panel" style="margin-bottom: var(--space-3);">
<summary>📊 方案对比({{ Math.min(candidateSchemes.length, 2) }} 个方案)</summary>
<div class="result-card full-width diagnostic-panel-body">
<table class="data-table">
<thead>
<tr>
<th>方案</th>
<th>方向</th>
<th>位置</th>
<th>总分</th>
<th>法向匹配</th>
<th>可制造性</th>
<th>分型质量</th>
<th>倒扣数</th>
<th>锁模力</th>
</tr>
</thead>
<tbody>
<tr v-for="scheme in candidateSchemes.slice(0, 2)" :key="'cmp-' + scheme.scheme_id" :style="state.selectedSchemeId === scheme.scheme_id ? 'background: rgba(var(--primary-rgb), 0.06); font-weight: 600;' : ''">
<td>
<span v-if="scheme.scheme_id === state.bestSchemeId" style="color: var(--primary-color); margin-right: 4px;">★</span>
<span style="cursor: pointer; color: var(--primary-color);" @click="selectScheme(scheme.scheme_id)">{{ scheme.title || scheme.scheme_id }}</span>
</td>
<td>{{ formatSchemeDirection(scheme) }}</td>
<td>{{ scheme.offset_label || '中面' }}</td>
<td>{{ formatNumber(scheme.score) }}</td>
<td>{{ formatNumber(scheme.normal_alignment_score || 0) }}</td>
<td>{{ formatNumber(scheme.score_breakdown?.manufacturability || 0) }}</td>
<td>{{ formatNumber(scheme.score_breakdown?.parting_quality || 0) }}</td>
<td>{{ scheme.key_info?.quality_considerations?.undercut_count || 0 }}</td>
<td>{{ scheme.cavity_data?.manufacturing_info?.estimated_clamping_force || 'N/A' }}</td>
</tr>
</tbody>
</table>
</div>
</details>
<div id="preview-3d" v-if="selectedHtmlFile" class="viewer-section viewer-section-hero">
<div class="summary-header">
<h3>3D 预览</h3>
@@ -2148,43 +2198,6 @@ const ResultView = {
</div>
</div>
<div id="candidate-schemes" v-if="candidateSchemes.length > 1" class="viewer-section diagnostic-panel" style="margin-top: var(--space-4);">
<summary>📊 全部方案对比</summary>
<div class="result-card full-width diagnostic-panel-body">
<table class="data-table">
<thead>
<tr>
<th>方案</th>
<th>方向</th>
<th>位置</th>
<th>总分</th>
<th>法向匹配</th>
<th>可制造性</th>
<th>分型质量</th>
<th>倒扣数</th>
<th>锁模力</th>
</tr>
</thead>
<tbody>
<tr v-for="scheme in candidateSchemes" :key="'cmp-' + scheme.scheme_id" :style="state.selectedSchemeId === scheme.scheme_id ? 'background: rgba(var(--primary-rgb), 0.06); font-weight: 600;' : ''">
<td>
<span v-if="scheme.scheme_id === state.bestSchemeId" style="color: var(--primary-color); margin-right: 4px;">★</span>
<span style="cursor: pointer; color: var(--primary-color);" @click="selectScheme(scheme.scheme_id)">{{ scheme.title || scheme.scheme_id }}</span>
</td>
<td>{{ formatSchemeDirection(scheme) }}</td>
<td>{{ scheme.offset_label || '中面' }}</td>
<td>{{ formatNumber(scheme.score) }}</td>
<td>{{ formatNumber(scheme.normal_alignment_score || 0) }}</td>
<td>{{ formatNumber(scheme.score_breakdown?.manufacturability || 0) }}</td>
<td>{{ formatNumber(scheme.score_breakdown?.parting_quality || 0) }}</td>
<td>{{ scheme.key_info?.quality_considerations?.undercut_count || 0 }}</td>
<td>{{ scheme.cavity_data?.manufacturing_info?.estimated_clamping_force || 'N/A' }}</td>
</tr>
</tbody>
</table>
</div>
</details>
<div id="ai-side-action" class="viewer-section">
<div class="summary-header">
<h3>AI 倒扣与抽芯分析</h3>