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

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,5 @@
<script setup lang="ts">
import { reactive, onMounted, ref } from "vue";
import { reactive, onMounted, ref, watch } from "vue";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
@ -18,12 +18,12 @@ const store = useEvaluateStore();
const { showLoader, hideLoader, messageError } = mixin;
/** props ID จาก Tab1.vue*/
/** props จาก Tab1.vue*/
const props = defineProps({
evaluateId: {
type: String,
},
educations: Array,
data: {
type: Array,
},
});
const emit = defineEmits(["update:spec"]);
@ -50,26 +50,26 @@ async function updateValue() {
* function fetchData ตรวจสอบคณสมบ
* @param id ประเม
*/
async function fetchCheckSpec(id: string) {
showLoader();
await http
.get(config.API.evaluationCheckspecByid(id))
.then((res) => {
const data = res.data.result;
formData.isEducationalQft = data.isEducationalQft;
formData.isGovermantServiceHtr = data.isGovermantServiceHtr;
formData.isOperatingExp = data.isOperatingExp;
formData.isMinPeriodOfTenure = data.isMinPeriodOfTenure;
formData.isHaveSpecificQft = data.isHaveSpecificQft;
formData.isHaveProLicense = data.isHaveProLicense;
formData.isHaveMinPeriodOrHoldPos = data.isHaveMinPeriodOrHoldPos;
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
async function fetchCheckSpec(data: any) {
// showLoader();
// await http
// .get(config.API.evaluationCheckspecByid(id))
// .then((res) => {
// const data = res.data.result;
formData.isEducationalQft = data.isEducationalQft;
formData.isGovermantServiceHtr = data.isGovermantServiceHtr;
formData.isOperatingExp = data.isOperatingExp;
formData.isMinPeriodOfTenure = data.isMinPeriodOfTenure;
formData.isHaveSpecificQft = data.isHaveSpecificQft;
formData.isHaveProLicense = data.isHaveProLicense;
formData.isHaveMinPeriodOrHoldPos = data.isHaveMinPeriodOrHoldPos;
// })
// .catch((err) => {
// messageError($q, err);
// })
// .finally(() => {
// hideLoader();
// });
}
/**
@ -88,7 +88,9 @@ function closeModal() {
/**hook lifecycle*/
onMounted(() => {
props.evaluateId && fetchCheckSpec(props.evaluateId);
// setTimeout(() => {
// }, 1000);
props.data && fetchCheckSpec(props.data);
});
</script>

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
)

View file

@ -1,5 +1,6 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { useRoute } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
import { useQuasar } from "quasar";
@ -11,13 +12,16 @@ import { useEvaluateStore } from "@/modules/06_evaluate/store";
const $q = useQuasar();
const store = useEvaluateStore();
const mixin = useCounterMixin();
const route = useRoute();
const { showLoader, hideLoader, messageError } = mixin;
const props = defineProps({
evaluateId: {
type: String,
},
});
const evaluateId = ref<string>(route.params.id.toString());
// const props = defineProps({
// evaluateId: {
// type: String,
// },
// });
const emit = defineEmits(["update:file"]);
const selectedItem = ref(1);
@ -37,9 +41,9 @@ function handleItemClick(itemNumber: number) {
}
async function fetchDocument(fileName: string) {
// showLoader();
props.evaluateId &&
evaluateId.value &&
(await http
.get(config.API.loadFileDocument("เล่ม 1", props.evaluateId, fileName))
.get(config.API.loadFileDocument("เล่ม 1", evaluateId.value, fileName))
.then((res) => {
downloadFile(res.data.downloadUrl);
})

View file

@ -1,5 +1,6 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { useRoute } from "vue-router";
import config from "@/app.config";
import http from "@/plugins/http";
import { useQuasar } from "quasar";
@ -8,13 +9,10 @@ import { useCounterMixin } from "@/stores/mixin";
const mixins = useCounterMixin();
const $q = useQuasar();
const route = useRoute();
const { date2Thai, success } = mixins;
const props = defineProps({
evaluateId: {
type: String,
},
});
const evaluateId = ref<string>(route.params.id.toString());
const dateStartAnnounce = ref<string | null>(date2Thai(new Date()));
const dateEndAnnounce = ref<string | null>(date2Thai(new Date()));
@ -37,13 +35,13 @@ const items = ref<any>([
const statusFile = ref<boolean>(false);
async function onClickfetchDocument(fileName: string, type: string) {
props.evaluateId &&
evaluateId.value &&
(await http
.get(config.API.loadFileDocument("เล่ม 1", props.evaluateId, fileName))
.get(config.API.loadFileDocument("เล่ม 1", evaluateId.value, fileName))
.then((res) => {
const downloadUrl = res.data.downloadUrl;
type === "COPPY" && coppyLink(downloadUrl);
statusFile.value = true;
type === "CHECK" && (statusFile.value = true);
})
.catch((err) => {}));
}
@ -62,9 +60,9 @@ async function coppyLink(link: string) {
}
async function fetchCheckDate() {
props.evaluateId &&
evaluateId.value &&
(await http
.get(config.API.evaluationCheckDate(props.evaluateId))
.get(config.API.evaluationCheckDate(evaluateId.value))
.then((res) => {
const data = res.data.result;
dateStartAnnounce.value = date2Thai(data.dateStartAnnounce);

View file

@ -1,5 +1,6 @@
<script setup lang="ts">
import { ref, reactive, onMounted } from "vue";
import { useRoute } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
import axios from "axios";
@ -14,14 +15,11 @@ import { useEvaluateStore } from "@/modules/06_evaluate/store";
const $q = useQuasar();
const store = useEvaluateStore();
const mixins = useCounterMixin();
const route = useRoute();
const { date2Thai, showLoader, hideLoader, messageError, success } = mixins;
const props = defineProps({
evaluateId: {
type: String,
},
});
const evaluateId = ref<string>(route.params.id.toString());
const emit = defineEmits(["update:form"]);
@ -134,9 +132,9 @@ async function fetcheSigner(id: string) {
const dateEndPrepareDoc2 = ref<string | null>(date2Thai(new Date()));
async function fetchCheckDate() {
props.evaluateId &&
evaluateId.value &&
(await http
.get(config.API.evaluationCheckDate(props.evaluateId))
.get(config.API.evaluationCheckDate(evaluateId.value))
.then((res) => {
const data = res.data.result;
// dateStartPrepareDoc2.value = date2Thai(data.dateStartPrepareDoc2);
@ -159,7 +157,7 @@ onMounted(async () => {
fileEvaluation1Ref: fileEvaluation1Ref.value,
};
if (store.currentStep > 2) {
fetcheSigner(store.evaluateId);
fetcheSigner(evaluateId.value);
}
await fetchCheckDate();
emit("update:form", formCommand, ref);
@ -261,7 +259,7 @@ onMounted(() => {
@click="
fetchPathUpload(
'เล่ม 2',
props.evaluateId,
evaluateId,
'1-เอกสารเล่ม 2',
fileEvaluation1
)

View file

@ -1,5 +1,6 @@
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { useRoute } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
import { useQuasar } from "quasar";
@ -11,6 +12,9 @@ import { useEvaluateStore } from "@/modules/06_evaluate/store";
const store = useEvaluateStore();
const mixin = useCounterMixin();
const $q = useQuasar();
const route = useRoute();
const evaluateId = ref<string>(route.params.id.toString());
const { showLoader, hideLoader, messageError } = mixin;
@ -26,12 +30,12 @@ const selectedItem = ref(1);
async function fetchDocument() {
showLoader();
props.evaluateId &&
evaluateId.value &&
(await http
.get(
config.API.loadFileDocument(
"เล่ม 2",
props.evaluateId,
evaluateId.value,
"1-เอกสารเล่ม 2"
)
)

View file

@ -1,5 +1,6 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { useRoute } from "vue-router";
import axios from "axios";
import http from "@/plugins/http";
import config from "@/app.config";
@ -14,14 +15,11 @@ import { useCounterMixin } from "@/stores/mixin";
const store = useEvaluateStore();
const $q = useQuasar();
const mixin = useCounterMixin();
const route = useRoute();
const { showLoader, hideLoader, messageError, success, date2Thai } = mixin;
const props = defineProps({
evaluateId: {
type: String,
},
});
const evaluateId = ref<string>(route.params.id.toString());
const status = ref<string>("WAIT_CHECK_DOC_V2");
const tabMenu = ref<string>("director");
@ -70,9 +68,9 @@ const meetingList = ref<any>();
async function fetchDirector() {
showLoader();
props.evaluateId &&
evaluateId.value &&
(await http
.get(config.API.evaluationDirectorMeetring(props.evaluateId))
.get(config.API.evaluationDirectorMeetring(evaluateId.value))
.then((res) => {
const directors = res.data.result.directors;
const meetings = res.data.result.meetings;
@ -261,7 +259,7 @@ onMounted(async () => {
@click="
fetchPathUpload(
'เล่ม 2',
props.evaluateId,
evaluateId,
'2-เอกสารเล่ม 2 (ฉบับแก้ไข)',
fileEvaluationEdit
)