refactor
This commit is contained in:
parent
98bf4532aa
commit
6c8c0939b4
8 changed files with 27 additions and 14 deletions
|
@ -24,7 +24,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
import { mapState, mapActions } from "pinia";
|
import { mapState, mapActions } from "pinia";
|
||||||
import { useModalStore } from "../stores/modal";
|
import { useModalStore } from "@/stores/modal";
|
||||||
import {
|
import {
|
||||||
barcodeFormats,
|
barcodeFormats,
|
||||||
defaultConstraintOptions,
|
defaultConstraintOptions,
|
||||||
|
@ -32,7 +32,7 @@ import {
|
||||||
handleScannerError,
|
handleScannerError,
|
||||||
trackFunctionOptions,
|
trackFunctionOptions,
|
||||||
type Camera,
|
type Camera,
|
||||||
} from "../helpers/codeScanner";
|
} from "@/helpers/codeScanner";
|
||||||
import { QrcodeStream, type DetectedBarcode } from "vue-qrcode-reader";
|
import { QrcodeStream, type DetectedBarcode } from "vue-qrcode-reader";
|
||||||
import { XMarkIcon } from "@heroicons/vue/24/outline";
|
import { XMarkIcon } from "@heroicons/vue/24/outline";
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -49,7 +49,6 @@ export default defineComponent({
|
||||||
const fileURL = window.URL.createObjectURL(new Blob([response.data]));
|
const fileURL = window.URL.createObjectURL(new Blob([response.data]));
|
||||||
const fileLink = this.$refs.download as HTMLAnchorElement;
|
const fileLink = this.$refs.download as HTMLAnchorElement;
|
||||||
fileLink.href = fileURL;
|
fileLink.href = fileURL;
|
||||||
console.log(this.data);
|
|
||||||
fileLink.setAttribute(
|
fileLink.setAttribute(
|
||||||
"download",
|
"download",
|
||||||
this.data.others == "pdf" ? `${this.data.title}.pdf` : `${this.data.title}.png`
|
this.data.others == "pdf" ? `${this.data.title}.pdf` : `${this.data.title}.png`
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { useEquipmentStore } from "@/stores/admin/unit/equipment/equipment";
|
import { useEquipmentStore } from "@/stores/admin/unit/equipment/equipment";
|
||||||
import { useEquipmentDamageReportStore } from "../../stores/admin/unit/equipment/damageReport";
|
import { useEquipmentDamageReportStore } from "@/stores/admin/unit/equipment/damageReport";
|
||||||
import { useEquipmentInspectionStore } from "../../stores/admin/unit/equipment/inspection";
|
import { useEquipmentInspectionStore } from "@/stores/admin/unit/equipment/inspection";
|
||||||
|
|
||||||
export async function setEquipmentId(to: any, from: any, next: any) {
|
export async function setEquipmentId(to: any, from: any, next: any) {
|
||||||
const equipmentStore = useEquipmentStore();
|
const equipmentStore = useEquipmentStore();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { useInspectionPlanStore } from "@/stores/admin/unit/inspectionPlan/inspectionPlan";
|
import { useInspectionPlanStore } from "@/stores/admin/unit/inspectionPlan/inspectionPlan";
|
||||||
import { useInspectionPointStore } from "../../stores/admin/unit/inspectionPlan/inspectionPoint";
|
import { useInspectionPointStore } from "@/stores/admin/unit/inspectionPlan/inspectionPoint";
|
||||||
|
|
||||||
export async function setInspectionPlanId(to: any, from: any, next: any) {
|
export async function setInspectionPlanId(to: any, from: any, next: any) {
|
||||||
const inspectionPlanStore = useInspectionPlanStore();
|
const inspectionPlanStore = useInspectionPlanStore();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { useVehicleStore } from "@/stores/admin/unit/vehicle/vehicle";
|
import { useVehicleStore } from "@/stores/admin/unit/vehicle/vehicle";
|
||||||
import { useVehicleDamageReportStore } from "../../stores/admin/unit/vehicle/damageReport";
|
import { useVehicleDamageReportStore } from "@/stores/admin/unit/vehicle/damageReport";
|
||||||
import { useVehicleInspectionStore } from "../../stores/admin/unit/vehicle/inspection";
|
import { useVehicleInspectionStore } from "@/stores/admin/unit/vehicle/inspection";
|
||||||
|
|
||||||
export async function setVehicleId(to: any, from: any, next: any) {
|
export async function setVehicleId(to: any, from: any, next: any) {
|
||||||
const vehicleStore = useVehicleStore();
|
const vehicleStore = useVehicleStore();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { useWearableStore } from "@/stores/admin/unit/wearable/wearable";
|
import { useWearableStore } from "@/stores/admin/unit/wearable/wearable";
|
||||||
import { useWearableDamageReportStore } from "../../stores/admin/unit/wearable/damageReport";
|
import { useWearableDamageReportStore } from "@/stores/admin/unit/wearable/damageReport";
|
||||||
import { useWearableTypeInspectionPlanStore } from "../../stores/admin/unit/wearableType/inspectionPlan";
|
import { useWearableTypeInspectionPlanStore } from "@/stores/admin/unit/wearableType/inspectionPlan";
|
||||||
|
|
||||||
export async function setWearableId(to: any, from: any, next: any) {
|
export async function setWearableId(to: any, from: any, next: any) {
|
||||||
const wearableStore = useWearableStore();
|
const wearableStore = useWearableStore();
|
||||||
|
|
|
@ -6,11 +6,17 @@
|
||||||
<input type="text" id="type" :value="activeInspectionPlanObj.related.type" readonly />
|
<input type="text" id="type" :value="activeInspectionPlanObj.related.type" readonly />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="interval">Intervall</label>
|
<label for="interval" class="flex flex-row justify-between">
|
||||||
|
Intervall
|
||||||
|
<InspectionTimeFormatExplainIcon />
|
||||||
|
</label>
|
||||||
<input type="text" id="interval" :value="activeInspectionPlanObj.inspectionInterval" readonly />
|
<input type="text" id="interval" :value="activeInspectionPlanObj.inspectionInterval" readonly />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="remind">Erinnerung vor Fälligkeit</label>
|
<label for="remind" class="flex flex-row justify-between">
|
||||||
|
Erinnerung vor Fälligkeit
|
||||||
|
<InspectionTimeFormatExplainIcon />
|
||||||
|
</label>
|
||||||
<input type="text" id="remind" :value="activeInspectionPlanObj.remindTime" readonly />
|
<input type="text" id="remind" :value="activeInspectionPlanObj.remindTime" readonly />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,6 +49,7 @@ import { defineComponent } from "vue";
|
||||||
import { mapActions, mapState } from "pinia";
|
import { mapActions, mapState } from "pinia";
|
||||||
import Spinner from "@/components/Spinner.vue";
|
import Spinner from "@/components/Spinner.vue";
|
||||||
import { useInspectionPlanStore } from "@/stores/admin/unit/inspectionPlan/inspectionPlan";
|
import { useInspectionPlanStore } from "@/stores/admin/unit/inspectionPlan/inspectionPlan";
|
||||||
|
import InspectionTimeFormatExplainIcon from "@/components/admin/unit/InspectionTimeFormatExplainIcon.vue";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
|
|
@ -14,7 +14,10 @@
|
||||||
<input type="text" id="name" required v-model="inspectionPlan.title" />
|
<input type="text" id="name" required v-model="inspectionPlan.title" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="interval">Intervall</label>
|
<label for="interval" class="flex flex-row justify-between">
|
||||||
|
Intervall
|
||||||
|
<InspectionTimeFormatExplainIcon />
|
||||||
|
</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="interval"
|
id="interval"
|
||||||
|
@ -25,7 +28,10 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="remind">Erinnerung vor Fälligkeit</label>
|
<label for="remind" class="flex flex-row justify-between">
|
||||||
|
Erinnerung vor Fälligkeit
|
||||||
|
<InspectionTimeFormatExplainIcon />
|
||||||
|
</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="remind"
|
id="remind"
|
||||||
|
@ -63,6 +69,7 @@ import FailureXMark from "@/components/FailureXMark.vue";
|
||||||
import ScanInput from "@/components/ScanInput.vue";
|
import ScanInput from "@/components/ScanInput.vue";
|
||||||
import isEqual from "lodash.isequal";
|
import isEqual from "lodash.isequal";
|
||||||
import cloneDeep from "lodash.clonedeep";
|
import cloneDeep from "lodash.clonedeep";
|
||||||
|
import InspectionTimeFormatExplainIcon from "@/components/admin/unit/InspectionTimeFormatExplainIcon.vue";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue