Browse Source

评估报告下载改为打印

new-ays
liuzhipeng 3 months ago
parent
commit
786881b9f4
  1. 27
      acupuncture-前台/src/views/medicalFile/index.vue

27
acupuncture-前台/src/views/medicalFile/index.vue

@ -610,6 +610,12 @@
</el-form-item>
</el-form>
</el-dialog>
<iframe
:src="reportPath"
frameborder="0"
:id="'codePartIframe' + timestamp"
style="display: none"
></iframe>
</div>
</template>
@ -631,6 +637,9 @@ export default {
dicts: ["sys_normal_disable", "sys_user_sex"],
data() {
return {
reportPath: "",
timestamp: "",
qzUrl: process.env.VUE_APP_API_QZURL, //
userInfo: {},
//
@ -1096,9 +1105,21 @@ export default {
},
//
handleReport(row) {
exportTreatmentPg({ treatmentId: row.id }).then((res) => {
window.open(`${process.env.VUE_APP_API_QZURL}${res.data}`);
});
try {
this.timestamp = new Date().getTime();
exportTreatmentPg({ treatmentId: row.id }).then((res) => {
this.reportPath = `${process.env.VUE_APP_API_QZURL}${res.data}`;
var iframe = document.getElementById(
"codePartIframe" + this.timestamp
);
iframe.onload = () => {
iframe.contentWindow.print();
};
// window.open(`${process.env.VUE_APP_API_QZURL}${res.data}`);
});
} catch (error) {
console.log("error: ", error);
}
},
/** 提交审核 */
handleExamine(row, _status) {

Loading…
Cancel
Save