pdf display
This commit is contained in:
parent
c2ae7bc9f0
commit
a5291031aa
@ -1,5 +1,4 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {ref} from "vue"
|
|
||||||
import Sheet from './components/Sheet.vue'
|
import Sheet from './components/Sheet.vue'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -2,48 +2,27 @@
|
|||||||
<div class="card-header">Calibration Devices</div>
|
<div class="card-header">Calibration Devices</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3>Primary Device</h3>
|
<h3>Primary Device</h3>
|
||||||
<select
|
<select name="primary_device" v-model="report_type" required id="id_report_type">
|
||||||
name="primary_device"
|
|
||||||
v-model="report_type"
|
|
||||||
required
|
|
||||||
id="id_report_type"
|
|
||||||
>
|
|
||||||
<option value="-" selected>----Primary-----</option>
|
<option value="-" selected>----Primary-----</option>
|
||||||
<option value="TV">Menzer1</option>
|
<option value="TV">Menzer1</option>
|
||||||
<option value="HC">Blackbelt</option>
|
<option value="HC">Blackbelt</option>
|
||||||
</select>
|
</select>
|
||||||
<td colspan="2">
|
|
||||||
<h3>Calibration Date</h3>
|
<h3>Calibration Date</h3>
|
||||||
<div class="date-picker">
|
<div class="date-picker">
|
||||||
<VueDatePicker
|
<VueDatePicker v-model="date" auto-apply :enableTimePicker="false" :flow="flow"></VueDatePicker>
|
||||||
v-model="date"
|
|
||||||
auto-apply
|
|
||||||
:enableTimePicker="false"
|
|
||||||
:flow="flow"
|
|
||||||
></VueDatePicker>
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
|
||||||
<hr />
|
<hr />
|
||||||
<h3>Secondary Device</h3>
|
<h3>Secondary Device</h3>
|
||||||
|
|
||||||
<select
|
<select name="secondary_device" v-model="report_type" required id="id_report_type">
|
||||||
name="secondary_device"
|
|
||||||
v-model="report_type"
|
|
||||||
required
|
|
||||||
id="id_report_type"
|
|
||||||
>
|
|
||||||
<option value="-" selected>----Secondary-----</option>
|
<option value="-" selected>----Secondary-----</option>
|
||||||
<option value="TV">Menzer1</option>
|
<option value="TV">Menzer1</option>
|
||||||
<option value="HC">Blackbelt</option>
|
<option value="HC">Blackbelt</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<h3>Calibration Date</h3>
|
<h3>Calibration Date</h3>
|
||||||
<div class="date-picker">
|
<div class="date-picker">
|
||||||
<VueDatePicker
|
<VueDatePicker v-model="date" auto-apply :enableTimePicker="false" :flow="flow"></VueDatePicker>
|
||||||
v-model="date"
|
|
||||||
auto-apply
|
|
||||||
:enableTimePicker="false"
|
|
||||||
:flow="flow"
|
|
||||||
></VueDatePicker>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Barometric Pressure (psi)</td>
|
<td>Pressure (psi)</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="number" name="pressure" step="0.01" max="1000" min="0" v-model="pressure"
|
<input type="number" name="pressure" step="0.01" max="1000" min="0" v-model="pressure"
|
||||||
required id="id_pressure">
|
required id="id_pressure">
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
<button class="custom-button" @click="exportToPDF">
|
<button class="custom-button" @click="exportToPDF">
|
||||||
Generate PDF and Label
|
Generate PDF and Label
|
||||||
</button>
|
</button>
|
||||||
<div :class="{ hide: hide }">
|
<br>
|
||||||
|
<br>
|
||||||
|
<div :class="{ hide: hide }" class="px666">
|
||||||
<div id="pdf" ref="document">
|
<div id="pdf" ref="document">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="flex-container">
|
<div class="flex-container">
|
||||||
@ -84,7 +86,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="label">Humidity (%RH):</span
|
<span class="label">Humidity (%RH):</span
|
||||||
>{{ props.environment?.humidity }}}
|
>{{ props.environment?.humidity }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -308,7 +310,7 @@ import { ref, defineProps } from "vue";
|
|||||||
import html2pdf from "html2pdf.js";
|
import html2pdf from "html2pdf.js";
|
||||||
import BenchTopLogoUrl from "../../assets/BenchTopLogo.png";
|
import BenchTopLogoUrl from "../../assets/BenchTopLogo.png";
|
||||||
import Al2pCertUrl from "../../assets/al2pCert.png";
|
import Al2pCertUrl from "../../assets/al2pCert.png";
|
||||||
const hide = ref(true);
|
const hide = ref(false);
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
upload: Object,
|
upload: Object,
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="flextainer">
|
||||||
<div class="item card">
|
<div class="left">
|
||||||
|
<div class="grid">
|
||||||
|
<div class="grid-item item card">
|
||||||
<UploadForm @uploadForm="uploadForm" />
|
<UploadForm @uploadForm="uploadForm" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="grid-item item card">
|
||||||
<div class="item card">
|
|
||||||
<CustomerForm @customerForm="customerForm" />
|
<CustomerForm @customerForm="customerForm" />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="item card">
|
<div class="grid">
|
||||||
|
<div class="grid-item item card">
|
||||||
<EnvironmentForm @environmentForm="environmentForm" />
|
<EnvironmentForm @environmentForm="environmentForm" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="grid-item item card">
|
||||||
<div class="item card">
|
|
||||||
<InstrumentForm
|
<InstrumentForm
|
||||||
v-if="!show_new_instrument"
|
v-if="!show_new_instrument"
|
||||||
@instrumentForm="instrumentForm"
|
@instrumentForm="instrumentForm"
|
||||||
@ -23,8 +24,8 @@
|
|||||||
@newInstrumentForm="newInstrumentForm"
|
@newInstrumentForm="newInstrumentForm"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="item card">
|
<div class="grid-item item card">
|
||||||
<CalibrationDeviceForm
|
<CalibrationDeviceForm
|
||||||
v-if="!show_new_calibration"
|
v-if="!show_new_calibration"
|
||||||
@calibrationForm="calibrationForm"
|
@calibrationForm="calibrationForm"
|
||||||
@ -35,8 +36,9 @@
|
|||||||
@newCalibrationForm="newCalibrationForm"
|
@newCalibrationForm="newCalibrationForm"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="item card">
|
<div class="right">
|
||||||
<PDF
|
<PDF
|
||||||
:upload="upload_form_data"
|
:upload="upload_form_data"
|
||||||
:customer="customer_form_data"
|
:customer="customer_form_data"
|
||||||
|
@ -29,12 +29,12 @@
|
|||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(file, index) in files" :key="index" class="file-list">
|
<li v-for="(file, index) in files" :key="index" class="file-list">
|
||||||
<button class="custom-button red" @click="removeUpload(index)">x</button>
|
<button class="custom-button red" @click="removeUpload(index)">x</button> {{ file.name }}
|
||||||
{{ file.name }}
|
<div>
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
name="alignment"
|
:name="'kind_' + index"
|
||||||
value="both"
|
value="both"
|
||||||
@change="kindChange('both', file)"
|
@change="kindChange('both', file)"
|
||||||
/>
|
/>
|
||||||
@ -43,7 +43,7 @@
|
|||||||
<label>
|
<label>
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
name="alignment"
|
:name="'kind_' + index"
|
||||||
value="left"
|
value="left"
|
||||||
@change="kindChange('left', file)"
|
@change="kindChange('left', file)"
|
||||||
/>
|
/>
|
||||||
@ -52,12 +52,13 @@
|
|||||||
<label>
|
<label>
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
name="alignment"
|
:name="'kind_' + index"
|
||||||
value="found"
|
value="found"
|
||||||
@change="kindChange('found', file)"
|
@change="kindChange('found', file)"
|
||||||
/>
|
/>
|
||||||
As Found
|
As Found
|
||||||
</label>
|
</label>
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ body {
|
|||||||
|
|
||||||
.card {
|
.card {
|
||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
min-height: 300px;
|
|
||||||
}
|
}
|
||||||
.card-header{
|
.card-header{
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
@ -14,19 +13,6 @@ body {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
|
||||||
display: flex;
|
|
||||||
flex-flow: column wrap;
|
|
||||||
align-content: space-between;
|
|
||||||
/* Your container needs a fixed height, and it
|
|
||||||
* needs to be taller than your tallest column. */
|
|
||||||
height: 1800px;
|
|
||||||
|
|
||||||
border-radius: 3px;
|
|
||||||
counter-reset: items;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
/* Optional */
|
/* Optional */
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -44,29 +30,7 @@ body {
|
|||||||
0 16px 16px rgba(0,90,250,0.05);
|
0 16px 16px rgba(0,90,250,0.05);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
min-width:466px;
|
|
||||||
min-height:325px;
|
|
||||||
}
|
}
|
||||||
.item::before {
|
|
||||||
counter-increment: items;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Re-order items into 3 rows */
|
|
||||||
.item:nth-child(3n+1) { order: 1; }
|
|
||||||
.item:nth-child(3n+2) { order: 2; }
|
|
||||||
.item:nth-child(3n) { order: 3; }
|
|
||||||
|
|
||||||
/* Force new columns */
|
|
||||||
.container::before,
|
|
||||||
.container::after {
|
|
||||||
content: "";
|
|
||||||
flex-basis: 100%;
|
|
||||||
width: 0;
|
|
||||||
order: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
@ -93,3 +57,40 @@ h3 {
|
|||||||
.dp__flex_display {
|
.dp__flex_display {
|
||||||
display:block ! important;
|
display:block ! important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.flextainer {
|
||||||
|
display: flex;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
flex-basis: 33%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-item {
|
||||||
|
width: 425px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
padding-left: 1rem;
|
||||||
|
padding-right:4rem;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.px666 {
|
||||||
|
width: 666px;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user