mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 01:41:07 +03:30
54 lines
1.9 KiB
Vue
54 lines
1.9 KiB
Vue
<template>
|
|
<v-container grid-list-xs>
|
|
<material-card color="black" title="Barcode Image">
|
|
<v-layout align-left justify-left wrap class="px-5 my-3">
|
|
<h3 class="ml-3">Barcode And QRCode Image</h3>
|
|
<v-flex xs12>
|
|
<hr class="v-divider theme--light">
|
|
</v-flex>
|
|
<v-layout row wrap class="ml-4">
|
|
<v-flex xs12 md6 sm6>
|
|
<img :src="barcodeimg">
|
|
</v-flex>
|
|
</v-layout>
|
|
<v-layout row wrap class="ml-4">
|
|
<v-flex xs12 md6 sm6>
|
|
<img :src="QRCodeimg">
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-layout>
|
|
<v-layout row wrap align-center justify-center>
|
|
<v-flex class xs12 md2 sm2 @click="print" >
|
|
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
|
<v-icon class="white--text mr-2 caption">fas fa-print</v-icon>
|
|
<span class="white--text">Print</span>
|
|
</v-btn>
|
|
</v-flex>
|
|
</v-layout>
|
|
</material-card>
|
|
</v-container>
|
|
</template>
|
|
<script>
|
|
import { mapGetters } from "vuex";
|
|
export default {
|
|
data: () => ({
|
|
barcodeimg : {},
|
|
QRCodeimg : {}
|
|
}),
|
|
created() {
|
|
this.barcodeimg = this.getModalProperties.result.data.data.Barcode;
|
|
this.QRCodeimg = this.getModalProperties.result.data.data.QRCode;
|
|
},
|
|
computed: {
|
|
...mapGetters("modal", ["getModalProperties"])
|
|
},
|
|
methods: {
|
|
print() {
|
|
let popup = window.open();
|
|
popup.document.write(`<img src="${this.barcodeimg}" style="padding:50px" /><img src="${this.QRCodeimg}" />`);
|
|
popup.focus();
|
|
popup.print();
|
|
}
|
|
}
|
|
};
|
|
</script> |