From a7decc6645172d7720746dd1472e2bdbbb7af4b6 Mon Sep 17 00:00:00 2001 From: sladro Date: Thu, 18 Sep 2025 09:59:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E5=B1=82=E7=BA=A7?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=8A=9F=E8=83=BD=E9=9B=86=E6=88=90=E5=92=8C?= =?UTF-8?q?=E5=B1=82=E7=BA=A7=E5=88=A0=E9=99=A4=E9=85=8D=E7=BD=AE=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加层级统计API端点配置和服务方法 - 集成getHierarchyStatistics API到层级删除配置页面 - 实现动态层级数据显示和组件数量统计 - 修复数据嵌套结构访问问题 - 调整层级显示从0-based改为1-based用户界面 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- CLAUDE.md | 1 + .../pages/HierarchyDeletionParamsPage.vue | 60 +++++++++++++++---- src/config/cad.js | 1 + src/services/creoApi.js | 15 +++++ 4 files changed, 66 insertions(+), 11 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index f60f5be..c79a59f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -146,6 +146,7 @@ const handleOperation = async () => { - ✅ 信息面板实时日志显示和软件状态同步 - ✅ PDMS工厂设计模型查看器(PdmsModelViewer) - ✅ Revit建筑设计模型查看器(RevitModelViewer) +- ✅ 层级统计功能完整集成(getHierarchyStatistics API + 层级删除配置页面) ## 页面添加标准流程 diff --git a/src/components/pages/HierarchyDeletionParamsPage.vue b/src/components/pages/HierarchyDeletionParamsPage.vue index 47764ad..9ce63f9 100644 --- a/src/components/pages/HierarchyDeletionParamsPage.vue +++ b/src/components/pages/HierarchyDeletionParamsPage.vue @@ -28,16 +28,18 @@ + min="1" + :max="maxLevel + 1" + v-model="displayLevel" + :disabled="loading"> 或选择: @@ -59,7 +61,8 @@ @@ -70,6 +73,7 @@ diff --git a/src/config/cad.js b/src/config/cad.js index 59675fc..f48c05f 100644 --- a/src/config/cad.js +++ b/src/config/cad.js @@ -83,6 +83,7 @@ const CAD_SOFTWARE_DEFINITIONS = { status: '/api/status/model', open: '/api/model/open', hierarchy: '/api/creo/analysis/hierarchy', + hierarchyStatistics: '/api/analysis/hierarchy-statistics', geometryComplexity: '/api/analysis/geometry-complexity', shellAnalysis: '/api/analysis/shell-analysis', optimization: '/api/creo/shrinkwrap/shell', diff --git a/src/services/creoApi.js b/src/services/creoApi.js index 5e5b835..88e3028 100644 --- a/src/services/creoApi.js +++ b/src/services/creoApi.js @@ -150,6 +150,21 @@ class CreoApiService { } }) } + + /** + * 获取层级统计信息 + * @returns {Promise<{success: boolean, data?: any, error?: string}>} + */ + async getHierarchyStatistics() { + const url = buildApiUrl(this.softwareName, 'hierarchyStatistics') + + return await apiClient.post(url, {}, { + operationContext: { + software: 'Creo', + operation: '获取层级统计' + } + }) + } } // 导出单例实例