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

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

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

Loading…
Cancel
Save