เปลี่ยนรอบการปฏิบัติงาน

This commit is contained in:
setthawutttty 2025-06-16 11:04:34 +07:00
parent 8f56dd773a
commit c289880166
2 changed files with 6 additions and 4 deletions

View file

@ -75,7 +75,6 @@ const initialPagination = ref<any>({
// Pagination - page & change page & get new data
const currentPage = ref<number>(1);
const roundOp = ref<any>([]);
async function updatePagination(newPagination: any) {
initialPagination.value = newPagination;
// currentPage.value = 1; // set current page 1 per row
@ -153,9 +152,10 @@ async function fetchDataOption() {
});
});
roundOp.value = option.filter(
const filterData = option.filter(
(e) => e.name !== props.DataRow?.currentRound
);
dataStore.roundOp = filterData;
})
.catch((err) => {
messageError($q, err);
@ -202,7 +202,7 @@ watch(
formData.reson = "";
formData.effectiveDate = null;
}
if (props.modal === true) {
if (props.modal === true && dataStore.roundOp.length == 0) {
currentPage.value = 1;
await fetchDataOption();
}
@ -266,7 +266,7 @@ watch(
emit-value
map-options
option-label="name"
:options="roundOp"
:options="dataStore.roundOp"
option-value="id"
lazy-rules
hide-bottom-space

View file

@ -21,6 +21,7 @@ const profileId = ref<string>("");
export const useChangeRoundDataStore = defineStore(
"changeRoundDataStore",
() => {
const roundOp = ref<any>([]);
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
const visibleColumns = ref<string[]>([
"cardId",
@ -234,6 +235,7 @@ export const useChangeRoundDataStore = defineStore(
totalListMain,
maxPageMain,
roundOp
};
}
);