ปรับ fe sprint2

This commit is contained in:
Kittapath 2023-06-19 15:50:50 +07:00
parent 8576f3c387
commit 0d6ff7be0a
83 changed files with 6932 additions and 2571 deletions

View file

@ -129,7 +129,7 @@ const pass = ref<number>(0);
const notpass = ref<number>(0);
const importId = ref<string>(route.params.id as string); // Period Import Id
const mixin = useCounterMixin();
const { messageError, showLoader, hideLoader } = mixin;
const { messageError } = mixin;
const filter = ref<string>(""); //search data table
const visibleColumns = ref<String[]>([
"examID",
@ -317,12 +317,12 @@ const clickDetail = (examID: string) => {
};
onMounted(async () => {
hideLoader();
loaderPage(false);
await fetchData();
});
const downloadExam = async () => {
showLoader();
loaderPage(true);
await http
.get(config.API.exportDisableExam(importId.value), {
responseType: "blob",
@ -338,12 +338,12 @@ const downloadExam = async () => {
messageError($q, e);
})
.finally(() => {
hideLoader();
loaderPage(false);
});
};
const downloadPassExam = async () => {
showLoader();
loaderPage(true);
await http
.get(config.API.exportDisablePassExam(importId.value), {
responseType: "blob",
@ -359,12 +359,12 @@ const downloadPassExam = async () => {
messageError($q, e);
})
.finally(() => {
hideLoader();
loaderPage(false);
});
};
const downloadPassResultExam = async () => {
showLoader();
loaderPage(true);
await http
.get(config.API.exportDisablePassResultExam(importId.value), {
responseType: "blob",
@ -380,12 +380,12 @@ const downloadPassResultExam = async () => {
messageError($q, e);
})
.finally(() => {
hideLoader();
loaderPage(false);
});
};
const fetchData = async () => {
showLoader();
loaderPage(true);
await http
.post(config.API.getDisableExamResultById(importId.value), {
examAttribute: "",
@ -416,7 +416,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
hideLoader();
loaderPage(false);
});
};
</script>