From 7af273ad08626ec69931420117fd4d463cd653fd Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 9 Jul 2024 15:52:41 +0700 Subject: [PATCH 1/4] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A8=E0=B8=9C=E0=B8=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/results/tableResults.vue | 261 +++++++++++++++++- src/modules/14_KPI/interface/response/Main.ts | 16 +- src/modules/14_KPI/views/resultsMain.vue | 67 ++++- 3 files changed, 330 insertions(+), 14 deletions(-) diff --git a/src/modules/14_KPI/components/results/tableResults.vue b/src/modules/14_KPI/components/results/tableResults.vue index a1f2cf34d..26856dc89 100644 --- a/src/modules/14_KPI/components/results/tableResults.vue +++ b/src/modules/14_KPI/components/results/tableResults.vue @@ -1,12 +1,271 @@ diff --git a/src/modules/14_KPI/interface/response/Main.ts b/src/modules/14_KPI/interface/response/Main.ts index 2d8cea4d2..cc702b947 100644 --- a/src/modules/14_KPI/interface/response/Main.ts +++ b/src/modules/14_KPI/interface/response/Main.ts @@ -39,5 +39,19 @@ interface ResEvaluator { topic: string; type: string; } +interface ResResults { + commanderHighId: string | null; + commanderId: string | null; + createdAt: string; + evaluationResults: string; + evaluationStatus: string; + evaluatorId: string; + firstname: string; + id: string; + kpiPeriodId: string; + lastname: string; + prefix: string; + profileId: string; +} -export type { ResRound, ResDataCapacity, ResEvaluator }; +export type { ResRound, ResDataCapacity, ResEvaluator, ResResults }; diff --git a/src/modules/14_KPI/views/resultsMain.vue b/src/modules/14_KPI/views/resultsMain.vue index e10b62667..c6be1b040 100644 --- a/src/modules/14_KPI/views/resultsMain.vue +++ b/src/modules/14_KPI/views/resultsMain.vue @@ -8,6 +8,7 @@ import config from "@/app.config"; * import type */ import type { ItemsTab } from "@/modules/14_KPI/interface/index/Main"; +import type { ResResults } from "@/modules/14_KPI/interface/response/Main"; /** * import components @@ -23,8 +24,7 @@ import { useCounterMixin } from "@/stores/mixin"; * use */ const $q = useQuasar(); -const { dialogRemove, messageError, showLoader, hideLoader, success } = - useCounterMixin(); +const { messageError, showLoader, hideLoader } = useCounterMixin(); /** * ตัวแปร @@ -34,19 +34,31 @@ const tabItems = ref([ { name: "COMPLETE", label: " รอประกาศผล" }, { name: "KP7", label: "ประกาศผลแล้ว" }, ]); - +const dataList = ref([]); // ข่อมูลรายการ const page = ref(1); const pageSize = ref(10); +const maxPage = ref(1); +const total = ref(1); +const keyword = ref(""); -function fetcDatahList() { +/** + * function fetch รายการประกาศผล + */ +function fetcDataList() { showLoader(); http .post(config.API.evaluationUser, { status: tab.value, page: page.value, pageSize: pageSize.value, + keyword: keyword.value, + }) + .then((res) => { + const data = res.data.result; + dataList.value = data.data; + total.value = data.total; + maxPage.value = Math.ceil(total.value / pageSize.value); }) - .then((res) => {}) .catch((err) => { messageError($q, err); }) @@ -55,14 +67,27 @@ function fetcDatahList() { }); } +/** + * ทำงานเมื่อมีการเปลี่ยน Tab + */ watch(tab, () => { page.value = 1; - pageSize.value = 10; - fetcDatahList(); + keyword.value = ""; + fetcDataList(); }); +/** + * ทำงานเมื่อมีการเปลี่ยนแถวต่อหน้า + */ +watch(pageSize, () => { + fetcDataList(); +}); + +/** + * HooK + */ onMounted(() => { - fetcDatahList(); + fetcDataList(); }); @@ -85,12 +110,30 @@ onMounted(() => { - - + + - - + + From e047e57a08852d38c0a739b5ff929d23e5aa51b1 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Tue, 9 Jul 2024 16:02:27 +0700 Subject: [PATCH 2/4] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=84?= =?UTF-8?q?=E0=B8=B3=E0=B8=A5=E0=B8=B2=E0=B8=AD=E0=B8=AD=E0=B8=81=20?= =?UTF-8?q?=E0=B8=AD=E0=B8=99=E0=B8=B8=E0=B8=A1=E0=B8=B1=E0=B8=95=E0=B8=B4?= =?UTF-8?q?=E0=B9=80=E0=B8=9B=E0=B9=87=E0=B8=99=20=E0=B8=AD=E0=B8=99?= =?UTF-8?q?=E0=B8=B8=E0=B8=8D=E0=B8=B2=E0=B8=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/resign/ResignByid.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index ac2e84749..23582e987 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -237,7 +237,7 @@ const conditionPopup = () => { } }; -//pop up ยืนยันการอนุมัติ +//pop up ยืนยันการอนุญาต const confirmpopUp = async () => { dialogConfirm( $q, @@ -248,7 +248,7 @@ const confirmpopUp = async () => { await http .put(config.API.resignConfirm(roleUser.value, id.value), body) .then(() => { - success($q, "การอนุมัติสำเร็จ"); + success($q, "การอนุญาตสำเร็จ"); closeModal(); }) .catch((e) => { @@ -258,8 +258,8 @@ const confirmpopUp = async () => { fetchData(id.value); }); }, - "ยืนยันการอนุมัติ", - "ต้องการยืนยันการอนุมัติการลานี้หรือไม่ ?" + "ยืนยันการอนุญาต", + "ต้องการยืนยันการอนุญาตการลานี้หรือไม่ ?" ); }; @@ -379,9 +379,9 @@ const getClass = (val: boolean) => { const statusOrder = (val: boolean) => { switch (val) { case true: - return "ยับยั้งการลาออก"; + return "ยับยั้ง"; case false: - return "อนุมัติการลาออก"; + return "อนุญาต"; } }; @@ -580,7 +580,7 @@ function removeFile(fileName: string) { dense icon-right="check" class="q-px-sm" - label="อนุมัติ" + label="อนุญาต" @click="popUp('pass')" /> From 061cb27c410e1eb9ce6f13229647a781b4473c55 Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Tue, 9 Jul 2024 16:22:18 +0700 Subject: [PATCH 3/4] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=97=E0=B8=B1=E0=B9=89=E0=B8=87=E0=B8=AB?= =?UTF-8?q?=E0=B8=A1=E0=B8=94=20/=20=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=E0=B8=9F=E0=B8=B4=E0=B8=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../09_leave/components/1_Work/Tab1.vue | 4 +- .../09_leave/components/1_Work/Tab2.vue | 3 + .../09_leave/components/1_Work/TableList.vue | 5 ++ .../components/ProjectDetail.vue | 86 +++++++++---------- .../15_development/interface/index/Main.ts | 4 +- 5 files changed, 54 insertions(+), 48 deletions(-) diff --git a/src/modules/09_leave/components/1_Work/Tab1.vue b/src/modules/09_leave/components/1_Work/Tab1.vue index 0629258b9..2272dcc5a 100644 --- a/src/modules/09_leave/components/1_Work/Tab1.vue +++ b/src/modules/09_leave/components/1_Work/Tab1.vue @@ -22,7 +22,7 @@ import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore"; const mixin = useCounterMixin(); const workStore = useWorklistDataStore(); const { date2Thai, dateToISO, showLoader, hideLoader, messageError } = mixin; - +const total = ref(0); const $q = useQuasar(); //ใช้ noti quasar /** ตัวแปร querySting*/ @@ -137,6 +137,7 @@ async function fetchListTimeRecord() { `?startDate=${querySting.startDate}&endDate=${querySting.startDate}&status=${querySting.status}&page=${querySting.page}&pageSize=${querySting.pageSize}&keyword=${querySting.keyword}` ) .then((res) => { + total.value = res.data.result.total; maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value); const datalist: TableRowsTime[] = res.data.result.data.map( (e: DataResTime) => ({ @@ -200,6 +201,7 @@ onMounted(async () => {