From 6fff2bf185cb109fdf9f7727215bfbfb1235eea5 Mon Sep 17 00:00:00 2001 From: "1747191978@qq.com" <1942943850@qq.com> Date: Mon, 10 Mar 2025 18:00:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=A9=BA=E5=80=BC=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- acupuncture-前台/src/views/indexCom/JM.vue | 2 +- acupuncture-前台/src/views/indexCom/XGZL.vue | 10 +++++----- acupuncture-前台/src/views/indexCom/patient.vue | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/acupuncture-前台/src/views/indexCom/JM.vue b/acupuncture-前台/src/views/indexCom/JM.vue index 9bec8ac5..fe4ca143 100644 --- a/acupuncture-前台/src/views/indexCom/JM.vue +++ b/acupuncture-前台/src/views/indexCom/JM.vue @@ -174,7 +174,7 @@ export default { await zlInfo(this.queryParams).then((res) => { const { jlfb, smfb, sort, ttfb, txfb, zytz } = res.data; // 病种(主要诊断) - this.diagnoseValue = sort.sort((a, b) => a.total - b.total); + this.diagnoseValue = sort?.sort((a, b) => a.total - b.total); this.handleDiagnose(); // 体系 this.systemValue = []; diff --git a/acupuncture-前台/src/views/indexCom/XGZL.vue b/acupuncture-前台/src/views/indexCom/XGZL.vue index 08ca5f50..ae37a89c 100644 --- a/acupuncture-前台/src/views/indexCom/XGZL.vue +++ b/acupuncture-前台/src/views/indexCom/XGZL.vue @@ -233,11 +233,11 @@ export default { this.handleEffect(); // 治疗费用 this.costValue = [ - zlfy.score1, - zlfy.score2, - zlfy.score3, - zlfy.score4, - zlfy.score5, + zlfy?.score1, + zlfy?.score2, + zlfy?.score3, + zlfy?.score4, + zlfy?.score5, ]; this.handleCost(); this.loading = false; diff --git a/acupuncture-前台/src/views/indexCom/patient.vue b/acupuncture-前台/src/views/indexCom/patient.vue index ae9b2c97..ab7a81b7 100644 --- a/acupuncture-前台/src/views/indexCom/patient.vue +++ b/acupuncture-前台/src/views/indexCom/patient.vue @@ -171,7 +171,7 @@ export default { }, ]; // 年龄分布 - let ageValue = res.data.age; + let ageValue = res.data.age || {}; this.ageValue = [ ageValue.num1, ageValue.num2, @@ -181,7 +181,7 @@ export default { ageValue.num6, ]; // 病种分布 - let diseaseValue = res.data.jwbz; + let diseaseValue = res.data.jwbz || {}; this.diseaseValue = []; for (let key in diseaseValue) { let data = {