จัดโค้ด เรื่อง เรื่องร้องเรียน
This commit is contained in:
parent
5b47826667
commit
aeaa8c8df2
5 changed files with 103 additions and 80 deletions
|
|
@ -11,17 +11,13 @@ import TableComplaint from "@/modules/11_discipline/components/1_Complaint/Table
|
|||
|
||||
const router = useRouter();
|
||||
|
||||
/** stoer */
|
||||
const complainstStore = useComplainstDataStore();
|
||||
const { fetchComplainst } = complainstStore; // function จาก stores
|
||||
const { fetchComplainst } = complainstStore;
|
||||
|
||||
//ข้อมูล Table
|
||||
const filterTable = ref<string>("");
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchListComplaints();
|
||||
});
|
||||
|
||||
// เรีนกรายการเรื่องร้องเรียน
|
||||
/**เรีนกรายการเรื่องร้องเรียน */
|
||||
async function fetchListComplaints() {
|
||||
const listData: DataList[] = [
|
||||
{
|
||||
|
|
@ -58,9 +54,15 @@ async function fetchListComplaints() {
|
|||
];
|
||||
await fetchComplainst(listData);
|
||||
}
|
||||
/** ไปยังหน้าเพิ่มข้อมูล */
|
||||
function redirectToPageadd() {
|
||||
router.push(`/discipline/complaints/add`);
|
||||
}
|
||||
|
||||
/** เรียกใช้งาน ฟังชั่น ตอนเริ่มโหลดหน้า */
|
||||
onMounted(async () => {
|
||||
await fetchListComplaints();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -80,7 +82,9 @@ function redirectToPageadd() {
|
|||
><q-tooltip>เพิ่มเรื่องร้องเรียน </q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
|
||||
<q-space />
|
||||
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
id="filterTable"
|
||||
|
|
@ -95,6 +99,7 @@ function redirectToPageadd() {
|
|||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-select
|
||||
id="visibleColumns"
|
||||
for="visibleColumns"
|
||||
|
|
@ -112,6 +117,7 @@ function redirectToPageadd() {
|
|||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<TableComplaint :filterTable="filterTable" />
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue