ทั้งหมดรายการ
This commit is contained in:
parent
9f90e4575f
commit
b6809d98c2
4 changed files with 12 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ import type {
|
||||||
NewPagination,
|
NewPagination,
|
||||||
} from "@/modules/14_KPI/interface/index/Main";
|
} from "@/modules/14_KPI/interface/index/Main";
|
||||||
|
|
||||||
|
const total = ref<number>()
|
||||||
const store = useKPIDataStore();
|
const store = useKPIDataStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -78,6 +79,7 @@ async function fetchList() {
|
||||||
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}&type=${store.competencyType}`
|
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}&type=${store.competencyType}`
|
||||||
)
|
)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
total.value = res.data.result.total
|
||||||
const data: ResDataCapacity[] = res.data.result.data;
|
const data: ResDataCapacity[] = res.data.result.data;
|
||||||
totalList.value = Math.ceil(res.data.result.total / formQuery.pageSize);
|
totalList.value = Math.ceil(res.data.result.total / formQuery.pageSize);
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -254,6 +256,7 @@ onMounted(() => {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ total }} รายการ
|
||||||
<q-pagination
|
<q-pagination
|
||||||
v-model="formQuery.page"
|
v-model="formQuery.page"
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import type { ResponseObject } from "@/modules/14_KPI/interface/response/KpiGrou
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
const total = ref<number>()
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const rows = ref<ResponseObject[]>([]);
|
const rows = ref<ResponseObject[]>([]);
|
||||||
const groupName = ref<string>("");
|
const groupName = ref<string>("");
|
||||||
|
|
@ -84,6 +85,7 @@ async function fetchData() {
|
||||||
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}`
|
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}`
|
||||||
)
|
)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
total.value = res.data.result.total
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
totalList.value = Math.ceil(res.data.result.total / formQuery.pageSize);
|
totalList.value = Math.ceil(res.data.result.total / formQuery.pageSize);
|
||||||
rows.value = data.data;
|
rows.value = data.data;
|
||||||
|
|
@ -300,6 +302,7 @@ onMounted(async () => {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ total }} รายการ
|
||||||
<q-pagination
|
<q-pagination
|
||||||
v-model="formQuery.page"
|
v-model="formQuery.page"
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import type { ListGroup } from "@/modules/14_KPI/interface/request/Main";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
const total = ref<number>()
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const rows = ref<any>([]);
|
const rows = ref<any>([]);
|
||||||
|
|
@ -98,6 +99,7 @@ async function getData() {
|
||||||
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}`
|
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}`
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
total.value = res.data.result.total
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
totalList.value = Math.ceil(res.data.result.total / formQuery.pageSize);
|
totalList.value = Math.ceil(res.data.result.total / formQuery.pageSize);
|
||||||
rows.value = data.data;
|
rows.value = data.data;
|
||||||
|
|
@ -460,6 +462,7 @@ onMounted(async () => {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ total }} รายการ
|
||||||
<q-pagination
|
<q-pagination
|
||||||
v-model="formQuery.page"
|
v-model="formQuery.page"
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import type { NewPagination } from "@/modules/14_KPI/interface/request/Main";
|
||||||
import type { DataOption } from "@/modules/14_KPI/interface/index/Main";
|
import type { DataOption } from "@/modules/14_KPI/interface/index/Main";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
|
const total = ref<number>()
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { showLoader, hideLoader, dialogRemove, success } = useCounterMixin();
|
const { showLoader, hideLoader, dialogRemove, success } = useCounterMixin();
|
||||||
|
|
@ -78,6 +79,7 @@ function fetchList() {
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
|
total.value = res.data.result.total
|
||||||
maxPage.value = Math.ceil(res.data.result.total / formFilter.pageSize);
|
maxPage.value = Math.ceil(res.data.result.total / formFilter.pageSize);
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
})
|
})
|
||||||
|
|
@ -390,6 +392,7 @@ onMounted(async () => {
|
||||||
@update:pagination="updatePageSize"
|
@update:pagination="updatePageSize"
|
||||||
>
|
>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ total }} รายการ
|
||||||
<q-pagination
|
<q-pagination
|
||||||
v-model="formFilter.page"
|
v-model="formFilter.page"
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue