This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-28 14:07:03 +07:00
parent 7084c9e839
commit a7b3397f74
3 changed files with 171 additions and 94 deletions

View file

@ -32,6 +32,7 @@ const pageSize = ref<number>(10);
const maxPage = ref<number>(1);
const total = ref<number>(1);
const keyword = ref<string>("");
const result = ref<string>("");
/** function fetch รายการประกาศผล*/
async function fetcDataList() {
@ -43,6 +44,7 @@ async function fetcDataList() {
pageSize: pageSize.value,
keyword: keyword.value,
kpiPeriodId: store.formQuery.round ? store.formQuery.round : "",
results: result.value === "" ? undefined : result.value,
})
.then(async (res) => {
const data = await res.data.result;
@ -61,6 +63,7 @@ async function fetcDataList() {
/** ทำงานเมื่อมีการเปลี่ยน Tab */
watch(tab, () => {
page.value = 1;
result.value = "";
keyword.value = "";
dataList.value = [];
});
@ -99,6 +102,7 @@ watch(pageSize, () => {
v-model:maxPage="maxPage"
v-model:total="total"
v-model:keyword="keyword"
v-model:result="result"
:fetchData="fetcDataList"
/>
</q-tab-panel>
@ -112,6 +116,7 @@ watch(pageSize, () => {
v-model:maxPage="maxPage"
v-model:total="total"
v-model:keyword="keyword"
v-model:result="result"
:fetchData="fetcDataList"
/>
</q-tab-panel>