浏览代码

fix(设备基础配置): 修正坠落确认时间的验证逻辑

修改坠落确认时间的提示信息并增加大于0的验证
当输入值小于等于0时设置为null
liujia 2 月之前
父节点
当前提交
6e93ad7638
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      src/views/device/detail/components/deviceBaseConfig/index.vue

+ 5 - 2
src/views/device/detail/components/deviceBaseConfig/index.vue

@@ -203,7 +203,7 @@
           <template #suffix>
             <a-tooltip>
               <template #title>
-                <div>默认: 53秒</div>
+                <div>需大于0,默认: 53秒</div>
               </template>
               <info-circle-outlined style="color: rgba(0, 0, 0, 0.45)" />
             </a-tooltip>
@@ -317,7 +317,10 @@ const saveBaseConfig = async () => {
           height: baseFormState.installHeight,
           northAngle: baseFormState.northAngle,
           tenantId: baseFormState?.tenantId,
-          fallingConfirm: Number(baseFormState?.fallingConfirm),
+          fallingConfirm:
+            Number(baseFormState?.fallingConfirm) > 0
+              ? Number(baseFormState?.fallingConfirm)
+              : null,
         })
         saveBaseLoading.value = false
         message.success('保存成功')