hrms-user/src/modules/06_evaluate/components/step/step1.vue

230 lines
7.9 KiB
Vue
Raw Normal View History

2023-12-13 15:24:59 +07:00
<script setup lang="ts">
2024-01-08 14:19:08 +07:00
import { reactive, onMounted, ref } from "vue";
/**importTyep*/
import type {
PersonInformation,
FormSpec,
} from "@/modules/06_evaluate/interface/evalute";
2023-12-19 17:04:39 +07:00
/** importComponents*/
import PopupCheckFeatures from "@/modules/06_evaluate/components/PopupCheckFeatures.vue";
/** importStores*/
2023-12-20 14:23:27 +07:00
import { useEvaluateStore } from "@/modules/06_evaluate/store";
2023-12-19 17:04:39 +07:00
/** use*/
2023-12-20 14:23:27 +07:00
const store = useEvaluateStore();
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: {
2024-01-08 14:19:08 +07:00
type: Object as () => PersonInformation,
2023-12-27 12:08:36 +07:00
},
2023-12-19 17:04:39 +07:00
});
const education = ref<any>();
const emit = defineEmits(["update:spec"]);
const modal = ref<boolean>(false);
const show = ref<boolean>(false);
2023-12-13 15:24:59 +07:00
2024-01-08 14:19:08 +07:00
const formData = reactive<FormSpec>({
2023-12-13 16:56:43 +07:00
isEducationalQft: false, // คุณวุฒิการศึกษา
isGovermantServiceHtr: false, // ประวัติการรับราชการ
isOperatingExp: false, // ประสบการณ์ในการปฏิบัติงาน
isMinPeriodOfTenure: false, // ระยะเวลาขั้นต่ำในการดำรงตำแหน่งในสายงานที่ขอเข้ารับการคัดเลือก
isHaveSpecificQft: false, // มีคุณสมบัติตรงตามคุณสมบัติเฉพาะสำหรับตำแหน่งที่กำหนด ในมาตราฐานกำหนดตำแหน่ง
isHaveProLicense: false, // มีใบอนุญาตประกอบวิชาชีพของสายงานต่างๆ
isHaveMinPeriodOrHoldPos: false, // มีระยะเวลาขั้นต่ำในการดำรงตำแหน่งหรือเคยดำรงตำแหน่งในสายงานที่จะคัดเลือกตามคุณวุฒิของบุคคลและระดับตำแหน่งที่จะคัดเลือก]
});
/** function อัปเดทตรวจสอบคุณสมบัติ*/
2023-12-19 17:04:39 +07:00
async function updateValue() {
emit("update:spec", formData);
}
/**
* function fetchData ตรวจสอบคณสมบ
2024-01-08 14:19:08 +07:00
* @param data ตรวจสอบคณสมบ
*/
2024-01-08 14:19:08 +07:00
async function fetchCheckSpec(data: PersonInformation) {
2023-12-27 12:08:36 +07:00
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;
2023-12-19 17:04:39 +07:00
}
/**
* function openPopup
* @param status
*/
function openModal(status: boolean) {
modal.value = true;
2023-12-23 21:54:37 +07:00
show.value = status;
}
/** function closePopup*/
function closeModal() {
modal.value = false;
}
/**hook lifecycle*/
2023-12-19 17:04:39 +07:00
onMounted(() => {
2023-12-27 12:08:36 +07:00
props.data && fetchCheckSpec(props.data);
setTimeout(() => {
education.value = props.educations
? props.educations
: props.data?.educations;
}, 100);
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
>ณวการศกษา
<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
>ระยะเวลาขนตำในการดำรงตำแหนงในสายงานทขอเขารบการคดเลอก
<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 16:56:43 +07:00
>
2023-12-13 15:24:59 +07:00
</q-item-section>
</q-item>
</q-list>
2023-12-23 21:54:37 +07:00
<PopupCheckFeatures
:modal="modal"
:show="show"
:close-modal="closeModal"
:educations="education"
2023-12-23 21:54:37 +07:00
/>
2023-12-13 15:24:59 +07:00
</template>
<style scoped></style>