From c6f07aab494aa0af680275f7c02b11cf1ced3467 Mon Sep 17 00:00:00 2001 From: "1747191978@qq.com" <1942943850@qq.com> Date: Mon, 14 Apr 2025 11:27:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E7=AD=9B=E6=9F=A5=E8=BF=87?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E6=8F=90=E7=A4=BA=E6=98=AF=E5=90=A6=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E7=BB=93=E8=AE=BA=EF=BC=8C=E7=BC=96=E8=BE=91=E6=82=A3?= =?UTF-8?q?=E8=80=85=E3=80=81=E6=9F=A5=E7=9C=8B=E7=BB=93=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/screening/h5eva.vue | 80 +++++++++++-------- 1 file changed, 48 insertions(+), 32 deletions(-) diff --git a/acupuncture-前台/src/views/screening/h5eva.vue b/acupuncture-前台/src/views/screening/h5eva.vue index a133e2b0..071d7a54 100644 --- a/acupuncture-前台/src/views/screening/h5eva.vue +++ b/acupuncture-前台/src/views/screening/h5eva.vue @@ -276,19 +276,25 @@
{{ tenantName || "-" }}
- 属于{{ - form["SCWJ-JL"] || "-" - }}型肥胖,建议扫码关注医院公众号,预约体重管理中心医师进一步评估。 -
- + +
+ + 编辑信息 + + + 查看结论 +
@@ -310,7 +316,7 @@ export default { open: false, loading: false, disabled: true, - + detailList: {}, tenantId: "", tenantName: "", stepNum: 1, // 步骤数 @@ -640,39 +646,40 @@ export default { }, }, methods: { + // 编辑信息 + handleContinue() { + this.form = { ...this.form, ...this.detailList }; + this.open = false; + }, + // 查看结果 + handleResult() { + this.$router.replace({ + path: "/screening/h5Result", + query: { + tenantName: this.tenantName, + data: JSON.stringify(this.detailList), + }, + }); + this.open = false; + }, // 通过手机号查询 getqueryDetailNoToken() { let phone = this.form["SCWJ-PHONE"]; let name = this.form["SCWJ-NAME"]; // // 手机号是否格式正确 if (name && phone && /^1[3456789]\d{9}$/.test(phone)) { - queryDetailNoToken({ param: { keywords: phone } }).then((res) => { - let flat = false; - let detailList = null; - res.data.list.forEach((item) => { - let data = {}; - if (item.detailList) { - item.detailList?.forEach((row) => { - item[row.questionCode] = row.answer; - data[row.questionCode] = row.answer; + queryDetailNoToken({ param: { name: name, phone: phone } }).then( + (res) => { + this.detailList = {}; + if (res.data.list.length) { + let data = res.data.list[0]; + data.detailList.forEach((item) => { + this.detailList[item.questionCode] = item.answer; }); + this.open = true; } - if (item["SCWJ-NAME"] == name && item["SCWJ-PHONE"] == phone) { - flat = true; - detailList = data; - console.log("已经筛查过,直接显示结果"); - } - }); - if (flat) { - this.$router.replace({ - path: "/screening/h5Result", - query: { - tenantName: this.tenantName, - data: JSON.stringify(detailList), - }, - }); } - }); + ); } }, // 获取筛查结论 @@ -978,6 +985,12 @@ export default {