Browse Source

fix: 更新模板模态框中的标靶图片提示,调整必填标识位置

master
qinjian 2 months ago
parent
commit
530de5c0ee
  1. 13
      client/src/sections/wuyuanbiaoba/components/CameraView.jsx
  2. 2
      client/src/sections/wuyuanbiaoba/components/TemplateModal.jsx

13
client/src/sections/wuyuanbiaoba/components/CameraView.jsx

@ -287,24 +287,23 @@ const CameraView = ({
if (videoRect && rectangles.length < maxRectangles) { if (videoRect && rectangles.length < maxRectangles) {
const nextIndex = Number(rectangles[rectangles.length - 1]?.id) ? Number(rectangles[rectangles.length - 1]?.id)-100+1 : 1; const nextIndex = Number(rectangles[rectangles.length - 1]?.id) ? Number(rectangles[rectangles.length - 1]?.id)-100+1 : 1;
const fixedId = `10${nextIndex}`; const fixedId = `10${nextIndex}`;
// //
const templateParams = selectedTemplate const templateParams = selectedTemplate
? { ? {
// //
name: `target${nextIndex}` || selectedTemplate.name, name: `T_${nextIndex}` || selectedTemplate.name,
radius: selectedTemplate.physicalRadius || 40.0, radius: selectedTemplate.physicalRadius || 40.0,
isReferencePoint: selectedTemplate.isBaseline || false, isReferencePoint: selectedTemplate.isBaseline || false,
gradientThreshold: gradientThreshold:
selectedTemplate.gradientThresholdValue || 100, selectedTemplate.gradientThresholdValue,
anchorThreshold: selectedTemplate.anchorThresholdValue || 80, anchorThreshold: selectedTemplate.anchorThresholdValue,
gaussianBlurThreshold: selectedTemplate.gaussianBlur || 3, gaussianBlurThreshold: selectedTemplate.gaussianBlur || 3,
binaryThreshold: selectedTemplate.binaryThreshold || 120, binaryThreshold: selectedTemplate.binaryThreshold || 120,
hasAdvancedConfig: false, hasAdvancedConfig: false,
} }
: { : {
// //
name: `target${nextIndex}`, name: `T_${nextIndex}`,
radius: 40.0, radius: 40.0,
isReferencePoint: false, isReferencePoint: false,
gradientThreshold: 100, gradientThreshold: 100,
@ -758,8 +757,8 @@ const CameraView = ({
threshold: { threshold: {
binary: rect.binaryThreshold || 120, binary: rect.binaryThreshold || 120,
gauss: rect.gaussianBlurThreshold || 1, gauss: rect.gaussianBlurThreshold || 1,
gradient: rect.gradientThreshold || 100, gradient: rect.gradientThreshold,
anchor: rect.anchorThreshold || 80, anchor: rect.anchorThreshold,
}, },
radius: rect.radius || 40.0, radius: rect.radius || 40.0,
id: rect.id || targetKey, // 使ID id: rect.id || targetKey, // 使ID

2
client/src/sections/wuyuanbiaoba/components/TemplateModal.jsx

@ -261,8 +261,8 @@ const TemplateModal = ({
<Form.Item <Form.Item
label={ label={
<> <>
<span style={{ color: "red", marginRight: 4 }}>*</span>
标靶图片 标靶图片
<span style={{ color: "red", marginLeft: 4 }}>*</span>
</> </>
} }
rules={[{ required: true, message: "请上传标靶图片" }]} rules={[{ required: true, message: "请上传标靶图片" }]}

Loading…
Cancel
Save