updated
This commit is contained in:
parent
c7cda1c7ba
commit
8b2819d634
6 changed files with 109 additions and 54 deletions
|
|
@ -51,28 +51,28 @@ const sumResult = computed(() => {
|
|||
const group = computed(() => {
|
||||
return convert(sumResult.value);
|
||||
});
|
||||
const options = ref<any[]>([
|
||||
{
|
||||
label: "ดีเด่น (คะแนนร้อยละ ๙๐.๐๐ ขึ้นไป)",
|
||||
value: "EXCELLENT",
|
||||
},
|
||||
{
|
||||
label: "ดีมาก (คะแนนร้อยละ ๘๐.๐๐ - ๘๙.๙๙)",
|
||||
value: "VERYGOOD",
|
||||
},
|
||||
{
|
||||
label: "ดี (คะแนนร้อยละ ๗๐.๐๐ - ๗๙.๙๙)",
|
||||
value: "GOOD",
|
||||
},
|
||||
{
|
||||
label: "พอใช้ (คะแนนร้อยละ ๖๐.๐๐ - ๖๙.๙๙)",
|
||||
value: "FAIR",
|
||||
},
|
||||
{
|
||||
label: "ต้องปรับปรุง (คะแนนต่ำกว่าร้อยละ ๖๐.๐๐)",
|
||||
value: "IMPROVEMENT",
|
||||
},
|
||||
]);
|
||||
// const options = ref<any[]>([
|
||||
// {
|
||||
// label: "ดีเด่น (คะแนนร้อยละ ๙๐.๐๐ ขึ้นไป)",
|
||||
// value: "EXCELLENT",
|
||||
// },
|
||||
// {
|
||||
// label: "ดีมาก (คะแนนร้อยละ ๘๐.๐๐ - ๘๙.๙๙)",
|
||||
// value: "VERYGOOD",
|
||||
// },
|
||||
// {
|
||||
// label: "ดี (คะแนนร้อยละ ๗๐.๐๐ - ๗๙.๙๙)",
|
||||
// value: "GOOD",
|
||||
// },
|
||||
// {
|
||||
// label: "พอใช้ (คะแนนร้อยละ ๖๐.๐๐ - ๖๙.๙๙)",
|
||||
// value: "FAIR",
|
||||
// },
|
||||
// {
|
||||
// label: "ต้องปรับปรุง (คะแนนต่ำกว่าร้อยละ ๖๐.๐๐)",
|
||||
// value: "IMPROVEMENT",
|
||||
// },
|
||||
// ]);
|
||||
|
||||
function convert(score: any): string {
|
||||
if (score >= 90) {
|
||||
|
|
@ -120,7 +120,7 @@ function onSubmitCommander() {
|
|||
showLoader();
|
||||
http
|
||||
.put(config.API.kpiSendToReason(id.value, "commander"), {
|
||||
isReason: superiorCommentCheck.value,
|
||||
isReason: superiorCommentCheck.value == "true" ? true : false,
|
||||
reason: superiorComment.value,
|
||||
})
|
||||
.then((res) => {
|
||||
|
|
@ -145,7 +145,7 @@ function onSubmitCommanderHigh() {
|
|||
showLoader();
|
||||
http
|
||||
.put(config.API.kpiSendToReason(id.value, "commanderHigh"), {
|
||||
isReason: additionalSuperiorCheck.value,
|
||||
isReason: additionalSuperiorCheck.value == "true" ? true : false,
|
||||
reason: additionalSuperiorComment.value,
|
||||
})
|
||||
.then((res) => {
|
||||
|
|
@ -180,7 +180,7 @@ async function fetchEvaluation() {
|
|||
const data = res.data.result;
|
||||
store.dataEvaluation = await data;
|
||||
|
||||
if (data.profileId == store.dataProfile.id) {
|
||||
if (data.profileId == store.dataProfile.profileId) {
|
||||
userOpen();
|
||||
}
|
||||
})
|
||||
|
|
@ -207,10 +207,14 @@ function getData() {
|
|||
developmentMethod.value = data.developEvaluator;
|
||||
developmentPeriod.value = data.timeEvaluator;
|
||||
evaluatorComment.value = data.reasonEvaluator;
|
||||
superiorCommentCheck.value = data.isReasonCommander.toString();
|
||||
superiorCommentCheck.value = data.isReasonCommander
|
||||
? data.isReasonCommander.toString()
|
||||
: "";
|
||||
superiorComment.value = data.reasonCommander;
|
||||
|
||||
additionalSuperiorCheck.value = data.isReasonCommanderHigh.toString();
|
||||
additionalSuperiorCheck.value = data.isReasonCommanderHigh
|
||||
? data.isReasonCommanderHigh.toString()
|
||||
: "";
|
||||
additionalSuperiorComment.value = data.reasonCommanderHigh;
|
||||
result1.value = data.totalPoint1;
|
||||
result2.value = data.totalPoint2_1 + data.totalPoint2_2;
|
||||
|
|
@ -227,6 +231,7 @@ onMounted(() => {
|
|||
fetchEvaluation();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="q-pa-sm">
|
||||
<!-- 1-4 สรุปผลการประเมิน -->
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useKpiDataStore } from "@/modules/08_KPI/store";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import Assessment from "@/modules/08_KPI/components/Tab/01_Assessment.vue";
|
||||
import Result from "@/modules/08_KPI/components/Tab/04_Result.vue";
|
||||
import CommanderAbove from "@/modules/08_KPI/components/Tab/03_CommanderAbove.vue";
|
||||
import CommanderAboveOneStep from "@/modules/08_KPI/components/Tab/04_CommanderAboveOneStep.vue";
|
||||
// import CommanderAbove from "@/modules/08_KPI/components/Tab/03_CommanderAbove.vue";
|
||||
// import CommanderAboveOneStep from "@/modules/08_KPI/components/Tab/04_CommanderAboveOneStep.vue";
|
||||
import File from "@/modules/08_KPI/components/Tab/05_File.vue";
|
||||
|
||||
const store = useKpiDataStore();
|
||||
|
|
@ -63,7 +63,16 @@ const splitterModel = ref<number>(12);
|
|||
label="รายงานผลสำเร็จของงาน"
|
||||
:disable="store.tabOpen < 3"
|
||||
/>
|
||||
<q-tab name="4" label="สรุปผลการประเมิน" :disable="store.tabOpen < 4" />
|
||||
<q-tab
|
||||
name="4"
|
||||
label="สรุปผลการประเมิน"
|
||||
:disable="
|
||||
store.tabOpen < 4 ||
|
||||
(store.tabOpen == 4 &&
|
||||
store.rolePerson === 'USER' &&
|
||||
store.dataEvaluation.evaluationStatus != 'COMPLETE')
|
||||
"
|
||||
/>
|
||||
<q-tab name="5" label="ไฟล์เอกสาร" />
|
||||
</q-tabs>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -268,9 +268,6 @@ const isEditStep3 = computed(() => {
|
|||
store.rolePerson === "USER" &&
|
||||
store.tabMain === "3") ||
|
||||
(store.dataEvaluation.evaluationStatus === "EVALUATING_EVALUATOR" &&
|
||||
store.rolePerson === "EVALUATOR" &&
|
||||
store.tabMain === "3") ||
|
||||
(store.dataEvaluation.evaluationStatus === "EVALUATING" &&
|
||||
store.rolePerson === "EVALUATOR" &&
|
||||
store.tabMain === "3")
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue