提交
This commit is contained in:
@@ -54,16 +54,13 @@
|
||||
<!-- 固定的输入框部分 -->
|
||||
<view style="height: calc(100% - 120rpx)">
|
||||
<textarea
|
||||
|
||||
v-model="formData.message"
|
||||
maxlength="-1"
|
||||
style="
|
||||
|
||||
width: 100%;
|
||||
min-height: calc(85vh - 100px) !important;
|
||||
height: calc(85vh - 100px) !important;
|
||||
max-height: calc(85vh - 100px) !important;
|
||||
|
||||
"
|
||||
auto-height
|
||||
placeholder="请输入医案到此处,将自动解析医案信息
|
||||
@@ -104,7 +101,12 @@
|
||||
class="message_wrap"
|
||||
:class="`${options.type == 'detail' ? 'message_wrap_detail' : ''}`"
|
||||
:style="`top: 1px;height:${
|
||||
options.statusId == 1 || options.statusId == 3 ? '92vh' : '85vh'
|
||||
options.statusId == 1 ||
|
||||
options.statusId == 5 ||
|
||||
options.statusId == 6 ||
|
||||
options.statusId == 4
|
||||
? '92vh'
|
||||
: '85vh'
|
||||
}`"
|
||||
v-if="showMessages"
|
||||
>
|
||||
@@ -286,36 +288,35 @@ export default {
|
||||
// this.clickRecord(this.pageData, index);
|
||||
// }
|
||||
},
|
||||
async onPullDownRefresh() {
|
||||
async onPullDownRefresh() {
|
||||
this.isRefreshing = true;
|
||||
console.log("下拉刷新");
|
||||
|
||||
setTimeout(async() => {
|
||||
if (this.options.type == "add") {
|
||||
this.showMessages = false;
|
||||
this.loading = true;
|
||||
} else {
|
||||
this.showMessages = true;
|
||||
this.loading = true;
|
||||
await this.getMedicalDetail(() => {
|
||||
this.medicalForm = { ...this.medicalRecords };
|
||||
console.log("this.medicalForm at line 193:", this.medicalForm);
|
||||
if (this.medicalRecords.img) {
|
||||
this.$refs.commonMedicalDetail.fileList1 = this.medicalRecords.img
|
||||
.split(",")
|
||||
.map((image, i) => ({
|
||||
uid: i, // 假设 id 是唯一标识符
|
||||
name: i, // 文件名
|
||||
status: "done", // 状态
|
||||
url: image, // 文件 URL
|
||||
}));
|
||||
}
|
||||
});
|
||||
setTimeout(async () => {
|
||||
if (this.options.type == "add") {
|
||||
this.showMessages = false;
|
||||
this.loading = true;
|
||||
} else {
|
||||
this.showMessages = true;
|
||||
this.loading = true;
|
||||
await this.getMedicalDetail(() => {
|
||||
this.medicalForm = { ...this.medicalRecords };
|
||||
console.log("this.medicalForm at line 193:", this.medicalForm);
|
||||
if (this.medicalRecords.img) {
|
||||
this.$refs.commonMedicalDetail.fileList1 = this.medicalRecords.img
|
||||
.split(",")
|
||||
.map((image, i) => ({
|
||||
uid: i, // 假设 id 是唯一标识符
|
||||
name: i, // 文件名
|
||||
status: "done", // 状态
|
||||
url: image, // 文件 URL
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
// this.tishi=true
|
||||
}
|
||||
// this.tishi=true
|
||||
}
|
||||
|
||||
|
||||
uni.stopPullDownRefresh();
|
||||
this.isRefreshing = false;
|
||||
console.log("下拉刷新已停止");
|
||||
@@ -383,48 +384,41 @@ export default {
|
||||
}
|
||||
}
|
||||
if (
|
||||
|
||||
["妇科", "儿科"].includes(this.medicalForm.labelTitle)&&isNewSave!=1
|
||||
) {
|
||||
if (
|
||||
|
||||
this.medicalForm.labelTitle == "妇科"
|
||||
) {
|
||||
const value = this.editableMap["personalAndFamilyHistory"] || "";
|
||||
const hasKeywords =
|
||||
value.includes("月经") || value.includes("婚育");
|
||||
["妇科", "儿科"].includes(this.medicalForm.labelTitle) &&
|
||||
isNewSave != 1
|
||||
) {
|
||||
if (this.medicalForm.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.$commonJS.showToast(
|
||||
"请在 " + titleHtml + " 中输入月经或婚育相关内容"
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (
|
||||
|
||||
this.medicalForm.labelTitle == "儿科"
|
||||
) {
|
||||
const value = this.editableMap["pastHistory"] || "";
|
||||
const hasKeywords = value.includes("疫苗");
|
||||
if (!hasKeywords) {
|
||||
// 包含“月经”或“婚育”
|
||||
console.log("疫苗");
|
||||
const titleHtml = this.getTitleHtml(
|
||||
this.record["pastHistory"]
|
||||
).replace(/<[^>]*>/g, "");
|
||||
this.$commonJS.showToast(
|
||||
"请在 " + titleHtml + " 中输入疫苗接种相关内容"
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!hasKeywords) {
|
||||
// 包含“月经”或“婚育”
|
||||
console.log("包含月经或婚育相关内容");
|
||||
const titleHtml = this.getTitleHtml(
|
||||
this.record["personalAndFamilyHistory"]
|
||||
).replace(/<[^>]*>/g, "");
|
||||
this.$commonJS.showToast(
|
||||
"请在 " + titleHtml + " 中输入月经或婚育相关内容"
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (this.medicalForm.labelTitle == "儿科") {
|
||||
const value = this.editableMap["pastHistory"] || "";
|
||||
const hasKeywords = value.includes("疫苗");
|
||||
if (!hasKeywords) {
|
||||
// 包含“月经”或“婚育”
|
||||
console.log("疫苗");
|
||||
const titleHtml = this.getTitleHtml(
|
||||
this.record["pastHistory"]
|
||||
).replace(/<[^>]*>/g, "");
|
||||
this.$commonJS.showToast(
|
||||
"请在 " + titleHtml + " 中输入疫苗接种相关内容"
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
var recordData = { ...this.record };
|
||||
for (const key in recordData) {
|
||||
const titleHtml = this.getTitleHtml(recordData[key]);
|
||||
@@ -465,6 +459,11 @@ export default {
|
||||
url: `/pages/medicalRecords/medical?navTitle=编辑医案&title=编辑医案&id=${this.medicalId}&type=edit&statusId=0`,
|
||||
});
|
||||
} else {
|
||||
if (type == "submit") {
|
||||
uni.setStorageSync("medicalRecordsStatusId", 1);
|
||||
} else {
|
||||
uni.removeStorageSync("medicalRecordsStatusId");
|
||||
}
|
||||
uni.redirectTo({
|
||||
url: "/pages/medicalRecords/index",
|
||||
});
|
||||
@@ -479,26 +478,26 @@ export default {
|
||||
// 判断内容是否为空或无效
|
||||
|
||||
getTitleHtml(html, key) {
|
||||
const str = [
|
||||
"chiefComplaint",
|
||||
"historyOfPresentIllness",
|
||||
"physicaExamination",
|
||||
"treatmentPlan",
|
||||
].includes(key)
|
||||
? `<span style="color:#F56C6C;margin-right:4px">*</span>`
|
||||
: "";
|
||||
const str = [
|
||||
"chiefComplaint",
|
||||
"historyOfPresentIllness",
|
||||
"physicaExamination",
|
||||
"treatmentPlan",
|
||||
].includes(key)
|
||||
? `<span style="color:#F56C6C;margin-right:4px">*</span>`
|
||||
: "";
|
||||
|
||||
// Regular expression to capture the first <h1> element in the HTML
|
||||
const h1Match = html.match(/<h1[^>]*>(.*?)<\/h1>/);
|
||||
|
||||
if (h1Match) {
|
||||
// If an <h1> is found, return it with the prepended star if needed
|
||||
return `<h1>${str}${h1Match[1]}</h1>`;
|
||||
} else {
|
||||
// If no <h1> is found, return an empty <h1>
|
||||
return "<h1></h1>";
|
||||
}
|
||||
},
|
||||
// Regular expression to capture the first <h1> element in the HTML
|
||||
const h1Match = html.match(/<h1[^>]*>(.*?)<\/h1>/);
|
||||
|
||||
if (h1Match) {
|
||||
// If an <h1> is found, return it with the prepended star if needed
|
||||
return `<h1>${str}${h1Match[1]}</h1>`;
|
||||
} else {
|
||||
// If no <h1> is found, return an empty <h1>
|
||||
return "<h1></h1>";
|
||||
}
|
||||
},
|
||||
|
||||
async checkPermision() {
|
||||
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE");
|
||||
@@ -753,7 +752,7 @@ export default {
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
console.log('res at line 713:', res)
|
||||
console.log("res at line 713:", res);
|
||||
if (res.code == 0) {
|
||||
this.medicalId = res.data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user