diff --git a/components/AssistantConsultationShell.vue b/components/AssistantConsultationShell.vue
new file mode 100644
index 0000000..03d9f84
--- /dev/null
+++ b/components/AssistantConsultationShell.vue
@@ -0,0 +1,541 @@
+
+
+
+
+
+
+
+ {{ part.text }}
+
+ 《{{ part.text }}》
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ assistantName }}
+
+ 您好! 我是医生助理, 已收到您的用药申请:「{{ prescriptionInfo }}」, 为了帮助医生判断准确, 请按照您的真实情况回答以下问题。
+
+
+
+
+
+
+
+ {{ assistantName }}
+
+ {{ message.content }}
+
+
+
+
+
+
+
+
+ {{ message.content }}
+
+
+
+
+
+
+
+ {{ assistantName }}
+
+ 请稍等, 正在为您转接医生进行复诊开方...
+
+
+
+
+
+
+
+ {{ assistantName }}
+
+ {{ message.content }}
+
+
+
+
+
+
+
+
+ {{ assistantName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ submittingText }}
+
+
+
+
+
+
+
+
diff --git a/pages.json b/pages.json
index 7e4898b..1e9607f 100644
--- a/pages.json
+++ b/pages.json
@@ -5,7 +5,8 @@
// npm安装方式
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue",
// 消息通知组件
- "^MessageNotification": "@/components/MessageNotification/MessageNotification.vue"
+ "^MessageNotification": "@/components/MessageNotification/MessageNotification.vue",
+ "^FollowUpDrugDrawer$": "@/subPackages/doctor/components/FollowUpDrugDrawer.vue"
},
"pages": [
{
@@ -185,6 +186,13 @@
"navigationBarTitleText": "商品详情",
"enablePullDownRefresh": false
}
+ },
+ {
+ "path": "follow-up/medication-info",
+ "style": {
+ "navigationBarTitleText": "用药信息",
+ "enablePullDownRefresh": false
+ }
}
]
},
diff --git a/request/api/order.js b/request/api/order.js
index b24e0b3..674cc6b 100644
--- a/request/api/order.js
+++ b/request/api/order.js
@@ -1,6 +1,20 @@
import {get, post, uploadFile} from './http'
const prefix = '/order';
+
+/**
+ * 在线复诊:创建就诊信息(挂号前)
+ */
+export async function createRegisterInfoApi(params) {
+ return await post(`${prefix}/create-register-info`, params, 3)
+}
+
+/**
+ * 在线复诊:可选西药列表(双端上架)
+ */
+export async function getWesternDrugsForFollowUpApi(params) {
+ return await get(`${prefix}/western-drugs-for-follow-up`, params, 3)
+}
/**
* 获取扫码诊所的商品详情
* @param params
@@ -26,6 +40,11 @@ export async function saveRegisterInfoApi(params) {
return await post(`${prefix}/save-register-info`, params, 3)
}
+/** 诊所在线复诊:确认是否曾用过所选西药 */
+export async function confirmFollowUpDrugUseApi(params) {
+ return await post(`${prefix}/confirm-follow-up-drug-use`, params, 3)
+}
+
/**
* 查询订单的处方状态
* @param params
diff --git a/subPackages/chat/chat.vue b/subPackages/chat/chat.vue
index dbf93aa..ce1e202 100644
--- a/subPackages/chat/chat.vue
+++ b/subPackages/chat/chat.vue
@@ -102,6 +102,7 @@
@viewPrescription="viewPrescription"
@goToOrderMedicine="goToOrderMedicine"
@viewOrder="viewOrder"
+ @followUpDrugAnswered="onFollowUpDrugAnswered"
/>
@@ -403,6 +404,25 @@ export default {
return avatar;
}
},
+
+ onFollowUpDrugAnswered({ messageId, answerStatus }) {
+ const roomId = this.doctorUserInfo.room_id;
+ const idx = this.messages.findIndex((m) => m.id === messageId);
+ if (idx === -1) return;
+ const row = this.messages[idx];
+ try {
+ const o = typeof row.message_content === 'string' ? JSON.parse(row.message_content) : { ...row.message_content };
+ o.answer_status = answerStatus;
+ const updated = { ...row, message_content: JSON.stringify(o) };
+ this.$set(this.messages, idx, updated);
+ if (typeof ChatManager !== 'undefined' && roomId && ChatManager.roomMessages && ChatManager.roomMessages[roomId]) {
+ const ri = ChatManager.roomMessages[roomId].findIndex((m) => m.id === messageId);
+ if (ri !== -1) this.$set(ChatManager.roomMessages[roomId], ri, updated);
+ }
+ } catch (e) {
+ console.error('onFollowUpDrugAnswered', e);
+ }
+ },
// 加载助理配置信息
async loadAssistantConfig() {
@@ -1011,7 +1031,7 @@ export default {
getRegisterStatusText(status) { const map = { 0: '待就诊', 1: '已缴费', 2: '已就诊', 3: '已取消', 4: '已退费' }; return map[status] || '未知状态'; },
viewPrescription(id, orderNo) { uni.navigateTo({ url: "/subPackages/my/myrecord-detail?id=" + id + '&no=' + orderNo }); },
goToOrderMedicine(id, orderNo) { uni.navigateTo({ url: "/subPackages/my/my-drug/drug-info?id=" + id + '&order_type=prescription' }); },
- viewRegister(id, orderNo) { uni.navigateTo({ url: "/subPackages/register/register-detail?id=" + id + '&no=' + orderNo }); },
+ viewRegister(id, orderNo) { uni.navigateTo({ url: `/subPackages/register/register-info?id=${id}&type=1` }); },
viewOrder(orderId, orderNo) { uni.navigateTo({ url: "/subPackages/my/my-drug/drug-info?id=" + orderId }); },
// 处理返回操作(自定义返回逻辑)
diff --git a/subPackages/chat/components/MessageBubble.vue b/subPackages/chat/components/MessageBubble.vue
index ffb2c70..fcfdf28 100644
--- a/subPackages/chat/components/MessageBubble.vue
+++ b/subPackages/chat/components/MessageBubble.vue
@@ -12,7 +12,7 @@
>
- {{ parsedContent }}
+ {{ parsedContent }}
订单号{{ parsedContent.order_no }}
就诊人{{ (parsedContent.user_patient && parsedContent.user_patient.name) || '未知' }}
费用¥{{ parsedContent.price }}
+
+ 主诉
+ {{ parsedContent.chief_complaint }}
+
+
+ 所选药品
+ {{ registerCardDrugNamesLine }}
+
+
+ 数量
+ 各 {{ parsedContent.number }} 盒
+
+
+
+
+
+
+ {{ parsedContent.question }}
+
+
+ {{ row.name || '药品' }}
+ ×{{ row.quantity != null ? row.quantity : 1 }}
+
+
+ 您的选择
+ {{ followUpAnsweredLabel }}
+
+
+ 请在挂号后的用药确认页完成选择,此处不可更改
+
+
+
+