From 3fd7a12be67b3412035731aa8ff23575b92d6009 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期三, 27 十一月 2024 14:15:04 +0800 Subject: [PATCH] 预约小票 格式调整 --- src/views/ecg/appointment/AppointmentForm.vue | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/views/ecg/appointment/AppointmentForm.vue b/src/views/ecg/appointment/AppointmentForm.vue index 71248fe..864f5a3 100644 --- a/src/views/ecg/appointment/AppointmentForm.vue +++ b/src/views/ecg/appointment/AppointmentForm.vue @@ -26,7 +26,7 @@ <el-radio v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX)" :key="dict.value" - :label="dict.value" + :value="dict.value" > {{ dict.label }} </el-radio> @@ -219,10 +219,25 @@ } } } -defineExpose({ open }) // 鎻愪緵 open 鏂规硶锛岀敤浜庢墦寮�寮圭獥 +const openByQueue = async (type: string, patId: string, checkType: number) => { + dialogVisible.value = true + dialogTitle.value = t('action.' + type) + formType.value = type + resetForm() + // 淇敼鏃讹紝璁剧疆鏁版嵁 + if (patId) { + formLoading.value = true + try { + formData.value = await AppointmentApi.getCurAppointmentByPatIdAndCheckType( patId, checkType ) + } finally { + formLoading.value = false + } + } +} +defineExpose({ open, openByQueue }) // 鎻愪緵 open 鏂规硶锛岀敤浜庢墦寮�寮圭獥 /** 鎻愪氦琛ㄥ崟 */ -const emit = defineEmits(['success']) // 瀹氫箟 success 浜嬩欢锛岀敤浜庢搷浣滄垚鍔熷悗鐨勫洖璋� +const emit = defineEmits(['event_appointment_success']) // 瀹氫箟 success 浜嬩欢锛岀敤浜庢搷浣滄垚鍔熷悗鐨勫洖璋� const submitForm = async () => { // 鏍¢獙琛ㄥ崟 await formRef.value.validate() @@ -232,14 +247,16 @@ const data = formData.value as unknown as AppointmentVO if (formType.value === 'create') { await AppointmentApi.createAppointment(data) + // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢 + emit('event_appointment_success') message.success(t('common.createSuccess')) - } else { + } else if (formType.value === 'update') { await AppointmentApi.updateAppointment(data) + // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢 + emit('event_appointment_success') message.success(t('common.updateSuccess')) } dialogVisible.value = false - // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢 - emit('success') } finally { formLoading.value = false } -- Gitblit v1.9.3