mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 16:11:07 +03:30
new Changes
This commit is contained in:
+12
-6
@@ -94,39 +94,45 @@ export default {
|
|||||||
text: 'Dashboard'
|
text: 'Dashboard'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: {name: 'MyInfo'},
|
to: {name: 'My Info'},
|
||||||
icon: 'mdi-account',
|
icon: 'mdi-account',
|
||||||
text: 'My Info'
|
text: 'My Info'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: {name: 'AllResultTest'},
|
to: {name: 'All ResultTest'},
|
||||||
icon: 'description',
|
icon: 'description',
|
||||||
text: 'All Test Result'
|
text: 'All Test Result'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: {name: 'ManageUsers'},
|
to: {name: 'Manage Users'},
|
||||||
icon: 'far fa-address-book',
|
icon: 'far fa-address-book',
|
||||||
text: 'Manage Users',
|
text: 'Manage Users',
|
||||||
role: 'Admin|Supervisor',
|
role: 'Admin|Supervisor',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: {name: 'ListTestType'},
|
to: {name: 'List TestType'},
|
||||||
icon: 'fas fa-vial',
|
icon: 'fas fa-vial',
|
||||||
text: 'List Test Type',
|
text: 'List Test Type',
|
||||||
role: 'Admin'
|
role: 'Admin'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: {name: 'AllItem'},
|
to: {name: 'All Item'},
|
||||||
icon: 'done',
|
icon: 'done',
|
||||||
text: 'Items',
|
text: 'Items',
|
||||||
role: 'Admin'
|
role: 'Admin'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: {name: 'AllPackage'},
|
to: {name: 'All Package'},
|
||||||
icon: 'done',
|
icon: 'done',
|
||||||
text: 'Packages',
|
text: 'Packages',
|
||||||
role: 'Admin'
|
role: 'Admin'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
to: {name: 'All Cycle'},
|
||||||
|
icon: 'done',
|
||||||
|
text: 'Cycles',
|
||||||
|
role: 'Admin'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
to: {name: 'Statistics'},
|
to: {name: 'Statistics'},
|
||||||
icon: 'fas fa-chart-bar',
|
icon: 'fas fa-chart-bar',
|
||||||
+38
-11
@@ -1,18 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-container grid-list-xs>
|
<v-container grid-list-xs>
|
||||||
<material-card color="black" title="Barcode Image">
|
<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>
|
<h3 class="ml-3">Barcode And QRCode Image</h3>
|
||||||
<v-flex xs12>
|
<v-flex xs12>
|
||||||
<hr class="v-divider theme--light">
|
<hr class="v-divider theme--light">
|
||||||
</v-flex>
|
</v-flex>
|
||||||
<v-layout row wrap class="ml-4">
|
<v-layout row wrap class="ml-4">
|
||||||
<v-flex xs12 md6 sm6>
|
<v-flex xs12 md6 sm6 v-if="barcodeimg">
|
||||||
<img :src="barcodeimg">
|
<img :src="barcodeimg">
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
<v-layout row wrap class="ml-4">
|
<v-layout row wrap class="ml-4">
|
||||||
<v-flex xs12 md6 sm6>
|
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||||
<img :src="QRCodeimg">
|
<img :src="QRCodeimg">
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
@@ -32,22 +32,49 @@
|
|||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
export default {
|
export default {
|
||||||
data: () => ({
|
data: () => ({
|
||||||
barcodeimg : {},
|
barcodeimg : null,
|
||||||
QRCodeimg : {}
|
QRCodeimg : null
|
||||||
}),
|
}),
|
||||||
created() {
|
created() {
|
||||||
this.barcodeimg = this.getModalProperties.result.data.data.Barcode;
|
this.barcodeimg = this.getModalProperties.result.data.data.Barcode ? this.getModalProperties.result.data.data.Barcode : null;
|
||||||
this.QRCodeimg = this.getModalProperties.result.data.data.QRCode;
|
this.QRCodeimg = this.getModalProperties.result.data.data.QRCode ? this.getModalProperties.result.data.data.QRCode : null;
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters("modal", ["getModalProperties"])
|
...mapGetters("modal", ["getModalProperties"])
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
print() {
|
print() {
|
||||||
let popup = window.open();
|
const prtHtml = document.getElementById("printMe").innerHTML;
|
||||||
popup.document.write(`<img src="${this.barcodeimg}" style="padding:50px" /><img src="${this.QRCodeimg}" />`);
|
|
||||||
popup.focus();
|
// Get all stylesheets HTML
|
||||||
popup.print();
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Vendored
Vendored
Vendored
Vendored
Vendored
Vendored
Vendored
Vendored
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user