ประเมินบุคคล

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-12-27 12:08:36 +07:00
parent aa23748eb2
commit e33d5eed1b
13 changed files with 757 additions and 164 deletions

View file

@ -1,5 +1,6 @@
<script setup lang="ts">
import { ref, onMounted, reactive } from "vue";
import { useRouter, useRoute } from "vue-router";
import { VuePDF, usePDF } from "@tato30/vue-pdf";
import { useQuasar } from "quasar";
import keycloak from "@/plugins/keycloak";
@ -19,15 +20,11 @@ import { useEvaluateStore } from "@/modules/06_evaluate/store";
const $q = useQuasar();
const store = useEvaluateStore();
const mixin = useCounterMixin();
const route = useRoute();
const { showLoader, hideLoader, date2Thai, messageError, success } = mixin;
/** props ID จาก Tab1.vue*/
const props = defineProps({
evaluateId: {
type: String,
},
});
const evaluateId = ref<string>(route.params.id.toString());
/** emit */
const emit = defineEmits(["update:form"]);
@ -213,6 +210,7 @@ async function fetchPathUpload(
const body = {
fileList: { fileName: type, metadata: {} },
};
if (id && file) {
showLoader();
await http
@ -315,7 +313,7 @@ const downloadFile6 = ref<string>("");
async function downloadFile(fileName: string) {
showLoader();
await http
.get(config.API.loadFileDocument("เล่ม 1", store.evaluateId, fileName))
.get(config.API.loadFileDocument("เล่ม 1", evaluateId.value, fileName))
.then((res) => {
if (fileName === "1-แบบพิจารณาคุณสมบัติบุคคล") {
downloadFile1.value = res.data.downloadUrl;
@ -356,9 +354,9 @@ onMounted(async () => {
fileEvaluation6Ref: fileEvaluation6Ref.value,
};
if (store.currentStep > 2) {
fetcheSigner(store.evaluateId);
fetcheSigner(evaluateId.value);
}
fetchCheckSpec(store.evaluateId);
fetchCheckSpec(evaluateId.value);
emit("update:form", formCommand, ref);
downloadFile("1-แบบพิจารณาคุณสมบัติบุคคล");
downloadFile("2-แบบแสดงรายละเอียดการเสนอผลงาน");
@ -441,7 +439,7 @@ onMounted(async () => {
@click="
fetchPathUpload(
'เล่ม 1',
props.evaluateId,
evaluateId,
'1-แบบพิจารณาคุณสมบัติบุคคล',
fileEvaluation1
)
@ -523,7 +521,7 @@ onMounted(async () => {
@click="
fetchPathUpload(
'เล่ม 1',
props.evaluateId,
evaluateId,
'2-แบบแสดงรายละเอียดการเสนอผลงาน',
fileEvaluation2
)
@ -606,7 +604,7 @@ onMounted(async () => {
@click="
fetchPathUpload(
'เล่ม 1',
props.evaluateId,
evaluateId,
'3-แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลเพื่อประกอบการคัดเลือกบุคคล (เอกสารแบบ ก.)',
fileEvaluation3
)
@ -688,7 +686,7 @@ onMounted(async () => {
@click="
fetchPathUpload(
'เล่ม 1',
props.evaluateId,
evaluateId,
'4-แบบประเมินคุณลักษณะบุคคล',
fileEvaluation4
)
@ -769,7 +767,7 @@ onMounted(async () => {
@click="
fetchPathUpload(
'เล่ม 1',
props.evaluateId,
evaluateId,
'5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)',
fileEvaluation5
)
@ -851,7 +849,7 @@ onMounted(async () => {
@click="
fetchPathUpload(
'เล่ม 1',
props.evaluateId,
evaluateId,
'6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)',
fileEvaluation6
)