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) {
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

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

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

Loading…
Cancel
Save