ปรับ การ Download ไฟล์ต้นฉบับ
This commit is contained in:
parent
36ea205624
commit
c118cb0e1f
6 changed files with 55 additions and 488 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue