From 2db6d0f98b02ea7bcf2e11d1f7591a966cb27b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com> Date: Tue, 29 Jul 2025 16:24:58 +0800 Subject: [PATCH] tijiao --- pages/medicalRecords/medical.vue | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/pages/medicalRecords/medical.vue b/pages/medicalRecords/medical.vue index 38a58a81..73f8a868 100644 --- a/pages/medicalRecords/medical.vue +++ b/pages/medicalRecords/medical.vue @@ -382,7 +382,49 @@ export default { return false; } } + if ( + ["妇科", "儿科"].includes(this.currentNode.data.title) || + ["妇科", "儿科"].includes(this.addCertificateForm.labelTitle) + ) { + if ( + this.currentNode.data.title == "妇科" || + this.addCertificateForm.labelTitle == "妇科" + ) { + const value = this.editableMap["personalAndFamilyHistory"] || ""; + const hasKeywords = + value.includes("月经") && value.includes("婚育"); + if (!hasKeywords) { + // 包含“月经”或“婚育” + console.log("包含月经或婚育相关内容"); + const titleHtml = this.getTitleHtml( + this.record["personalAndFamilyHistory"] + ).replace(/<[^>]*>/g, ""); + this.$message.error( + "请在 " + titleHtml + " 中输入月经或婚育相关内容" + ); + return false; + } + } + if ( + this.currentNode.data.title == "儿科" || + this.addCertificateForm.labelTitle == "儿科" + ) { + const value = this.editableMap["pastHistory"] || ""; + const hasKeywords = value.includes("疫苗"); + if (!hasKeywords) { + // 包含“月经”或“婚育” + console.log("疫苗"); + const titleHtml = this.getTitleHtml( + this.record["pastHistory"] + ).replace(/<[^>]*>/g, ""); + this.$message.error( + "请在 " + titleHtml + " 中输入疫苗接种相关内容" + ); + return false; + } + } + } var recordData = { ...this.record }; for (const key in recordData) { const titleHtml = this.getTitleHtml(recordData[key]); @@ -711,6 +753,7 @@ export default { }, }) .then((res) => { + console.log('res at line 713:', res) if (res.code == 0) { this.medicalId = res.data;