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

241 lines
8.2 KiB
Vue
Raw Normal View History

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";
/** 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
/** 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
});
const emit = defineEmits(["update:spec"]);
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, // มีระยะเวลาขั้นต่ำในการดำรงตำแหน่งหรือเคยดำรงตำแหน่งในสายงานที่จะคัดเลือกตามคุณวุฒิของบุคคลและระดับตำแหน่งที่จะคัดเลือก]
});
/** function อัปเดทตรวจสอบคุณสมบัติ*/
2023-12-19 17:04:39 +07:00
async function updateValue() {
emit("update:spec", formData);
}
/**
* 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
}
/**
* 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
// 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
>ณวการศกษา
<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="educations"
/>
2023-12-13 15:24:59 +07:00
</template>
<style scoped></style>