添加信息提示

This commit is contained in:
Euni4U 2025-03-26 13:08:20 +08:00
parent c83d9b4976
commit 19c47c79a0

View File

@ -394,13 +394,17 @@ const submitForm = async () => {
birthday: addForm.birthDate ? new Date(addForm.birthDate) : undefined
}
await PatientApi.insertPatinetInfo(patientData as PatientVO)
message.success('添加成功')
dialogVisible.value = false
//
resetForm()
//
await getList()
const data=await PatientApi.insertPatinetInfo(patientData as PatientVO)
if(data){
message.success('添加成功')
dialogVisible.value = false
//
resetForm()
//
await getList()
}else{
message.error('患者已存在')
}
} catch (error) {
console.error('添加失败:', error)
message.error('添加失败: ' + (error.message || '未知错误'))
@ -487,7 +491,6 @@ const handleGwPatientInfo = async () => {
loading.value = true
// API
const result = await PatientApi.getGwPatientInfo(addForm.cardId)
console.log('获取到的公卫患者信息:', result);
if (result) {
//
addForm.name = result.name || ''