新增开启会话的功能

This commit is contained in:
wangdongbo 2026-02-04 17:13:27 +08:00
parent 26bd604e45
commit bbef274c6e
4 changed files with 49 additions and 33 deletions

View File

@ -78,6 +78,7 @@ const props = defineProps({
userId: { type: String, default: "" }, userId: { type: String, default: "" },
patientId: { type: String, default: "" }, patientId: { type: String, default: "" },
corpId: { type: String, default: "" }, corpId: { type: String, default: "" },
orderStatus: { type: String, default: "" },
}); });
// Emits // Emits
@ -422,7 +423,8 @@ const handleOpenConsult = () => {
}); });
}; };
const morePanelButtons = [ const morePanelButtons = computed(() => {
const buttons = [
{ text: "照片", icon: "/static/icon/zhaopian.png", action: showImagePicker }, { text: "照片", icon: "/static/icon/zhaopian.png", action: showImagePicker },
{ {
text: "回访任务", text: "回访任务",
@ -444,17 +446,27 @@ const morePanelButtons = [
icon: "/static/icon/wenjuan.png", icon: "/static/icon/wenjuan.png",
action: goToSurveyList, action: goToSurveyList,
}, },
{ ];
text: "结束问诊",
icon: "/static/icon/jieshuzixun.png", //
action: handleEndConsult, if (props.orderStatus === "finished") {
}, // ""
{ buttons.push({
text: "开启会话", text: "开启会话",
icon: "/static/icon/kaiqihuihua.png", icon: "/static/icon/kaiqihuihua.png",
action: handleOpenConsult, action: handleOpenConsult,
}, });
]; } else {
// ""
buttons.push({
text: "结束问诊",
icon: "/static/icon/jieshuzixun.png",
action: handleEndConsult,
});
}
return buttons;
});
function handleInputFocus() { function handleInputFocus() {
console.log("handleInputFocus"); console.log("handleInputFocus");

View File

@ -75,6 +75,8 @@ const text = computed(() => {
return '问诊已结束'; return '问诊已结束';
case 'consult_timeout': case 'consult_timeout':
return '问诊已超时'; return '问诊已超时';
case 'consult_reopened':
return '会话已重新开启';
default: default:
return systemMessageData.value.content || '[系统消息]'; return systemMessageData.value.content || '[系统消息]';
} }

View File

@ -163,6 +163,7 @@
:patientId="patientId" :patientId="patientId"
:corpId="corpId" :corpId="corpId"
:patientInfo="patientInfo" :patientInfo="patientInfo"
:orderStatus="orderStatus"
@scrollToBottom="() => scrollToBottom(true)" @scrollToBottom="() => scrollToBottom(true)"
@messageSent="() => scrollToBottom(true)" @messageSent="() => scrollToBottom(true)"
@endConsult="handleEndConsult" @endConsult="handleEndConsult"

View File

@ -94,6 +94,7 @@ const urlsConfig = {
getChatRecordsByGroupId: "getChatRecordsByGroupId", getChatRecordsByGroupId: "getChatRecordsByGroupId",
sendConsultRejectedMessage: "sendConsultRejectedMessage", sendConsultRejectedMessage: "sendConsultRejectedMessage",
endConsultation: "endConsultation", endConsultation: "endConsultation",
openConsultation: "openConsultation",
getGroupListByGroupId: "getGroupListByGroupId", getGroupListByGroupId: "getGroupListByGroupId",
acceptConsultation: "acceptConsultation", acceptConsultation: "acceptConsultation",
sendArticleMessage: "sendArticleMessage", sendArticleMessage: "sendArticleMessage",