ปรับ การ Download ไฟล์ต้นฉบับ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-01-05 14:24:54 +07:00
parent 36ea205624
commit c118cb0e1f
6 changed files with 55 additions and 488 deletions

View file

@ -5,14 +5,18 @@ import { useRouter } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
/** import Type*/
import type { ListMenu } from "@/modules/06_evaluate/interface/evalute";
import TableListEvaluate from "@/modules/06_evaluate/components/TableListEvaluate.vue";
import DialogMain from "@/modules/06_evaluate/components/DialogMain.vue";
/** import Components*/
import TableListEvaluate from "@/modules/06_evaluate/components/TableListEvaluate.vue"; //
import DialogMain from "@/modules/06_evaluate/components/DialogMain.vue"; // popup
/** import Store*/
import { useEvaluateStore } from "@/modules/06_evaluate/store";
import { useCounterMixin } from "@/stores/mixin";
/** use*/
const mixin = useCounterMixin();
const store = useEvaluateStore();
const router = useRouter();
@ -20,6 +24,9 @@ const $q = useQuasar();
const { showLoader, hideLoader, messageError } = mixin;
/** ตัวแปร*/
const modal = ref<boolean>(false);
const menu = ref<ListMenu>();
const listMenu = ref<ListMenu[]>([
{
val: "EXPERT",
@ -30,16 +37,22 @@ const listMenu = ref<ListMenu[]>([
label: "ประเมินชำนาญการพิเศษ",
},
]);
const modal = ref<boolean>(false);
const menu = ref<ListMenu>();
/**
* function เป popup เพมการประเม
* @param data
*/
function onclickAddEvaluate(data: ListMenu) {
modal.value = !modal.value;
menu.value = data;
}
/** ตัวแปร Paging*/
const page = ref<number>(1);
const pageSize = ref<number>(25);
const maxPage = ref<number>(10);
/** function เรียกรายการประเมิน*/
async function fetchEvaluteList() {
showLoader();
await http
@ -59,6 +72,11 @@ async function fetchEvaluteList() {
});
}
/**
* function updatePaging
* @param newPagination อมลใหมของ Paging
* @param currentPage หน Page
*/
async function updatePaging(newPagination: any, currentPage: number) {
page.value = currentPage;
pageSize.value = newPagination.rowsPerPage;
@ -66,8 +84,9 @@ async function updatePaging(newPagination: any, currentPage: number) {
await fetchEvaluteList();
}
onMounted(() => {
fetchEvaluteList();
/** hook lifecycle*/
onMounted(async () => {
await fetchEvaluteList();
});
</script>
<template>