专家意见

main
SWX\10484 4 days ago
parent 5d267e1cf2
commit 98475e6903
  1. 18
      public/report-template.html
  2. 18
      src/views/cases/components/UltrasoundReportPrint.vue

@ -12,7 +12,7 @@
<body> <body>
<div align="left"> <div align="left">
$$logo$$ $$logo$$
<h1 align="center"> 青岛海信医疗设备股份有限公司 </h1> <h1 align="center"> 青岛海信智能医疗技术有限公司 </h1>
<h2 align="center"> 彩色多普勒超声检查报告单 </h2> <h2 align="center"> 彩色多普勒超声检查报告单 </h2>
</div> </div>
<div style="margin-top:15px; "> <div style="margin-top:15px; ">
@ -74,12 +74,26 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<!--expert_section_start-->
<div style="margin-top:25px; width: 100%; " align="center">
<table width="100%" align="center">
<tbody>
<tr>
<td style="font-size: 12pt;"><b>专家意见</b></td>
</tr>
<tr>
<td style="padding-top:16px;padding-left:36px;font-size: 12pt;"><code>$$user_comment$$</code></td>
</tr>
</tbody>
</table>
</div>
<!--expert_section_end-->
<div class="footer"> <div class="footer">
<hr style="height:2px;border:none;border-top:2px solid #000000;" width="100%/"> <hr style="height:2px;border:none;border-top:2px solid #000000;" width="100%/">
<table width="100%" align="center"> <table width="100%" align="center">
<tbody> <tbody>
<tr> <tr>
<td valign="bottom" style="font-size: 12pt;"><b>青岛海信医疗设备股份有限公司</b></td> <td valign="bottom" style="font-size: 12pt;"><b>青岛海信智能医疗技术有限公司</b></td>
<td valign="bottom" style="font-size: 12pt;"><b>诊断医师:</b> $$reportor_sig$$ </td> <td valign="bottom" style="font-size: 12pt;"><b>诊断医师:</b> $$reportor_sig$$ </td>
<td valign="bottom" style="font-size: 12pt;"><b>检查日期:</b> $$createtime$$</td> <td valign="bottom" style="font-size: 12pt;"><b>检查日期:</b> $$createtime$$</td>
</tr> </tr>

@ -47,6 +47,12 @@ export default {
if (!this.templateContent || !this.report) return ""; if (!this.templateContent || !this.report) return "";
let content = this.templateContent; let content = this.templateContent;
const data = this.report; const data = this.report;
console.log(data)
console.log(data.patient_age + data.patient_age_type
? this.patientAgeTypeList.find(
(i) => i.value == data.patient_age_type
).label || ""
: "" || "")
// + // +
const mappings = { const mappings = {
$$logo$$: this.renderLogo(), $$logo$$: this.renderLogo(),
@ -61,9 +67,9 @@ export default {
"", "",
$$age$$: $$age$$:
data.patient_age + data.patient_age_type data.patient_age + data.patient_age_type
? this.patientAgeTypeList.find( ? `${data.patient_age}${this.patientAgeTypeList.find(
(i) => i.value == data.patient_age_type (i) => i.value == data.patient_age_type
).label || "" ).label || ""}`
: "" || "", : "" || "",
$$examroom$$: data.exam_rooms.map((item) => item.name).join(", "), $$examroom$$: data.exam_rooms.map((item) => item.name).join(", "),
$$requestdoctor$$: data.request_doctor || "", $$requestdoctor$$: data.request_doctor || "",
@ -77,12 +83,20 @@ export default {
$$reportor_sig$$: this.renderSignature(), $$reportor_sig$$: this.renderSignature(),
$$createtime$$: data.create_time || "", $$createtime$$: data.create_time || "",
$$creati$$: data.create_time || "", $$creati$$: data.create_time || "",
$$user_comment$$: data.user_comment || "",
}; };
// $ // $
Object.keys(mappings).forEach((key) => { Object.keys(mappings).forEach((key) => {
const reg = new RegExp(key.replace(/\$/g, "\\$"), "g"); const reg = new RegExp(key.replace(/\$/g, "\\$"), "g");
content = content.replace(reg, mappings[key]); content = content.replace(reg, mappings[key]);
}); });
// user_comment
if (!data.user_comment) {
content = content.replace(
/<!--expert_section_start-->[\s\S]*?<!--expert_section_end-->/g,
""
);
}
return content; return content;
}, },
}, },

Loading…
Cancel
Save