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

This commit is contained in:
STW_TTTY\stwtt 2024-07-09 15:04:07 +07:00
parent 7072bcff94
commit 4f20aa79fa
3 changed files with 106 additions and 78 deletions

View file

@ -23,6 +23,7 @@ export default {
dataUserDuty: `${profileOrg}/duty/user`,
dataUserSalary: `${profileOrg}/salary/user`,
dataUserHonor: `${profileOrg}/honor/user`,
dataUserNopaid: `${profileOrg}/nopaid/user`,
dataUserCertificate: (type: string) => `${profileOrg}/${type}/user`,

View file

@ -62,6 +62,7 @@ const formDetail = reactive<any>({
salaries: [],
trainings: [],
assessments: [],
honor: [],
});
/** function เรียกข้อมูลตรวจสอบคุณสมบัติ*/
@ -75,13 +76,13 @@ async function fetchDetail() {
formDetail.citizenId = data.citizenId;
formDetail.prefix = data.prefix;
formDetail.fullName = `${data.firstName} ${data.lastName}`;
formDetail.firstName = data.firstName
formDetail.lastName = data.lastName
formDetail.firstName = data.firstName;
formDetail.lastName = data.lastName;
formDetail.position = data.position;
formDetail.oc = data.rootShortName;
formDetail.positionLevel = data.posLevelName;
formDetail.posNo = data.rootShortName + data.posMasterNo;
formDetail.birthDate = data.birthDate
formDetail.birthDate = data.birthDate;
formDetail.govAge = data.govAge; //
http.get(config.API.dataUserEducations).then((res) => {
@ -101,30 +102,7 @@ async function fetchDetail() {
});
http.get(config.API.dataUserSalary).then((res) => {
formDetail.salaries = res.data.result.map((e: any) => ({
amount: e.amount,
date: e.date,
mouthSalaryAmount: e.mouthSalaryAmount ? e.mouthSalaryAmount : 0,
posNo: e.posNo,
position: e.position,
positionSalaryAmount: e.positionSalaryAmount
? e.positionSalaryAmount
: 0,
refCommandDate: e.refCommandDate,
refCommandNo: e.refCommandNo,
salaryClass: e.salaryClass,
salaryRef: e.salaryRef,
salaryStatus: e.salaryStatus,
//
oc: "",//
lineWork: e.positionLine,
side: e.positionPathSide,
positionType: e.positionType,
level: e.positionLevel,
positionsAdministrative: e.positionExecutive,
aspectAdministrative: "",//
}));
formDetail.salaries = res.data.result;
formDetail.salary = formDetail.salaries
? formattedNumber(
formDetail.salaries[formDetail.salaries.length - 1].amount
@ -146,6 +124,16 @@ async function fetchDetail() {
yearly: e.yearly,
}));
});
http.get(config.API.dataUserHonor).then((res) => {
formDetail.honor = res.data.result.map((e: any) => ({
receivedDate: e.createdAt,
authority: e.issuer,
detail: e.detail,
orderNumber: e.refCommandNo,
doce: e.refCommandDate,
}));
});
// formDetail.assessments = data.assessments;
emit("update:formDeital", formDetail);
})
@ -173,7 +161,7 @@ async function fetchCheckSpec(data: any) {
formDetail.salary = data.salary ? formattedNumber(data.salary) : "";
formDetail.positionLevel = data.positionLevel;
formDetail.posNo = data.posNo;
formDetail.birthDate = data.birthDate
formDetail.birthDate = data.birthDate;
formDetail.educations = data.educations;
formDetail.certificates = data.certificates.map((e: CertificatesForm) => ({
@ -292,7 +280,9 @@ onMounted(async () => {
<div class="col-xs-6 col-sm-4 col-md-3">
<q-input
borderless
:model-value="formDetail.birthDate ? date2Thai(formDetail.birthDate):'-'"
:model-value="
formDetail.birthDate ? date2Thai(formDetail.birthDate) : '-'
"
readonly
label="วันเดือนปีเกิด"
>
@ -483,6 +473,12 @@ onMounted(async () => {
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>
@ -506,7 +502,39 @@ onMounted(async () => {
</div>
<div class="col-12"><q-separator /></div>
<div class="col-10">
<TableData :columns="columnSalaries" :row="formDetail.salaries" />
<d-table
ref="table"
row-key="id"
flat
bordered
dense
:columns="columnSalaries"
:rows="formDetail.salaries"
:paging="true"
:rows-per-page-options="[20, 50, 100]"
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td
v-for="col in props.cols"
:key="col.id"
class="vertical-top"
>
<div class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
<!-- <TableData :columns="columnSalaries" :row="formDetail.salaries" /> -->
</div>
</q-card>
@ -536,7 +564,10 @@ onMounted(async () => {
</div>
<div class="col-12"><q-separator /></div>
<div class="col-10">
<TableData :columns="columnProjectsProposed" />
<TableData
:columns="columnProjectsProposed"
:row="formDetail.honor"
/>
</div>
</q-card>
</div>

View file

@ -62,32 +62,43 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
name: "date",
align: "left",
label: "วัน เดือน ปี",
sortable: false,
sortable: true,
field: "date",
format(val, row) {
return date2Thai(row.date)
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (v) => date2Thai(v),
},
{
name: "oc",
name: "amount",
align: "left",
label: "สังกัด",
label: "เงินเดือน",
sortable: true,
field: "oc",
field: "amount",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (v) => Number(v).toLocaleString(),
},
{
name: "position",
name: "positionSalaryAmount",
align: "left",
label: "ตำแหน่ง",
label: "เงินประจำตำแหน่ง",
sortable: true,
field: "position",
field: "positionSalaryAmount",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (v) => Number(v).toLocaleString(),
},
{
name: "mouthSalaryAmount",
align: "left",
label: "เงินค่าตอบแทนรายเดือน",
sortable: true,
field: "mouthSalaryAmount",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (v) => Number(v).toLocaleString(),
},
{
name: "posNo",
align: "left",
@ -97,57 +108,41 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "lineWork",
align: "left",
label: "สายงาน",
sortable: true,
field: "lineWork",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "side",
align: "left",
label: "ด้าน/สาขา",
sortable: true,
field: "side",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionType",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "level",
name: "positionLevel",
align: "left",
label: "ระดับ",
sortable: true,
field: "level",
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "templateDoc",
align: "left",
label: "เอกสารอ้างอิง",
sortable: true,
field: "templateDoc",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionsAdministrative ",
name: "refCommandNo",
align: "left",
label: "ตำแหน่งทางการบริหาร",
label: "เลขที่คำสั่ง",
sortable: true,
field: "positionsAdministrative",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "aspectAdministrative",
align: "left",
label: "ด้านทางการบริหาร",
sortable: true,
field: "aspectAdministrative",
field: "refCommandNo",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -227,8 +222,9 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
name: "receivedDate",
align: "center",
label: "วันที่ได้รับ",
sortable: true,
field: "receivedDate",
field: (value) => date2Thai(value),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -242,7 +238,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
style: "font-size: 14px",
},
{
name: "datail",
name: "detail",
align: "left",
label: "รายละเอียด",
sortable: true,
@ -260,11 +256,11 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
style: "font-size: 14px",
},
{
name: "doc",
name: "doce",
align: "left",
label: "เอกสารอ้างอิง",
sortable: true,
field: "doc",
field: (value) => date2Thai(value),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},