Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2025-01-20 13:52:39 +07:00
commit 621104c4a2
2 changed files with 22 additions and 6 deletions

View file

@ -211,7 +211,7 @@ async function downloadReport() {
data,
"แบบรายงานผลการปฏิบัติราชการ " +
store.dataEvaluation.prefix +
store.dataEvaluation.fileName +
store.dataEvaluation.firstName +
" " +
store.dataEvaluation.lastName
);

View file

@ -271,13 +271,13 @@ function onOpenReturn() {
dialogReturn.value = true;
}
function onDownload() {
function onDownload(type: string) {
showLoader();
http
.get(config.API.developmentScholarshipReport + `/${id.value}`)
.then((res) => {
const dataList = res.data.result;
genReport(dataList, "ฟอร์มรายงานตัวกลับเข้ารับราชการ(ต้นแบบ)");
genReport(dataList, "ฟอร์มรายงานตัวกลับเข้ารับราชการ(ต้นแบบ)", type);
})
.catch((e) => {
messageError($q, e);
@ -543,11 +543,27 @@ onMounted(async () => {
</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="onDownload">
<q-item clickable v-close-popup @click="onDownload('docx')">
<q-item-section>
<q-item-label>
<q-icon name="download" color="primary" size="18px" />
ดาวนโหลดฟอรมตนแบบ
<q-icon
name="mdi-file-word"
color="blue"
size="18px"
/>
ดาวนโหลดฟอรมตนแบบ .docx
</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="onDownload('pdf')">
<q-item-section>
<q-item-label>
<q-icon
name="mdi-file-pdf-box"
color="red"
size="18px"
/>
ดาวนโหลดฟอรมตนแบบ .pdf
</q-item-label>
</q-item-section>
</q-item>