feat:view pdf
This commit is contained in:
parent
0c88ef429b
commit
0a3ce7b272
2 changed files with 337 additions and 1 deletions
|
|
@ -42,6 +42,7 @@ const DialogResign = defineAsyncComponent(
|
|||
const DialogTransfer = defineAsyncComponent(
|
||||
() => import("@/modules/04_registryPerson/components/DialogTransfer.vue")
|
||||
);
|
||||
const ViewPDF = defineAsyncComponent(() => import("@/components/ViewPDF.vue"));
|
||||
|
||||
/** use*/
|
||||
const $q = useQuasar();
|
||||
|
|
@ -80,6 +81,10 @@ const formDetail = ref<ResponseObject>(); //ข้อมูลส่วนตั
|
|||
const modalDialogResign = ref<boolean>(false); //ป๊อบอัพขอลาออก
|
||||
const modalDialogTransfer = ref<boolean>(false); //ป๊อบอัพขอโอน
|
||||
const modalDialogRetired = ref<boolean>(false); //ป๊อบอัพข้อมูลการพ้นจากราชการ
|
||||
const modalDialogViewPDF = ref<boolean>(false); //ป๊อบอัพแสดงไฟล์ PDF
|
||||
|
||||
const selectedDataFile = ref<any | undefined>(undefined); //ไฟล์ PDF ที่เลือกแสดง
|
||||
const titleDialogViewPDF = ref<string>(""); //ชื่อไฟล์ PDF ที่เลือกแสดง
|
||||
|
||||
//รายการเมนูออกคำสั่งข้าราชการ
|
||||
const baseItemsMenu = ref<DataOptionSys[]>([
|
||||
|
|
@ -436,7 +441,11 @@ async function onClickDownloadKp7(type: string) {
|
|||
.get(url)
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
await genReport(data, `${fileName}`, type);
|
||||
selectedDataFile.value = data;
|
||||
titleDialogViewPDF.value = fileName;
|
||||
modalDialogViewPDF.value = true;
|
||||
|
||||
// await genReport(data, `${fileName}`, type);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -1257,6 +1266,12 @@ onMounted(async () => {
|
|||
<DialogResign v-model:modal="modalDialogResign" />
|
||||
<!-- ขอโอน -->
|
||||
<DialogTransfer v-model:modal="modalDialogTransfer" />
|
||||
|
||||
<ViewPDF
|
||||
v-model:modal="modalDialogViewPDF"
|
||||
:dataFile="selectedDataFile"
|
||||
:title="titleDialogViewPDF"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue