tijiao
This commit is contained in:
@@ -52,14 +52,14 @@
|
||||
</view>
|
||||
|
||||
<!-- 固定的输入框部分 -->
|
||||
<view style="height: calc(100% - 80rpx)">
|
||||
<view style="height: calc(100% - 120rpx)">
|
||||
<textarea
|
||||
v-model="formData.message"
|
||||
maxlength="-1"
|
||||
style="
|
||||
min-height: calc(88vh - 100px) !important;
|
||||
min-height: calc(85vh - 360rpx) !important;
|
||||
width: 100%;
|
||||
max-height: calc(88vh - 100px) !important;
|
||||
max-height: calc(85vh - 360rpx) !important;
|
||||
"
|
||||
auto-height
|
||||
placeholder="请输入医案到此处,将自动解析医案信息
|
||||
@@ -433,20 +433,27 @@ export default {
|
||||
// 判断内容是否为空或无效
|
||||
|
||||
getTitleHtml(html, key) {
|
||||
const div = document.createElement("div");
|
||||
div.innerHTML = html;
|
||||
var str = [
|
||||
"chiefComplaint",
|
||||
"historyOfPresentIllness",
|
||||
"physicaExamination",
|
||||
"treatmentPlan",
|
||||
].includes(key)
|
||||
? `<span style="color:#F56C6C;margin-right:4px">*</span>`
|
||||
: "";
|
||||
return div.querySelector("h1")
|
||||
? div.querySelector("h1").outerHTML || "<h1></h1>"
|
||||
: "";
|
||||
},
|
||||
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>";
|
||||
}
|
||||
},
|
||||
|
||||
async checkPermision() {
|
||||
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE");
|
||||
if (result != 1) {
|
||||
@@ -1801,7 +1808,7 @@ h3 {
|
||||
background-color: #fff;
|
||||
border: 4rpx solid #188bff !important;
|
||||
border-radius: 20rpx;
|
||||
height: 88vh;
|
||||
height: 84vh;
|
||||
|
||||
border-radius: 10px;
|
||||
|
||||
@@ -1819,7 +1826,7 @@ h3 {
|
||||
}
|
||||
}
|
||||
/deep/.home_wrap_analysis {
|
||||
height: 92vh;
|
||||
height: 89vh;
|
||||
.home_form {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@@ -450,26 +450,41 @@ export default {
|
||||
},
|
||||
|
||||
getInnerHtml(html) {
|
||||
const div = document.createElement("div");
|
||||
div.innerHTML = html;
|
||||
const children = Array.from(div.children).slice(1); // 跳过 h1
|
||||
return children.map((e) => e.outerHTML).join("");
|
||||
},
|
||||
// Regular expression to capture all HTML tags excluding the first <h1> tag
|
||||
const h1Match = html.match(/<h1[^>]*>.*?<\/h1>/);
|
||||
|
||||
// If an <h1> is found, remove it and process the rest
|
||||
if (h1Match) {
|
||||
// Remove the first <h1> and its content, then return the rest of the HTML
|
||||
html = html.replace(h1Match[0], '');
|
||||
}
|
||||
|
||||
// Return the remaining HTML
|
||||
return html;
|
||||
},
|
||||
|
||||
getTitleHtml(html, key) {
|
||||
const div = document.createElement("div");
|
||||
div.innerHTML = html;
|
||||
var str = [
|
||||
"chiefComplaint",
|
||||
"historyOfPresentIllness",
|
||||
"physicaExamination",
|
||||
"treatmentPlan",
|
||||
].includes(key)
|
||||
? `<span style="color:#F56C6C;margin-right:4px">*</span>`
|
||||
: "";
|
||||
return div.querySelector("h1")
|
||||
? div.querySelector("h1").outerHTML || "<h1></h1>"
|
||||
: "";
|
||||
},
|
||||
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>";
|
||||
}
|
||||
},
|
||||
|
||||
async checkPermision() {
|
||||
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE");
|
||||
if (result != 1) {
|
||||
|
||||
Reference in New Issue
Block a user