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

172 lines
6.4 KiB
Vue
Raw Normal View History

2023-12-13 15:24:59 +07:00
<script setup lang="ts">
2023-12-19 17:04:39 +07:00
import { reactive, onMounted } from "vue";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
const mixin = useCounterMixin();
const $q = useQuasar();
const { showLoader, hideLoader, messageError } = mixin;
const props = defineProps({
evaluateId: {
type: String,
},
});
const emit = defineEmits(["update:spec"]);
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-19 17:04:39 +07:00
async function updateValue() {
emit("update:spec", formData);
}
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();
});
}
onMounted(() => {
props.evaluateId && fetchCheckSpec(props.evaluateId);
});
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
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-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
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
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
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
>ระยะเวลาขนตำในการดำรงตำแหนงในสายงานทขอเขารบการคดเลอก</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
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
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
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>
</template>
<style scoped></style>