diff --git a/src/modules/11_discipline/components/1_Complaint/MainPage.vue b/src/modules/11_discipline/components/1_Complaint/MainPage.vue index 2c49e0645..76818f859 100644 --- a/src/modules/11_discipline/components/1_Complaint/MainPage.vue +++ b/src/modules/11_discipline/components/1_Complaint/MainPage.vue @@ -28,6 +28,7 @@ const filterKeyword = ref(""); const maxPage = ref(1); const page = ref(1); const rowsPerPage = ref(10); +const toptitle = ref(0); const statusFilter = ref("NEW"); async function updatePagingProp(rowPerpage: number, pageCurrent: number) { @@ -50,6 +51,7 @@ async function getList() { // .then((res) => { maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value); + toptitle.value = res.data.result.total; const data = res.data.result.data; fetchComplainst(data); }) @@ -166,6 +168,7 @@ onMounted(async () => { :page="page" :maxPage="maxPage" @update:pagination="updatePagingProp" + :toptitle="toptitle" /> diff --git a/src/modules/11_discipline/components/1_Complaint/TableComplaint.vue b/src/modules/11_discipline/components/1_Complaint/TableComplaint.vue index 77d5e1c75..7043da5b9 100644 --- a/src/modules/11_discipline/components/1_Complaint/TableComplaint.vue +++ b/src/modules/11_discipline/components/1_Complaint/TableComplaint.vue @@ -27,6 +27,10 @@ const props = defineProps({ type: Number, require: true, }, + toptitle: { + type: Number, + require: true, + }, }); /** หัวข้อที่เเสดงในตาราง */ @@ -178,17 +182,6 @@ onMounted(() => { v-model:pagination="pagination" :rows-per-page-options="[10, 25, 50, 100]" > - + diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue index 6e32a2f55..106b26497 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue @@ -30,6 +30,7 @@ const currentPage = ref(1); const maxPage = ref(1); const page = ref(1); const rowsPerPage = ref(10); +const toptitle = ref(0); /** *pagination ของตาราง @@ -70,6 +71,8 @@ async function getList() { ) .then((res) => { maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value); + toptitle.value = res.data.result.total; + const data = res.data.result.data; dataInvestigate.fecthList(data); }) @@ -181,17 +184,6 @@ onMounted(async () => { v-model:pagination="pagination" :rows-per-page-options="[10, 25, 50, 100]" > - + diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue index 5756dd897..83a53d4f2 100644 --- a/src/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue @@ -22,6 +22,8 @@ const router = useRouter(); const filter = ref(""); //search data table const page = ref(1); const maxPage = ref(1); +const totalList = ref(); + const status = ref("NEW"); async function fetchListDisciplinary() { showLoader(); @@ -33,6 +35,7 @@ async function fetchListDisciplinary() { .then((res) => { const data = res.data.result.data; maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value); + totalList.value = res.data.result.total; fetchList(data); }) .catch((err) => {}) @@ -57,7 +60,7 @@ async function updatePagingProp(rowPerpage: number, pageCurrent: number) { function filterStatus(statusReturn: string) { status.value = statusReturn; - fetchListDisciplinary() + fetchListDisciplinary(); } /**เมื่อเริ่มโหลดหน้า @@ -88,6 +91,7 @@ onMounted(async () => { :rowsPerPage="rowsPerPage" :page="page" :maxPage="maxPage" + :totalList="totalList" :fetchListDisciplinary="fetchListDisciplinary" @update:pagination="updatePagingProp" v-model:open-edit="openEdit" diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue index 0029abe53..32f31e61a 100644 --- a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue @@ -61,6 +61,10 @@ const props = defineProps({ type: Number, require: true, }, + totalList: { + type: Number, + require: true, + }, }); const emit = defineEmits([ @@ -195,6 +199,7 @@ function filterFn() { :rows-per-page-options="[10, 25, 50, 100]" >