แก้ res

This commit is contained in:
setthawutttty 2024-10-07 16:36:00 +07:00
parent 34e72b5651
commit 16b932e565
2 changed files with 8 additions and 12 deletions

View file

@ -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) => {

View file

@ -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(() => {