From 16b932e56564f672b585fe0cb6ad1a16a62a80be Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Mon, 7 Oct 2024 16:36:00 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20res?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../05_placement/components/probation/DialogOrder.vue | 10 ++++------ .../components/probation/MainProbation.vue | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/modules/05_placement/components/probation/DialogOrder.vue b/src/modules/05_placement/components/probation/DialogOrder.vue index 687cf4f00..cece72997 100644 --- a/src/modules/05_placement/components/probation/DialogOrder.vue +++ b/src/modules/05_placement/components/probation/DialogOrder.vue @@ -192,13 +192,11 @@ async function getList() { }&pageSize=${pagination.value.rowsPerPage}` ) .then(async (res) => { - // const data = await res.data.result.data; - const data = await res.data.data; + const data = await res.data.data.data; + const resTotal = await res.data.data.total; rows.value = data; - totalList.value = Math.ceil( - res.data.result.total / pagination.value.rowsPerPage - ); - total.value = res.data.result.total; + totalList.value = Math.ceil(resTotal / pagination.value.rowsPerPage); + total.value = resTotal; hideLoader(); }) .catch((e) => { diff --git a/src/modules/05_placement/components/probation/MainProbation.vue b/src/modules/05_placement/components/probation/MainProbation.vue index 7dffebfd4..97e9453c6 100644 --- a/src/modules/05_placement/components/probation/MainProbation.vue +++ b/src/modules/05_placement/components/probation/MainProbation.vue @@ -234,16 +234,14 @@ async function getpersonalList() { `?status=${fillter.value}&page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}` ) .then(async (res) => { - // const data = await res.data.result.data; - const data = await res.data.data; + const data = await res.data.data.data; + const resTotal = await res.data.data.total; rows.value = data; fillterStatus.value = data; dataUpdate.value = rows.value; Opfillter.value = storeFn.optionStatusProbation; - totalList.value = Math.ceil( - res.data.result.total / pagination.value.rowsPerPage - ); - total.value = res.data.result.total; + totalList.value = Math.ceil(resTotal / pagination.value.rowsPerPage); + total.value = resTotal; }) .catch(() => {}) .finally(() => {