Refactoring code module 06_evaluate
This commit is contained in:
parent
4253226ac3
commit
d03e3b9e98
22 changed files with 192 additions and 400 deletions
|
|
@ -1,18 +1,17 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, onMounted, reactive } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
import axios from "axios";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import axios from "axios";
|
||||
import genReport from "@/plugins/genreport";
|
||||
import { tokenParsed } from "@/plugins/auth";
|
||||
import { VuePDF } from "@tato30/vue-pdf";
|
||||
|
||||
/** importType*/
|
||||
import type { FormCommand } from "@/modules/06_evaluate/interface/evalute";
|
||||
|
||||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
|
||||
|
|
@ -21,7 +20,6 @@ const $q = useQuasar();
|
|||
const store = useEvaluateStore();
|
||||
const mixin = useCounterMixin();
|
||||
const route = useRoute();
|
||||
|
||||
const { showLoader, hideLoader, date2Thai, messageError, success } = mixin;
|
||||
|
||||
const evaluateId = ref<string>(route.params.id.toString());
|
||||
|
|
@ -86,12 +84,12 @@ function updateInput(val: any) {
|
|||
}
|
||||
|
||||
/** ตัวแปร file*/
|
||||
const fileEvaluation1 = ref<any>();
|
||||
const fileEvaluation2 = ref<any>();
|
||||
const fileEvaluation3 = ref<any>();
|
||||
const fileEvaluation4 = ref<any>();
|
||||
const fileEvaluation5 = ref<any>();
|
||||
const fileEvaluation6 = ref<any>();
|
||||
const fileEvaluation1 = ref<File | null>();
|
||||
const fileEvaluation2 = ref<File | null>();
|
||||
const fileEvaluation3 = ref<File | null>();
|
||||
const fileEvaluation4 = ref<File | null>();
|
||||
const fileEvaluation5 = ref<File | null>();
|
||||
const fileEvaluation6 = ref<File | null>();
|
||||
|
||||
const modalView = ref<boolean>(false);
|
||||
const numOfPages = ref<number>(0);
|
||||
|
|
@ -399,32 +397,6 @@ async function downloadFile(fileName: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/**lifecycle Hooks*/
|
||||
onMounted(async () => {
|
||||
const user = await tokenParsed();
|
||||
if (user) {
|
||||
formCommand.author = user.name;
|
||||
}
|
||||
showLoader();
|
||||
await Promise.all([
|
||||
fetcheSigner(evaluateId.value),
|
||||
fetchCheckSpec(evaluateId.value),
|
||||
downloadFile("1-แบบพิจารณาคุณสมบัติบุคคล"),
|
||||
downloadFile("2-แบบแสดงรายละเอียดการเสนอผลงาน"),
|
||||
downloadFile(
|
||||
"3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)"
|
||||
),
|
||||
downloadFile("4-แบบประเมินคุณลักษณะบุคคล"),
|
||||
downloadFile("5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)"),
|
||||
downloadFile("6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)"),
|
||||
]);
|
||||
// .then(() => {
|
||||
// setTimeout(() => {
|
||||
// hideLoader();
|
||||
// }, 2000);
|
||||
// });
|
||||
});
|
||||
|
||||
function getCommander() {
|
||||
http
|
||||
.get(config.API.searchCommander)
|
||||
|
|
@ -475,6 +447,27 @@ watch(
|
|||
}, 200);
|
||||
}
|
||||
);
|
||||
|
||||
/**lifecycle Hooks*/
|
||||
onMounted(async () => {
|
||||
const user = await tokenParsed();
|
||||
if (user) {
|
||||
formCommand.author = user.name;
|
||||
}
|
||||
showLoader();
|
||||
await Promise.all([
|
||||
fetcheSigner(evaluateId.value),
|
||||
fetchCheckSpec(evaluateId.value),
|
||||
downloadFile("1-แบบพิจารณาคุณสมบัติบุคคล"),
|
||||
downloadFile("2-แบบแสดงรายละเอียดการเสนอผลงาน"),
|
||||
downloadFile(
|
||||
"3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก)"
|
||||
),
|
||||
downloadFile("4-แบบประเมินคุณลักษณะบุคคล"),
|
||||
downloadFile("5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)"),
|
||||
downloadFile("6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)"),
|
||||
]);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -488,10 +481,6 @@ watch(
|
|||
<div class="col-12"><q-separator /></div>
|
||||
<div class="col-12 q-pa-sm">
|
||||
<div class="row q-col-gutter-sm">
|
||||
<!-- <div class="text-weight-medium q-py-sm">
|
||||
ผู้บังคับบัญชาชั้นต้น
|
||||
</div> -->
|
||||
|
||||
<q-input
|
||||
:readonly="store.currentStep != 2 || store.statusUpload"
|
||||
ref="performanceRef"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue