ปรับ table ทดลองปฏิบัติงาน
This commit is contained in:
parent
6011112741
commit
11e0bdcee1
3 changed files with 11 additions and 24 deletions
|
|
@ -32,8 +32,6 @@ const filterKeyword = ref<string>("");
|
|||
const filterKeywordOrder = ref<string>("");
|
||||
const modalOrder = ref<boolean>(false);
|
||||
|
||||
const total = ref<number>(0);
|
||||
const totalList = ref<number>(1);
|
||||
const pagination = ref({
|
||||
sortBy: "createdAt",
|
||||
descending: true,
|
||||
|
|
@ -82,11 +80,6 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
]);
|
||||
|
||||
function updatePagination(newPagination: any) {
|
||||
pagination.value.page = 1;
|
||||
pagination.value.rowsPerPage = newPagination.rowsPerPage;
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลหลัก */
|
||||
async function getData() {
|
||||
showLoader();
|
||||
|
|
@ -96,18 +89,13 @@ async function getData() {
|
|||
const data = await res.data.result;
|
||||
rows.value = data;
|
||||
rowsData.value = data;
|
||||
hideLoader();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
hideLoader();
|
||||
})
|
||||
.finally(() => {});
|
||||
}
|
||||
|
||||
/** reset ฟิลเตอร์ */
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -126,15 +114,16 @@ function onDelete(id: string) {
|
|||
showLoader();
|
||||
http
|
||||
.delete(config.API.appointMain + `/${id}`)
|
||||
.then(async (res) => {
|
||||
.then(async () => {
|
||||
await getData();
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
hideLoader();
|
||||
})
|
||||
.finally(() => {});
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -200,7 +189,6 @@ onMounted(async () => {
|
|||
|
||||
<q-space />
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2 q-mr-sm"
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
|
|
@ -226,7 +214,6 @@ onMounted(async () => {
|
|||
:options="columns"
|
||||
option-value="name"
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue