From 721ea10c6679e864b1daea93f4ad49cb1b42d584 Mon Sep 17 00:00:00 2001 From: sladro Date: Mon, 23 Feb 2026 17:52:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9EPDMS=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E8=BD=BB=E9=87=8F=E5=8C=96=E5=A4=84=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- diff_to_review.diff | 0 src/components/pages/PdmsShrinkwrapPage.vue | 16 ++++++++++++---- .../pages/RevitEnvelopeOptimization.vue | 10 ++++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 diff_to_review.diff diff --git a/diff_to_review.diff b/diff_to_review.diff new file mode 100644 index 0000000..e69de29 diff --git a/src/components/pages/PdmsShrinkwrapPage.vue b/src/components/pages/PdmsShrinkwrapPage.vue index 73242cc..4a30aa4 100644 --- a/src/components/pages/PdmsShrinkwrapPage.vue +++ b/src/components/pages/PdmsShrinkwrapPage.vue @@ -180,12 +180,20 @@ const taskResult = ref(null) const zoneFiltersInput = ref("") +// 单文件常量配置 +const DEFAULT_SHRINKWRAP_CONFIG = { + DRY_RUN: true, + PADDING: 500.0, + TOUCH_TOLERANCE: 1.0, + KEEP_TYPES: ["SITE", "ZONE", "STRU", "FRAME", "SHELL", "PLAT", "WALL"] +}; + // 表单数据 const formData = reactive({ - dryRun: true, - padding: 500.0, - touchTolerance: 1.0, - keepTypes: ["SITE", "ZONE", "STRU", "FRAME", "SHELL", "PLAT", "WALL"] + dryRun: DEFAULT_SHRINKWRAP_CONFIG.DRY_RUN, + padding: DEFAULT_SHRINKWRAP_CONFIG.PADDING, + touchTolerance: DEFAULT_SHRINKWRAP_CONFIG.TOUCH_TOLERANCE, + keepTypes: [...DEFAULT_SHRINKWRAP_CONFIG.KEEP_TYPES] }) // 返回函数 diff --git a/src/components/pages/RevitEnvelopeOptimization.vue b/src/components/pages/RevitEnvelopeOptimization.vue index e44d51a..9f02eaf 100644 --- a/src/components/pages/RevitEnvelopeOptimization.vue +++ b/src/components/pages/RevitEnvelopeOptimization.vue @@ -174,10 +174,16 @@ const taskResult = ref(null) // 轮询定时器 let pollingTimer = null +// 单文件常量配置 +const DEFAULT_REVIT_CONFIG = { + MODE: 'EnvelopeOnly', + BACKUP_ORIGINAL: true +}; + // 表单数据 const formData = reactive({ - mode: 'EnvelopeOnly', - backupOriginal: true + mode: DEFAULT_REVIT_CONFIG.MODE, + backupOriginal: DEFAULT_REVIT_CONFIG.BACKUP_ORIGINAL }) // 返回函数