Browse Source

打印不需要弹出选择签名,直接打印

lhqzyy
lzp 2 months ago
parent
commit
b72d5ad73d
  1. 15
      web_client/src/views/history/components/scaleInfor.vue
  2. 21
      web_client/src/views/history/components/scaleInforCopy.vue

15
web_client/src/views/history/components/scaleInfor.vue

@ -22,21 +22,21 @@
<div
class="div-derive cardRig-but"
style="width: 130px; margin-right: 10px"
@click="handleExport('医生版')"
@click="handleExport('医生版', true)"
>
<i class="el-icon-upload2"></i>导出医生版
</div>
<div
style="width: 130px; margin-right: 10px"
class="div-print cardRig-but"
@click="handlePrinting('医生版')"
@click="handlePrinting('医生版', true)"
>
<i class="el-icon-printer"></i>打印医生版
</div>
<div
class="div-derive cardRig-but"
style="width: 130px; margin-right: 10px"
@click="handleExport('阳性版')"
@click="handleExport('阳性版', true)"
>
<i class="el-icon-upload2"></i>导出阳性版
</div>
@ -405,7 +405,7 @@ export default {
this.$router.go(-1);
},
//
async handleExport(_type) {
async handleExport(_type, _printFlat) {
this.type = _type;
let params = {
evaluationId: this.reportDetail1.patient.evaluationId,
@ -423,8 +423,8 @@ export default {
const { code, msg, data } = res;
if (code === 200) {
//
if (!this.open) {
// true
if (_printFlat) {
//
window.open(this.apiUrl + data.path);
} else {
@ -494,7 +494,8 @@ export default {
handlePrinting(_type) {
this.type = _type;
this.timestamp = new Date().getTime();
this.open = true;
// this.open = true;
this.handleExport(this.type);
},
//
handleInvoke(_path) {

21
web_client/src/views/history/components/scaleInforCopy.vue

@ -21,21 +21,21 @@
<div
class="div-derive cardRig-but"
style="width: 130px; margin-right: 10px"
@click="handleExport('医生版')"
@click="handleExport('医生版', true)"
>
<i class="el-icon-upload2"></i>导出医生版
</div>
<div
style="width: 130px; margin-right: 10px"
class="div-print cardRig-but"
@click="handlePrinting('医生版')"
@click="handlePrinting('医生版', true)"
>
<i class="el-icon-printer"></i>打印医生版
</div>
<div
class="div-derive cardRig-but"
style="width: 130px; margin-right: 10px"
@click="handleExport('阳性版')"
@click="handleExport('阳性版', true)"
>
<i class="el-icon-upload2"></i>导出阳性版
</div>
@ -213,7 +213,7 @@
<span>检查日期</span>
{{
$moment(reportDetail1.patient.checkTime - 0).format(
"YYYY-MM-DD HH:mm"
"YYYY-MM-DD HH:mm",
)
}}
</div>
@ -408,7 +408,7 @@ export default {
this.$router.go(-1);
},
//
async handleExport(_type) {
async handleExport(_type, _printFlat) {
this.type = _type;
let params = {
evaluationId: this.reportDetail1.patient.evaluationId,
@ -426,14 +426,14 @@ export default {
const { code, msg, data } = res;
if (code === 200) {
//
if (!this.open) {
// true
if (_printFlat) {
//
window.open(this.apiUrl + data.path);
} else {
this.open = false;
this.handleInvoke(
`${this.apiUrl}${data.path}?time${new Date().getTime()}`
`${this.apiUrl}${data.path}?time${new Date().getTime()}`,
);
}
this.$forceUpdate();
@ -497,7 +497,8 @@ export default {
handlePrinting(_type) {
this.type = _type;
this.timestamp = new Date().getTime();
this.open = true;
// this.open = true;
this.handleExport(this.type);
},
//
handleInvoke(_path) {
@ -514,7 +515,7 @@ export default {
}
this.reportPath = _path;
var iframe = document.getElementById(
"reportPartIframe" + this.timestamp
"reportPartIframe" + this.timestamp,
);
iframe.onload = () => {
iframe.contentWindow.print();

Loading…
Cancel
Save