From 530de5c0ee4a57633d83f4dbe0bc05c51fd0dace Mon Sep 17 00:00:00 2001 From: qinjian Date: Thu, 28 Aug 2025 17:13:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=A8=A1=E6=80=81=E6=A1=86=E4=B8=AD=E7=9A=84=E6=A0=87=E9=9D=B6?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=8F=90=E7=A4=BA=EF=BC=8C=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=BF=85=E5=A1=AB=E6=A0=87=E8=AF=86=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sections/wuyuanbiaoba/components/CameraView.jsx | 13 ++++++------- .../wuyuanbiaoba/components/TemplateModal.jsx | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/client/src/sections/wuyuanbiaoba/components/CameraView.jsx b/client/src/sections/wuyuanbiaoba/components/CameraView.jsx index d76fef7..86e40bb 100644 --- a/client/src/sections/wuyuanbiaoba/components/CameraView.jsx +++ b/client/src/sections/wuyuanbiaoba/components/CameraView.jsx @@ -287,24 +287,23 @@ const CameraView = ({ if (videoRect && rectangles.length < maxRectangles) { const nextIndex = Number(rectangles[rectangles.length - 1]?.id) ? Number(rectangles[rectangles.length - 1]?.id)-100+1 : 1; const fixedId = `10${nextIndex}`; - // 根据选中的模板预设参数 const templateParams = selectedTemplate ? { // 从模板中获取参数 - name: `target${nextIndex}` || selectedTemplate.name, + name: `T_${nextIndex}` || selectedTemplate.name, radius: selectedTemplate.physicalRadius || 40.0, isReferencePoint: selectedTemplate.isBaseline || false, gradientThreshold: - selectedTemplate.gradientThresholdValue || 100, - anchorThreshold: selectedTemplate.anchorThresholdValue || 80, + selectedTemplate.gradientThresholdValue, + anchorThreshold: selectedTemplate.anchorThresholdValue, gaussianBlurThreshold: selectedTemplate.gaussianBlur || 3, binaryThreshold: selectedTemplate.binaryThreshold || 120, hasAdvancedConfig: false, } : { // 默认参数 - name: `target${nextIndex}`, + name: `T_${nextIndex}`, radius: 40.0, isReferencePoint: false, gradientThreshold: 100, @@ -758,8 +757,8 @@ const CameraView = ({ threshold: { binary: rect.binaryThreshold || 120, gauss: rect.gaussianBlurThreshold || 1, - gradient: rect.gradientThreshold || 100, - anchor: rect.anchorThreshold || 80, + gradient: rect.gradientThreshold, + anchor: rect.anchorThreshold, }, radius: rect.radius || 40.0, id: rect.id || targetKey, // 使用原始ID diff --git a/client/src/sections/wuyuanbiaoba/components/TemplateModal.jsx b/client/src/sections/wuyuanbiaoba/components/TemplateModal.jsx index 3407d1b..93c9ccc 100644 --- a/client/src/sections/wuyuanbiaoba/components/TemplateModal.jsx +++ b/client/src/sections/wuyuanbiaoba/components/TemplateModal.jsx @@ -261,8 +261,8 @@ const TemplateModal = ({ + * 标靶图片 - * } rules={[{ required: true, message: "请上传标靶图片" }]}