添加信息提示

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