新增开启会话的功能

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

View File

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

View File

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

View File

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