新增开启会话的功能
This commit is contained in:
parent
26bd604e45
commit
bbef274c6e
@ -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");
|
||||
|
||||
@ -75,6 +75,8 @@ const text = computed(() => {
|
||||
return '问诊已结束';
|
||||
case 'consult_timeout':
|
||||
return '问诊已超时';
|
||||
case 'consult_reopened':
|
||||
return '会话已重新开启';
|
||||
default:
|
||||
return systemMessageData.value.content || '[系统消息]';
|
||||
}
|
||||
|
||||
@ -163,6 +163,7 @@
|
||||
:patientId="patientId"
|
||||
:corpId="corpId"
|
||||
:patientInfo="patientInfo"
|
||||
:orderStatus="orderStatus"
|
||||
@scrollToBottom="() => scrollToBottom(true)"
|
||||
@messageSent="() => scrollToBottom(true)"
|
||||
@endConsult="handleEndConsult"
|
||||
|
||||
@ -94,6 +94,7 @@ const urlsConfig = {
|
||||
getChatRecordsByGroupId: "getChatRecordsByGroupId",
|
||||
sendConsultRejectedMessage: "sendConsultRejectedMessage",
|
||||
endConsultation: "endConsultation",
|
||||
openConsultation: "openConsultation",
|
||||
getGroupListByGroupId: "getGroupListByGroupId",
|
||||
acceptConsultation: "acceptConsultation",
|
||||
sendArticleMessage: "sendArticleMessage",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user