API ประเมืน
This commit is contained in:
parent
0e5d15dc7c
commit
257b4a1424
16 changed files with 700 additions and 186 deletions
|
|
@ -4,6 +4,10 @@ const props = defineProps({
|
|||
type: Array as () => any[],
|
||||
require: true,
|
||||
},
|
||||
row: {
|
||||
type: Array as () => any[],
|
||||
require: true,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -14,6 +18,7 @@ const props = defineProps({
|
|||
bordered
|
||||
class="custom-header-table"
|
||||
:columns="props.columns"
|
||||
:rows="props.row"
|
||||
dense
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
style="width: 625px"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,11 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import type {
|
||||
EducationForm,
|
||||
CertificatesForm,
|
||||
} from "@/modules/06_evaluate/interface/evalute";
|
||||
|
||||
import TableData from "@/modules/06_evaluate/components/viewstep/tableStep1.vue";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -15,31 +20,31 @@ const $q = useQuasar();
|
|||
|
||||
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
||||
const {
|
||||
columnsLicense,
|
||||
columnPeriodhistory,
|
||||
columnTrainingHistory,
|
||||
columnsCertificates,
|
||||
columnSalaries,
|
||||
columnTraining,
|
||||
columnProjectsProposed,
|
||||
} = store;
|
||||
|
||||
const emit = defineEmits(["update:formDeital"]);
|
||||
|
||||
const formDetail = reactive({
|
||||
UserId: "",
|
||||
CitizenId: "",
|
||||
Prefix: "",
|
||||
FullName: "",
|
||||
Position: "",
|
||||
Oc: "",
|
||||
Salary: "",
|
||||
PositionLevel: "",
|
||||
PosNo: "",
|
||||
BirthDate: "",
|
||||
GovAge: "",
|
||||
Educations: [],
|
||||
Certificates: [],
|
||||
Salaries: [],
|
||||
Trainings: [],
|
||||
Assessments: [],
|
||||
userId: "",
|
||||
citizenId: "",
|
||||
prefix: "",
|
||||
fullName: "",
|
||||
position: "",
|
||||
oc: "",
|
||||
salary: "",
|
||||
positionLevel: "",
|
||||
posNo: "",
|
||||
birthDate: "",
|
||||
govAge: "",
|
||||
educations: [] as EducationForm[],
|
||||
certificates: [],
|
||||
salaries: [],
|
||||
trainings: [],
|
||||
assessments: [],
|
||||
// Type: "",
|
||||
// Step: "",
|
||||
});
|
||||
|
|
@ -50,25 +55,70 @@ async function fetchDetail() {
|
|||
.get(config.API.evaluationDetail())
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formDetail.UserId = data.id;
|
||||
formDetail.CitizenId = data.citizenId;
|
||||
formDetail.Prefix = data.prefix;
|
||||
formDetail.FullName = `${data.firstName} ${data.lastName}`;
|
||||
formDetail.Position = data.position;
|
||||
formDetail.Oc = data.oc;
|
||||
formDetail.Salary = data.salary;
|
||||
formDetail.PositionLevel = data.positionLevel;
|
||||
formDetail.PosNo = data.posNo;
|
||||
formDetail.BirthDate = data.birthDate && date2Thai(data.birthDate);
|
||||
formDetail.GovAge = data.govAge;
|
||||
formDetail.Educations = data.educations;
|
||||
formDetail.Certificates = data.certificates;
|
||||
formDetail.Salaries = data.salaries;
|
||||
formDetail.Trainings = data.trainings;
|
||||
formDetail.Assessments = data.assessments;
|
||||
formDetail.userId = data.id;
|
||||
formDetail.citizenId = data.citizenId;
|
||||
formDetail.prefix = data.prefix;
|
||||
formDetail.fullName = `${data.firstName} ${data.lastName}`;
|
||||
formDetail.position = data.position;
|
||||
formDetail.oc = data.oc;
|
||||
formDetail.salary = data.salary;
|
||||
formDetail.positionLevel = data.positionLevel;
|
||||
formDetail.posNo = data.posNo;
|
||||
formDetail.birthDate = data.birthDate && date2Thai(data.birthDate);
|
||||
formDetail.govAge = data.govAge;
|
||||
formDetail.educations = data.educations;
|
||||
|
||||
formDetail.certificates = data.certificates.map(
|
||||
(e: CertificatesForm) => ({
|
||||
certificateNo: e.certificateNo,
|
||||
certificateType: e.certificateType,
|
||||
expireDate: date2Thai(e.expireDate),
|
||||
issueDate: date2Thai(e.issueDate),
|
||||
issuer: e.issuer,
|
||||
})
|
||||
);
|
||||
formDetail.salaries = data.salaries.map((e: any) => ({
|
||||
amount: e.amount,
|
||||
date: date2Thai(e.date),
|
||||
mouthSalaryAmount: e.mouthSalaryAmount ? e.mouthSalaryAmount : 0,
|
||||
posNo: e.posNo,
|
||||
position: e.position,
|
||||
positionSalaryAmount: e.positionSalaryAmount
|
||||
? e.positionSalaryAmount
|
||||
: 0,
|
||||
refCommandDate: e.refCommandDate ? e.refCommandDate : "",
|
||||
|
||||
refCommandNo: e.refCommandNo ? e.refCommandNo : "",
|
||||
salaryClass: e.salaryClass ? e.salaryClass : "",
|
||||
salaryRef: e.salaryRef ? e.salaryRef : "",
|
||||
salaryStatus: e.salaryStatus ? e.salariesStatus : "",
|
||||
//
|
||||
oc: "-",
|
||||
lineWork: "-",
|
||||
side: "-",
|
||||
positionType: "-",
|
||||
level: "-",
|
||||
positionsAdministrative: "-",
|
||||
aspectAdministrative: "-",
|
||||
}));
|
||||
formDetail.trainings = data.trainings.map((e: any) => ({
|
||||
dateOrder: date2Thai(e.dateOrder),
|
||||
department: e.department,
|
||||
duration: e.duration,
|
||||
endDate: date2Thai(e.endDate),
|
||||
name: e.name,
|
||||
numberOrder: e.numberOrder,
|
||||
place: e.place,
|
||||
startDate: date2Thai(e.startDate),
|
||||
topic: e.topic,
|
||||
yearly: e.yearly,
|
||||
}));
|
||||
formDetail.assessments = data.assessments;
|
||||
// fromDetail.Type = data.
|
||||
// fromDetail.Step = data.
|
||||
|
||||
console.log(formDetail);
|
||||
|
||||
emit("update:formDeital", data);
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -99,7 +149,7 @@ onMounted(async () => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
:model-value="formDetail.Prefix"
|
||||
:model-value="formDetail.prefix"
|
||||
label="คำนำหน้าชื่อ"
|
||||
></q-input>
|
||||
</div>
|
||||
|
|
@ -107,14 +157,14 @@ onMounted(async () => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
:model-value="formDetail.FullName"
|
||||
:model-value="formDetail.fullName"
|
||||
label="ชื่อ - นามสกุล"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">
|
||||
<q-input
|
||||
borderless
|
||||
:model-value="formDetail.BirthDate"
|
||||
:model-value="formDetail.birthDate"
|
||||
readonly
|
||||
label="วันเดือนปีเกิด"
|
||||
>
|
||||
|
|
@ -127,7 +177,7 @@ onMounted(async () => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
:model-value="formDetail.Position"
|
||||
:model-value="formDetail.position"
|
||||
label="ตำแหน่ง"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -135,7 +185,7 @@ onMounted(async () => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
:model-value="formDetail.PosNo"
|
||||
:model-value="formDetail.posNo"
|
||||
label="ตำแหน่งเลขที่"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -143,7 +193,7 @@ onMounted(async () => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
:model-value="formDetail.Oc"
|
||||
:model-value="formDetail.oc"
|
||||
label="สังกัด"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -151,7 +201,7 @@ onMounted(async () => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
:model-value="formDetail.Salary"
|
||||
:model-value="formDetail.salary"
|
||||
label="เงินเดือน"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -160,7 +210,7 @@ onMounted(async () => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
:model-value="formDetail.PositionLevel"
|
||||
:model-value="formDetail.positionLevel"
|
||||
label="ระดับปัจจุบัน"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -169,7 +219,7 @@ onMounted(async () => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
:model-value="formDetail.PositionLevel"
|
||||
:model-value="formDetail.positionLevel"
|
||||
label="ระดับที่ประเมิน"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -178,7 +228,7 @@ onMounted(async () => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
:model-value="formDetail.GovAge"
|
||||
:model-value="formDetail.govAge"
|
||||
label="อายุราชการ"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -187,15 +237,19 @@ onMounted(async () => {
|
|||
|
||||
<q-card bordered style="border: 1px solid #d6dee1">
|
||||
<div class="text-weight-bold row items-center bg-grey-2">
|
||||
<span class="q-ml-lg q-my-sm">ประวัติการศึกษา</span>
|
||||
<span class="q-ml-lg q-my-sm">ประวัติการศึกษา </span>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div class="row q-pa-sm">
|
||||
<div
|
||||
class="row q-pa-sm"
|
||||
v-for="(education, index) in formDetail.educations"
|
||||
:key="index"
|
||||
>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">
|
||||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
model-value="ปริญญาตรี"
|
||||
:model-value="education.educationLevel"
|
||||
label="ระดับศึกษา"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -204,7 +258,7 @@ onMounted(async () => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
model-value="มหาวิทยาลัยก."
|
||||
:model-value="education.institute"
|
||||
label="สถานศึกษา"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -212,7 +266,7 @@ onMounted(async () => {
|
|||
<div class="col-xs-6 col-sm-4 col-md-3">
|
||||
<q-input
|
||||
borderless
|
||||
model-value="19/03/44"
|
||||
:model-value="date2Thai(education.startDate)"
|
||||
readonly
|
||||
label="ตั้งแต่"
|
||||
>
|
||||
|
|
@ -223,7 +277,12 @@ onMounted(async () => {
|
|||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">
|
||||
<q-input borderless model-value="19/03/44" readonly label="ถึง">
|
||||
<q-input
|
||||
borderless
|
||||
:model-value="date2Thai(education.endDate)"
|
||||
readonly
|
||||
label="ถึง"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon class="size-icon" name="o_calendar_today" />
|
||||
</template>
|
||||
|
|
@ -232,7 +291,7 @@ onMounted(async () => {
|
|||
<div class="col-xs-6 col-sm-4 col-md-3">
|
||||
<q-input
|
||||
borderless
|
||||
model-value="19/03/44"
|
||||
:model-value="date2Thai(education.finishDate)"
|
||||
readonly
|
||||
label="วันทราสำเร็จการศึกษา"
|
||||
>
|
||||
|
|
@ -246,7 +305,7 @@ onMounted(async () => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
model-value="ปริญญาตรี"
|
||||
:model-value="education.degree"
|
||||
label="วุฒิการศึกษาในตําแหน่ง"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -255,7 +314,7 @@ onMounted(async () => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
model-value="ปริญญาตรี"
|
||||
:model-value="education.degree"
|
||||
label="วุฒิการศึกษา"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -264,27 +323,38 @@ onMounted(async () => {
|
|||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
model-value="-"
|
||||
:model-value="education.field"
|
||||
label="สาขาวิชา/ทาง"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">
|
||||
<q-input borderless readonly model-value="-" label="ทุน" />
|
||||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
:model-value="education.fundName"
|
||||
label="ทุน"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">
|
||||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
model-value="3.33"
|
||||
:model-value="education.gpa"
|
||||
label="เกรดเฉลี่ย"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-4 col-md-6">
|
||||
<q-input borderless readonly model-value="ไทย" label="ประเทศ" />
|
||||
<q-input
|
||||
borderless
|
||||
readonly
|
||||
:model-value="education.country"
|
||||
label="ประเทศ"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<q-separator />
|
||||
</q-card>
|
||||
|
||||
<q-card bordered style="border: 1px solid #d6dee1">
|
||||
|
|
@ -294,7 +364,10 @@ onMounted(async () => {
|
|||
<q-separator />
|
||||
<div class="row q-pa-sm">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<TableData :columns="columnsLicense" />
|
||||
<TableData
|
||||
:columns="columnsCertificates"
|
||||
:row="formDetail.certificates"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
|
@ -306,7 +379,7 @@ onMounted(async () => {
|
|||
<q-separator />
|
||||
<div class="row q-pa-sm">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<TableData :columns="columnPeriodhistory" />
|
||||
<TableData :columns="columnSalaries" :row="formDetail.salaries" />
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
|
@ -318,7 +391,10 @@ onMounted(async () => {
|
|||
<q-separator />
|
||||
<div class="row q-pa-sm">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<TableData :columns="columnTrainingHistory" />
|
||||
<TableData
|
||||
:columns="columnTraining"
|
||||
:row="formDetail.trainings"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
|
@ -330,7 +406,10 @@ onMounted(async () => {
|
|||
<q-separator />
|
||||
<div class="row q-pa-sm">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<TableData :columns="columnTrainingHistory" />
|
||||
<!-- <TableData
|
||||
:columns="columnTraining"
|
||||
:row="formDetail.Trainings"
|
||||
/> -->
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
import ViewPDF from "@/modules/06_evaluate/components/viewstep/viewPDF.vue";
|
||||
|
||||
import { useEvaluateStore } from "@/modules/06_evaluate/store";
|
||||
|
||||
const store = useEvaluateStore();
|
||||
const props = defineProps({
|
||||
pdfSrc: {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-tab-panels v-model="store.tabPanels" animated swipeable vertical>
|
||||
<q-tab-panel name="1">
|
||||
<ViewPDF />
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
<ViewPDF :pdfSrc="props.pdfSrc" />
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue