新增开启会话的功能
This commit is contained in:
parent
26bd604e45
commit
bbef274c6e
@ -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");
|
||||||
|
|||||||
@ -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 || '[系统消息]';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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"
|
||||||
|
|||||||
@ -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",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user