ปรับ fe sprint2
This commit is contained in:
parent
8576f3c387
commit
0d6ff7be0a
83 changed files with 6932 additions and 2571 deletions
|
|
@ -18,9 +18,7 @@
|
|||
<q-menu>
|
||||
<q-list style="min-width: 100px">
|
||||
<q-item clickable v-close-popup @click="downloadExam()">
|
||||
<q-item-section class="text-blue"
|
||||
>ส่งออกข้อมูลผู้มีสิทธิ์สอบ</q-item-section
|
||||
>
|
||||
<q-item-section class="text-blue">ส่งออกข้อมูลผู้มีสิทธิ์สอบ</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup @click="downloadPassExam()">
|
||||
<q-item-section class="text-primary"
|
||||
|
|
@ -48,7 +46,6 @@
|
|||
:visible-columns="visibleColumns"
|
||||
v-model:inputfilter="filter"
|
||||
v-model:inputvisible="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
:nornmalData="false"
|
||||
:conclude="true"
|
||||
>
|
||||
|
|
@ -102,23 +99,12 @@
|
|||
</q-tr>
|
||||
</template>
|
||||
</Table>
|
||||
<div class="row justify-center q-mt-md">
|
||||
<q-pagination
|
||||
v-model="pagination.page"
|
||||
color="grey-8"
|
||||
:max="pagesNumber"
|
||||
:max-pages="5"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import type { QTableProps } from "quasar";
|
||||
import { ref, onMounted, computed } from "vue";
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import type { RecruitDetailResponse } from "@/modules/03_recruiting/interface/response/Period";
|
||||
import Table from "@/modules/03_recruiting/components/Table.vue";
|
||||
|
|
@ -134,7 +120,7 @@ const router = useRouter();
|
|||
const route = useRoute();
|
||||
const { loaderPage } = dataStore;
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
const { messageError } = mixin;
|
||||
const year = ref<string>("");
|
||||
const round = ref<string>("");
|
||||
const name = ref<string>("");
|
||||
|
|
@ -326,18 +312,8 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
]);
|
||||
|
||||
const pagination = ref({
|
||||
sortBy: "desc",
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
const pagesNumber = computed(() => {
|
||||
return Math.ceil(rows.value.length / pagination.value.rowsPerPage);
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
await fetchData();
|
||||
});
|
||||
|
||||
|
|
@ -346,7 +322,7 @@ const clickDetail = (examID: string) => {
|
|||
};
|
||||
|
||||
const downloadExam = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.exportExam(importId.value), {
|
||||
responseType: "blob",
|
||||
|
|
@ -362,12 +338,12 @@ const downloadExam = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
const downloadPassExam = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.exportPassExam(importId.value), {
|
||||
responseType: "blob",
|
||||
|
|
@ -383,12 +359,12 @@ const downloadPassExam = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
const downloadPassResultExam = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.exportPassResultExam(importId.value), {
|
||||
responseType: "blob",
|
||||
|
|
@ -404,12 +380,12 @@ const downloadPassResultExam = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.post(config.API.getExamResultById(importId.value), {
|
||||
examAttribute: "",
|
||||
|
|
@ -437,7 +413,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue