diff --git a/apps/web-antd/src/components/form/components/input-select.vue b/apps/web-antd/src/components/form/components/input-select.vue new file mode 100644 index 00000000..2aae5548 --- /dev/null +++ b/apps/web-antd/src/components/form/components/input-select.vue @@ -0,0 +1,33 @@ + + + diff --git a/apps/web-antd/src/store/prescription.ts b/apps/web-antd/src/store/prescription.ts index c50479e8..1a20127c 100644 --- a/apps/web-antd/src/store/prescription.ts +++ b/apps/web-antd/src/store/prescription.ts @@ -16,6 +16,7 @@ import { getProcessRuleList, getProductListDoctorReception, } from '#/views/doctor/doctor-reception/api'; +import traditionalJson from '#/views/business/chat/config/traditional.json'; export const usePrescriptionStore = defineStore('prescription', () => { // 基础数据 @@ -73,6 +74,11 @@ export const usePrescriptionStore = defineStore('prescription', () => { const isInitialized = ref(false); const isPatientInfoLoaded = ref(false); + const traditionalChineseMedicine = ref(traditionalJson); + const diseasesSelected = ref(); + const methodSelected = ref(); + const syndromeSelected = ref(); + // 获取localStorage key const getStorageKey = () => `prescriptionData-chat-${currentRegisterId.value}`; @@ -590,6 +596,7 @@ export const usePrescriptionStore = defineStore('prescription', () => { // 发送处方 const sendPrescription = async (doctorSecondSignValue = 0) => { + if (currentDrugs.value.length === 0) { message.error('请选择药品'); return false; @@ -625,7 +632,6 @@ export const usePrescriptionStore = defineStore('prescription', () => { message.error('医嘱不能为空'); return false; } - try { await addWestPrescription({ patient: activePatient.value, @@ -647,6 +653,10 @@ export const usePrescriptionStore = defineStore('prescription', () => { dosage: dosage.value, day_dosage: dayDosage.value, doctor_second_sign: doctorSecondSignValue, + // 中医在线问诊所需的东西 + diseases_id: diseasesSelected.value, + method_id: methodSelected.value, + syndrome_id: syndromeSelected.value, }).then((res) => { message.success('处方已发送'); sendMessage({ @@ -798,5 +808,9 @@ export const usePrescriptionStore = defineStore('prescription', () => { syncToLocalStorage, loadFromLocalStorage, updateCurrentDrugs, + traditionalChineseMedicine, + diseasesSelected, + methodSelected, + syndromeSelected, }; }); diff --git a/apps/web-antd/src/views/business/chat/components/MessageBubble.vue b/apps/web-antd/src/views/business/chat/components/MessageBubble.vue index e9f7af68..a9f088ef 100644 --- a/apps/web-antd/src/views/business/chat/components/MessageBubble.vue +++ b/apps/web-antd/src/views/business/chat/components/MessageBubble.vue @@ -1,25 +1,39 @@