เครื่องราชฯ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-19 14:58:16 +07:00
parent 8ebbef05d9
commit 1530da36cf
22 changed files with 159 additions and 777 deletions

View file

@ -46,15 +46,6 @@ const nextPage = (type: string, title: string) => {
</q-item-section>
</q-item>
<!-- <q-item to="/insignia/report/report-01" dense class="hover-green">
<q-item-section avatar>
<q-icon color="primary" name="mdi-file" size="xs" />
</q-item-section>
<q-item-section class="text-dark"
>รายชอขาราชการสามญฯ ได/ไมไดบใบกำก
</q-item-section>
</q-item> -->
<q-item
clickable
@click="
@ -84,22 +75,6 @@ const nextPage = (type: string, title: string) => {
ญชแสดงจำนวนชนตราเครองราชฯ
</q-item-section>
</q-item>
<!-- <q-item
clickable
@click="
nextPage('46', 'ประวัติสำหรับการเสนอขอพระราชทานเหรียญจักรพรรดิมาลา')
"
dense
class="hover-green"
>
<q-item-section avatar>
<q-icon color="primary" name="mdi-file" size="xs" />
</q-item-section>
<q-item-section class="text-dark">
ประวสำหรบการเสนอขอพระราชทานเหรยญจกรพรรดมาลา
</q-item-section>
</q-item> -->
</div>
</q-card>
</div>

View file

@ -10,14 +10,7 @@ import config from "@/app.config";
import type { QForm } from "quasar";
const mixin = useCounterMixin();
const {
date2Thai,
messageError,
showLoader,
hideLoader,
dialogConfirm,
success,
} = mixin;
const { messageError, showLoader, hideLoader } = mixin;
const $q = useQuasar();
const myForm = ref<QForm>();
@ -27,15 +20,6 @@ const page = ref<number>(1);
const dialog = ref<boolean>(false);
onMounted(async () => {
await fecthlistRound();
// const pdfData = usePDF(
// "https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf"
// );
// setTimeout(() => {
// pdfSrc.value = pdfData.pdf.value;
// numOfPages.value = pdfData.pages.value;
// }, 1000);
// console.log(pdfData);
});
const splitterModel = ref(14);
@ -76,7 +60,6 @@ const fecthlistRound = async () => {
}));
})
.catch((err) => {
console.log(err);
messageError($q, err);
});
};
@ -91,7 +74,6 @@ const conditionDocument = (type: string) => {
if (type == "show") {
await downloadReport("pdf", false);
} else {
// await downloadReport("pdf", false);
await downloadReport(type, true);
}
}
@ -141,8 +123,6 @@ const downloadReport = async (
);
} else {
const url = URL.createObjectURL(new Blob([res.data]));
// pdfSrc.value = "";
// numOfPages.value = 0;
showDocument(url);
}
})

View file

@ -12,14 +12,7 @@ import type { QForm } from "quasar";
const store = useInsigniaDataStore();
const mixin = useCounterMixin();
const {
date2Thai,
messageError,
showLoader,
hideLoader,
dialogConfirm,
success,
} = mixin;
const { messageError, showLoader, hideLoader } = mixin;
const { typeReport, titleReport } = store;
const $q = useQuasar();
@ -31,26 +24,9 @@ const dialog = ref<boolean>(false);
onMounted(async () => {
await fecthlistRound();
// const pdfData = usePDF(
// "https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf"
// );
// setTimeout(() => {
// pdfSrc.value = pdfData.pdf.value;
// numOfPages.value = pdfData.pages.value;
// }, 1000);
// console.log(pdfData);
});
const splitterModel = ref(14);
const fileId = ref<string>("");
const selectReport = ref<any>({ id: 39, name: "รายงานขร.1" });
const optionsReport = ref<any>([
{ id: 39, name: "รายงานขร.1" },
{ id: 40, name: "รายงานขร.2" },
{ id: 41, name: "รายงานขร.3" },
{ id: 42, name: "รายงานขร.4" },
]);
const selectList = ref<any>();
const optionsList = ref<any>([{ id: 0, name: "เลือกกรอบการยื่นขอ" }]);
@ -80,7 +56,6 @@ const fecthlistRound = async () => {
}));
})
.catch((err) => {
console.log(err);
messageError($q, err);
});
};
@ -95,7 +70,6 @@ const conditionDocument = (type: string) => {
if (type == "show") {
await downloadReport("pdf", false);
} else {
// await downloadReport("pdf", false);
await downloadReport(type, true);
}
}
@ -125,7 +99,6 @@ const downloadReport = async (
type: string = "pdf",
download: boolean = true
) => {
console.log(typeReport);
showLoader();
await http
.get(config.API.reportInsignia(typeReport, type, selectList.value.id), {
@ -136,8 +109,6 @@ const downloadReport = async (
downloadFile(res, `${titleReport} ${selectList.value.name}.${type}`);
} else {
const url = URL.createObjectURL(new Blob([res.data]));
// pdfSrc.value = "";
// numOfPages.value = 0;
showDocument(url);
}
})
@ -169,21 +140,6 @@ const downloadReport = async (
<div class="q-pa-md q-gutter-y-sm">
<q-toolbar style="padding: 0">
<q-form ref="myForm" class="row items-center">
<!-- <q-select
use-input
fill-input
hide-selected
class="q-mr-sm"
dense
outlined
v-model="selectReport"
:options="optionsReport"
:label="optionsReport.name"
option-value="id"
option-label="name"
style="width: 150px"
@update:model-value="updateSelect"
/> -->
<q-select
class="q-pa-none"
use-input
@ -200,7 +156,6 @@ const downloadReport = async (
@update:model-value="updateSelect"
/>
</q-form>
<!-- style="width: 200px" -->
<q-space />
<div class="q-pa-ms q-gutter-sm" style="padding: 0">
<q-btn outline color="primary" icon="download" label="ดาวน์โหลด">