รายละเอียดข้อมูลผ้สอบผ่าน
This commit is contained in:
parent
2317839c7a
commit
b4c7a29220
3 changed files with 178 additions and 93 deletions
|
|
@ -3,4 +3,12 @@
|
||||||
*/
|
*/
|
||||||
import env from "../index";
|
import env from "../index";
|
||||||
|
|
||||||
export default {};
|
const placement = `${env.API_URI}/Placement/placement`
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
getDatapersonal: (id: string) => `${placement}/personal/${id}`,
|
||||||
|
putProperty: (id: string) => `${placement}/property/${id}`
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -437,7 +437,7 @@ const fetchHistory = async () => {
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,16 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import DialogHeader from "@/modules/05_placement/components/pass/DialogHeader.vue";
|
import DialogHeader from "@/modules/05_placement/components/pass/DialogHeader.vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vue";
|
import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { CheckboxItem } from "@/modules/05_placement/interface/index/Main";
|
import type { CheckboxItem } from "@/modules/05_placement/interface/index/Main";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const modal = ref<boolean>();
|
const modal = ref<boolean>();
|
||||||
const { success } = mixin;
|
const { success, showLoader, hideLoader, date2Thai, modalConfirm } = mixin;
|
||||||
const save = ref<boolean>(true);
|
const save = ref<boolean>(true);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
Modal: Boolean,
|
Modal: Boolean,
|
||||||
|
|
@ -26,13 +28,10 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const rows = ref<any[]>([
|
const rows = ref<any[]>([
|
||||||
{
|
// university: props.getdetail.university || "-",
|
||||||
university: props.getdetail.university || "-",
|
// degree: props.getdetail.degree || "-",
|
||||||
degree: props.getdetail.degree || "-",
|
// major: props.getdetail.major || "-",
|
||||||
major: props.getdetail.major || "-",
|
// graduation: "2022-01-01",
|
||||||
graduation: "2022-01-01",
|
|
||||||
},
|
|
||||||
|
|
||||||
]);
|
]);
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -76,86 +75,157 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const myForm = ref<any>();
|
const myForm = ref<any>([]);
|
||||||
const checkValidate = ref<boolean>(false);
|
const personalForm = ref<any>([]);
|
||||||
const selection = ref<number[]>([]);
|
// const checkValidate = ref<boolean>(false);
|
||||||
|
const selection = ref<any>([]);
|
||||||
|
|
||||||
const checkboxItems: CheckboxItem[] = [
|
// const checkboxItems: CheckboxItem[] = [
|
||||||
{ id: 1, label: "ไม่เป็นผู้ดำรงตำแหน่งทางการเมือง" },
|
// { id: 1, label: "ไม่เป็นผู้ดำรงตำแหน่งทางการเมือง" },
|
||||||
{
|
// {
|
||||||
id: 2,
|
// id: 2,
|
||||||
label:
|
// label:
|
||||||
"ไม่เป็นคนไร้ความสามารถ คนเสมือนไร้ความสามารถ คนวิกลจริตหรือจิตฟั่นเฟือน ไม่สมประกอบหรือเป็นโรคตามที่กำหนดในกฎ ก.พ.",
|
// "ไม่เป็นคนไร้ความสามารถ คนเสมือนไร้ความสามารถ คนวิกลจริตหรือจิตฟั่นเฟือน ไม่สมประกอบหรือเป็นโรคตามที่กำหนดในกฎ ก.พ.",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 3,
|
// id: 3,
|
||||||
label:
|
// label:
|
||||||
"ไม่เป็นผู้อยู่ในระหว่างถูกสั่งพักราชการหรือถูกสั่งให้ออกจากราชการไว้ก่อนตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น",
|
// "ไม่เป็นผู้อยู่ในระหว่างถูกสั่งพักราชการหรือถูกสั่งให้ออกจากราชการไว้ก่อนตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น",
|
||||||
},
|
// },
|
||||||
{ id: 4, label: "ไม่เป็นผู้บกพร่องในศีลธรรมอันดีจนเป็นที่รังเกียจของสังคม" },
|
// { id: 4, label: "ไม่เป็นผู้บกพร่องในศีลธรรมอันดีจนเป็นที่รังเกียจของสังคม" },
|
||||||
{
|
// {
|
||||||
id: 5,
|
// id: 5,
|
||||||
label:
|
// label:
|
||||||
"ไม่เป็นกรรมการหรือผู้ดำรงตำแหน่งที่รับผิดชอบในการบริหารพรรคการเมือง หรือเจ้าหน้าที่ในพรรคการเมือง",
|
// "ไม่เป็นกรรมการหรือผู้ดำรงตำแหน่งที่รับผิดชอบในการบริหารพรรคการเมือง หรือเจ้าหน้าที่ในพรรคการเมือง",
|
||||||
},
|
// },
|
||||||
{ id: 6, label: "ไม่เป็นบุคคลล้มละลาย" },
|
// { id: 6, label: "ไม่เป็นบุคคลล้มละลาย" },
|
||||||
{
|
// {
|
||||||
id: 7,
|
// id: 7,
|
||||||
label:
|
// label:
|
||||||
"ไม่เป็นผู้เคยต้องรับโทษจำคุกโดยคำพิพากษาถึงที่สุดให้จำคุกเพราะกระทำความผิดทางอาญา เว้นแต่เป็นโทษสำหรับความผิดที่ใด้กระทำโดยประมาทหรือความผิดลหุโทษ",
|
// "ไม่เป็นผู้เคยต้องรับโทษจำคุกโดยคำพิพากษาถึงที่สุดให้จำคุกเพราะกระทำความผิดทางอาญา เว้นแต่เป็นโทษสำหรับความผิดที่ใด้กระทำโดยประมาทหรือความผิดลหุโทษ",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 8,
|
// id: 8,
|
||||||
label:
|
// label:
|
||||||
"ไม่เป็นผู้เคยถูกลงโทษให้ออก ปลดออก หรือไล่ออกจากรัฐวิสาหกิจ หรือ หน่วยงานอื่นของรัฐ",
|
// "ไม่เป็นผู้เคยถูกลงโทษให้ออก ปลดออก หรือไล่ออกจากรัฐวิสาหกิจ หรือ หน่วยงานอื่นของรัฐ",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 9,
|
// id: 9,
|
||||||
label:
|
// label:
|
||||||
"เป็นผู้เคยถูลงโทษให้ออก หรือปลดออก เพราะกระทำผิตวินัยตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น",
|
// "เป็นผู้เคยถูลงโทษให้ออก หรือปลดออก เพราะกระทำผิตวินัยตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 10,
|
// id: 10,
|
||||||
label:
|
// label:
|
||||||
"เป็นผู้เคยถูกลงโทษไล่ออก เพราะกระทำผิดวินัยตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น",
|
// "เป็นผู้เคยถูกลงโทษไล่ออก เพราะกระทำผิดวินัยตามพระราชบัญญัตินี้ หรือตามกฎหมายอื่น",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 11,
|
// id: 11,
|
||||||
label:
|
// label:
|
||||||
"เป็นผู้เคยกระทำการทุจริตในการสอบเข้ารับราชการ หรือเข้าปฏิบัติงานใน หน่วยงานของรัฐ",
|
// "เป็นผู้เคยกระทำการทุจริตในการสอบเข้ารับราชการ หรือเข้าปฏิบัติงานใน หน่วยงานของรัฐ",
|
||||||
},
|
// },
|
||||||
];
|
// ];
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
function isRequired(val: any): boolean | string {
|
function isRequired(val: any): boolean | string {
|
||||||
return !!val || "กรุณาเลือกไฟล์เอกสารหลักฐาน";
|
return !!val || "กรุณาเลือกไฟล์เอกสารหลักฐาน";
|
||||||
}
|
}
|
||||||
const validateData = () => {
|
|
||||||
const selectedIds = selection.value;
|
|
||||||
const selectedItems = checkboxItems.filter((item) =>
|
|
||||||
selectedIds.includes(item.id)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
watch(props, () => {
|
||||||
|
if (props.Modal === true) {
|
||||||
|
console.log(props.getdetail);
|
||||||
|
fetchData();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const validateData = () => {
|
||||||
|
const selectedIds = personalForm.value.isProperty;
|
||||||
|
|
||||||
|
const selectedItems = personalForm.value.isProperty.filter(
|
||||||
|
(item) => item.value === true
|
||||||
|
// selectedIds.includes(item.value)
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
selectedItems.length > 0 && selectedItems.length === selectedIds.length
|
selectedItems.length > 0 || selectedItems.length === selectedIds.length
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const ClickSave = () => {
|
const ClickSave = () => {
|
||||||
const isValid = validateData();
|
const isValid = validateData();
|
||||||
|
|
||||||
if (isValid) {
|
if (isValid) {
|
||||||
console.log(selection.value);
|
// props.close();
|
||||||
console.log("rerer", props.Modal);
|
// props.validate();
|
||||||
props.close();
|
// putpersonalForm();
|
||||||
props.validate();
|
modalConfirm(
|
||||||
selection.value = [];
|
$q,
|
||||||
|
"การยืนยัน",
|
||||||
|
"ยืนยันการบันทึกการคัดกรองคุณสมบัติ",
|
||||||
|
putpersonalForm
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
success($q, "กรอกให้ครบ");
|
success($q, "กรอกให้ครบ");
|
||||||
|
console.log();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const fetchData = async () => {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(config.API.getDatapersonal("0a846508-4932-40de-9a9e-5b519492217c"))
|
||||||
|
.then((res) => {
|
||||||
|
personalForm.value = res.data.result;
|
||||||
|
personalForm.value.education.map((e) => {
|
||||||
|
rows.value.push({
|
||||||
|
university: e.name,
|
||||||
|
degree: e.degree,
|
||||||
|
major: e.field,
|
||||||
|
graduation: e.finishDate,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log("e", e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const formBmaofficer = (val: string) => {
|
||||||
|
switch (val) {
|
||||||
|
case "officer":
|
||||||
|
return "ขรก.กทม. สามัญ";
|
||||||
|
break;
|
||||||
|
case "employee_perm":
|
||||||
|
return "ลูกจ้างประจำ";
|
||||||
|
break;
|
||||||
|
case "employee_temp":
|
||||||
|
return "ลูกจ้างชั่วคราว";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
"";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const close = async () => {
|
const close = async () => {
|
||||||
props.close();
|
props.close();
|
||||||
selection.value = [];
|
selection.value = [];
|
||||||
|
rows.value = [];
|
||||||
|
};
|
||||||
|
const putpersonalForm = async () => {
|
||||||
|
await http
|
||||||
|
.put(
|
||||||
|
config.API.putProperty("0a846508-4932-40de-9a9e-5b519492217c"),
|
||||||
|
personalForm.value.isProperty
|
||||||
|
)
|
||||||
|
.then((res) => {
|
||||||
|
success($q, res.data.message);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log(e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
props.close();
|
||||||
|
props.validate();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -164,7 +234,7 @@ const close = async () => {
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<DialogHeader
|
<DialogHeader
|
||||||
:title="`รายละเอียดของ ${props.getdetail.fullName}`"
|
:title="`รายละเอียดของ ${personalForm.fullName}`"
|
||||||
@click="close"
|
@click="close"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -176,7 +246,10 @@ const close = async () => {
|
||||||
<div class="row items-center q-pa-xs header-text">
|
<div class="row items-center q-pa-xs header-text">
|
||||||
ข้อมูลทั่วไป
|
ข้อมูลทั่วไป
|
||||||
<span class="check-officer"
|
<span class="check-officer"
|
||||||
><q-icon name="mdi-check" /> ข้าราชการฯ กทม</span
|
><q-icon
|
||||||
|
name="mdi-check"
|
||||||
|
v-if="personalForm.bmaofficer !== null && ''"
|
||||||
|
/>{{ formBmaofficer(personalForm.bmaofficer) }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="row q-pa-xs">
|
<div class="row q-pa-xs">
|
||||||
|
|
@ -186,10 +259,10 @@ const close = async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 sub-text">
|
<div class="col-4 sub-text">
|
||||||
<div class="q-pb-md">
|
<div class="q-pb-md">
|
||||||
{{ props.getdetail.profileID }}
|
{{ personalForm.idCard }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ props.getdetail.dateOfBirth }}
|
{{ date2Thai(personalForm.dateOfBirth) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2 header-sub-text">
|
<div class="col-2 header-sub-text">
|
||||||
|
|
@ -198,10 +271,10 @@ const close = async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3 sub-text">
|
<div class="col-3 sub-text">
|
||||||
<div class="q-pb-md">
|
<div class="q-pb-md">
|
||||||
{{ props.getdetail.fullName }}
|
{{ personalForm.fullName }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ props.getdetail.gender }}
|
{{ personalForm.gender }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -213,7 +286,7 @@ const close = async () => {
|
||||||
<div class="row q-pa-xs">
|
<div class="row q-pa-xs">
|
||||||
<div class="col-3 header-sub-text">ที่อยู่</div>
|
<div class="col-3 header-sub-text">ที่อยู่</div>
|
||||||
<div class="col-9 sub-text">
|
<div class="col-9 sub-text">
|
||||||
{{ props.getdetail.address }}
|
{{ personalForm.address }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
@ -252,31 +325,31 @@ const close = async () => {
|
||||||
<div class="col-4 q-pa-xs">
|
<div class="col-4 q-pa-xs">
|
||||||
<div class="header-sub-text-exam-2">คะแนนที่ได้</div>
|
<div class="header-sub-text-exam-2">คะแนนที่ได้</div>
|
||||||
<div class="sub-text-exam">
|
<div class="sub-text-exam">
|
||||||
{{ props.getdetail.scoreResult.scoreAFull }}
|
{{ personalForm.pointTotalA }}
|
||||||
</div>
|
</div>
|
||||||
<div class="sub-text-exam">
|
<div class="sub-text-exam">
|
||||||
{{ props.getdetail.scoreResult.scoreBFull }}
|
{{ personalForm.pointTotalB }}
|
||||||
</div>
|
</div>
|
||||||
<div class="sub-text-exam">
|
<div class="sub-text-exam">
|
||||||
{{ props.getdetail.scoreResult.scoreCFull }}
|
{{ personalForm.pointTotalC }}
|
||||||
</div>
|
</div>
|
||||||
<div class="sub-text-exam">
|
<div class="sub-text-exam">
|
||||||
{{ props.getdetail.scoreResult.scoreSumFull }}
|
{{ personalForm.pointTotal }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-pa-xs header-sub-text-exam-2">
|
<div class="col-4 q-pa-xs header-sub-text-exam-2">
|
||||||
<div class="header-sub-text-exam-2">ผลการสอบ</div>
|
<div class="header-sub-text-exam-2">ผลการสอบ</div>
|
||||||
<div class="sub-text-exam">
|
<div class="sub-text-exam">
|
||||||
{{ props.getdetail.scoreResult.scoreA }}
|
{{ personalForm.pointA }}
|
||||||
</div>
|
</div>
|
||||||
<div class="sub-text-exam">
|
<div class="sub-text-exam">
|
||||||
{{ props.getdetail.scoreResult.scoreB }}
|
{{ personalForm.pointB }}
|
||||||
</div>
|
</div>
|
||||||
<div class="sub-text-exam">
|
<div class="sub-text-exam">
|
||||||
{{ props.getdetail.scoreResult.scoreC }}
|
{{ personalForm.pointC }}
|
||||||
</div>
|
</div>
|
||||||
<div class="sub-text-exam">
|
<div class="sub-text-exam">
|
||||||
{{ props.getdetail.scoreResult.scoreSum }}
|
{{ personalForm.point }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -292,10 +365,10 @@ const close = async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-5 sub-text-exam">
|
<div class="col-5 sub-text-exam">
|
||||||
<div class="q-pb-sm">
|
<div class="q-pb-sm">
|
||||||
{{ props.getdetail.scoreResult.examResult }}
|
{{ personalForm.pass }}
|
||||||
</div>
|
</div>
|
||||||
<div class="q-pb-sm">{{ props.getdetail.number }}</div>
|
<div class="q-pb-sm">{{ personalForm.examNumber }}</div>
|
||||||
<div class="q-pb-sm">{{ props.getdetail.examCount }}</div>
|
<div class="q-pb-sm">{{ personalForm.examRound }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -308,12 +381,16 @@ const close = async () => {
|
||||||
<div class="col-12 row items-center q-pa-sm header-text">
|
<div class="col-12 row items-center q-pa-sm header-text">
|
||||||
การคัดกรองคุณสมบัติ
|
การคัดกรองคุณสมบัติ
|
||||||
</div>
|
</div>
|
||||||
<div v-for="item of checkboxItems" :key="item.id" class="q-pa-sm">
|
<div
|
||||||
|
v-for="(item, index) of personalForm.isProperty"
|
||||||
|
:key="index"
|
||||||
|
class="q-pa-sm"
|
||||||
|
>
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
size="xs"
|
size="xs"
|
||||||
v-model="selection"
|
v-model="item.value"
|
||||||
:val="item.id"
|
:val="item.value"
|
||||||
:label="item.label"
|
:label="item.name"
|
||||||
keep-color
|
keep-color
|
||||||
color="teal"
|
color="teal"
|
||||||
:rules="[isRequired]"
|
:rules="[isRequired]"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue