แก้ dialog เพิ่ม page

This commit is contained in:
setthawutttty 2024-10-29 14:06:05 +07:00
parent a0feb4a785
commit 4124d81bb3
4 changed files with 576 additions and 546 deletions

View file

@ -10,8 +10,6 @@ import { useIndividualDevelopmentPlan } from "@/modules/14_IDP/store"; // ดึ
import type { DataOption, RowsListMain } from "@/modules/14_IDP/interface/Main";
import DialogDevelop from "@/modules/14_IDP/component/DialogDevelop.vue";
const $q = useQuasar();
const router = useRouter();
const mixin = useCounterMixin();
@ -169,7 +167,7 @@ function clearStatus() {
/** ฟังชั่น เปิด popup */
function openAdd() {
modalAdd.value = true;
router.push("/idp-registry");
}
function onDelete(id: string) {
@ -267,9 +265,12 @@ function updatePagination(newPagination: any) {
* @param id id row
*/
function onDetail(id: string) {
modalAdd.value = true;
isEdit.value = true;
idRow.value = id;
router.push(`/idp-registry-detail/${id}`);
}
function getSerach(){
pagination.value.page = 1
getListData()
}
watch(
@ -315,7 +316,7 @@ onMounted(async () => {
option-value="id"
:options="statusOptions"
style="width: 250px"
@update:model-value="getListData()"
@update:model-value="getSerach()"
@filter="(inputValue:string,
doneFn:Function) => filterOption(inputValue, doneFn
) "
@ -345,7 +346,7 @@ onMounted(async () => {
outlined
dense
label="ค้นหา"
@keydown.enter="getListData()"
@keydown.enter="getSerach()"
style="width: 200px"
>
<template v-slot:append>
@ -354,7 +355,7 @@ onMounted(async () => {
v-if="filterKeyword !== ''"
name="clear"
class="cursor-pointer"
@click="(filterKeyword = ''), getListData()"
@click="(filterKeyword = ''), getSerach()"
/>
</template>
</q-input>
@ -381,7 +382,7 @@ onMounted(async () => {
row-key="id"
:paging="true"
:visible-columns="visibleColumns"
:rows-per-page-options="[1, 25, 50, 100]"
:rows-per-page-options="[10, 25, 50, 100]"
@update:pagination="updatePagination"
>
<template v-slot:header="props">
@ -485,13 +486,5 @@ onMounted(async () => {
</div>
</div>
</div>
<DialogDevelop
v-model:modal="modalAdd"
:get-data="getListData"
v-model:is-edit="isEdit"
v-model:id-row="idRow"
:on-download-file="onDownloadFile"
/>
</template>
<style scoped lang="scss"></style>