ระบบพัฒนาบุคลากร>>ทุนการศึกษา/ฝึกอบรม (ชื่อผู้ค้ำประกันไม่แสดง)

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-11 09:48:28 +07:00
parent 29d605a9e1
commit c116daba58
2 changed files with 28 additions and 25 deletions

View file

@ -1076,7 +1076,7 @@ onMounted(async () => {
<div class="col-4 text-grey">-นามสก</div>
<div class="col-8 text-weight-medium">
{{
dataGuarantor.firstName ? dataGuarantor.name : "-"
dataGuarantor.name ? dataGuarantor.name : "-"
}}
</div>
<div class="col-4 text-grey">ตำแหน</div>

View file

@ -79,49 +79,52 @@ const columns = ref<QTableProps["columns"]>([
const visibleColumns = ref<string[]>(["scholarshipYear", "scholarshipType"]);
/** ดึงข้อมูล */
function getData() {
http
async function getData() {
showLoader();
await http
.get(
config.API.developmentScholarship +
`/user/${profilId.value}?year=${year.value}&type=${type.value}`
)
.then((res) => {
.then(async (res) => {
rows.value = res.data.result;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {});
.finally(() => {
hideLoader();
});
}
function onEdit(id: string) {
router.push(`/scholarship/${id}`);
}
watch(
() => currentPage.value,
() => {
rowsPerPage.value = pagination.value.rowsPerPage;
getData();
}
);
// watch(
// () => currentPage.value,
// () => {
// rowsPerPage.value = pagination.value.rowsPerPage;
// getData();
// }
// );
watch(
() => pagination.value.rowsPerPage,
() => {
rowsPerPage.value = pagination.value.rowsPerPage;
currentPage.value = 1;
getData();
}
);
// watch(
// () => pagination.value.rowsPerPage,
// () => {
// rowsPerPage.value = pagination.value.rowsPerPage;
// currentPage.value = 1;
// getData();
// }
// );
function getProfileId() {
async function getProfileId() {
showLoader();
http
await http
.get(config.API.profilePosition())
.then((res) => {
.then(async (res) => {
profilId.value = res.data.result.profileId;
getData();
await getData();
})
.catch((e) => {
messageError($q, e);
@ -147,7 +150,7 @@ function convertType(val: string) {
}
onMounted(async () => {
getProfileId();
await getProfileId();
});
</script>