แก้ไข filter
This commit is contained in:
parent
3230b5e8c4
commit
c4761461cc
1 changed files with 35 additions and 4 deletions
|
|
@ -125,12 +125,29 @@ onMounted(async () => {
|
|||
});
|
||||
const fetchPlacementData = async (val: number) => {
|
||||
showLoader();
|
||||
rows.value = [];
|
||||
http
|
||||
.get(config.API.MainDetail(val))
|
||||
.then((res) => {
|
||||
dataPlacement.value = res.data.result;
|
||||
DataStore.DataMainOrig = dataPlacement.value;
|
||||
rows.value = DataStore.DataMainOrig;
|
||||
console.log(DataStore.DataMainOrig);
|
||||
|
||||
// rows.value = DataStore.DataMainOrig;
|
||||
DataStore.DataMainOrig.map((e: any) => {
|
||||
rows.value.push({
|
||||
examRound: e.examRound,
|
||||
examOrder: e.examOrder,
|
||||
examTypeName: e.examTypeName,
|
||||
examTypeValue: e.examTypeValue,
|
||||
accountEndDate: date2Thai(e.accountEndDate),
|
||||
accountExpirationDate: date2Thai(e.accountExpirationDate),
|
||||
accountStartDate: date2Thai(e.accountStartDate),
|
||||
fiscalYear: e.fiscalYear,
|
||||
numberOfCandidates: e.numberOfCandidates,
|
||||
});
|
||||
});
|
||||
|
||||
examTypeFilter();
|
||||
examTimeFilter();
|
||||
expiredAccountFilter();
|
||||
|
|
@ -218,13 +235,27 @@ const examTypeFilter = () => {
|
|||
};
|
||||
//--------------|ฟิลเตอร์|--------------------------------------//
|
||||
const searchFilterTable = async () => {
|
||||
rows.value = [];
|
||||
if (examType.value !== undefined && examType.value !== null) {
|
||||
await DataStore.DataUpdateMain(
|
||||
examTime.value,
|
||||
examType.value,
|
||||
expiredAccount.value
|
||||
);
|
||||
rows.value = DataStore.DataMainUpdate;
|
||||
// rows.value = DataStore.DataMainUpdate;
|
||||
DataStore.DataMainUpdate.map((e: any) => {
|
||||
rows.value.push({
|
||||
examRound: e.examRound,
|
||||
examOrder: e.examOrder,
|
||||
examTypeName: e.examTypeName,
|
||||
examTypeValue: e.examTypeValue,
|
||||
accountEndDate: date2Thai(e.accountEndDate),
|
||||
accountExpirationDate: date2Thai(e.accountExpirationDate),
|
||||
accountStartDate: date2Thai(e.accountStartDate),
|
||||
fiscalYear: e.fiscalYear,
|
||||
numberOfCandidates: e.numberOfCandidates,
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -416,10 +447,10 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
{{ props.row.examTypeName }}
|
||||
</q-td>
|
||||
<q-td key="accountStartDate" :props="props">
|
||||
{{ date2Thai(props.row.accountStartDate) }}
|
||||
{{ props.row.accountStartDate }}
|
||||
</q-td>
|
||||
<q-td key="accountExpirationDate" :props="props">
|
||||
{{ date2Thai(props.row.accountExpirationDate) }}
|
||||
{{ props.row.accountExpirationDate }}
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue