ประเมินบุคคล
This commit is contained in:
parent
d092e8311d
commit
4d0137749c
3 changed files with 144 additions and 40 deletions
|
|
@ -23,6 +23,23 @@ const props = defineProps({
|
||||||
virtual-scroll
|
virtual-scroll
|
||||||
class="row col-12"
|
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>
|
</q-table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ const {
|
||||||
columnsCertificates,
|
columnsCertificates,
|
||||||
columnSalaries,
|
columnSalaries,
|
||||||
columnTraining,
|
columnTraining,
|
||||||
columnProjectsProposed,
|
columnAssessments,
|
||||||
} = store;
|
} = store;
|
||||||
const { date2Thai, showLoader, hideLoader } = mixin;
|
const { date2Thai, showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
|
|
@ -42,7 +42,7 @@ const formDetail = reactive({
|
||||||
position: "", //ตำแหน่ง
|
position: "", //ตำแหน่ง
|
||||||
oc: "", //สังกัด
|
oc: "", //สังกัด
|
||||||
salary: "", //เงินเดือน
|
salary: "", //เงินเดือน
|
||||||
positionLevel: "", //ระดับปัจจุบัน,ระดับที่ประเมิน
|
positionLevel: "", //ระดับปัจจุบัน,ระดับที่ประเมิน
|
||||||
posNo: "", //ตำแหน่งเลขที่
|
posNo: "", //ตำแหน่งเลขที่
|
||||||
birthDate: "", //วันเดือนปีเกิด
|
birthDate: "", //วันเดือนปีเกิด
|
||||||
govAge: "", //อายุราชการ
|
govAge: "", //อายุราชการ
|
||||||
|
|
@ -60,20 +60,20 @@ function formattedNumber(x: number) {
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
showLoader();
|
showLoader();
|
||||||
formDetail.prefix = props.data.prefix;
|
formDetail.prefix = props.data.prefix ?? "-";
|
||||||
formDetail.fullName = props.data.fullName;
|
formDetail.fullName = props.data.fullName ?? "-";
|
||||||
formDetail.position = props.data.position;
|
formDetail.position = props.data.position ?? "-";
|
||||||
formDetail.oc = props.data.oc;
|
formDetail.oc = props.data.oc ?? "-";
|
||||||
formDetail.salary = props.data.salary
|
formDetail.salary = props.data.salary
|
||||||
? formattedNumber(props.data.salary)
|
? formattedNumber(props.data.salary)
|
||||||
: "-";
|
: "-";
|
||||||
formDetail.positionLevel = props.data.positionLevel;
|
formDetail.positionLevel = props.data.positionLevel ?? "-";
|
||||||
formDetail.posNo = props.data.posNo;
|
formDetail.posNo = props.data.posNo ?? "-";
|
||||||
formDetail.birthDate =
|
formDetail.birthDate = props.data.birthDate
|
||||||
props.data.birthDate && date2Thai(props.data.birthDate);
|
? date2Thai(props.data.birthDate)
|
||||||
formDetail.govAge = props.data.govAge;
|
: "-";
|
||||||
|
formDetail.govAge = props.data.govAge ?? "-";
|
||||||
formDetail.educations = props.data.educations;
|
formDetail.educations = props.data.educations;
|
||||||
|
|
||||||
formDetail.certificates = props.data.certificates
|
formDetail.certificates = props.data.certificates
|
||||||
? props.data.certificates.map((e: CertificatesForm) => ({
|
? props.data.certificates.map((e: CertificatesForm) => ({
|
||||||
certificateNo: e.certificateNo,
|
certificateNo: e.certificateNo,
|
||||||
|
|
@ -255,7 +255,9 @@ onMounted(() => {
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
readonly
|
readonly
|
||||||
:model-value="education.educationLevel"
|
:model-value="
|
||||||
|
education.educationLevel ? education.educationLevel : '-'
|
||||||
|
"
|
||||||
label="ระดับศึกษา"
|
label="ระดับศึกษา"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -264,7 +266,7 @@ onMounted(() => {
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
readonly
|
readonly
|
||||||
:model-value="education.institute"
|
:model-value="education.institute ? education.institute : '-'"
|
||||||
label="สถานศึกษา"
|
label="สถานศึกษา"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -272,7 +274,9 @@ onMounted(() => {
|
||||||
<div class="col-xs-6 col-sm-4 col-md-3">
|
<div class="col-xs-6 col-sm-4 col-md-3">
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
:model-value="date2Thai(education.startDate)"
|
:model-value="
|
||||||
|
education.startDate ? date2Thai(education.startDate) : '-'
|
||||||
|
"
|
||||||
readonly
|
readonly
|
||||||
label="ตั้งแต่"
|
label="ตั้งแต่"
|
||||||
>
|
>
|
||||||
|
|
@ -282,7 +286,9 @@ onMounted(() => {
|
||||||
<div class="col-xs-6 col-sm-4 col-md-3">
|
<div class="col-xs-6 col-sm-4 col-md-3">
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
:model-value="date2Thai(education.endDate)"
|
:model-value="
|
||||||
|
education.endDate ? date2Thai(education.endDate) : '-'
|
||||||
|
"
|
||||||
readonly
|
readonly
|
||||||
label="ถึง"
|
label="ถึง"
|
||||||
>
|
>
|
||||||
|
|
@ -291,7 +297,9 @@ onMounted(() => {
|
||||||
<div class="col-xs-6 col-sm-4 col-md-3">
|
<div class="col-xs-6 col-sm-4 col-md-3">
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
:model-value="date2Thai(education.finishDate)"
|
:model-value="
|
||||||
|
education.finishDate ? date2Thai(education.finishDate) : '-'
|
||||||
|
"
|
||||||
readonly
|
readonly
|
||||||
label="วันที่สำเร็จการศึกษา"
|
label="วันที่สำเร็จการศึกษา"
|
||||||
>
|
>
|
||||||
|
|
@ -311,7 +319,7 @@ onMounted(() => {
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
readonly
|
readonly
|
||||||
:model-value="education.degree"
|
:model-value="education.degree ? education.degree:'-'"
|
||||||
label="วุฒิการศึกษา"
|
label="วุฒิการศึกษา"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -320,7 +328,7 @@ onMounted(() => {
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
readonly
|
readonly
|
||||||
:model-value="education.field"
|
:model-value="education.field ? education.field : '-'"
|
||||||
label="สาขาวิชา/ทาง"
|
label="สาขาวิชา/ทาง"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -328,7 +336,7 @@ onMounted(() => {
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
readonly
|
readonly
|
||||||
:model-value="education.fundName"
|
:model-value="education.fundName? education.fundName:'-'"
|
||||||
label="ทุน"
|
label="ทุน"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -337,7 +345,7 @@ onMounted(() => {
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
readonly
|
readonly
|
||||||
:model-value="education.gpa"
|
:model-value="education.gpa ? education.gpa :'-'"
|
||||||
label="เกรดเฉลี่ย"
|
label="เกรดเฉลี่ย"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -346,10 +354,16 @@ onMounted(() => {
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
readonly
|
readonly
|
||||||
:model-value="education.country"
|
:model-value="education.country ? education.country : '-'"
|
||||||
label="ประเทศ"
|
label="ประเทศ"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="index + 1 !== formDetail.educations.length"
|
||||||
|
class="col-12"
|
||||||
|
>
|
||||||
|
<q-separator size="2px" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="row col-12 q-pa-md">ไม่มีประวัติการศึกษา</div>
|
<div v-else class="row col-12 q-pa-md">ไม่มีประวัติการศึกษา</div>
|
||||||
|
|
@ -403,7 +417,10 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="col-10">
|
<div class="col-10">
|
||||||
<TableData :columns="columnProjectsProposed" />
|
<TableData
|
||||||
|
:columns="columnAssessments"
|
||||||
|
:row="formDetail.assessments"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,13 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const { date2Thai } = mixin;
|
||||||
|
|
||||||
export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
||||||
const tabMenu = ref<string>("1");
|
const tabMenu = ref<string>("1");
|
||||||
const step = ref<number>(1);
|
const step = ref<number>(1);
|
||||||
|
|
@ -237,54 +242,119 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** คอลัมน์ ผลงานที่เคยเสนอขอประเมิน*/
|
/** คอลัมน์ ผลงานที่เคยเสนอขอประเมิน*/
|
||||||
const columnProjectsProposed = ref<QTableProps["columns"]>([
|
const columnAssessments = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "receivedDate",
|
name: "date",
|
||||||
align: "center",
|
align: "left",
|
||||||
label: "วันที่ได้รับ",
|
label: "วันที่ได้รับ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "receivedDate",
|
field: "date",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (v) => date2Thai(v),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "authority",
|
name: "point1Total",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ผู้มีอำนาจลงนาม",
|
label: "ส่วนที่1 (น้ำหนัก)",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "authority",
|
field: "point1Total",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "datail",
|
name: "point1",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "รายละเอียด",
|
label: "ผลประเมินส่วนที่1 (คะแนน)",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "detail",
|
field: "point1",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "orderNumber",
|
name: "point2Total",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เลขที่คำสั่ง",
|
label: "ส่วนที่2 (น้ำหนัก)",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "orderNumber",
|
field: "point2Total",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "doc",
|
name: "point2",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เอกสารอ้างอิง",
|
label: "ผลประเมินส่วนที่2 (คะแนน)",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "doc",
|
field: "point2",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "pointSumTotal",
|
||||||
|
align: "left",
|
||||||
|
label: "ผลรวม (น้ำหนัก)",
|
||||||
|
sortable: true,
|
||||||
|
field: "pointSumTotal",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "pointSum",
|
||||||
|
align: "left",
|
||||||
|
label: "ผลประเมินรวม (คะแนน)",
|
||||||
|
sortable: true,
|
||||||
|
field: "pointSum",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "name",
|
||||||
|
align: "left",
|
||||||
|
label: "ผลประเมิน",
|
||||||
|
sortable: true,
|
||||||
|
field: "name",
|
||||||
|
format(val, row) {
|
||||||
|
return `${textPoint(row.pointSum)} ${textRangePoint(row.pointSum)}`;
|
||||||
|
},
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
function textRangePoint(val: number | undefined) {
|
||||||
|
if (val == undefined) val = -1;
|
||||||
|
if (val < 60.0) return "(คะแนนต่ำกว่าร้อยละ 60.00)";
|
||||||
|
if (val >= 60.0 && val <= 69.99) return "(คะแนนร้อยละ 60.00 - 69.99)";
|
||||||
|
if (val >= 70.0 && val <= 79.99) return "(คะแนนร้อยละ 70.00 - 79.99)";
|
||||||
|
if (val >= 80.0 && val <= 89.99) return " (คะแนนร้อยละ 80.00 - 89.99)";
|
||||||
|
if (val >= 90.0) return " (คะแนนร้อยละ 90.00 ขึ้นไป)";
|
||||||
|
else return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
function textPoint(val: number | undefined) {
|
||||||
|
if (val == undefined) val = -1;
|
||||||
|
if (val < 60.0) return "ต้องปรับปรุง";
|
||||||
|
if (val >= 60.0 && val <= 69.99) return "พอใช้";
|
||||||
|
if (val >= 70.0 && val <= 79.99) return "ดี";
|
||||||
|
if (val >= 80.0 && val <= 89.99) return "ดีมาก";
|
||||||
|
if (val >= 90.0) return "ดีเด่น";
|
||||||
|
else return "-";
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
tabMenu,
|
tabMenu,
|
||||||
step,
|
step,
|
||||||
|
|
@ -294,7 +364,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
||||||
columnsCertificates,
|
columnsCertificates,
|
||||||
columnSalaries,
|
columnSalaries,
|
||||||
columnTraining,
|
columnTraining,
|
||||||
columnProjectsProposed,
|
columnAssessments,
|
||||||
pdfSrcStore,
|
pdfSrcStore,
|
||||||
urlDownloadFile,
|
urlDownloadFile,
|
||||||
numOfPagesStore,
|
numOfPagesStore,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue