diff --git a/src/components/SkeletonTable.vue b/src/components/SkeletonTable.vue index 652d9f4..ea9da21 100644 --- a/src/components/SkeletonTable.vue +++ b/src/components/SkeletonTable.vue @@ -1,5 +1,5 @@ - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + {{ + col.label + }} + + + + + + + + + + + + diff --git a/src/components/Workflow/Main.vue b/src/components/Workflow/Main.vue index 6c5f5b4..209a9c2 100644 --- a/src/components/Workflow/Main.vue +++ b/src/components/Workflow/Main.vue @@ -10,7 +10,6 @@ import type { Permission } from "@/components/Workflow/interface/index/Main"; import type { DataListState } from "@/components/Workflow/interface/response/Main"; import DialogSelectPerson from "@/components/Workflow/DialogSelectPerson.vue"; -import Keycloak from "keycloak-js"; const $q = useQuasar(); const { dialogConfirm, showLoader, hideLoader, messageError } = @@ -31,6 +30,7 @@ const stateId = ref(""); //id state ปัจุบัน const state = ref(1); //state ปัจุบัน const isPermission = ref(true); //การเข้าถึง Workflow const KeycloakId = ref(""); +const isLoading = ref(false); //สถานะการโหลดข้อมูล const permission = ref({ isChangeState: false, //ส่งไปยังผู้บังคับบัญชา/ผู้มีอำนาจ @@ -48,6 +48,7 @@ const itemState = ref([]); /** ฟังก์ชันเรียกข้อมูล Workflow ที่อยู่ปัจุบัน*/ async function fetchCheckState() { + isLoading.value = true; await http .post(config.API.workflow + `check-user-now`, { refId: id, @@ -74,6 +75,9 @@ async function fetchCheckState() { }) .catch(() => { isPermission.value = false; + }) + .finally(() => { + isLoading.value = false; }); } @@ -129,7 +133,22 @@ defineExpose({ สถานะการดำเนินเรื่อง - + + + + + + + + + + + (""); // ชื่อผู้ใช้ const inboxList = ref([]); // รายการกล่องข้อความ const idInboxActive = ref(); // Id ข้อความที่เลือก -// รายการเมนูหลักของระบบ +const isLoadingInbox = ref(true); // สถานะการโหลดกล่องข้อความ +// รายการเมนูหลักของระบบ const filteredItems = computed(() => { const isOfficer = dataStore.officerType === "OFFICER"; const conditions: Record = { @@ -148,7 +149,10 @@ const items = ref([ * @param index หน้าที่โหลดข้อมูล */ const fetchlistInbox = async (index: number) => { - index === 1 && showLoader(); + if (index === 1) { + isLoadingInbox.value = true; // เริ่มโหลดข้อมูลกล่องข้อความ + } + index != 0 && (await http .get(config.API.msgInbox + `?page=${index}&pageSize=${10}`) @@ -173,7 +177,7 @@ const fetchlistInbox = async (index: number) => { } }) .finally(() => { - hideLoader(); + isLoadingInbox.value = false; })); }; @@ -249,11 +253,17 @@ const totalInbox = ref(0); // จำนวนข้อความทั */ async function onLoad(index: number, done: Function) { const num = index === 1 ? 0 : index++; - if (inboxList.value.length < totalInbox.value) { - setTimeout(() => { - fetchlistInbox(num); - done(); - }, 3000); + try { + // ถ้าโหลดครบแล้ว ให้หยุด infinite scroll + if (inboxList.value.length >= totalInbox.value) { + done(true); + return; + } + + await fetchlistInbox(num); + done(); + } catch (error) { + done(true); } } @@ -284,7 +294,16 @@ onMounted(async () => { v-for="(item, j) in filteredItems" :key="j" > - + + + + + { กล่องข้อความ - + + + + ทั้งหมด {{ totalInbox }} ข้อความ + + + + + + + + + @@ -400,7 +435,11 @@ onMounted(async () => { - + ([]); @@ -37,10 +37,10 @@ const leaveId = ref(""); /** filter calendar left */ const filterLists = ref([]); const filterVal = ref([keycloakId.value]); +const isLoading = ref(false); +const isLoadingHoliday = ref(false); -/** - * Option ของปฏิทิน - */ +/** Option ของปฏิทิน */ const fullCalendar = ref(); //ref calendar const calendarOptions = ref({ plugins: [ @@ -76,6 +76,7 @@ const dateMonth = ref({ /** function เรียกข้อมูล calendar*/ async function fetchDataCalendar() { + isLoading.value = true; await http .post(config.API.leaveCalendar(), { year: dateMonth.value.year, @@ -119,6 +120,9 @@ async function fetchDataCalendar() { }) .catch((err) => { messageError($q, err); + }) + .finally(() => { + isLoading.value = false; }); } @@ -126,6 +130,7 @@ async function fetchDataCalendar() { * fetch วันหยุดในปฏิทิน */ async function fetchData() { + isLoadingHoliday.value = true; await http .get( config.API.listHolidayHistoryYearMonth( @@ -154,6 +159,9 @@ async function fetchData() { }) .catch((e) => { messageError($q, e); + }) + .finally(() => { + isLoadingHoliday.value = false; }); } @@ -193,7 +201,6 @@ async function updateMonth() { } catch (error) { messageError($q, error); } finally { - hideLoader(); } } @@ -215,7 +222,6 @@ async function onClickClose() { watch( () => filterVal.value, async () => { - showLoader(); const eventData = filterVal.value.map((item: any) => { return mainData.value .filter( @@ -236,14 +242,13 @@ watch( const allEventData = [].concat(...eventData); calendarOptions.value.events = allEventData; await fetchData(); - hideLoader(); } ); /**Hook */ onMounted(async () => { try { - showLoader(); + isLoading.value = true; // เรียกข้อมูล keycloakId const user = await tokenParsed(); keycloakId.value = await (user ? user.sub : ""); @@ -253,7 +258,7 @@ onMounted(async () => { } catch (error) { messageError($q, error); } finally { - hideLoader(); + isLoading.value = false; } }); @@ -262,7 +267,8 @@ onMounted(async () => { - + + { + ({ leaveRangeEnd: "", leaveDirectorComment: "", }); +const isLoading = ref(false); /** form ขอยกเลิก*/ const formDelete = reactive({ @@ -187,7 +188,7 @@ const formDeleteRef: FormDeleteRef = { * @param id การลา */ async function fetchDataDetail(id: string) { - showLoader(); + isLoading.value = true; await http .get(config.API.leaveUserId(id), {}) .then((res) => { @@ -280,7 +281,7 @@ async function fetchDataDetail(id: string) { messageError($q, err); }) .finally(() => { - hideLoader(); + isLoading.value = false; }); } @@ -308,10 +309,7 @@ function checkLeaveType(leaveTypeId: string) { checkForm.value = "FormHajj"; } else if (type === "LV-007") { checkForm.value = "FormCheckSelect"; - } else if ( - type === "LV-008" && - formData.leaveSubTypeName === "ศึกษาต่อ" - ) { + } else if (type === "LV-008" && formData.leaveSubTypeName === "ศึกษาต่อ") { checkForm.value = "FormStudy"; } else if ( (type === "LV-008" && formData.leaveSubTypeName === "ฝึกอบรม") || @@ -334,7 +332,7 @@ function checkLeaveType(leaveTypeId: string) { * @param id ยกเลิกการลา */ async function fetchDataCancelDetail(id: string) { - showLoader(); + isLoading.value = true; await http .get(config.API.leaveCancelById(id)) .then((res) => { @@ -362,7 +360,7 @@ async function fetchDataCancelDetail(id: string) { messageError($q, err); }) .finally(() => { - hideLoader(); + isLoading.value = false; }); } @@ -401,7 +399,8 @@ async function onSubmit() { formData.append("doc", formDelete.doc); await http .post(config.API.leaveCancelById(id), formData) - .then(() => { + .then(async () => { + await props.fetchDataTable?.(); success($q, "บันทึกข้อมูลสำเร็จ"); props.onClickClose?.(); }) @@ -409,7 +408,6 @@ async function onSubmit() { messageError($q, err); }) .finally(() => { - props.fetchDataTable?.(); hideLoader(); }); } @@ -445,7 +443,9 @@ watch( - + + + @@ -584,7 +585,8 @@ watch( - + + diff --git a/src/modules/05_leave/components/ListView.vue b/src/modules/05_leave/components/ListView.vue index 8fbb085..3dbefca 100644 --- a/src/modules/05_leave/components/ListView.vue +++ b/src/modules/05_leave/components/ListView.vue @@ -30,6 +30,7 @@ const year = ref(new Date().getFullYear()); const type = ref("00000000-0000-0000-0000-000000000000"); const status = ref("ALL"); const filter = ref(""); +const isLoading = ref(false); /** pagination*/ const maxPage = ref(1); @@ -38,7 +39,7 @@ const pageSize = ref(10); const total = ref(0); /** function เรียกข้อมูลการลา*/ async function fetchDataTable() { - showLoader(); + isLoading.value = true; const body = { year: year.value, //*ปีในการยื่นขอใบลา(ใช้เป็น คศ.) type: LeaveData.type, //*Id ประเภทการลา @@ -59,7 +60,7 @@ async function fetchDataTable() { messageError($q, err); }) .finally(() => { - hideLoader(); + isLoading.value = false; }); } @@ -128,10 +129,10 @@ async function onClickClose() { */ async function updateFilterTable(y: number, t: string, s: string, k: string) { if (t && s) { - year.value = await y; - type.value = await t; - status.value = await s; - filter.value = await k; + year.value = y; + type.value = t; + status.value = s; + filter.value = k; await fetchDataTable(); } } @@ -142,7 +143,7 @@ async function updateFilterTable(y: number, t: string, s: string, k: string) { * @param ps แถวต่อหน้า */ async function updatePagination(p: number, ps: number) { - (page.value = await p), (pageSize.value = await ps); + (page.value = p), (pageSize.value = ps); await fetchDataTable(); } @@ -168,15 +169,8 @@ function convert(val: any) { * เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้ */ onMounted(async () => { - try { - showLoader(); - await fectOptionType(); - await fetchDataTable(); - } catch (error) { - messageError($q, error); - } finally { - hideLoader(); - } + await fectOptionType(); + await fetchDataTable(); }); @@ -194,6 +188,7 @@ onMounted(async () => { :pageSize="pageSize" :leaveType="leaveType" :total="total" + :isloadingData="isLoading" > diff --git a/src/modules/05_leave/components/Table.vue b/src/modules/05_leave/components/Table.vue index ad36ea9..7e9357a 100644 --- a/src/modules/05_leave/components/Table.vue +++ b/src/modules/05_leave/components/Table.vue @@ -3,6 +3,7 @@ import { ref, useAttrs, watch } from "vue"; import { useQuasar } from "quasar"; import { useLeaveStore } from "@/modules/05_leave/store"; +import SkeletonTable from "@/components/SkeletonTable.vue"; const $q = useQuasar(); const attrs = ref(useAttrs()); @@ -15,7 +16,6 @@ const props = defineProps({ pass: Number, notpass: Number, total: Number, - name: String, icon: String, inputvisible: Array, @@ -34,6 +34,10 @@ const props = defineProps({ type: Object, require: true, }, + isloadingData: { + type: Boolean, + default: false, + }, }); /** @@ -48,9 +52,7 @@ const emit = defineEmits([ const table = ref(null); -/** - * ตั้งค่า pagination - */ +/** ตั้งค่า pagination*/ const currentPage = ref(1); const pagination = ref({ sortBy: "dateSendLeave", @@ -235,7 +237,9 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => { + ([ }, ]); -const isloading = ref(false); +const isloadingSummary = ref(false); /** function เรียกข้อมูลตารางสถิติการลา*/ async function fetchStatsTable() { - isloading.value = true; + isloadingSummary.value = true; await http .get(config.API.leaveStats()) .then((res) => { @@ -171,11 +171,12 @@ async function fetchStatsTable() { leaveCountReject: e.leaveCountReject, leaveCountDelete: e.leaveCountDelete, })); - isloading.value = false; }) .catch((err) => { messageError($q, err); - isloading.value = true; + }) + .finally(() => { + isloadingSummary.value = false; }); } @@ -215,7 +216,7 @@ onMounted(async () => { - + สถิติการลา @@ -278,6 +279,7 @@ onMounted(async () => { + (); * @param id id ประเมิน */ async function fetchDataStep1(id: string) { - showLoader(); + // showLoader(); showLoadStatus.value = false; await http .get(config.API.evaluationCheckspecByid(id)) @@ -211,9 +211,6 @@ async function fetchDataStep1(id: string) { }) .finally(() => { showLoadStatus.value = true; - setTimeout(() => { - hideLoader(); - }, 3000); }); } @@ -581,7 +578,9 @@ async function saveStep7() { .then(() => { route.params.id && fetchCheckStep(route.params.id.toString()); }) - .catch(() => {}) + .catch((err) => { + messageError($q, err); + }) .finally(() => { hideLoader(); }); diff --git a/src/modules/06_evaluate/components/ExpertPage.vue b/src/modules/06_evaluate/components/ExpertPage.vue index 8779d66..29f1e27 100644 --- a/src/modules/06_evaluate/components/ExpertPage.vue +++ b/src/modules/06_evaluate/components/ExpertPage.vue @@ -1,5 +1,5 @@ @@ -103,7 +101,14 @@ onMounted(() => { - + + + diff --git a/src/modules/06_evaluate/components/ExpertPageDetail.vue b/src/modules/06_evaluate/components/ExpertPageDetail.vue index 22e5b8b..5fcb7d1 100644 --- a/src/modules/06_evaluate/components/ExpertPageDetail.vue +++ b/src/modules/06_evaluate/components/ExpertPageDetail.vue @@ -1,5 +1,6 @@ +divdivdiv - - - - - - ประเมินเชี่ยวชาญ - + + + + + ประเมินเชี่ยวชาญ + - - - - - - - - ผลงาน - - - - - - - + + + + + + + + + + ผลงาน + + + + + + + - + lazy-rules + hide-bottom-space + /> - - + + + - - - - - เลือกผู้เซ็นเอกสาร - - - - - - - ผู้บังคับบัญชาชั้นต้น - - - - - + + + + + + + + เลือกผู้เซ็นเอกสาร + + + + + + + ผู้บังคับบัญชาชั้นต้น - - - - - ผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ - - - + - - + lazy-rules + hide-bottom-space + /> + - - - - - - - - - แบบพิจารณาคุณสมบัติบุคคล - - - - ดาวน์โหลดต้นแบบ - - - - ดูไฟล์เอกสาร - + + + + ผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ - - - - - + + + + + + + + + + + + + + + + + แบบพิจารณาคุณสมบัติบุคคล + + + + ดาวน์โหลดต้นแบบ + + + + ดูไฟล์เอกสาร + + + + + + + - - - - - อัปโหลดไฟล์ - - - + > + + + + + อัปโหลดไฟล์ + + - - + + + - - - - - แบบแสดงรายละเอียดการเสนอผลงาน - - - - ดาวน์โหลดต้นแบบ - - - - ดูไฟล์เอกสาร - + + + + + + แบบแสดงรายละเอียดการเสนอผลงาน + + + + ดาวน์โหลดต้นแบบ - - - - - + ดูไฟล์เอกสาร + + + + + + + - - - - - อัปโหลดไฟล์ - - - + > + + + + + อัปโหลดไฟล์ + + - - + + + - - - - - - แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล - (เอกสารแบบ ก.) - - - - - ดาวน์โหลดต้นแบบ - - - - ดูไฟล์เอกสาร - + + + + + + + แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล + (เอกสารแบบ ก.) - - - - + ดาวน์โหลดต้นแบบ + + + + ดูไฟล์เอกสาร + + + + + + - - - - - อัปโหลดไฟล์ - - - + > + + + + + อัปโหลดไฟล์ + + - - + + + - - - - - - แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9) - - - - ดาวน์โหลดต้นแบบ - - - - ดูไฟล์เอกสาร - + + + + + + + แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9) - - - - ดาวน์โหลดต้นแบบ + + + + ดูไฟล์เอกสาร + + + + + + - - - - - อัปโหลดไฟล์ - - - + > + + + + + อัปโหลดไฟล์ + + - - + + + - - - - - แบบประเมินคุณลักษณะบุคคล - - - - ดาวน์โหลดต้นแบบ - - - - ดูไฟล์เอกสาร - + + + + + + แบบประเมินคุณลักษณะบุคคล + + + + ดาวน์โหลดต้นแบบ - - - - + ดูไฟล์เอกสาร + + + + + + - - - - - อัปโหลดไฟล์ - - - + > + + + + + อัปโหลดไฟล์ + + - - + + + - - - - - ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11) - - - - ดาวน์โหลดต้นแบบ - - - - ดูไฟล์เอกสาร - + + + + + + ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11) + + + + ดาวน์โหลดต้นแบบ - - - - + ดูไฟล์เอกสาร + + + + + + - - - - - อัปโหลดไฟล์ - - - + > + + + + + อัปโหลดไฟล์ + + - - + + - - + + - + diff --git a/src/modules/06_evaluate/components/PopupPosition.vue b/src/modules/06_evaluate/components/PopupPosition.vue index 7a9f9d7..7cd4691 100644 --- a/src/modules/06_evaluate/components/PopupPosition.vue +++ b/src/modules/06_evaluate/components/PopupPosition.vue @@ -16,6 +16,7 @@ const { showLoader, hideLoader, messageError, formatDatePosition } = const modal = defineModel("modal", { required: true }); +const isLoading = ref(false); const cardData = ref([ { label: "ระยะเวลาดำรงตำแหน่งในสายงาน", @@ -36,7 +37,7 @@ function onClosePopup() { } async function fetchDataPosition() { - showLoader(); + isLoading.value = true; await http .get(config.API.salaryTenurePosition("")) .then((res) => { @@ -76,7 +77,7 @@ async function fetchDataPosition() { messageError($q, err); }) .finally(() => { - hideLoader(); + isLoading.value = false; }); } @@ -98,7 +99,19 @@ watch(modal, (v) => { - + + + {{ item.label }} diff --git a/src/modules/06_evaluate/components/TableListEvaluate.vue b/src/modules/06_evaluate/components/TableListEvaluate.vue index c5916bb..261f49a 100644 --- a/src/modules/06_evaluate/components/TableListEvaluate.vue +++ b/src/modules/06_evaluate/components/TableListEvaluate.vue @@ -8,6 +8,7 @@ import config from "@/app.config"; import http from "@/plugins/http"; import { useEvaluateStore } from "@/modules/06_evaluate/store"; import { useCounterMixin } from "@/stores/mixin"; +import SkeletonTable from "@/components/SkeletonTable.vue"; /** use*/ const $q = useQuasar(); @@ -37,6 +38,10 @@ const props = defineProps({ type: Function, require: true, }, + isLoading: { + type: Boolean, + default: false, + }, }); const emit = defineEmits(["update:pagination"]); @@ -135,7 +140,9 @@ onMounted(() => { + ({ isHaveProLicense: false, // มีใบอนุญาตประกอบวิชาชีพของสายงานต่างๆ isHaveMinPeriodOrHoldPos: false, // มีระยะเวลาขั้นต่ำในการดำรงตำแหน่งหรือเคยดำรงตำแหน่งในสายงานที่จะคัดเลือกตามคุณวุฒิของบุคคลและระดับตำแหน่งที่จะคัดเลือก] }); +const isLoading = ref(false); /** function อัปเดทตรวจสอบคุณสมบัติ*/ async function updateValue() { @@ -48,6 +49,7 @@ async function updateValue() { * @param data ตรวจสอบคุณสมบัติ */ async function fetchCheckSpec(data: PersonInformation) { + isLoading.value = true; formData.isEducationalQft = data.isEducationalQft; formData.isGovermantServiceHtr = data.isGovermantServiceHtr; formData.isOperatingExp = data.isOperatingExp; @@ -55,6 +57,7 @@ async function fetchCheckSpec(data: PersonInformation) { formData.isHaveSpecificQft = data.isHaveSpecificQft; formData.isHaveProLicense = data.isHaveProLicense; formData.isHaveMinPeriodOrHoldPos = data.isHaveMinPeriodOrHoldPos; + isLoading.value = false; } /** @@ -87,7 +90,14 @@ onMounted(() => { - + + diff --git a/src/modules/06_evaluate/components/step/step2.vue b/src/modules/06_evaluate/components/step/step2.vue index 70e3757..e480695 100644 --- a/src/modules/06_evaluate/components/step/step2.vue +++ b/src/modules/06_evaluate/components/step/step2.vue @@ -52,6 +52,7 @@ const formTemplates = ref([ fileName: "1-แบบพิจารณาคุณสมบัติบุคคล", downloadFile: "", file: null, + isLoading: false, }, { code: "EV1_006", @@ -60,6 +61,7 @@ const formTemplates = ref([ fileName: "2-แบบแสดงรายละเอียดการเสนอผลงาน", downloadFile: "", file: null, + isLoading: false, }, { code: "EV1_008", @@ -68,6 +70,7 @@ const formTemplates = ref([ fileName: "4-แบบประเมินคุณลักษณะบุคคล", downloadFile: "", file: null, + isLoading: false, }, { code: "EV1_010", @@ -76,6 +79,7 @@ const formTemplates = ref([ fileName: "6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)", downloadFile: "", file: null, + isLoading: false, }, ]); @@ -96,6 +100,7 @@ const numOfPages = ref(0); const page = ref(1); const pdfSrc = ref(); const profile = ref(); +const isLoading = ref(false); /** function ไปหน้าต่อไปของรายงาน */ function nextPage() { @@ -201,8 +206,9 @@ async function uploadfile(uploadUrl: string, file: any) { * function fecth รายชื่อผู้เซ็นเอกสาร * @param id evaluate ID */ -function fetcheSigner(id: string) { - http +async function fetcheSigner(id: string) { + isLoading.value = true; + await http .get(config.API.evaluationSignerDoc1(id)) .then((res) => { const data = res.data.result; @@ -220,9 +226,12 @@ function fetcheSigner(id: string) { formCommand.subject = data.subject; store.statusUpload = true; }) - .catch(() => { + .catch(async () => { store.statusUpload = false; - getCommander(); + await getCommander(); + }) + .finally(() => { + isLoading.value = false; }); } @@ -247,6 +256,11 @@ async function fetchCheckSpec(id: string) { * @param fileName ชื่อไฟล์ */ async function downloadFile(fileName: string) { + const loadingKey = formTemplates.value.findIndex( + (item) => item.fileName === fileName + ); + formTemplates.value[loadingKey].isLoading = true; + await http .get(config.API.loadFileDocument("เล่ม 1", evaluateId.value, fileName)) .then((res) => { @@ -264,6 +278,7 @@ async function downloadFile(fileName: string) { }; emit("update:form", formCommand, ref); + formTemplates.value[loadingKey].isLoading = false; }); } @@ -316,29 +331,16 @@ watch( /**lifecycle Hooks*/ onMounted(async () => { - const user = await tokenParsed(); - try { - showLoader(); await Promise.all([ fetcheSigner(evaluateId.value), fetchCheckSpec(evaluateId.value), formTemplates.value.forEach((e) => { downloadFile(e.fileName); }), - // downloadFile("1-แบบพิจารณาคุณสมบัติบุคคล"), - // downloadFile("2-แบบแสดงรายละเอียดการเสนอผลงาน"), - // downloadFile( - // "3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)" - // ), - // downloadFile("4-แบบประเมินคุณลักษณะบุคคล"), - // downloadFile("5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)"), - // downloadFile("6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)"), ]); } catch (error) { console.log(error); - } finally { - hideLoader(); } }); @@ -347,7 +349,8 @@ onMounted(async () => { - + + ผลงาน @@ -422,7 +425,8 @@ onMounted(async () => { - + + เลือกผู้เซ็นเอกสาร @@ -573,14 +577,16 @@ onMounted(async () => { - + - + + + @@ -662,541 +668,6 @@ onMounted(async () => { - - - - - - - - - - - - - - - - - - diff --git a/src/modules/06_evaluate/components/step/step3.vue b/src/modules/06_evaluate/components/step/step3.vue index 019a960..93ae4b8 100644 --- a/src/modules/06_evaluate/components/step/step3.vue +++ b/src/modules/06_evaluate/components/step/step3.vue @@ -13,7 +13,7 @@ const $q = useQuasar(); const store = useEvaluateStore(); const mixin = useCounterMixin(); const route = useRoute(); -const { showLoader, hideLoader, messageError } = mixin; +const { messageError } = mixin; /** id ประเมิน*/ const evaluateId = ref(route.params.id.toString()); @@ -21,6 +21,7 @@ const evaluateId = ref(route.params.id.toString()); /** emit*/ const emit = defineEmits(["update:file"]); +const isLoading = ref(false); const selectedItem = ref(1); const formTemplates = ref([ { @@ -55,8 +56,10 @@ function handleItemClick(itemNumber: number) { * function เรีกยเอกสาร * @param fileName ชื่อเอกสาร */ -async function fetchDocument(fileName: string) { - showLoader(); +async function fetchDocument(fileName: string, forceDownload = false) { + if (forceDownload) { + isLoading.value = true; + } evaluateId.value && (await http .get(config.API.loadFileDocument("เล่ม 1", evaluateId.value, fileName)) @@ -67,7 +70,7 @@ async function fetchDocument(fileName: string) { messageError($q, err); }) .finally(() => { - hideLoader(); + isLoading.value = false; })); } @@ -95,7 +98,10 @@ async function downloadFile(url: string) { /** HooK lifecycle*/ onMounted(async () => { - await fetchDocument(formTemplates.value[selectedItem.value - 1].fileName); + await fetchDocument( + formTemplates.value[selectedItem.value - 1].fileName, + true + ); }); @@ -111,7 +117,8 @@ onMounted(async () => { @click="handleItemClick(index + 1)" class="cursor-pointer" > - {{ item.title }} + + {{ item.title }} diff --git a/src/modules/06_evaluate/components/step/step4.vue b/src/modules/06_evaluate/components/step/step4.vue index 56d583d..70a6f79 100644 --- a/src/modules/06_evaluate/components/step/step4.vue +++ b/src/modules/06_evaluate/components/step/step4.vue @@ -1,6 +1,6 @@ @@ -226,7 +234,13 @@ onMounted(async () => { + (route.params.id.toString()); @@ -20,6 +20,7 @@ const evaluateId = ref(route.params.id.toString()); const dateStartAnnounce = ref(date2Thai(new Date())); const dateEndAnnounce = ref(date2Thai(new Date())); const statusFile = ref(false); +const isLoading = ref(false); /** เอกสารประกาศผลการคัดเลือกบุคคล*/ const items = ref([ @@ -44,22 +45,16 @@ const items = ref([ ]); /** fuinction เรียกข้อมูลลิงก์ดาวนฺโหลด*/ -function onClickfetchDocument(fileName: string, type: string) { +async function onClickfetchDocument(fileName: string, type: string) { if (evaluateId.value) { - showLoader(); - http + await http .get(config.API.loadFileDocument("เล่ม 1", evaluateId.value, fileName)) .then((res) => { const downloadUrl = res.data.downloadUrl; type === "COPPY" && coppyLink(downloadUrl); type === "CHECK" && (statusFile.value = true); }) - .catch(() => {}) - .finally(() => { - setTimeout(() => { - hideLoader(); - }, 1500); - }); + .catch(() => {}); } } @@ -71,9 +66,10 @@ async function coppyLink(link: string) { } /** function เรียกข้อมูลวันที่ประกาศ*/ -function fetchCheckDate() { +async function fetchCheckDate() { + isLoading.value = true; evaluateId.value && - http + (await http .get(config.API.evaluationCheckDate(evaluateId.value)) .then((res) => { const data = res.data.result; @@ -82,7 +78,12 @@ function fetchCheckDate() { endDate.setDate(endDate.getDate() + 30); dateEndAnnounce.value = date2Thai(endDate); }) - .catch(() => {}); + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + isLoading.value = false; + })); } /** Hook lifecycle*/ @@ -91,10 +92,16 @@ onMounted(async () => { await onClickfetchDocument("บันทึกแจ้งผลการประกาศคัดเลือก", "CHECK"); }); +` - + + diff --git a/src/modules/06_evaluate/components/step/step6.vue b/src/modules/06_evaluate/components/step/step6.vue index efccae3..de5ef96 100644 --- a/src/modules/06_evaluate/components/step/step6.vue +++ b/src/modules/06_evaluate/components/step/step6.vue @@ -50,6 +50,10 @@ const formCommand = reactive({ const modalView = ref(false); +const isLoading = ref(false); // ใช้สำหรับเช็คการโหลดไฟล์ +const isLoadingFile = ref(false); +const isLoadingDate = ref(false); + /** function อัปเดท ผลงาน,ผู้เซ็นเอกสาร*/ function updateInput(value: any) { const ref = { @@ -85,16 +89,18 @@ async function fetchPathUpload( showLoader(); await http .post(config.API.loadPathDocument(volume, id), body) - .then((res) => { + .then(async (res) => { const foundKey: string | undefined = Object.keys(res.data).find( (key) => res.data[key]?.fileName !== undefined && res.data[key]?.fileName !== "" ); - foundKey && uploadfile(res.data[foundKey]?.uploadUrl, file); + foundKey && (await uploadfile(res.data[foundKey]?.uploadUrl, file)); }) .catch((err) => { messageError($q, err); + }) + .finally(() => { hideLoader(); }); } @@ -129,7 +135,7 @@ async function uploadfile(uploadUrl: string, file: any) { * @param id ประเมิน */ async function fetcheSigner(id: string) { - showLoader(); + isLoading.value = true; await http .get(config.API.evaluationSignerDoc2(id)) .then((res) => { @@ -148,40 +154,43 @@ async function fetcheSigner(id: string) { formCommand.author = data.authorDoc2; formCommand.subject = data.subjectDoc2; formCommand.assignedPosition = data.assignedPosition; - assignedPosLevel.value = data.assignedPosLevel; - store.statusUpload6 = data.isUpdated; }) .catch((err) => { messageError($q, err); - // store.statusUpload6 = false; - // getCommander(); }) .finally(() => { - hideLoader(); + isLoading.value = false; }); } const dateEndPrepareDoc2 = ref(date2Thai(new Date())); /** functoin เรียกข้อมูลวันสุดท้ายของการส่งผลงาน*/ async function fetchCheckDate() { - evaluateId.value && - (await http - .get(config.API.evaluationCheckDate(evaluateId.value)) - .then((res) => { - const data = res.data.result; + if (!evaluateId.value) return; + isLoadingDate.value = true; + await http + .get(config.API.evaluationCheckDate(evaluateId.value)) + .then((res) => { + const data = res.data.result; - const endDate = new Date(data.dateEndAnnounce); - endDate.setDate(endDate.getDate() + 180); - dateEndPrepareDoc2.value = date2Thai(endDate); - }) - .catch((err) => {})); + const endDate = new Date(data.dateEndAnnounce); + endDate.setDate(endDate.getDate() + 180); + dateEndPrepareDoc2.value = date2Thai(endDate); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + isLoadingDate.value = false; + }); } const downloadUrl = ref(""); /** function เช็คไฟล์อัปโหลด*/ async function checkDoc() { + isLoadingFile.value = true; await http .get( config.API.loadFileDocument("เล่ม 2", evaluateId.value, "1-เอกสารเล่ม 2") @@ -195,26 +204,10 @@ async function checkDoc() { }; emit("update:form", formCommand, ref); + isLoadingFile.value = false; }); } -// function getCommander() { -// http -// .get(config.API.searchCommander) -// .then((res) => { -// const data = res.data.result; -// formCommand.commanderFullname = data.commanderFullname; -// formCommand.commanderPosition = data.commanderPosition; -// formCommand.commanderAboveFullname = data.commanderAboveFullname; -// formCommand.commanderAbovePosition = data.commanderAbovePosition; -// formCommand.commanderOrg = data.commanderOrg; -// formCommand.commanderAboveOrg = data.commanderAboveOrg; -// }) -// .catch((e) => { -// messageError($q, e); -// }); -// } - function onAddSubject() { formCommand.subject.push(""); } @@ -256,9 +249,10 @@ onMounted(async () => { - + - + + วันสุดท้ายของการส่งผลงานคือวันที่ {{ dateEndPrepareDoc2 }} @@ -268,7 +262,14 @@ onMounted(async () => { - + + + ผลงาน @@ -372,7 +373,13 @@ onMounted(async () => { - + + เลือกผู้เซ็นเอกสาร @@ -541,7 +548,13 @@ onMounted(async () => { - + + เอกสารเล่ม 2 diff --git a/src/modules/06_evaluate/components/step/step7.vue b/src/modules/06_evaluate/components/step/step7.vue index a6cf6b9..40562d6 100644 --- a/src/modules/06_evaluate/components/step/step7.vue +++ b/src/modules/06_evaluate/components/step/step7.vue @@ -13,7 +13,7 @@ import { useCounterMixin } from "@/stores/mixin"; const $q = useQuasar(); const mixin = useCounterMixin(); const route = useRoute(); -const { showLoader, hideLoader, messageError } = mixin; +const { messageError } = mixin; /** emit*/ const emit = defineEmits(["update:file"]); @@ -22,28 +22,25 @@ const emit = defineEmits(["update:file"]); const evaluateId = ref(route.params.id.toString()); const selectedItem = ref(1); +const isLoading = ref(false); /** function เรีกยเอกสาร*/ async function fetchDocument() { - showLoader(); - evaluateId.value && - (await http - .get( - config.API.loadFileDocument( - "เล่ม 2", - evaluateId.value, - "1-เอกสารเล่ม 2" - ) - ) - .then(async (res) => { - await downloadFile(res.data.downloadUrl); - }) - .catch((err) => { - messageError($q, err); - }) - .finally(() => { - hideLoader(); - })); + if (!evaluateId.value) return; + isLoading.value = true; + await http + .get( + config.API.loadFileDocument("เล่ม 2", evaluateId.value, "1-เอกสารเล่ม 2") + ) + .then(async (res) => { + await downloadFile(res.data.downloadUrl); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + isLoading.value = false; + }); } /** @@ -84,7 +81,9 @@ onMounted(async () => { active-class="text-primary" class="cursor-pointer" > - เอกสารเล่ม 2 + + + เอกสารเล่ม 2 diff --git a/src/modules/06_evaluate/components/step/step8.vue b/src/modules/06_evaluate/components/step/step8.vue index ef226e4..5968df6 100644 --- a/src/modules/06_evaluate/components/step/step8.vue +++ b/src/modules/06_evaluate/components/step/step8.vue @@ -107,9 +107,11 @@ async function uploadfile(uploadUrl: string, file: any) { } const downloadUrl = ref(""); +const isLoadingFile = ref(false); /** function เช็คไฟล์อัปโหลด*/ -function checkDoc() { - http +async function checkDoc() { + isLoadingFile.value = true; + await http .get( config.API.loadFileDocument( "เล่ม 2", @@ -119,6 +121,9 @@ function checkDoc() { ) .then((res: any) => { downloadUrl.value = res.data.downloadUrl; + }) + .finally(() => { + isLoadingFile.value = false; }); } @@ -148,12 +153,9 @@ async function fetcheSigner(id: string) { /** lifecycleHook*/ onMounted(async () => { try { - showLoader(); await Promise.all([checkDoc(), fetcheSigner(evaluateId.value)]); } catch (error) { console.log(error); - } finally { - hideLoader(); } }); @@ -178,7 +180,12 @@ onMounted(async () => { (store.currentStep !== 8 && downloadUrl) || store.currentStep == 8 " > - + + เอกสารเล่ม 2 (ฉบับแก้ไข) diff --git a/src/modules/06_evaluate/components/viewstep/popupHistory.vue b/src/modules/06_evaluate/components/viewstep/popupHistory.vue index fd03ab9..d4d466b 100644 --- a/src/modules/06_evaluate/components/viewstep/popupHistory.vue +++ b/src/modules/06_evaluate/components/viewstep/popupHistory.vue @@ -9,12 +9,15 @@ import config from "@/app.config"; import { useCounterMixin } from "@/stores/mixin"; import HeaderDialog from "@/components/DialogHeader.vue"; +import SkeletonTable from "@/components/SkeletonTable.vue"; const $q = useQuasar(); const route = useRoute(); const mixins = useCounterMixin(); const { showLoader, hideLoader, date2Thai, messageError } = mixins; +const isLoading = ref(false); + const evaluateId = computed(() => { const id = route.params.id ? route.params.id.toString() : ""; return id; @@ -85,7 +88,7 @@ async function fetchListHistory(id: string) { minute: "2-digit", second: "2-digit", }; - showLoader(); + isLoading.value = true; await http .get(config.API.evaluationHistory(id)) .then((res) => { @@ -104,7 +107,7 @@ async function fetchListHistory(id: string) { messageError($q, err); }) .finally(() => { - hideLoader(); + isLoading.value = false; }); } @@ -124,7 +127,9 @@ watch( - + - + @@ -169,31 +174,4 @@ watch( - + diff --git a/src/modules/06_evaluate/components/viewstep/tableStep1.vue b/src/modules/06_evaluate/components/viewstep/tableStep1.vue index a19e67b..22aa11b 100644 --- a/src/modules/06_evaluate/components/viewstep/tableStep1.vue +++ b/src/modules/06_evaluate/components/viewstep/tableStep1.vue @@ -1,4 +1,6 @@ + import { reactive, onMounted, ref } from "vue"; import { useRoute } from "vue-router"; -import { useQuasar } from "quasar"; +import { is, useQuasar } from "quasar"; import http from "@/plugins/http"; import config from "@/app.config"; @@ -21,6 +21,7 @@ import type { /** importComponents*/ import TableData from "@/modules/06_evaluate/components/viewstep/tableStep1.vue"; import HeaderDialog from "@/components/DialogHeader.vue"; +import SkeletonTable from "@/components/SkeletonTable.vue"; /** use*/ const mixin = useCounterMixin(); @@ -29,8 +30,7 @@ const storeEva = useEvaluateStore(); const storeData = useDataStore(); const $q = useQuasar(); const route = useRoute(); -const { showLoader, hideLoader, messageError, date2Thai, findOrgNameHtml } = - mixin; +const { messageError, date2Thai, findOrgNameHtml } = mixin; const { columnsCertificates, columnSalaries, @@ -76,8 +76,19 @@ const formDetail = reactive({ honor: [], }); +const isLoading = reactive({ + loadDetail: false, + loadEducation: false, + loadCertificate: false, + loadSalary: false, + loadTraining: false, + loadAssessment: false, + loadExperience: false, +}); + /** function เรียกข้อมูลตรวจสอบคุณสมบัติ*/ async function fetchDetail() { + isLoading.loadDetail = true; try { if (!storeData.dataprofilePosition) { const res = await http.get(config.API.profilePosition()); @@ -87,6 +98,8 @@ async function fetchDetail() { } } catch (error) { messageError($q, error); + } finally { + isLoading.loadDetail = false; } } @@ -109,58 +122,113 @@ async function updateFormDetail(data: DataProfile) { formDetail.posExecutive = data.posExecutiveName; formDetail.positionArea = data.positionArea; await fetchDataAllDetail(); - emit("update:formDeital", formDetail); } async function fetchDataAllDetail() { // ดึงข้อมูลประวัติการศึกษา - http.get(config.API.dataUserEducations).then((res) => { - formDetail.educations = res.data.result; - }); + isLoading.loadEducation = true; + http + .get(config.API.dataUserEducations) + .then((res) => { + formDetail.educations = res.data.result; + }) + .catch((e) => { + messageError($q, e); + }) + .then(() => { + isLoading.loadEducation = false; + }); // ดึงข้อมูลใบอนุญาตประกอบวิชาชีพ - http.get(config.API.dataUserCertificate("certificate")).then((res) => { - formDetail.certificates = res.data.result.map((e: CertificatesForm) => ({ - certificateNo: e.certificateNo, - certificateType: e.certificateType, - expireDate: e.expireDate, - issueDate: e.issueDate, - issuer: e.issuer, - })); - }); + isLoading.loadCertificate = true; + http + .get(config.API.dataUserCertificate("certificate")) + .then((res) => { + formDetail.certificates = res.data.result.map((e: CertificatesForm) => ({ + certificateNo: e.certificateNo, + certificateType: e.certificateType, + expireDate: e.expireDate, + issueDate: e.issueDate, + issuer: e.issuer, + })); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + isLoading.loadCertificate = false; + }); // ดึงข้อมูลประวัติการรับราชการ - http.get(config.API.dataUserSalaryPosition).then((res) => { - formDetail.salaries = res.data.result; - }); + isLoading.loadSalary = true; + http + .get(config.API.dataUserSalaryPosition) + .then((res) => { + formDetail.salaries = res.data.result; + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + isLoading.loadSalary = false; + }); // ดึงข้อมูลประวัติการฝึกอบรมดูงาน - http.get(config.API.dataUserCertificate("training")).then((res) => { - formDetail.trainings = res.data.result.map((e: any) => ({ - dateOrder: e.dateOrder, - department: e.department, - duration: e.duration, - endDate: e.endDate, - name: e.name, - numberOrder: e.numberOrder, - place: e.place, - startDate: e.startDate, - topic: e.topic, - yearly: e.yearly, - })); - }); + isLoading.loadTraining = true; + http + .get(config.API.dataUserCertificate("training")) + .then((res) => { + formDetail.trainings = res.data.result.map((e: any) => ({ + dateOrder: e.dateOrder, + department: e.department, + duration: e.duration, + endDate: e.endDate, + name: e.name, + numberOrder: e.numberOrder, + place: e.place, + startDate: e.startDate, + topic: e.topic, + yearly: e.yearly, + })); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + isLoading.loadTraining = false; + }); - http.get(config.API.dataUserPerformance).then((res) => { - formDetail.assessments = res.data.result.map((e: any) => ({ - ...e, - isAdd: false, - })); - }); + // ดึงข้อมูลประสบการณ์ในการปฏิบัติงาน + isLoading.loadExperience = true; + http + .get(config.API.dataUserPerformance) + .then((res) => { + formDetail.assessments = res.data.result.map((e: any) => ({ + ...e, + isAdd: false, + })); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + isLoading.loadExperience = false; + }); - http.get(config.API.dataUserPortfolio).then((res) => { - formDetail.experience = res.data.result; - }); + // ดึงข้อมูลผลงานที่เคยเสนอขอ + isLoading.loadExperience = true; + http + .get(config.API.dataUserPortfolio) + .then((res) => { + formDetail.experience = res.data.result; + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + isLoading.loadExperience = false; + }); } /** @@ -168,40 +236,52 @@ async function fetchDataAllDetail() { * @param id ประเมิน */ async function fetchCheckSpec(data: any) { - formDetail.userId = data.id; - formDetail.citizenId = data.citizenId; - formDetail.prefix = data.prefix; - formDetail.fullName = data.fullName; - formDetail.position = data.position; - formDetail.oc = data.oc; - formDetail.salary = data.salary ? formattedNumber(data.salary) : ""; - formDetail.positionLevel = data.positionLevel; - formDetail.posNo = data.posNo; - formDetail.birthDate = data.birthDate; - formDetail.educations = data.educations; - - formDetail.certificates = data.certificates.map((e: CertificatesForm) => ({ - certificateNo: e.certificateNo, - certificateType: e.certificateType, - expireDate: date2Thai(e.expireDate), - issueDate: date2Thai(e.issueDate), - issuer: e.issuer, - })); - formDetail.salaries = data.salaries; - formDetail.trainings = data.trainings.map((e: any) => ({ - dateOrder: date2Thai(e.dateOrder), - department: e.department, - duration: e.duration, - endDate: date2Thai(e.endDate), - name: e.name, - numberOrder: e.numberOrder, - place: e.place, - startDate: date2Thai(e.startDate), - topic: e.topic, - yearly: e.yearly, - })); - formDetail.assessments = data.performances; - formDetail.experience = data.portfolios; + isLoading.loadEducation = true; + isLoading.loadCertificate = true; + isLoading.loadSalary = true; + isLoading.loadTraining = true; + isLoading.loadExperience = true; + try { + formDetail.userId = data.id; + formDetail.citizenId = data.citizenId; + formDetail.prefix = data.prefix; + formDetail.fullName = data.fullName; + formDetail.position = data.position; + formDetail.oc = data.oc; + formDetail.salary = data.salary ? formattedNumber(data.salary) : ""; + formDetail.positionLevel = data.positionLevel; + formDetail.posNo = data.posNo; + formDetail.birthDate = data.birthDate; + formDetail.educations = data.educations; + formDetail.certificates = data.certificates.map((e: CertificatesForm) => ({ + certificateNo: e.certificateNo, + certificateType: e.certificateType, + expireDate: date2Thai(e.expireDate), + issueDate: date2Thai(e.issueDate), + issuer: e.issuer, + })); + formDetail.salaries = data.salaries; + formDetail.trainings = data.trainings.map((e: any) => ({ + dateOrder: date2Thai(e.dateOrder), + department: e.department, + duration: e.duration, + endDate: date2Thai(e.endDate), + name: e.name, + numberOrder: e.numberOrder, + place: e.place, + startDate: date2Thai(e.startDate), + topic: e.topic, + yearly: e.yearly, + })); + formDetail.assessments = data.performances; + formDetail.experience = data.portfolios; + } finally { + isLoading.loadEducation = false; + isLoading.loadCertificate = false; + isLoading.loadSalary = false; + isLoading.loadTraining = false; + isLoading.loadExperience = false; + } } /** @@ -218,6 +298,7 @@ function formattedNumber(x: number) { /** get data */ function getData() { + isLoading.loadDetail = true; http .get(config.API.dataUserGovernment) .then(async (res) => { @@ -229,6 +310,9 @@ function getData() { }) .catch((e) => { messageError($q, e); + }) + .finally(() => { + isLoading.loadDetail = false; }); } @@ -298,7 +382,6 @@ function onDeletePerformance(index: number) { onMounted(async () => { try { - showLoader(); const promises = []; if (route.name === "evaluate-add") { @@ -315,7 +398,6 @@ onMounted(async () => { } catch (error) { console.log(error); } finally { - hideLoader(); } }); @@ -327,7 +409,10 @@ onMounted(async () => { :style="$q.screen.lt.sm ? '' : 'height: 60vh; overflow: scroll;'" > - + + + + ข้อมูลส่วนตัว @@ -430,7 +515,10 @@ onMounted(async () => { - + + + + ประวัติการศึกษา @@ -571,6 +659,7 @@ onMounted(async () => { class="col-12" :columns="columnsCertificates" :row="formDetail.certificates" + :is-loading="isLoading.loadCertificate" /> @@ -579,8 +668,14 @@ onMounted(async () => { ประวัติการรับราชการ + + { class="col-12" :columns="columnTraining" :row="formDetail.trainings" + :is-loading="isLoading.loadTraining" /> @@ -649,6 +745,7 @@ onMounted(async () => { class="col-12" :columns="columnExperience" :row="formDetail.experience" + :is-loading="isLoading.loadExperience" /> @@ -671,7 +768,13 @@ onMounted(async () => { + (false); const modal = ref(false); const menu = ref(); const listMenu = ref([ @@ -73,7 +74,8 @@ function openExpert() { /** function เรียกรายการประเมิน*/ async function fetchEvaluteList() { - showLoader(); + isLoading.value = true; + const body = { page: pagination.value.page, pageSize: pagination.value.rowsPerPage, @@ -93,7 +95,7 @@ async function fetchEvaluteList() { messageError($q, err); }) .finally(() => { - hideLoader(); + isLoading.value = false; }); } @@ -326,6 +328,7 @@ onMounted(async () => { v-model:total="total" v-model:total-list="totalList" v-model:pagination="pagination" + :isLoading="isLoading" /> diff --git a/src/modules/10_registry/01_Information/01_Information.vue b/src/modules/10_registry/01_Information/01_Information.vue index fc736f7..393767a 100644 --- a/src/modules/10_registry/01_Information/01_Information.vue +++ b/src/modules/10_registry/01_Information/01_Information.vue @@ -1,19 +1,20 @@ + @@ -402,13 +406,17 @@ onMounted(async () => { dense round size="14px" + :loading="isLoading" @click="onHistory" > ประวัติแก้ไขข้อมูลส่วนตัว - + + + + @@ -670,5 +678,6 @@ onMounted(async () => { :rows-data="rowsHistoryData" :visibleColumns="visibleColumnsHistory" :columns="columnsHistory" + :is-loading="isLoadingHistory" /> diff --git a/src/modules/10_registry/01_Information/02_ChangeName.vue b/src/modules/10_registry/01_Information/02_ChangeName.vue index dcac788..b9fe939 100644 --- a/src/modules/10_registry/01_Information/02_ChangeName.vue +++ b/src/modules/10_registry/01_Information/02_ChangeName.vue @@ -1,33 +1,29 @@ + - { :display-value="$q.lang.table.columns" /> - - - - - {{ col.label }} - - - - - - - - - {{ props.rowIndex + 1 }} - - - {{ col.value ? col.value : "-" }} - - - - - ดาวน์โหลด - - - - - - - - - - - ดาวน์โหลด - - - - - {{ - col.label - }} - - - {{ - col.value ? col.value : "-" - }} - - - - - - - + + + + + + + + + + {{ col.label }} + + + + + + + + + + {{ props.rowIndex + 1 }} + + + {{ col.value ? col.value : "-" }} + + + + + ดาวน์โหลด + + + + + + + + + + + ดาวน์โหลด + + + + + {{ + col.label + }} + + + {{ + col.value ? col.value : "-" + }} + + + + + + + + - +