2023-12-13 15:24:59 +07:00
|
|
|
<script setup lang="ts">
|
2023-12-27 12:08:36 +07:00
|
|
|
import { reactive, onMounted, ref, watch } from "vue";
|
2023-12-19 17:04:39 +07:00
|
|
|
import { useQuasar } from "quasar";
|
|
|
|
|
import http from "@/plugins/http";
|
|
|
|
|
import config from "@/app.config";
|
|
|
|
|
|
2023-12-26 11:09:51 +07:00
|
|
|
/** importComponents*/
|
|
|
|
|
import PopupCheckFeatures from "@/modules/06_evaluate/components/PopupCheckFeatures.vue";
|
|
|
|
|
|
|
|
|
|
/** importStores*/
|
2023-12-19 17:04:39 +07:00
|
|
|
import { useCounterMixin } from "@/stores/mixin";
|
2023-12-20 14:23:27 +07:00
|
|
|
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
2023-12-19 17:04:39 +07:00
|
|
|
|
2023-12-26 11:09:51 +07:00
|
|
|
/** use*/
|
2023-12-19 17:04:39 +07:00
|
|
|
const mixin = useCounterMixin();
|
|
|
|
|
const $q = useQuasar();
|
2023-12-20 14:23:27 +07:00
|
|
|
const store = useEvaluateStore();
|
2023-12-19 17:04:39 +07:00
|
|
|
|
|
|
|
|
const { showLoader, hideLoader, messageError } = mixin;
|
|
|
|
|
|
2023-12-27 12:08:36 +07:00
|
|
|
/** props จาก Tab1.vue*/
|
2023-12-19 17:04:39 +07:00
|
|
|
const props = defineProps({
|
2023-12-23 21:54:37 +07:00
|
|
|
educations: Array,
|
2023-12-27 12:08:36 +07:00
|
|
|
data: {
|
|
|
|
|
type: Array,
|
|
|
|
|
},
|
2023-12-19 17:04:39 +07:00
|
|
|
});
|
|
|
|
|
|
2023-12-26 11:09:51 +07:00
|
|
|
const emit = defineEmits(["update:spec"]);
|
|
|
|
|
|
2023-12-22 17:05:57 +07:00
|
|
|
const modal = ref<boolean>(false);
|
|
|
|
|
const show = ref<boolean>(false);
|
2023-12-13 15:24:59 +07:00
|
|
|
|
2023-12-13 16:56:43 +07:00
|
|
|
const formData = reactive<any>({
|
|
|
|
|
isEducationalQft: false, // คุณวุฒิการศึกษา
|
|
|
|
|
isGovermantServiceHtr: false, // ประวัติการรับราชการ
|
|
|
|
|
isOperatingExp: false, // ประสบการณ์ในการปฏิบัติงาน
|
|
|
|
|
isMinPeriodOfTenure: false, // ระยะเวลาขั้นต่ำในการดำรงตำแหน่งในสายงานที่ขอเข้ารับการคัดเลือก
|
|
|
|
|
isHaveSpecificQft: false, // มีคุณสมบัติตรงตามคุณสมบัติเฉพาะสำหรับตำแหน่งที่กำหนด ในมาตราฐานกำหนดตำแหน่ง
|
|
|
|
|
isHaveProLicense: false, // มีใบอนุญาตประกอบวิชาชีพของสายงานต่างๆ
|
|
|
|
|
isHaveMinPeriodOrHoldPos: false, // มีระยะเวลาขั้นต่ำในการดำรงตำแหน่งหรือเคยดำรงตำแหน่งในสายงานที่จะคัดเลือกตามคุณวุฒิของบุคคลและระดับตำแหน่งที่จะคัดเลือก]
|
|
|
|
|
});
|
2023-12-26 11:09:51 +07:00
|
|
|
|
|
|
|
|
/** function อัปเดทตรวจสอบคุณสมบัติ*/
|
2023-12-19 17:04:39 +07:00
|
|
|
async function updateValue() {
|
|
|
|
|
emit("update:spec", formData);
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-26 11:09:51 +07:00
|
|
|
/**
|
|
|
|
|
* function fetchData ตรวจสอบคุณสมบัติ
|
|
|
|
|
* @param id ประเมิน
|
|
|
|
|
*/
|
2023-12-27 12:08:36 +07:00
|
|
|
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();
|
|
|
|
|
// });
|
2023-12-19 17:04:39 +07:00
|
|
|
}
|
|
|
|
|
|
2023-12-26 11:09:51 +07:00
|
|
|
/**
|
|
|
|
|
* function openPopup
|
|
|
|
|
* @param status
|
|
|
|
|
*/
|
2023-12-22 17:05:57 +07:00
|
|
|
function openModal(status: boolean) {
|
|
|
|
|
modal.value = true;
|
2023-12-23 21:54:37 +07:00
|
|
|
show.value = status;
|
2023-12-22 17:05:57 +07:00
|
|
|
}
|
|
|
|
|
|
2023-12-26 11:09:51 +07:00
|
|
|
/** function closePopup*/
|
2023-12-22 17:05:57 +07:00
|
|
|
function closeModal() {
|
|
|
|
|
modal.value = false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-26 11:09:51 +07:00
|
|
|
/**hook lifecycle*/
|
2023-12-19 17:04:39 +07:00
|
|
|
onMounted(() => {
|
2023-12-27 12:08:36 +07:00
|
|
|
// setTimeout(() => {
|
|
|
|
|
// }, 1000);
|
|
|
|
|
props.data && fetchCheckSpec(props.data);
|
2023-12-19 17:04:39 +07:00
|
|
|
});
|
2023-12-13 15:24:59 +07:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<q-list>
|
|
|
|
|
<q-item v-ripple>
|
|
|
|
|
<q-item-section avatar>
|
2023-12-13 16:56:43 +07:00
|
|
|
<q-checkbox
|
2023-12-23 21:54:37 +07:00
|
|
|
:disable="store.currentStep > 1"
|
2023-12-13 16:56:43 +07:00
|
|
|
keep-color
|
|
|
|
|
color="primary"
|
|
|
|
|
v-model="formData.isEducationalQft"
|
2023-12-19 17:04:39 +07:00
|
|
|
@update:model-value="updateValue"
|
2023-12-13 16:56:43 +07:00
|
|
|
/>
|
2023-12-13 15:24:59 +07:00
|
|
|
</q-item-section>
|
|
|
|
|
<q-item-section>
|
2023-12-20 14:23:27 +07:00
|
|
|
<q-item-label
|
|
|
|
|
>คุณวุฒิการศึกษา
|
2023-12-22 17:05:57 +07:00
|
|
|
<q-btn
|
|
|
|
|
flat
|
|
|
|
|
round
|
|
|
|
|
dense
|
|
|
|
|
color="info"
|
|
|
|
|
icon="info"
|
|
|
|
|
@click="openModal(false)"
|
|
|
|
|
>
|
2023-12-20 14:23:27 +07:00
|
|
|
<q-tooltip>ข้อมูลเพิ่มเติม</q-tooltip>
|
|
|
|
|
</q-btn>
|
|
|
|
|
</q-item-label>
|
2023-12-13 15:24:59 +07:00
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
<q-item v-ripple>
|
|
|
|
|
<q-item-section avatar>
|
2023-12-13 16:56:43 +07:00
|
|
|
<q-checkbox
|
2023-12-23 21:54:37 +07:00
|
|
|
:disable="store.currentStep > 1"
|
2023-12-13 16:56:43 +07:00
|
|
|
keep-color
|
|
|
|
|
color="primary"
|
|
|
|
|
v-model="formData.isGovermantServiceHtr"
|
2023-12-19 17:04:39 +07:00
|
|
|
@update:model-value="updateValue"
|
2023-12-13 16:56:43 +07:00
|
|
|
/>
|
2023-12-13 15:24:59 +07:00
|
|
|
</q-item-section>
|
|
|
|
|
<q-item-section>
|
2023-12-13 16:56:43 +07:00
|
|
|
<q-item-label>ประวัติการรับราชการ </q-item-label>
|
2023-12-13 15:24:59 +07:00
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
<q-item v-ripple>
|
|
|
|
|
<q-item-section avatar>
|
2023-12-13 16:56:43 +07:00
|
|
|
<q-checkbox
|
2023-12-23 21:54:37 +07:00
|
|
|
:disable="store.currentStep > 1"
|
2023-12-13 16:56:43 +07:00
|
|
|
keep-color
|
|
|
|
|
color="primary"
|
|
|
|
|
v-model="formData.isOperatingExp"
|
2023-12-19 17:04:39 +07:00
|
|
|
@update:model-value="updateValue"
|
2023-12-13 16:56:43 +07:00
|
|
|
/>
|
2023-12-13 15:24:59 +07:00
|
|
|
</q-item-section>
|
|
|
|
|
<q-item-section>
|
2023-12-13 16:56:43 +07:00
|
|
|
<q-item-label>ประสบการณ์ในการปฏิบัติงาน </q-item-label>
|
2023-12-13 15:24:59 +07:00
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
<q-item v-ripple>
|
|
|
|
|
<q-item-section avatar>
|
2023-12-13 16:56:43 +07:00
|
|
|
<q-checkbox
|
2023-12-23 21:54:37 +07:00
|
|
|
:disable="store.currentStep > 1"
|
2023-12-13 16:56:43 +07:00
|
|
|
keep-color
|
|
|
|
|
color="primary"
|
|
|
|
|
v-model="formData.isMinPeriodOfTenure"
|
2023-12-19 17:04:39 +07:00
|
|
|
@update:model-value="updateValue"
|
2023-12-13 16:56:43 +07:00
|
|
|
/>
|
2023-12-13 15:24:59 +07:00
|
|
|
</q-item-section>
|
|
|
|
|
<q-item-section>
|
2023-12-13 16:56:43 +07:00
|
|
|
<q-item-label
|
2023-12-20 14:23:27 +07:00
|
|
|
>ระยะเวลาขั้นต่ำในการดำรงตำแหน่งในสายงานที่ขอเข้ารับการคัดเลือก
|
2023-12-22 17:05:57 +07:00
|
|
|
<q-btn
|
|
|
|
|
flat
|
|
|
|
|
round
|
|
|
|
|
dense
|
|
|
|
|
color="info"
|
|
|
|
|
icon="info"
|
|
|
|
|
@click="openModal(true)"
|
|
|
|
|
>
|
2023-12-20 14:23:27 +07:00
|
|
|
<q-tooltip>ข้อมูลเพิ่มเติม</q-tooltip>
|
|
|
|
|
</q-btn></q-item-label
|
2023-12-13 16:56:43 +07:00
|
|
|
>
|
2023-12-13 15:24:59 +07:00
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
<q-item v-ripple>
|
|
|
|
|
<q-item-section avatar>
|
2023-12-13 16:56:43 +07:00
|
|
|
<q-checkbox
|
2023-12-23 21:54:37 +07:00
|
|
|
:disable="store.currentStep > 1"
|
2023-12-13 16:56:43 +07:00
|
|
|
keep-color
|
|
|
|
|
color="primary"
|
|
|
|
|
v-model="formData.isHaveSpecificQft"
|
2023-12-19 17:04:39 +07:00
|
|
|
@update:model-value="updateValue"
|
2023-12-13 16:56:43 +07:00
|
|
|
/>
|
2023-12-13 15:24:59 +07:00
|
|
|
</q-item-section>
|
|
|
|
|
<q-item-section>
|
2023-12-13 16:56:43 +07:00
|
|
|
<q-item-label
|
|
|
|
|
>มีคุณสมบัติตรงตามคุณสมบัติเฉพาะ สำหรับตำแหน่งที่กำหนด
|
|
|
|
|
ในมาตรฐานกำหนดตำแหน่ง</q-item-label
|
|
|
|
|
>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
<q-item v-ripple>
|
|
|
|
|
<q-item-section avatar>
|
|
|
|
|
<q-checkbox
|
2023-12-23 21:54:37 +07:00
|
|
|
:disable="store.currentStep > 1"
|
2023-12-13 16:56:43 +07:00
|
|
|
keep-color
|
|
|
|
|
color="primary"
|
|
|
|
|
v-model="formData.isHaveProLicense"
|
2023-12-19 17:04:39 +07:00
|
|
|
@update:model-value="updateValue"
|
2023-12-13 16:56:43 +07:00
|
|
|
/>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
<q-item-section>
|
|
|
|
|
<q-item-label
|
|
|
|
|
>มีใบอนุญาตประกอบวิชาชีพของสายงานต่างๆ และ/หรือ
|
|
|
|
|
คุณวุฒิเพิ่มเติมครบถ้วนตามที่ ก.ก. กำหนด (แพทย์พยาบาล วิศวกรโยธา
|
|
|
|
|
สถาปนิก ฯลฯ)</q-item-label
|
|
|
|
|
>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
<q-item v-ripple>
|
|
|
|
|
<q-item-section avatar>
|
|
|
|
|
<q-checkbox
|
2023-12-23 21:54:37 +07:00
|
|
|
:disable="store.currentStep > 1"
|
2023-12-13 16:56:43 +07:00
|
|
|
keep-color
|
|
|
|
|
color="primary"
|
|
|
|
|
v-model="formData.isHaveMinPeriodOrHoldPos"
|
2023-12-19 17:04:39 +07:00
|
|
|
@update:model-value="updateValue"
|
2023-12-13 16:56:43 +07:00
|
|
|
/>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
<q-item-section>
|
|
|
|
|
<q-item-label
|
|
|
|
|
>มีระยะเวลาขั้นต่ำในการดำรงตำแหน่งหรือเคย
|
|
|
|
|
ดำรงตำแหน่งในสายงานที่จะคัดเลือก
|
|
|
|
|
ตามคุณวุฒิของบุคคลและระดับตำแหน่งที่จะคัดเลือก</q-item-label
|
|
|
|
|
>
|
2023-12-13 15:24:59 +07:00
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
</q-list>
|
2023-12-22 17:05:57 +07:00
|
|
|
|
2023-12-23 21:54:37 +07:00
|
|
|
<PopupCheckFeatures
|
|
|
|
|
:modal="modal"
|
|
|
|
|
:show="show"
|
|
|
|
|
:close-modal="closeModal"
|
|
|
|
|
:educations="educations"
|
|
|
|
|
/>
|
2023-12-13 15:24:59 +07:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped></style>
|