แก้ไข รายงานเครื่องราช
This commit is contained in:
parent
77a930ed78
commit
a62f64b355
4 changed files with 29 additions and 8 deletions
|
|
@ -1,13 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import { useRouter } from "vue-router";
|
||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||
// import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||
const router = useRouter();
|
||||
const store = useInsigniaDataStore();
|
||||
const { setTypeandTitle } = store;
|
||||
// const store = useInsigniaDataStore();
|
||||
|
||||
const nextPage = (type: string, title: string) => {
|
||||
setTypeandTitle(type, title);
|
||||
router.push("/insignia/report/report-02");
|
||||
router.push(`/insignia/report/report/${type}`);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
import { ref, onMounted } from "vue";
|
||||
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -10,10 +12,12 @@ import config from "@/app.config";
|
|||
|
||||
import type { QForm } from "quasar";
|
||||
|
||||
const route = useRoute();
|
||||
const typeReport = route.params.type.toString();
|
||||
const store = useInsigniaDataStore();
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
const { typeReport, titleReport } = store;
|
||||
const { optionReport } = store;
|
||||
const $q = useQuasar();
|
||||
|
||||
const myForm = ref<QForm>();
|
||||
|
|
@ -21,9 +25,16 @@ const pdfSrc = ref<any>();
|
|||
const numOfPages = ref<number>(0);
|
||||
const page = ref<number>(1);
|
||||
const dialog = ref<boolean>(false);
|
||||
const titleReport = ref<string>("");
|
||||
interface OptionReport {
|
||||
id: string;
|
||||
title: string;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await fecthlistRound();
|
||||
let report = optionReport.find((e: OptionReport) => e.id == typeReport);
|
||||
report && (titleReport.value = report.title);
|
||||
});
|
||||
|
||||
const splitterModel = ref(14);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue