|
|
@ -35,7 +35,7 @@ const [registerQueryForm, { |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [registerForm, {setFieldsValue, resetFields, validate}] = useForm({ |
|
|
const [registerForm, {setFieldsValue, getFieldsValue,resetFields, validate}] = useForm({ |
|
|
labelWidth: 120, |
|
|
labelWidth: 120, |
|
|
baseColProps: {span: 24}, |
|
|
baseColProps: {span: 24}, |
|
|
schemas: updateWarnForm, |
|
|
schemas: updateWarnForm, |
|
|
@ -107,12 +107,8 @@ const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) |
|
|
|
|
|
|
|
|
async function handleSubmit() { |
|
|
async function handleSubmit() { |
|
|
try { |
|
|
try { |
|
|
|
|
|
|
|
|
const values = await validate() |
|
|
const values = await validate() |
|
|
// ⭐ 条件校验(重点) |
|
|
|
|
|
if (values.inputName !== pointInfo.value.pointName) { |
|
|
|
|
|
createMessage.error('请确保点号信息与查询结果一致,如果不一致请重新查询') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
setModalProps({confirmLoading: true}) |
|
|
setModalProps({confirmLoading: true}) |
|
|
if (unref(isUpdate)) { |
|
|
if (unref(isUpdate)) { |
|
|
await updateWarn(values) |
|
|
await updateWarn(values) |
|
|
@ -123,6 +119,11 @@ async function handleSubmit() { |
|
|
// 新增预警 |
|
|
// 新增预警 |
|
|
//先拿查询表单数据 |
|
|
//先拿查询表单数据 |
|
|
const queryValues = await validateQueryForm() |
|
|
const queryValues = await validateQueryForm() |
|
|
|
|
|
// ⭐ 条件校验(重点) |
|
|
|
|
|
if (queryValues.inputName !== pointInfo.value.pointName) { |
|
|
|
|
|
createMessage.error('请确保点号信息与查询结果一致,如果不一致请重新查询') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
// 再拿输入的数据 |
|
|
// 再拿输入的数据 |
|
|
const values = await validate() |
|
|
const values = await validate() |
|
|
// 合并三个数据 |
|
|
// 合并三个数据 |
|
|
|