2023-06-15 16:07:44 +07:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ref } from 'vue';
|
|
|
|
|
import type { CheckboxItem } from "@/modules/05_placement/interface/index/Main";
|
2023-06-16 16:13:37 +07:00
|
|
|
import type { QForm } from 'quasar';
|
|
|
|
|
import { useQuasar } from "quasar";
|
|
|
|
|
import { useCounterMixin } from "@/stores/mixin";
|
|
|
|
|
import HeaderTop from "@/modules/05_placement/components/exams_other/Information/top.vue";
|
|
|
|
|
const $q = useQuasar();
|
|
|
|
|
const mixin = useCounterMixin();
|
|
|
|
|
const {
|
|
|
|
|
modalError,
|
|
|
|
|
} = mixin;
|
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
statusEdit: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
notiNoEdit: {
|
|
|
|
|
type: Function,
|
|
|
|
|
default: () => console.log("not function"),
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
const emit = defineEmits(["update:statusEdit"]);
|
|
|
|
|
|
|
|
|
|
const edit = ref<boolean>(false);
|
|
|
|
|
const myform = ref<QForm | null>(null);
|
|
|
|
|
const saveData = async () => {
|
|
|
|
|
if (myform.value != null) {
|
|
|
|
|
await myform.value.validate().then(async (success: boolean) => {
|
|
|
|
|
if (success) {
|
|
|
|
|
await editData();
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const changeBtn = async () => {
|
|
|
|
|
if (edit.value == true) {
|
|
|
|
|
if (props.statusEdit === true) {
|
|
|
|
|
edit.value = false;
|
|
|
|
|
props.notiNoEdit();
|
|
|
|
|
} else {
|
|
|
|
|
emit("update:statusEdit", true);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
emit("update:statusEdit", false);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const editData = async () => {
|
|
|
|
|
modalError($q, "พบข้อผิดพลาด", "วันเกิดไม่ถูกต้อง");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const onCancel = async () => {
|
|
|
|
|
if (myform.value != null) {
|
|
|
|
|
myform.value.reset();
|
|
|
|
|
}
|
|
|
|
|
// await fetchData();
|
|
|
|
|
};
|
|
|
|
|
|
2023-06-15 16:07:44 +07:00
|
|
|
|
|
|
|
|
const selection = ref([]);
|
|
|
|
|
const checkboxItems: CheckboxItem[] = [
|
|
|
|
|
{ id: 1, label: 'ไม่เป็นผู้ดำรงตำแหน่งทางการเมือง' },
|
|
|
|
|
{ id: 2, label: 'ไม่เป็นคนไร้ความสามารถ คนเสมือนไร้ความสามารถ คนวิกลจริตหรือจิตฟั่นเฟือน ไม่สมประกอบหรือเป็นโรคตามที่กำหนดในกฎ ก.พ.' },
|
|
|
|
|
{ id: 3, label: 'ไม่เป็นผู้อยู่ในระหว่างถูกสั่งพักราชการหรือถูกสั่งให้ออกจากราชการไว้ก่อนตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น' },
|
|
|
|
|
{ id: 4, label: 'ไม่เป็นผู้บกพร่องในศีลธรรมอันดีจนเป็นที่รังเกียจของสังคม' },
|
|
|
|
|
{ id: 5, label: 'ไม่เป็นกรรมการหรือผู้ดำรงตำแหน่งที่รับผิดชอบในการบริหารพรรคการเมือง หรือเจ้าหน้าที่ในพรรคการเมือง' },
|
|
|
|
|
{ id: 6, label: 'ไม่เป็นบุคคลล้มละลาย' },
|
|
|
|
|
{ id: 7, label: 'ไม่เป็นผู้เคยต้องรับโทษจำคุกโดยคำพิพากษาถึงที่สุดให้จำคุกเพราะกระทำความผิดทางอาญา เว้นแต่เป็นโทษสำหรับความผิดที่ใด้กระทำโดยประมาทหรือความผิดลหุโทษ' },
|
|
|
|
|
{ id: 8, label: 'ไม่เป็นผู้เคยถูกลงโทษให้ออก ปลดออก หรือไล่ออกจากรัฐวิสาหกิจ หรือ หน่วยงานอื่นของรัฐ' },
|
|
|
|
|
{ id: 9, label: 'เป็นผู้เคยถูลงโทษให้ออก หรือปลดออก เพราะกระทำผิตวินัยตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น' },
|
|
|
|
|
{ id: 10, label: 'เป็นผู้เคยถูกลงโทษไล่ออก เพราะกระทำผิดวินัยตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น' },
|
|
|
|
|
{ id: 11, label: 'เป็นผู้เคยกระทำการทุจริตในการสอบเข้ารับราชการ หรือเข้าปฏิบัติงานใน หน่วยงานของรัฐ' },
|
|
|
|
|
]
|
|
|
|
|
</script>
|
|
|
|
|
<template>
|
|
|
|
|
<div class="row">
|
2023-06-16 16:13:37 +07:00
|
|
|
<HeaderTop
|
|
|
|
|
v-model:edit="edit"
|
|
|
|
|
header="การคัดกรองคุณสมบัติ"
|
|
|
|
|
icon="mdi-briefcase-edit"
|
|
|
|
|
:save="saveData"
|
|
|
|
|
:history="false"
|
|
|
|
|
:changeBtn="changeBtn"
|
|
|
|
|
:disable="statusEdit"
|
|
|
|
|
:cancel="onCancel"
|
|
|
|
|
/>
|
2023-06-15 16:07:44 +07:00
|
|
|
</div>
|
2023-06-16 16:13:37 +07:00
|
|
|
<div class="contanier-checkbox">
|
|
|
|
|
<div v-for="item of checkboxItems" :key="item.id" class="q-pt-md">
|
|
|
|
|
<q-checkbox size="xs" v-model="selection" :val="item.id" :label="item.label" keep-color color="teal"
|
|
|
|
|
:disable="false" />
|
|
|
|
|
<q-separator />
|
|
|
|
|
</div>
|
2023-06-15 16:07:44 +07:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<style lang="scss" scoped>
|
2023-06-16 16:13:37 +07:00
|
|
|
.contanier-checkbox {
|
|
|
|
|
padding-left: 20px;
|
|
|
|
|
padding-top: 10px;
|
2023-06-15 16:07:44 +07:00
|
|
|
}
|
|
|
|
|
</style>
|