This commit is contained in:
2025-07-29 16:24:58 +08:00
parent 8679ea5647
commit 2db6d0f98b

View File

@@ -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;