แก้ไข loader
This commit is contained in:
parent
f072224851
commit
b663eedb09
147 changed files with 3095 additions and 3256 deletions
|
|
@ -236,17 +236,17 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useDataStore } from "@/stores/data";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
const $q = useQuasar();
|
||||
const dataStore = useDataStore();
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const { loaderPage } = dataStore;
|
||||
|
||||
const profile_id = ref<string>("");
|
||||
const birthdate = ref<string>("");
|
||||
const gender = ref<string>("");
|
||||
|
|
@ -269,7 +269,7 @@ const examOrder = ref<string>("");
|
|||
const number = ref<string>("");
|
||||
const score_expired = ref<string>("");
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
const examID = ref<string>("62150001");
|
||||
const prefix = ref<string>("นาย");
|
||||
const fullname = ref<string>("เกียรติศักดิ์ บัณฑิต");
|
||||
|
|
@ -281,7 +281,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.getExamDetail(importId.value, examId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -319,12 +319,12 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadScore = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.downloadScoreReport(importId.value, examId.value), {
|
||||
responseType: "blob",
|
||||
|
|
@ -340,12 +340,12 @@ const downloadScore = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadCertificate = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
let type = degree.value.includes("บัณฑิต") ? 2 : 1;
|
||||
await http
|
||||
.get(config.API.downloadExamReport(importId.value, examId.value, type), {
|
||||
|
|
@ -362,7 +362,7 @@ const downloadCertificate = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue