ปรับวินัย

This commit is contained in:
setthawutttty 2023-12-27 15:50:41 +07:00
parent 117cc8aeb8
commit 5c1b67a642
12 changed files with 161 additions and 190 deletions

View file

@ -19,28 +19,23 @@ const { fetchList } = dataInvestigateDis;
const rowsPerPage = ref<number>(10);
const $q = useQuasar(); // show dialog
const router = useRouter();
const filter = ref<string>(""); //search data table
const page = ref<number>(1);
const maxPage = ref<number>(1);
async function fetchListDisciplinary() {
showLoader();
await http
.get(
config.API.disciplineDisciplinary() +
`?page=${page.value}&pageSize=${rowsPerPage.value}`
`?page=${page.value}&pageSize=${rowsPerPage.value}&keyword=${filter.value}`
)
.then((res) => {
const data = res.data.result.data;
maxPage.value = Math.ceil(
res.data.result.total / rowsPerPage.value
);
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
fetchList(data);
})
.catch((err) => {
})
.catch((err) => {})
.finally(() => {
hideLoader();
});
@ -78,7 +73,6 @@ onMounted(async () => {
style="max-height: 80vh"
:rows="dataInvestigateDis.rows"
:columns="dataInvestigateDis.columns"
:filter="filter"
:visible-columns="dataInvestigateDis.visibleColumns"
v-model:inputfilter="filter"
v-model:inputvisible="dataInvestigateDis.visibleColumns"
@ -89,6 +83,7 @@ onMounted(async () => {
:rowsPerPage="rowsPerPage"
:page="page"
:maxPage="maxPage"
:fetchListDisciplinary="fetchListDisciplinary"
@update:pagination="updatePagingProp"
v-model:open-edit="openEdit"
>