diff --git a/src/components/doctorCheck/PatientRegisterBase2.vue b/src/components/doctorCheck/PatientRegisterBase2.vue index 917e29a..f246081 100644 --- a/src/components/doctorCheck/PatientRegisterBase2.vue +++ b/src/components/doctorCheck/PatientRegisterBase2.vue @@ -255,6 +255,7 @@ export default { let noVal = this.prBase[noType] //唯一号的值 if (!noVal) return let body = {} + if(noType == 'idNo') noVal = noVal.toUpperCase() body[noType] = noVal let patientRegister = { id: '' } diff --git a/src/components/patientRegister/patientRegisterQuery.vue b/src/components/patientRegister/patientRegisterQuery.vue index e48de76..89e1529 100644 --- a/src/components/patientRegister/patientRegisterQuery.vue +++ b/src/components/patientRegister/patientRegisterQuery.vue @@ -305,7 +305,12 @@ export default { toQuery(queryType) { console.log('toQuery.queryType',queryType) this.query.queryType = queryType - if(queryType != 'idCardNo') this.query.photo = '' + // 身份证转大写 + if(queryType == 'idCardNo'){ + this.query.idCardNo = this.query.idCardNo.toUpperCase() + }else{ + this.query.photo = '' + } this.$emit('triggerQuery', this.query) }, diff --git a/src/views/doctorCheck/sumDoctorCheck.vue b/src/views/doctorCheck/sumDoctorCheck.vue index 559deb7..7827cdf 100644 --- a/src/views/doctorCheck/sumDoctorCheck.vue +++ b/src/views/doctorCheck/sumDoctorCheck.vue @@ -142,7 +142,7 @@ { - // 清洗 SSE 风格前缀并移除结束标志 - let cleaned = String(chunk).replace(/data:\s*\[DONE\]/g, '').replace(/^data:\s*/gm, ''); - if (!cleaned) return; - // 首个数据到达时显示弹窗并展开 - if (!this.AI.visible) { - this.AI.visible = true; - this.btnAImax(false); - } - this.AI.rawText += cleaned; - // 实时渲染 Markdown - this.AI.html = md.render(this.AI.rawText); - // 滚动到底部 - this.$nextTick(() => { - try { - const el = this.$refs.aiContent; - if (el) el.scrollTop = el.scrollHeight; - } catch (e) { } - }); - }); - } catch (err) { - // 回退:非流式请求(axios/postapi) - try { - const res = await postapi('/api/app/AiMessageWs/GetAIMessageResult', { message }); - if (res) { - let cleaned = String(res).replace(/data:\s*\[DONE\]/g, '').replace(/^data:\s*/gm, ''); - if (cleaned) { - // 回退响应到达后显示弹窗并展开 - if (!this.AI.visible) { - this.AI.visible = true; - this.btnAImax(false); - } - this.AI.rawText += cleaned; - this.AI.html = md.render(this.AI.rawText); - } - } - } catch (e) { - this.$message.error({ showClose: true, message: (err && err.message) || 'AI诊断请求失败' }); - } - } + this.AI.visible = true + this.btnAImax(false); + this.toAIdiagnosis() }, + // AI 是否最大化 btnAImax(max) { this.AI.max = !max @@ -1703,7 +1659,7 @@ export default { // 根据诊断,搜索医学解释、常见原因、健康指导 // AI诊断 AI重新诊断 - btnAIdiagnosis(diagnosis) { + btnAIdiagnosisDetail(diagnosis) { this.AI.visible = true this.AI.question = '' this.btnAImax(false) @@ -1718,7 +1674,7 @@ export default { return } - message = '性别:' + this.doctorCheck.prBase.sexName + ',年龄:' + this.doctorCheck.prBase.age + '岁,检查结果:' + diagnosis + message = '性别:' + this.patient_register.sexName + ',年龄:' + this.patient_register.age + '岁,检查结果:' + diagnosis + ' 请给出医学解释、常见原因及健康指导' this.AI.question = message }