new loader
This commit is contained in:
parent
fd7aae2f5d
commit
fe6c712a18
95 changed files with 1189 additions and 950 deletions
|
|
@ -282,7 +282,14 @@ import { useQuasar } from "quasar";
|
|||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { genColor15, dateToISO, date2Thai, messageError } = mixin;
|
||||
const {
|
||||
genColor15,
|
||||
dateToISO,
|
||||
date2Thai,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const router = useRouter();
|
||||
|
|
@ -465,7 +472,7 @@ watch(status, (count: String, prevCount: String) => {
|
|||
});
|
||||
|
||||
onMounted(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
await fetchDataCom();
|
||||
});
|
||||
|
||||
|
|
@ -484,7 +491,7 @@ const fetchDataCom = async () => {
|
|||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateOfPeriodExam(status.value, examId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -511,12 +518,12 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchPeriodExam = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.periodExamStatus(examId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -531,7 +538,7 @@ const fetchPeriodExam = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -540,7 +547,7 @@ const fetchPeriodExam = async () => {
|
|||
*/
|
||||
const fetchDataSummary = async () => {
|
||||
dataNum.value = [];
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.countDashbordPeriodExam(examId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -558,12 +565,12 @@ const fetchDataSummary = async () => {
|
|||
dataNum.value = [];
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadFileDashboard = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(
|
||||
config.API.periodExamDownloadDashboard(examId.value),
|
||||
|
|
@ -587,7 +594,7 @@ const downloadFileDashboard = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue