new Changes

This commit is contained in:
saeid
2019-08-21 13:59:18 +04:30
parent b9cadbedc5
commit f7c3e87e5f
127 changed files with 216 additions and 21 deletions
@@ -94,39 +94,45 @@ export default {
text: 'Dashboard'
},
{
to: {name: 'MyInfo'},
to: {name: 'My Info'},
icon: 'mdi-account',
text: 'My Info'
},
{
to: {name: 'AllResultTest'},
to: {name: 'All ResultTest'},
icon: 'description',
text: 'All Test Result'
},
{
to: {name: 'ManageUsers'},
to: {name: 'Manage Users'},
icon: 'far fa-address-book',
text: 'Manage Users',
role: 'Admin|Supervisor',
},
{
to: {name: 'ListTestType'},
to: {name: 'List TestType'},
icon: 'fas fa-vial',
text: 'List Test Type',
role: 'Admin'
},
{
to: {name: 'AllItem'},
to: {name: 'All Item'},
icon: 'done',
text: 'Items',
role: 'Admin'
},
{
to: {name: 'AllPackage'},
to: {name: 'All Package'},
icon: 'done',
text: 'Packages',
role: 'Admin'
},
{
to: {name: 'All Cycle'},
icon: 'done',
text: 'Cycles',
role: 'Admin'
},
{
to: {name: 'Statistics'},
icon: 'fas fa-chart-bar',
@@ -1,18 +1,18 @@
<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">
<v-layout id="printMe" 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>
<v-flex xs12 md6 sm6 v-if="barcodeimg">
<img :src="barcodeimg">
</v-flex>
</v-layout>
<v-layout row wrap class="ml-4">
<v-flex xs12 md6 sm6>
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
<img :src="QRCodeimg">
</v-flex>
</v-layout>
@@ -32,22 +32,49 @@
import { mapGetters } from "vuex";
export default {
data: () => ({
barcodeimg : {},
QRCodeimg : {}
barcodeimg : null,
QRCodeimg : null
}),
created() {
this.barcodeimg = this.getModalProperties.result.data.data.Barcode;
this.QRCodeimg = this.getModalProperties.result.data.data.QRCode;
this.barcodeimg = this.getModalProperties.result.data.data.Barcode ? this.getModalProperties.result.data.data.Barcode : null;
this.QRCodeimg = this.getModalProperties.result.data.data.QRCode ? this.getModalProperties.result.data.data.QRCode : null;
},
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();
const prtHtml = document.getElementById("printMe").innerHTML;
// Get all stylesheets HTML
let stylesHtml = "";
for (const node of [
...document.querySelectorAll('link[rel="stylesheet"], style')
]) {
stylesHtml += node.outerHTML;
}
// Open the print window
const WinPrint = window.open(
"",
"",
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
);
WinPrint.document.write(`<!DOCTYPE html>
<html>
<head>
${stylesHtml}
</head>
<body>
${prtHtml}
</body>
</html>`);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
}
}
};

Some files were not shown because too many files have changed in this diff Show More