small updates getting running
This commit is contained in:
parent
e0489f5ca8
commit
5001030746
@ -2,27 +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 name="primary_device" v-model="report_type" required id="id_report_type">
|
<select name="primary_device" v-model="primary_device" required id="id_report_type">
|
||||||
<option value="-" selected>----Primary-----</option>
|
<option value="-" selected>----Primary-----</option>
|
||||||
<option value="TV">Menzer1</option>
|
<option value="Menzer1">Menzer1</option>
|
||||||
<option value="HC">Blackbelt</option>
|
<option value="Blackbelt">Blackbelt</option>
|
||||||
</select>
|
</select>
|
||||||
<h3>Calibration Date</h3>
|
<h3>Calibration Date</h3>
|
||||||
<div class="date-picker">
|
<div class="date-picker">
|
||||||
<VueDatePicker v-model="date" auto-apply :enableTimePicker="false" :flow="flow"></VueDatePicker>
|
<VueDatePicker v-model="primary_calibration_date" auto-apply :enableTimePicker="false" :flow="flow"></VueDatePicker>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<h3>Secondary Device</h3>
|
<h3>Secondary Device</h3>
|
||||||
|
|
||||||
<select name="secondary_device" v-model="report_type" required id="id_report_type">
|
<select name="secondary_device" v-model="secondary_device" required id="id_report_type">
|
||||||
<option value="-" selected>----Secondary-----</option>
|
<option value="-" selected>----Secondary-----</option>
|
||||||
<option value="TV">Menzer1</option>
|
<option value="Menzer1">Menzer1</option>
|
||||||
<option value="HC">Blackbelt</option>
|
<option value="Blackbelt">Blackbelt</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<h3>Calibration Date</h3>
|
<h3>Calibration Date</h3>
|
||||||
<div class="date-picker">
|
<div class="date-picker">
|
||||||
<VueDatePicker v-model="date" auto-apply :enableTimePicker="false" :flow="flow"></VueDatePicker>
|
<VueDatePicker v-model="secondary_calibration_date" auto-apply :enableTimePicker="false" :flow="flow"></VueDatePicker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -32,22 +32,20 @@ import { ref, defineEmits, watchEffect } from "vue";
|
|||||||
import VueDatePicker from "@vuepic/vue-datepicker";
|
import VueDatePicker from "@vuepic/vue-datepicker";
|
||||||
import "@vuepic/vue-datepicker/dist/main.css";
|
import "@vuepic/vue-datepicker/dist/main.css";
|
||||||
|
|
||||||
const model = ref(""),
|
const primary_device = ref(""),
|
||||||
serial = ref(""),
|
secondary_device = ref(""),
|
||||||
cert_id = ref(""),
|
primary_calibration_date = ref(new Date()),
|
||||||
due_date = ref(new Date()),
|
secondary_calibration_date = ref(new Date());
|
||||||
date = ref(new Date());
|
|
||||||
|
|
||||||
const flow = ref(["year", "month", "calendar"]);
|
const flow = ref(["year", "month", "calendar"]);
|
||||||
|
|
||||||
const emit = defineEmits();
|
const emit = defineEmits();
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
emit("new-calibration-form", {
|
emit("new-calibration-form", {
|
||||||
model,
|
primary_device,
|
||||||
serial,
|
secondary_device,
|
||||||
cert_id,
|
primary_calibration_date,
|
||||||
due_date,
|
secondary_calibration_date,
|
||||||
date,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<div :class="{ hide: hide }" class="px666 scroll-pdf">
|
<div :class="{ hide: hide }" class="px666 scroll-pdf">
|
||||||
<div v-for="table of tables">
|
<div id="pdf" ref="document">
|
||||||
<div id="pdf" ref="document">
|
<div v-for="table of tables">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="flex-container">
|
<div class="flex-container">
|
||||||
<div class="column pct-25">
|
<div class="column pct-25">
|
||||||
<img :src="BenchTopLogoUrl"/>
|
<img :src="BenchTopLogoUrl" alt="benchtop devices logo" />
|
||||||
</div>
|
</div>
|
||||||
<div class="column pct-50">
|
<div class="column pct-50">
|
||||||
<div>Customer: {{ props.customer?.customer_name }}</div>
|
<div>Customer: {{ props.customer?.customer_name }}</div>
|
||||||
@ -193,15 +193,19 @@ const c_due_date = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const exportToPDF = () => {
|
const exportToPDF = () => {
|
||||||
const element = document.getElementById("pdf");
|
if (props.upload !== undefined && props.upload.files.length > 0) {
|
||||||
var opt = {
|
const element = document.getElementById("pdf");
|
||||||
margin: 0.4,
|
|
||||||
filename: `${props.instrument.model}_${i_date()}.pdf`,
|
|
||||||
image: {type: "jpeg", quality: 0.98},
|
var opt = {
|
||||||
html2canvas: {scale: 2},
|
margin: 0.4,
|
||||||
jsPDF: {unit: "in", format: "letter", orientation: "portrait"},
|
filename: `${props.instrument.model}_${i_date()}.pdf`,
|
||||||
};
|
image: {type: "jpeg", quality: 0.98},
|
||||||
html2pdf().from(element).set(opt).save();
|
html2canvas: {scale: 2},
|
||||||
|
jsPDF: {unit: "in", format: "letter", orientation: "portrait"},
|
||||||
|
};
|
||||||
|
html2pdf().from(element).set(opt).save();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const output = () => {
|
const output = () => {
|
||||||
|
@ -110,7 +110,7 @@ const showNewCalibration = (val) => {
|
|||||||
show_new_calibration.value = val;
|
show_new_calibration.value = val;
|
||||||
};
|
};
|
||||||
|
|
||||||
const emits = defineEmits([
|
const emit = defineEmits([
|
||||||
"uploadForm",
|
"uploadForm",
|
||||||
"customerForm",
|
"customerForm",
|
||||||
"environmentForm",
|
"environmentForm",
|
||||||
|
4961
benchtop-fe/yarn.lock
Normal file
4961
benchtop-fe/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user