Merge branch 'nice_dev' into develop
This commit is contained in:
commit
45632a9bff
4 changed files with 32 additions and 17 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);
|
||||
|
|
|
|||
|
|
@ -98,8 +98,8 @@ export default [
|
|||
},
|
||||
},
|
||||
{
|
||||
path: "/insignia/report/report-02",
|
||||
name: "report-report-02",
|
||||
path: "/insignia/report/report/:type",
|
||||
name: "report-report",
|
||||
component: report_02,
|
||||
meta: {
|
||||
Auth: true,
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@ const mixin = useCounterMixin();
|
|||
const { date2Thai } = mixin;
|
||||
|
||||
export const useInsigniaDataStore = defineStore("insignia", () => {
|
||||
interface OptionReport {
|
||||
id: string;
|
||||
title: string;
|
||||
}
|
||||
const roundId = ref<string>("");
|
||||
const optionRound = ref<any>([]);
|
||||
const isLock = ref<boolean>(false);
|
||||
|
|
@ -26,14 +30,18 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
|||
{ name: "ลูกจ้างประจำ", id: "perm" },
|
||||
]);
|
||||
|
||||
const typeReport = ref<string>("");
|
||||
const titleReport = ref<string>("");
|
||||
//รางาน
|
||||
const optionReport = ref<OptionReport[]>([
|
||||
{ id: '45', title: "บัญชีรายชื่อข้าราชการผู้ขอพระราชทานเครื่องราชอิสริยาภรณ์" },
|
||||
{ id: '43', title: 'บัญชีระดับผลการประเมินผลการปฏิบัติราชการในรอบ 5 ปี' },
|
||||
{ id: '44', title: 'บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ' }
|
||||
])
|
||||
|
||||
|
||||
|
||||
const mainTab = ref<string | undefined>("pending");
|
||||
|
||||
const setTypeandTitle = (type: string, title: string) => {
|
||||
typeReport.value = type;
|
||||
titleReport.value = title;
|
||||
};
|
||||
|
||||
// เรียกราชชื่อการเสนอขอ
|
||||
const fetchData = async (data: any) => {
|
||||
if (data !== null) {
|
||||
|
|
@ -143,9 +151,6 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
|||
fetchData,
|
||||
fetchOption,
|
||||
searchDataTable,
|
||||
setTypeandTitle,
|
||||
typeReport,
|
||||
titleReport,
|
||||
employeeClass,
|
||||
employeeClassOps,
|
||||
fetchDataInsignia,
|
||||
|
|
@ -153,5 +158,6 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
|||
requestId,
|
||||
roleUser,
|
||||
requestStatus,
|
||||
optionReport,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue