feat: 实现薄壳化分析结果页面完整功能系统
- 新增ShellAnalysisResult.vue完整数据展示功能 - 支持分析数据接收、统计摘要、零件列表展示 - 实现筛选、分页、选择、删除功能 - 添加creoApi.deleteComponentsByPath删除接口 - 修复数据传递链路:CreoModelAnalysis -> DashboardView -> ShellAnalysisResult - 遵循API接入标准流程,确保数据正确传递 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
1f08ea85f9
commit
dde3b3d12e
@ -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": [],
|
||||
|
||||
@ -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 () => {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -124,6 +124,27 @@ class CreoApiService {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定路径的组件
|
||||
* @param {Array<string>} 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: '删除组件'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 导出单例实例
|
||||
|
||||
@ -112,7 +112,7 @@
|
||||
|
||||
<!-- 智能薄壳化分析结果页面 -->
|
||||
<div v-else-if="currentPage === PAGE_TYPES.SHELL_ANALYSIS_RESULT" class="page-content">
|
||||
<ShellAnalysisResult />
|
||||
<ShellAnalysisResult :analysis-data="shellAnalysisData" />
|
||||
</div>
|
||||
|
||||
<!-- 按层级删除优化分析结果页面 -->
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user