diff --git a/.claude/settings.local.json b/.claude/settings.local.json index e072dd9..f4ed7c1 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -9,7 +9,9 @@ "mcp__sequential-thinking__sequentialthinking", "Bash(for dir in src/assets src/components src/config src/router src/stores src/views)", "Bash(do echo \"=== $dir ===\")", - "Bash(ls:*)" + "Bash(ls:*)", + "mcp__context7__resolve-library-id", + "mcp__context7__get-library-docs" ], "deny": [], "ask": [], diff --git a/src/components/pages/CreoModelAnalysis.vue b/src/components/pages/CreoModelAnalysis.vue index 2ecb02a..7a91d16 100644 --- a/src/components/pages/CreoModelAnalysis.vue +++ b/src/components/pages/CreoModelAnalysis.vue @@ -80,7 +80,8 @@ const emit = defineEmits(['show-shell-analysis-result', 'show-hierarchy-analysis const handleShellAnalysis = async () => { const result = await creoApi.startShellAnalysis() if (result.success) { - emit('show-shell-analysis-result') + // 将API数据传递给父组件 + emit('show-shell-analysis-result', result.data) } } const handleHierarchyDeletion = async () => { diff --git a/src/components/pages/ShellAnalysisResult.vue b/src/components/pages/ShellAnalysisResult.vue index 98280b0..ed59e42 100644 --- a/src/components/pages/ShellAnalysisResult.vue +++ b/src/components/pages/ShellAnalysisResult.vue @@ -9,25 +9,476 @@
-
-
- + +
+
+

分析摘要

+
+ + 完成时间: {{ analysisTime }} +
+
+ +
+
+
{{ allParts.length }}
+
总零件数
+
+
+
{{ analysisResults.estimatedReduction.volumeReduction }}
+
体积减少
+
+
+
{{ analysisResults.estimatedReduction.fileSizeReduction }}
+
文件大小减少
+
+
+
{{ analysisResults.estimatedReduction.performanceImprovement }}
+
性能提升
+
+
+
+ + +
+
+

+ + 薄壳化分析结果 ({{ filteredParts.length }} 个零件) +

+
+ +
+ + + + +
+ +
+ + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
选择ID零件名称零件路径体积减少置信度原因删除建议
+ + {{ part.id }}{{ part.name }}{{ part.partPath }}{{ formatPercent(part.volumeReduction) }}%{{ formatPercent(part.confidence * 100) }}%{{ part.reason }} + + {{ getDeletionRecommendationText(part.deletion_recommendation) }} + +
+
+ + +
+ + +
+ 第 {{ currentPage }} 页 / 共 {{ totalPages }} 页,展示 {{ filteredParts.length }} 个结果 +
+
+ + +
+
+ 已选择: {{ selectedParts.size }} 个零件 +
+
-

分析结果页面

-

此页面将展示智能薄壳化分析的结果

\ No newline at end of file diff --git a/src/services/creoApi.js b/src/services/creoApi.js index 6855b66..737acf5 100644 --- a/src/services/creoApi.js +++ b/src/services/creoApi.js @@ -124,6 +124,27 @@ class CreoApiService { } }) } + + /** + * 删除指定路径的组件 + * @param {Array} componentPaths - 要删除的组件路径数组 + * @param {boolean} forceDelete - 是否强制删除,默认false + * @returns {Promise<{success: boolean, data?: any, error?: string}>} + */ + async deleteComponentsByPath(componentPaths, forceDelete = false) { + const url = buildApiUrl(this.softwareName, 'deleteComponent') + + return await apiClient.post(url, { + "software_type": "creo", + "component_paths": componentPaths, + "force_delete": forceDelete + }, { + operationContext: { + software: 'Creo', + operation: '删除组件' + } + }) + } } // 导出单例实例 diff --git a/src/views/DashboardView.vue b/src/views/DashboardView.vue index da88dcb..3143db1 100644 --- a/src/views/DashboardView.vue +++ b/src/views/DashboardView.vue @@ -112,7 +112,7 @@
- +
@@ -231,6 +231,9 @@ const currentPage = ref(PAGE_TYPES.HOME) const showModelViewer = ref(false) const currentModelData = ref(null) +// 分析结果数据存储 +const shellAnalysisData = ref(null) + // 处理显示模型查看器 const handleShowModelViewer = (modelData) => { currentModelData.value = modelData @@ -244,7 +247,8 @@ const handlePageChange = (page) => { } // 处理跳转到分析结果页面 -const handleShowShellAnalysisResult = () => { +const handleShowShellAnalysisResult = (analysisData) => { + shellAnalysisData.value = analysisData currentPage.value = PAGE_TYPES.SHELL_ANALYSIS_RESULT }