From 110da652dbc8e728c6209e7085e93242afcdc166 Mon Sep 17 00:00:00 2001 From: "1747191978@qq.com" <1942943850@qq.com> Date: Mon, 10 Mar 2025 14:25:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=8A=E7=96=97=E6=A1=A3=E6=A1=88=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=82=A3=E8=80=85=E5=81=A5=E5=BA=B7=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=EF=BC=88PHQ-9=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../medicalFile/components/posture/PHQ-9.vue | 11 +- .../medicalFile/components/posture/epworth.vue | 182 ++++++++++++++++++ .../src/views/medicalFile/details.vue | 19 +- 3 files changed, 203 insertions(+), 9 deletions(-) create mode 100644 acupuncture-前台/src/views/medicalFile/components/posture/epworth.vue diff --git a/acupuncture-前台/src/views/medicalFile/components/posture/PHQ-9.vue b/acupuncture-前台/src/views/medicalFile/components/posture/PHQ-9.vue index 9af9b739..0dc3531a 100644 --- a/acupuncture-前台/src/views/medicalFile/components/posture/PHQ-9.vue +++ b/acupuncture-前台/src/views/medicalFile/components/posture/PHQ-9.vue @@ -140,9 +140,12 @@ export default { created() { this.treatmentId = this.$route.query.treatmentId; // 诊疗id let scaleData = localStorage.getItem("scaleData"); // 获取上次填写的数据 - this.scaleData = JSON.parse(scaleData) || {}; - console.log(" this.scaleData", this.scaleData); - this.form = this.scaleData[this.treatmentId] || {}; // 将上次填写的数据赋值给form + this.scaleData = scaleData + ? JSON.parse(scaleData) + : { + [this.treatmentId]: {}, + }; + this.form = this.scaleData[this.treatmentId].PHQ9 || {}; // 将上次填写的数据赋值给form }, methods: { submitForm() { @@ -154,7 +157,7 @@ export default { } } // 存储数据 - this.scaleData[this.treatmentId] = this.form; + this.scaleData[this.treatmentId].PHQ9 = this.form; localStorage.setItem("scaleData", JSON.stringify(this.scaleData)); // 将数据传递给父组件 this.$emit("getScaleResult", score, "PG_SM_PHQ-9_DF"); diff --git a/acupuncture-前台/src/views/medicalFile/components/posture/epworth.vue b/acupuncture-前台/src/views/medicalFile/components/posture/epworth.vue new file mode 100644 index 00000000..9af9b739 --- /dev/null +++ b/acupuncture-前台/src/views/medicalFile/components/posture/epworth.vue @@ -0,0 +1,182 @@ + + + + + + {{ item.index }}. {{ item.question }} + + + {{ criteria.label }} + + + + + + 提交 + + + + + + + + + diff --git a/acupuncture-前台/src/views/medicalFile/details.vue b/acupuncture-前台/src/views/medicalFile/details.vue index 2d3a44c7..cc842e91 100644 --- a/acupuncture-前台/src/views/medicalFile/details.vue +++ b/acupuncture-前台/src/views/medicalFile/details.vue @@ -246,10 +246,16 @@ placeholder="请输入" /> - + + + Epworth嗜睡评估得分(0-24分) + + 评估 + + import { queryRecord, saveAidRecord } from "@/api/medicalFile"; -import PHQ from "./components/posture/PHQ-9"; +import PHQ from "./components/posture/PHQ-9"; // 患者健康问卷(PHQ-9) +import epworth from "./components/posture/PHQ-9"; // Epworth嗜睡评估 export default { name: "Notice", components: { PHQ, + epworth, }, data() { return { @@ -451,6 +459,7 @@ export default { component: { // 失眠评估 PHQ9: "PHQ", // 患者健康问卷(PHQ-9) + epworth: "epworth", // Epworth嗜睡评估 }, // 量表组件集合 componentsCode: "", // 量表组件code stepActive: 0,