diff --git a/api/reception.js b/api/reception.js index c973d39..c2fbbbe 100644 --- a/api/reception.js +++ b/api/reception.js @@ -620,6 +620,32 @@ export function aiGeneratePrescriptionApi(data) { }) } +/** + * 语音转写(multipart:字段名 audio) + * @param {{ filePath: string, duration_ms?: number }} data + */ +export function aiVoiceAsrApi(data) { + return req.request({ + url: '/newApi/doctor-reception-wx/ai-voice-asr', + method: 'POST', + type: 'upload', + filePath: data.filePath, + name: 'audio', + formData: { + duration_ms: String(data.duration_ms || 0) + } + }) +} + +/** 语音口述落方(只抽药名剂量) */ +export function aiGenerateVoicePrescriptionApi(data) { + return req.request({ + url: '/newApi/doctor-reception-wx/ai-generate-voice-prescription', + method: 'POST', + data + }) +} + /** 本挂号 AI 生成历史(轻量列表) */ export function aiListGenerationsApi(data) { return req.request({ diff --git a/subPackages/sub_workbench/prescription_v2/components/AiPrescriptionDrawer.vue b/subPackages/sub_workbench/prescription_v2/components/AiPrescriptionDrawer.vue index 46eda6e..5b751f7 100644 --- a/subPackages/sub_workbench/prescription_v2/components/AiPrescriptionDrawer.vue +++ b/subPackages/sub_workbench/prescription_v2/components/AiPrescriptionDrawer.vue @@ -29,12 +29,12 @@ {{ consentText }} - + 配伍禁忌提示 · {{ line }} - + 历史 @@ -162,13 +162,13 @@ - 未对照({{ unmatchedCount }}) + 未对照({{ unmatchedCount }})— 药库未找到,已标红 - {{ u.ai_name }} + {{ u.ai_name }} 去手动搜索 + + + + 语音开方 + 返回 + + + + + {{ voiceAsrLoading ? '转写中…' : (voiceRecording ? '点击结束录音' : '点击开始录音') }} + + 说完后点结束,可改字 + + + 转写文本(可改) +