ประเมินบุคคล

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-12-18 11:22:38 +07:00
parent d092e8311d
commit 4d0137749c
3 changed files with 144 additions and 40 deletions

View file

@ -23,6 +23,23 @@ const props = defineProps({
virtual-scroll
class="row col-12"
>
<template v-slot:header="props">
<q-tr :props="props" class="bg-grey-2">
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-body2 text-black">{{ col.label }}</span>
</q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props">
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div>
{{ !col.value ? "-" : col.value }}
</div>
</q-td>
</q-tr>
</template>
</q-table>
</template>

View file

@ -20,7 +20,7 @@ const {
columnsCertificates,
columnSalaries,
columnTraining,
columnProjectsProposed,
columnAssessments,
} = store;
const { date2Thai, showLoader, hideLoader } = mixin;
@ -42,7 +42,7 @@ const formDetail = reactive({
position: "", //
oc: "", //
salary: "", //
positionLevel: "", //,
positionLevel: "", //,
posNo: "", //
birthDate: "", //
govAge: "", //
@ -60,20 +60,20 @@ function formattedNumber(x: number) {
onMounted(() => {
if (props.data) {
showLoader();
formDetail.prefix = props.data.prefix;
formDetail.fullName = props.data.fullName;
formDetail.position = props.data.position;
formDetail.oc = props.data.oc;
formDetail.prefix = props.data.prefix ?? "-";
formDetail.fullName = props.data.fullName ?? "-";
formDetail.position = props.data.position ?? "-";
formDetail.oc = props.data.oc ?? "-";
formDetail.salary = props.data.salary
? formattedNumber(props.data.salary)
: "-";
formDetail.positionLevel = props.data.positionLevel;
formDetail.posNo = props.data.posNo;
formDetail.birthDate =
props.data.birthDate && date2Thai(props.data.birthDate);
formDetail.govAge = props.data.govAge;
formDetail.positionLevel = props.data.positionLevel ?? "-";
formDetail.posNo = props.data.posNo ?? "-";
formDetail.birthDate = props.data.birthDate
? date2Thai(props.data.birthDate)
: "-";
formDetail.govAge = props.data.govAge ?? "-";
formDetail.educations = props.data.educations;
formDetail.certificates = props.data.certificates
? props.data.certificates.map((e: CertificatesForm) => ({
certificateNo: e.certificateNo,
@ -255,7 +255,9 @@ onMounted(() => {
<q-input
borderless
readonly
:model-value="education.educationLevel"
:model-value="
education.educationLevel ? education.educationLevel : '-'
"
label="ระดับศึกษา"
/>
</div>
@ -264,7 +266,7 @@ onMounted(() => {
<q-input
borderless
readonly
:model-value="education.institute"
:model-value="education.institute ? education.institute : '-'"
label="สถานศึกษา"
/>
</div>
@ -272,7 +274,9 @@ onMounted(() => {
<div class="col-xs-6 col-sm-4 col-md-3">
<q-input
borderless
:model-value="date2Thai(education.startDate)"
:model-value="
education.startDate ? date2Thai(education.startDate) : '-'
"
readonly
label="ตั้งแต่"
>
@ -282,7 +286,9 @@ onMounted(() => {
<div class="col-xs-6 col-sm-4 col-md-3">
<q-input
borderless
:model-value="date2Thai(education.endDate)"
:model-value="
education.endDate ? date2Thai(education.endDate) : '-'
"
readonly
label="ถึง"
>
@ -291,7 +297,9 @@ onMounted(() => {
<div class="col-xs-6 col-sm-4 col-md-3">
<q-input
borderless
:model-value="date2Thai(education.finishDate)"
:model-value="
education.finishDate ? date2Thai(education.finishDate) : '-'
"
readonly
label="วันที่สำเร็จการศึกษา"
>
@ -311,7 +319,7 @@ onMounted(() => {
<q-input
borderless
readonly
:model-value="education.degree"
:model-value="education.degree ? education.degree:'-'"
label="วุฒิการศึกษา"
/>
</div>
@ -320,7 +328,7 @@ onMounted(() => {
<q-input
borderless
readonly
:model-value="education.field"
:model-value="education.field ? education.field : '-'"
label="สาขาวิชา/ทาง"
/>
</div>
@ -328,7 +336,7 @@ onMounted(() => {
<q-input
borderless
readonly
:model-value="education.fundName"
:model-value="education.fundName? education.fundName:'-'"
label="ทุน"
/>
</div>
@ -337,7 +345,7 @@ onMounted(() => {
<q-input
borderless
readonly
:model-value="education.gpa"
:model-value="education.gpa ? education.gpa :'-'"
label="เกรดเฉลี่ย"
/>
</div>
@ -346,10 +354,16 @@ onMounted(() => {
<q-input
borderless
readonly
:model-value="education.country"
:model-value="education.country ? education.country : '-'"
label="ประเทศ"
/>
</div>
<div
v-if="index + 1 !== formDetail.educations.length"
class="col-12"
>
<q-separator size="2px" />
</div>
</div>
</div>
<div v-else class="row col-12 q-pa-md">ไมประวการศกษา</div>
@ -403,7 +417,10 @@ onMounted(() => {
</div>
<div class="col-12"><q-separator /></div>
<div class="col-10">
<TableData :columns="columnProjectsProposed" />
<TableData
:columns="columnAssessments"
:row="formDetail.assessments"
/>
</div>
</q-card>
</div>