Browse Source

fix:预警配置表单校验问题修复

pull/123/head
xiaojinfei 3 days ago
parent
commit
8aae814f3f
  1. 13
      src/views/warn/config/UpdateModal.vue

13
src/views/warn/config/UpdateModal.vue

@ -35,7 +35,7 @@ const [registerQueryForm, {
})
const [registerForm, {setFieldsValue, resetFields, validate}] = useForm({
const [registerForm, {setFieldsValue, getFieldsValue,resetFields, validate}] = useForm({
labelWidth: 120,
baseColProps: {span: 24},
schemas: updateWarnForm,
@ -107,12 +107,8 @@ const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data)
async function handleSubmit() {
try {
const values = await validate()
//
if (values.inputName !== pointInfo.value.pointName) {
createMessage.error('请确保点号信息与查询结果一致,如果不一致请重新查询')
return
}
setModalProps({confirmLoading: true})
if (unref(isUpdate)) {
await updateWarn(values)
@ -123,6 +119,11 @@ async function handleSubmit() {
//
//
const queryValues = await validateQueryForm()
//
if (queryValues.inputName !== pointInfo.value.pointName) {
createMessage.error('请确保点号信息与查询结果一致,如果不一致请重新查询')
return
}
//
const values = await validate()
//

Loading…
Cancel
Save