fixing registry
This commit is contained in:
parent
2cd133dce9
commit
c03bcb3928
4 changed files with 95 additions and 86 deletions
|
|
@ -215,17 +215,17 @@ function redirectToPagePetition() {
|
|||
}
|
||||
}
|
||||
|
||||
function onGovernment() {
|
||||
modalReport.value = true;
|
||||
}
|
||||
// function onGovernment() {
|
||||
// modalReport.value = true;
|
||||
// }
|
||||
|
||||
function closeDialog() {
|
||||
modalReport.value = false;
|
||||
rangeAge.value = {
|
||||
min: 18,
|
||||
max: 60,
|
||||
};
|
||||
}
|
||||
// function closeDialog() {
|
||||
// modalReport.value = false;
|
||||
// rangeAge.value = {
|
||||
// min: 18,
|
||||
// max: 60,
|
||||
// };
|
||||
// }
|
||||
|
||||
async function getReport() {
|
||||
loadingBtn.value = true;
|
||||
|
|
@ -250,46 +250,46 @@ async function getReport() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function เรียกไฟล์ XLSX
|
||||
* @param data ข้อมูลรายงานสถิติการลา
|
||||
*/
|
||||
async function genReportXLSX(data: any) {
|
||||
await axios
|
||||
.post(`${config.API.reportTemplate}/xlsx`, data, {
|
||||
headers: {
|
||||
accept:
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
"content-Type": "application/json",
|
||||
},
|
||||
responseType: "blob",
|
||||
})
|
||||
.then(async (res) => {
|
||||
const blob = new Blob([res.data]);
|
||||
await downloadReport(blob, "xlsx");
|
||||
})
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
});
|
||||
}
|
||||
// /**
|
||||
// * function เรียกไฟล์ XLSX
|
||||
// * @param data ข้อมูลรายงานสถิติการลา
|
||||
// */
|
||||
// async function genReportXLSX(data: any) {
|
||||
// await axios
|
||||
// .post(`${config.API.reportTemplate}/xlsx`, data, {
|
||||
// headers: {
|
||||
// accept:
|
||||
// "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
// "content-Type": "application/json",
|
||||
// },
|
||||
// responseType: "blob",
|
||||
// })
|
||||
// .then(async (res) => {
|
||||
// const blob = new Blob([res.data]);
|
||||
// await downloadReport(blob, "xlsx");
|
||||
// })
|
||||
// .catch(async (e) => {
|
||||
// messageError($q, JSON.parse(await e.response.data.text()));
|
||||
// });
|
||||
// }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param data ข้อมูลรายงานสถิติการลา
|
||||
* @param type นามสกุลไฟล์
|
||||
*/
|
||||
async function downloadReport(data: any, type: string) {
|
||||
const link = document.createElement("a");
|
||||
var fileName =
|
||||
empType.value == "officer"
|
||||
? "รายงานสถิติข้อมูลข้าราชการ กทม. สามัญ"
|
||||
: "รายงานสถิติข้อมูลลูกจ้างประจำ กทม.";
|
||||
link.href = window.URL.createObjectURL(new Blob([data]));
|
||||
link.setAttribute("download", `${fileName}.${type}`);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
}
|
||||
// /**
|
||||
// *
|
||||
// * @param data ข้อมูลรายงานสถิติการลา
|
||||
// * @param type นามสกุลไฟล์
|
||||
// */
|
||||
// async function downloadReport(data: any, type: string) {
|
||||
// const link = document.createElement("a");
|
||||
// var fileName =
|
||||
// empType.value == "officer"
|
||||
// ? "รายงานสถิติข้อมูลข้าราชการ กทม. สามัญ"
|
||||
// : "รายงานสถิติข้อมูลลูกจ้างประจำ กทม.";
|
||||
// link.href = window.URL.createObjectURL(new Blob([data]));
|
||||
// link.setAttribute("download", `${fileName}.${type}`);
|
||||
// document.body.appendChild(link);
|
||||
// link.click();
|
||||
// document.body.removeChild(link);
|
||||
// }
|
||||
|
||||
/**
|
||||
* ดูการเปลี่ยนแปลงของ formFilter.value.pageSize
|
||||
|
|
@ -334,7 +334,7 @@ watch(
|
|||
พบข้อมูลทั้งหมด {{ total.toLocaleString() }} รายการ
|
||||
</div>
|
||||
<!-- empType === "officer" ? -->
|
||||
<div>
|
||||
<!-- <div>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
|
|
@ -348,7 +348,7 @@ watch(
|
|||
}}</q-tooltip
|
||||
></q-btn
|
||||
>
|
||||
</div>
|
||||
</div> -->
|
||||
<q-select
|
||||
v-if="store.mode === 'table'"
|
||||
v-model="visibleColumns"
|
||||
|
|
@ -626,14 +626,14 @@ watch(
|
|||
|
||||
<q-dialog v-model="modalReport" persistent>
|
||||
<q-card class="col-12" style="width: 40%">
|
||||
<DialogHeader
|
||||
<!-- <DialogHeader
|
||||
:tittle="
|
||||
empType == 'officer'
|
||||
? 'รายงานสถิติข้อมูลข้าราชการ กทม. สามัญ'
|
||||
: 'รายงานสถิติข้อมูลลูกจ้างประจำ กทม.'
|
||||
"
|
||||
:close="closeDialog"
|
||||
/>
|
||||
/> -->
|
||||
<q-separator />
|
||||
<q-card-section class="q-pa-lg">
|
||||
<div class="column q-pa-sm q-gutter-y-sm">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue