แก้ไข รายงานเครื่องราช
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">
|
<script setup lang="ts">
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
// import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const store = useInsigniaDataStore();
|
// const store = useInsigniaDataStore();
|
||||||
const { setTypeandTitle } = store;
|
|
||||||
|
|
||||||
const nextPage = (type: string, title: string) => {
|
const nextPage = (type: string, title: string) => {
|
||||||
setTypeandTitle(type, title);
|
router.push(`/insignia/report/report/${type}`);
|
||||||
router.push("/insignia/report/report-02");
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -10,10 +12,12 @@ import config from "@/app.config";
|
||||||
|
|
||||||
import type { QForm } from "quasar";
|
import type { QForm } from "quasar";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const typeReport = route.params.type.toString();
|
||||||
const store = useInsigniaDataStore();
|
const store = useInsigniaDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, showLoader, hideLoader } = mixin;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
const { typeReport, titleReport } = store;
|
const { optionReport } = store;
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const myForm = ref<QForm>();
|
const myForm = ref<QForm>();
|
||||||
|
|
@ -21,9 +25,16 @@ const pdfSrc = ref<any>();
|
||||||
const numOfPages = ref<number>(0);
|
const numOfPages = ref<number>(0);
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
const dialog = ref<boolean>(false);
|
const dialog = ref<boolean>(false);
|
||||||
|
const titleReport = ref<string>("");
|
||||||
|
interface OptionReport {
|
||||||
|
id: string;
|
||||||
|
title: string;
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fecthlistRound();
|
await fecthlistRound();
|
||||||
|
let report = optionReport.find((e: OptionReport) => e.id == typeReport);
|
||||||
|
report && (titleReport.value = report.title);
|
||||||
});
|
});
|
||||||
|
|
||||||
const splitterModel = ref(14);
|
const splitterModel = ref(14);
|
||||||
|
|
|
||||||
|
|
@ -98,8 +98,8 @@ export default [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/insignia/report/report-02",
|
path: "/insignia/report/report/:type",
|
||||||
name: "report-report-02",
|
name: "report-report",
|
||||||
component: report_02,
|
component: report_02,
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,10 @@ const mixin = useCounterMixin();
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
|
|
||||||
export const useInsigniaDataStore = defineStore("insignia", () => {
|
export const useInsigniaDataStore = defineStore("insignia", () => {
|
||||||
|
interface OptionReport {
|
||||||
|
id: string;
|
||||||
|
title: string;
|
||||||
|
}
|
||||||
const roundId = ref<string>("");
|
const roundId = ref<string>("");
|
||||||
const optionRound = ref<any>([]);
|
const optionRound = ref<any>([]);
|
||||||
const isLock = ref<boolean>(false);
|
const isLock = ref<boolean>(false);
|
||||||
|
|
@ -26,6 +30,13 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
||||||
{ name: "ลูกจ้างประจำ", id: "perm" },
|
{ name: "ลูกจ้างประจำ", id: "perm" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
//รางาน
|
||||||
|
const optionReport = ref<OptionReport[]>([
|
||||||
|
{ id: '45', title: "บัญชีรายชื่อข้าราชการผู้ขอพระราชทานเครื่องราชอิสริยาภรณ์" },
|
||||||
|
{ id: '43', title: 'บัญชีระดับผลการประเมินผลการปฏิบัติราชการในรอบ 5 ปี' },
|
||||||
|
{ id: '44', title: 'บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ' }
|
||||||
|
])
|
||||||
|
|
||||||
const typeReport = ref<string>("");
|
const typeReport = ref<string>("");
|
||||||
const titleReport = ref<string>("");
|
const titleReport = ref<string>("");
|
||||||
const mainTab = ref<string | undefined>("pending");
|
const mainTab = ref<string | undefined>("pending");
|
||||||
|
|
@ -153,5 +164,6 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
||||||
requestId,
|
requestId,
|
||||||
roleUser,
|
roleUser,
|
||||||
requestStatus,
|
requestStatus,
|
||||||
|
optionReport,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue