From 52a1cb1ce5b97a116667c43c8236c62fed7fb176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=90=A6?= Date: Tue, 28 Jul 2026 16:53:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=AF=8A=E6=89=80=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E6=B0=94=E6=B3=A1=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E8=8D=AF=E5=93=81=E7=9A=84=E6=97=B6=E5=80=99=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=89=93=E5=BC=80=E5=BC=80=E6=96=B9=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=B9=B6=E4=B8=94=E5=88=87=E6=8D=A2tab=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/store/prescription.ts | 6 +- .../components/FollowUpDrugAssistantCard.vue | 13 ++++ .../chat/components/MessageBubble.vue | 35 +++++++++- .../src/views/business/chat/utils/request.ts | 7 +- .../components/PatientInfoPanel.vue | 65 +++++++++++++++---- .../online-consultation-clinic/index.vue | 8 +++ .../components/PatientInfoPanel.vue | 65 +++++++++++++++---- .../doctor/online-consultation/index.vue | 8 +++ 8 files changed, 174 insertions(+), 33 deletions(-) diff --git a/apps/web-antd/src/store/prescription.ts b/apps/web-antd/src/store/prescription.ts index 4fd8bf89..62e9a19d 100644 --- a/apps/web-antd/src/store/prescription.ts +++ b/apps/web-antd/src/store/prescription.ts @@ -1094,7 +1094,7 @@ export const usePrescriptionStore = defineStore('prescription', () => { }, userStore.currentUser.doctor_id, ); - // 在线复诊开方后自动连发购药指引与用药温馨提示 + // 在线复诊开方后自动连发购药指引与用药温馨提示(小助手发送) const tipTexts = [ '根据您的病情描述,已为您开具电子处方,请点击上方的‘立即支付’,进行购药;如有商品价格和订单等问题请咨询平台客服。', '温馨提示:用药前请详细阅读药品说明书,并严格按照线下医嘱用药。如用药过程中出现病情变化或其它不适症状,请立即停药并及时就医。(请您注意,如果您尚未在医院就诊或未曾使用过本次申请的药品,请暂时不要支付订单。我们建议您在医生的指导下使用药品,以确保用药安全。)', @@ -1102,7 +1102,7 @@ export const usePrescriptionStore = defineStore('prescription', () => { tipTexts.forEach((tip, tipIdx) => { sendMessage({ roomId: chatStore.currentFriend.room_id, - senderId: userStore.currentUser.doctor_id, + senderId: 'doctor_assistant', receiverId: chatStore.currentFriend.id, type: 'text', content: tip, @@ -1111,7 +1111,7 @@ export const usePrescriptionStore = defineStore('prescription', () => { { id: `${Date.now()}_tip_${tipIdx}`, room_id: chatStore.currentFriend.room_id, - sender_user_id: `doctor-${userStore.currentUser.doctor_id}`, + sender_user_id: 'doctor_assistant', receiver_user_id: chatStore.currentFriend.id, message_type: 0, message_content: tip, diff --git a/apps/web-antd/src/views/business/chat/components/FollowUpDrugAssistantCard.vue b/apps/web-antd/src/views/business/chat/components/FollowUpDrugAssistantCard.vue index ac6daf77..abc921af 100644 --- a/apps/web-antd/src/views/business/chat/components/FollowUpDrugAssistantCard.vue +++ b/apps/web-antd/src/views/business/chat/components/FollowUpDrugAssistantCard.vue @@ -43,6 +43,14 @@ const answeredLabel = computed(() => { return ''; }); +/** 是否就诊过:有明确 0/1 才展示 */ +const visitedLabel = computed(() => { + const v = data.value.has_visited; + if (v === 1 || v === '1') return '是'; + if (v === 0 || v === '0') return '否'; + return ''; +}); + const drugs = computed(() => Array.isArray(data.value.drugs) ? data.value.drugs : [], ); @@ -98,6 +106,11 @@ const canShowAddBtn = computed( {{ answeredLabel }} +
+ 是否就诊过 + {{ visitedLabel }} +
+
适用症/症状
{{ illnessInfo }}
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 71bbb95a..cc5930be 100644 --- a/apps/web-antd/src/views/business/chat/components/MessageBubble.vue +++ b/apps/web-antd/src/views/business/chat/components/MessageBubble.vue @@ -747,9 +747,13 @@ const getSexText = (sex) => {
- +
@@ -758,6 +762,33 @@ const getSexText = (sex) => { registerCardDisplay.chief_complaint }}
+
+ 适用症/症状: + {{ + registerCardDisplay.illnessInfo + }} +
+
+ + 是否就诊过:{{ + registerCardDisplay.has_visited === 1 || + registerCardDisplay.has_visited === '1' + ? '是' + : '否' + }} + + + 是否使用过药品:{{ + registerCardDisplay.has_used_drug === 1 || + registerCardDisplay.has_used_drug === '1' + ? '是' + : '否' + }} + +
所选药品:
{ const receiverId = data.receiverId.toString(); const normalizedReceiverId = receiverId.startsWith('user-') ? receiverId : `user-${receiverId}`; - // 确保 sender_user_id 有 doctor- 前缀(医生端) + // 确保 sender_user_id:小助手保持 doctor_assistant;医生端补 doctor- 前缀 const senderId = data.senderId.toString(); - const normalizedSenderId = senderId.startsWith('doctor-') ? senderId : `doctor-${senderId}`; + const normalizedSenderId = + senderId === 'doctor_assistant' || senderId.startsWith('doctor-') + ? senderId + : `doctor-${senderId}`; const requestData = { room_id: data.roomId, diff --git a/apps/web-antd/src/views/doctor/online-consultation-clinic/components/PatientInfoPanel.vue b/apps/web-antd/src/views/doctor/online-consultation-clinic/components/PatientInfoPanel.vue index 5af30c27..f65522b0 100644 --- a/apps/web-antd/src/views/doctor/online-consultation-clinic/components/PatientInfoPanel.vue +++ b/apps/web-antd/src/views/doctor/online-consultation-clinic/components/PatientInfoPanel.vue @@ -1,14 +1,15 @@