updated
This commit is contained in:
parent
eb74d42767
commit
1739f5bae3
5 changed files with 75 additions and 62 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive,watch,onMounted } from "vue";
|
||||
import { ref, reactive, watch, onMounted } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
|
|
@ -109,7 +109,7 @@ function onSubmit() {
|
|||
http
|
||||
.post(config.API.evaluationExpertise, formData)
|
||||
.then((res) => {
|
||||
router.push(`/evaluate/detail/expertise/${res.data.result.id}`)
|
||||
router.push(`/evaluate/detail/expertise/${res.data.result.id}`);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -230,7 +230,6 @@ async function onClickDowloadFile(
|
|||
};
|
||||
await genReport(body, fileName); //สร้างไฟล์ต้นแบบ
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -373,7 +372,7 @@ async function onClickDowloadFile(
|
|||
</q-card>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<!-- <div class="col-12">
|
||||
<q-card bordered>
|
||||
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||
ดาวน์โหลดเอกสาร
|
||||
|
|
@ -416,7 +415,7 @@ async function onClickDowloadFile(
|
|||
</q-item>
|
||||
</q-list>
|
||||
</q-card>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<q-separator />
|
||||
|
||||
|
|
|
|||
|
|
@ -228,8 +228,8 @@ onMounted(() => {
|
|||
/>
|
||||
</template>
|
||||
|
||||
<style >
|
||||
.listItem{
|
||||
<style>
|
||||
.listItem {
|
||||
padding: 5px 0px !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ const formDetail = reactive({
|
|||
async function fetchDetail() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.evaluationDetail())
|
||||
.get(config.API.positionBykeycloak())
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formDetail.userId = data.id;
|
||||
|
|
@ -71,59 +71,71 @@ async function fetchDetail() {
|
|||
formDetail.prefix = data.prefix;
|
||||
formDetail.fullName = `${data.firstName} ${data.lastName}`;
|
||||
formDetail.position = data.position;
|
||||
formDetail.oc = data.oc;
|
||||
formDetail.salary = data.salary ? formattedNumber(data.salary) : "";
|
||||
formDetail.positionLevel = data.positionLevel;
|
||||
formDetail.posNo = data.posNo;
|
||||
formDetail.oc = data.rootShortName;
|
||||
// formDetail.salary = data.salary ? formattedNumber(data.salary) : ""; // ยังไม่มี
|
||||
formDetail.positionLevel = data.posLevelName;
|
||||
formDetail.posNo = data.rootShortName + data.posMasterNo;
|
||||
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 : "",
|
||||
formDetail.govAge = data.govAge; // ยังไม่มี
|
||||
|
||||
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;
|
||||
http.get(config.API.dataUserEducations).then((res) => {
|
||||
formDetail.educations = res.data.result;
|
||||
});
|
||||
|
||||
http.get(config.API.dataUserCertificate("certificate")).then((res) => {
|
||||
formDetail.certificates = res.data.result.map(
|
||||
(e: CertificatesForm) => ({
|
||||
certificateNo: e.certificateNo,
|
||||
certificateType: e.certificateType,
|
||||
expireDate: date2Thai(e.expireDate),
|
||||
issueDate: date2Thai(e.issueDate),
|
||||
issuer: e.issuer,
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
http.get(config.API.dataUserSalary).then((res) => {
|
||||
formDetail.salaries = res.data.result.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: "-",
|
||||
}));
|
||||
});
|
||||
|
||||
http.get(config.API.dataUserCertificate("training")).then((res) => {
|
||||
formDetail.trainings = res.data.result.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;
|
||||
emit("update:formDeital", data);
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@ const evaluateMain = () =>
|
|||
import("@/modules/06_evaluate/views/EvaluateMain.vue");
|
||||
const evaluateStep = () =>
|
||||
import("@/modules/06_evaluate/components/EvaluateStepMain.vue");
|
||||
const expertPage = () => import('@/modules/06_evaluate/components/ExpertPage.vue')
|
||||
const expertPageDetail = () => import('@/modules/06_evaluate/components/ExpertPageDetail.vue')
|
||||
const expertPage = () =>
|
||||
import("@/modules/06_evaluate/components/ExpertPage.vue");
|
||||
const expertPageDetail = () =>
|
||||
import("@/modules/06_evaluate/components/ExpertPageDetail.vue");
|
||||
export default [
|
||||
{
|
||||
path: "/evaluate",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue