diff --git a/src/components/doctorCheck/ButtonList.vue b/src/components/doctorCheck/ButtonList.vue index 54fc422..ce156c5 100644 --- a/src/components/doctorCheck/ButtonList.vue +++ b/src/components/doctorCheck/ButtonList.vue @@ -678,21 +678,33 @@ export default { return } } - let reqText = '' + let message = '' let linkStr = ';' this.doctorCheck.checkItemList.forEach(e => { if (e.result) { - if (reqText) { + if (message) { linkStr = ';' } else { linkStr = '' } - reqText += linkStr + e.itemName + ':' + e.result + message += linkStr + e.itemName + ':' + e.result + if(e.unitName) message += e.unitName + if(e.referenceRangeValue) message += '(正常范围:' + e.referenceRangeValue + ')' } }); - this.AI.visible = true - this.AI.diagnosis = reqText - this.btnAImax(false) + + postapi('/api/app/AIMessage/GetAIMessageResult', { message }) + .then(res => { + if (res.code > -1) { + this.AI.visible = true + this.AI.diagnosis = res.data.result + this.btnAImax(false) + } else { + this.$message.error({ showClose: true, message: res.message }) + } + }) + + }, btnAImax(max) { diff --git a/src/components/sumDoctorCheck/ButtonList.vue b/src/components/sumDoctorCheck/ButtonList.vue index 76e0cda..cfb9548 100644 --- a/src/components/sumDoctorCheck/ButtonList.vue +++ b/src/components/sumDoctorCheck/ButtonList.vue @@ -143,13 +143,13 @@ export default { ], summary_check_doctor_alias: ["总检", "审核"], - AI:{ - width:500, - height:24, - max:true, + AI: { + width: 500, + height: 24, + max: true, visible: false, diagnosis: 'AI诊断信息', - } + } }; }, @@ -172,12 +172,12 @@ export default { computed: { ...mapState(["window", "dict", "dataTransOpts", "dialogWin", "patientRegister", "doctorCheck", "sumDoctorCheck"]), - frameHeight(){ - return this.window.pageHeight - 42 - 10 + frameHeight() { + return this.window.pageHeight - 42 - 10 }, // AIdiagnosisHeight - AIDH(){ - return Math.floor((this.AI.height - 24 - 42 - 4)/21.5) + AIDH() { + return Math.floor((this.AI.height - 24 - 42 - 4) / 21.5) } }, @@ -414,37 +414,44 @@ export default { // AI诊断 AI重新诊断 btnAIdiagnosis(again) { if (!again) { - if (this.AI.visible){ + if (this.AI.visible) { this.btnAImax(false) return } } - let reqText = '' + let message = '' let linkStr = ';' - this.sumDoctorCheck.summaryList.forEach(e => { - if (reqText) { - linkStr = ';' + this.sumDoctorCheck.summaryList.forEach(e => { + if (message) { + linkStr = ';' } else { linkStr = '' } - reqText += linkStr + e.summaryTitle + ':' - e.details.forEach((e1,i) => { - reqText += (i+1) + ')、' + e1.summaryContent - }); + message += linkStr + e.summaryTitle + ':' + e.details.forEach((e1, i) => { + message += (i + 1) + ')、' + e1.summaryContent + }); }); + postapi('/api/app/AIMessage/GetAIMessageResult', { message }) + .then(res => { + if (res.code > -1) { + this.AI.visible = true + this.AI.diagnosis = res.data.result + this.btnAImax(false) + } else { + this.$message.error({ showClose: true, message: res.message }) + } + }) - this.AI.visible = true - this.AI.diagnosis = reqText - this.btnAImax(false) }, - btnAImax(max){ + btnAImax(max) { this.AI.max = !max - if(this.AI.max){ + if (this.AI.max) { this.AI.width = 500 this.AI.height = this.frameHeight - }else{ + } else { this.AI.width = 24 this.AI.height = 24 }