แก้ วินัย เพิ่ม api
This commit is contained in:
parent
fc55ffc928
commit
142fc30d8b
13 changed files with 134 additions and 145 deletions
|
|
@ -26,14 +26,14 @@ const page = ref<number>(1);
|
|||
const pageSize = ref<number>(10);
|
||||
const maxPage = ref<number>(1);
|
||||
const filter = ref<string>("");
|
||||
|
||||
const status = ref<string>("ALL");
|
||||
/** function เรียกรายการสรุปผลการพิจารณาทางวินัย*/
|
||||
async function fetchListResult() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(
|
||||
config.API.listResult() +
|
||||
`?page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}`
|
||||
`?page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}&status=${status.value}`
|
||||
)
|
||||
.then(async (res) => {
|
||||
const data = res.data.result.data;
|
||||
|
|
@ -66,6 +66,11 @@ function openEdit(id: string) {
|
|||
router.push(`/discipline-result/${id}`);
|
||||
}
|
||||
|
||||
function filterStatus(statusReturn: string) {
|
||||
status.value = statusReturn;
|
||||
fetchListResult();
|
||||
}
|
||||
|
||||
/**เมื่อเริ่มโหลดหน้า
|
||||
* ส่งข้อมูลจำลองไปยัง store
|
||||
*/
|
||||
|
|
@ -97,6 +102,7 @@ onMounted(async () => {
|
|||
:maxPage="maxPage"
|
||||
@update:queryString="updateQueryString"
|
||||
v-model:open-edit="openEdit"
|
||||
:filterStatus="filterStatus"
|
||||
>
|
||||
</Table>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue