From acb8da2684425c257b1b723f34f3ee9789a504a3 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 13 Jun 2024 18:03:41 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=88=E0=B8=B1=E0=B8=94=E0=B8=97=E0=B8=B3?= =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=81=E0=B8=B2=E0=B8=A8=E0=B8=9C?= =?UTF-8?q?=E0=B8=B9=E0=B9=89=E0=B8=A1=E0=B8=B5=E0=B8=9C=E0=B8=A5=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=9B=E0=B8=8F=E0=B8=B4=E0=B8=9A=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=A3=E0=B8=B0=E0=B8=94=E0=B8=B1=E0=B8=9A=E0=B8=94?= =?UTF-8?q?=E0=B8=B5=E0=B9=80=E0=B8=94=E0=B9=88=E0=B8=99=E0=B9=81=E0=B8=A5?= =?UTF-8?q?=E0=B8=B0=E0=B8=94=E0=B8=B5=E0=B8=A1=E0=B8=B2=E0=B8=81=20=3D>?= =?UTF-8?q?=20ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/14_KPI/api.KPI.ts | 3 +++ src/modules/14_KPI/views/report.vue | 26 ++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/api/14_KPI/api.KPI.ts b/src/api/14_KPI/api.KPI.ts index 732ecd14d..902d5b476 100644 --- a/src/api/14_KPI/api.KPI.ts +++ b/src/api/14_KPI/api.KPI.ts @@ -69,4 +69,7 @@ export default { kpiLink, profilePosition: () => `${env.API_URI}/org/profile/keycloak/position`, + + /** Report*/ + kpiReport: () => `${KPI}/report/announcement`, }; diff --git a/src/modules/14_KPI/views/report.vue b/src/modules/14_KPI/views/report.vue index 0cc79434c..fce0da73e 100644 --- a/src/modules/14_KPI/views/report.vue +++ b/src/modules/14_KPI/views/report.vue @@ -84,7 +84,26 @@ function fetchListOrg(id: string) { }); } -function changRound() {} +function fetchReport() { + if (round.value !== "" && organization.value !== "") { + showLoader(); + const body = { + periodId: round.value, + root: organization.value, + }; + http + .post(config.API.kpiReport(), body) + .then((res) => {}) + .catch((err) => {}) + .finally(() => { + hideLoader(); + }); + } +} + +function changOption() { + fetchReport(); +} function filterSelector(val: string, update: Function) { update(() => { @@ -183,7 +202,7 @@ onMounted(() => { emit-value map-options :disable="roundOp.length === 0" - @update:model-value="changRound" + @update:model-value="changOption" /> { outlined option-label="name" option-value="id" + emit-value map-options v-model="organization" :options="organizationOps" label="หน่วยงาน" use-input + @update:model-value="changOption" @filter="(inputValue: string, + doneFn: Function) => filterSelector(inputValue, doneFn )" />