转接方
Some checks failed
Close stale issues / stale (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Some checks failed
Close stale issues / stale (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
This commit is contained in:
@@ -794,7 +794,7 @@ export const usePrescriptionStore = defineStore('prescription', () => {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
await addWestPrescription({
|
||||
const response = await addWestPrescription({
|
||||
patient: activePatient.value,
|
||||
drugs: currentDrugs.value,
|
||||
diagnosis: diagnosis.value,
|
||||
@@ -821,36 +821,44 @@ export const usePrescriptionStore = defineStore('prescription', () => {
|
||||
// 诊所选择参数(使用传入的参数)
|
||||
send_mode: customSendMode,
|
||||
custom_store_id: customSendMode === 1 ? customStoreId : null,
|
||||
}).then((res) => {
|
||||
message.success('处方已发送');
|
||||
sendMessage({
|
||||
roomId: chatStore.currentFriend.room_id,
|
||||
senderId: userStore.currentUser.doctor_id,
|
||||
receiverId: chatStore.currentFriend.id,
|
||||
type: 'prescription',
|
||||
content: JSON.stringify(res),
|
||||
});
|
||||
chatStore.addMessage(
|
||||
{
|
||||
id: Date.now().toString(),
|
||||
room_id: chatStore.currentFriend.room_id,
|
||||
sender_user_id: `doctor-${userStore.currentUser.doctor_id}`,
|
||||
receiver_user_id: chatStore.currentFriend.id,
|
||||
message_type: 4,
|
||||
message_content: JSON.stringify(res),
|
||||
messageTypeName: 'prescription',
|
||||
created_at: Date.now(),
|
||||
created_at_text: new Date().toLocaleTimeString().slice(0, 5),
|
||||
timestamp: Date.now(),
|
||||
isSent: true,
|
||||
read: true,
|
||||
duration: 0,
|
||||
},
|
||||
userStore.currentUser.doctor_id,
|
||||
);
|
||||
resetForm();
|
||||
});
|
||||
return true;
|
||||
|
||||
const res = await response;
|
||||
message.success('处方已发送');
|
||||
sendMessage({
|
||||
roomId: chatStore.currentFriend.room_id,
|
||||
senderId: userStore.currentUser.doctor_id,
|
||||
receiverId: chatStore.currentFriend.id,
|
||||
type: 'prescription',
|
||||
content: JSON.stringify(res),
|
||||
});
|
||||
chatStore.addMessage(
|
||||
{
|
||||
id: Date.now().toString(),
|
||||
room_id: chatStore.currentFriend.room_id,
|
||||
sender_user_id: `doctor-${userStore.currentUser.doctor_id}`,
|
||||
receiver_user_id: chatStore.currentFriend.id,
|
||||
message_type: 4,
|
||||
message_content: JSON.stringify(res),
|
||||
messageTypeName: 'prescription',
|
||||
created_at: Date.now(),
|
||||
created_at_text: new Date().toLocaleTimeString().slice(0, 5),
|
||||
timestamp: Date.now(),
|
||||
isSent: true,
|
||||
read: true,
|
||||
duration: 0,
|
||||
},
|
||||
userStore.currentUser.doctor_id,
|
||||
);
|
||||
resetForm();
|
||||
|
||||
// 返回包含转诊信息的响应数据
|
||||
return {
|
||||
success: true,
|
||||
result: res?.result || res?.data || res,
|
||||
need_transfer: res?.result?.need_transfer || res?.data?.need_transfer || res?.need_transfer,
|
||||
transfer_prescription_id: res?.result?.transfer_prescription_id || res?.data?.transfer_prescription_id || res?.transfer_prescription_id,
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('发送处方失败:', error);
|
||||
message.error('发送处方失败');
|
||||
|
||||
Reference in New Issue
Block a user