Merge branch 'develop' into devTee
This commit is contained in:
commit
5e8c8589cb
14 changed files with 363 additions and 124 deletions
|
|
@ -15,11 +15,10 @@ const KpiUser = `${env.API_URI}/kpi/user`;
|
|||
const kpiAchievement = `${env.API_URI}/kpi/user/achievement`;
|
||||
const kpiReason = `${env.API_URI}/kpi/reason`;
|
||||
|
||||
|
||||
// const placementKeycloak = `${env.API_URI}/placement/officer/keycloak`;
|
||||
const placementKeycloak = `${env.API_URI}/placement/officer/profileId`;
|
||||
// const orgPosition = `${env.API_URI}/org/profile/keycloak/position `;
|
||||
const orgPosition = `${env.API_URI}/org/profile/profileid/position`;
|
||||
const orgPosition = `${env.API_URI}/org/profile/profileid/position`;
|
||||
export default {
|
||||
kpiPeriod,
|
||||
kpiEvaluation,
|
||||
|
|
@ -51,9 +50,13 @@ export default {
|
|||
/**ประเมิน*/
|
||||
kpiAchievementDevelop: `${kpiAchievement}/development`,
|
||||
|
||||
kpiCommentP:(typP:string,type:string,role:string,id:string)=>`${kpiReason}/${typP}/${type}/${role}/${id}`,
|
||||
kpiCommentP: (typP: string, type: string, role: string, id: string) =>
|
||||
`${kpiReason}/${typP}/${type}/${role}/${id}`,
|
||||
|
||||
placementKeycloak,
|
||||
orgPosition,
|
||||
sendToCommander:`${KpiUser}/evaluation/admin/change-status`
|
||||
sendToCommander: `${KpiUser}/evaluation/admin/change-status`,
|
||||
sendToSummary: (id: string) => `${kpiEvaluation}/summary/${id}`,
|
||||
updatePoint: (id: string) => `${kpiEvaluation}/point/${id}`,
|
||||
openPoint: (id: string) => `${kpiEvaluation}/open/${id}`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -152,10 +152,6 @@ function fetchAssigned() {
|
|||
});
|
||||
}
|
||||
|
||||
function onInfo() {
|
||||
modalCriteria.value = true;
|
||||
}
|
||||
|
||||
function getCriteria() {
|
||||
http
|
||||
.get(config.API.KpiEvaluationInfo)
|
||||
|
|
@ -195,6 +191,24 @@ watch(
|
|||
|
||||
store.indicatorScoreVal =
|
||||
store.indicatorPercentVal * (store.indicatorScore / 100);
|
||||
|
||||
if (
|
||||
store.isUpdate &&
|
||||
store.tabMain === "3" &&
|
||||
(store.dataEvaluation.evaluationStatus === "EVALUATOR" ||
|
||||
store.dataEvaluation.evaluationStatus === "EVALUATING_EVALUATOR")
|
||||
) {
|
||||
http
|
||||
.put(config.API.updatePoint(evaluationId.value), {
|
||||
totalPoint1: store.indicatorScoreVal.toFixed(2),
|
||||
summaryPoint: (
|
||||
store.indicatorScoreVal +
|
||||
store.competencyScoreVal +
|
||||
store.devScoreVal
|
||||
).toFixed(2),
|
||||
})
|
||||
.then((res) => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
@ -221,7 +235,12 @@ onMounted(() => {
|
|||
</div>
|
||||
<div class="q-gutter-md q-mt-sm">
|
||||
<!-- องค์ประกอบที่ 1 -->
|
||||
<div v-if="store.dataEvaluation.posExecutiveName != null">
|
||||
<div
|
||||
v-if="
|
||||
store.dataEvaluation.posTypeName == 'อำนวยการ' &&
|
||||
store.dataEvaluation.posTypeName == 'บริหาร'
|
||||
"
|
||||
>
|
||||
<Work
|
||||
v-model:data="rows_01"
|
||||
:title="`มิติที่ 1 ภารกิจตามนโยบายและยุทธศาสตร์ของกรุงเทพมหานคร`"
|
||||
|
|
@ -419,7 +438,8 @@ onMounted(() => {
|
|||
:rows="[
|
||||
{
|
||||
name: `สรุปผลการประเมินสมรรถนะ (คะแนนเต็ม ${
|
||||
!store.dataEvaluation.posExecutiveName
|
||||
store.dataEvaluation.posTypeName != 'อำนวยการ' &&
|
||||
store.dataEvaluation.posTypeName != 'บริหาร'
|
||||
? store.competencyScore
|
||||
: store.excusiveCompetencyScore
|
||||
} คะแนน)`,
|
||||
|
|
@ -446,7 +466,12 @@ onMounted(() => {
|
|||
class="q-mt-xs q-mb-md"
|
||||
/>
|
||||
|
||||
<div v-if="!store.dataEvaluation.posExecutiveName">
|
||||
<div
|
||||
v-if="
|
||||
store.dataEvaluation.posTypeName != 'อำนวยการ' &&
|
||||
store.dataEvaluation.posTypeName != 'บริหาร'
|
||||
"
|
||||
>
|
||||
<Develop />
|
||||
|
||||
<div v-if="isShowScore">
|
||||
|
|
@ -484,7 +509,10 @@ onMounted(() => {
|
|||
|
||||
<div v-if="isShowScore">
|
||||
<div
|
||||
v-if="store.dataEvaluation.posExecutiveName == null"
|
||||
v-if="
|
||||
store.dataEvaluation.posTypeName != 'อำนวยการ' &&
|
||||
store.dataEvaluation.posTypeName != 'บริหาร'
|
||||
"
|
||||
class="row text-body2 text-weight-bold"
|
||||
>
|
||||
<div class="col-12 text-center row justify-center">
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ const additionalSuperiorComment = ref<string>("");
|
|||
const superiorCommentCheck = ref<string>("");
|
||||
const additionalSuperiorCheck = ref<string>("");
|
||||
|
||||
const weight1 = ref<number>(10);
|
||||
const weight1 = ref<number>(0);
|
||||
const result1 = ref<number>(0);
|
||||
const weight2 = ref<number>(50);
|
||||
const result2 = ref<number>(60);
|
||||
const weight2 = ref<number>(0);
|
||||
const result2 = ref<number>(0);
|
||||
const sumWeight = computed(() => {
|
||||
return weight1.value + weight2.value;
|
||||
});
|
||||
|
|
@ -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) => {
|
||||
|
|
@ -179,6 +179,10 @@ async function fetchEvaluation() {
|
|||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
store.dataEvaluation = await data;
|
||||
|
||||
if (data.profileId == store.dataProfile.profileId) {
|
||||
userOpen();
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -188,6 +192,12 @@ async function fetchEvaluation() {
|
|||
});
|
||||
}
|
||||
|
||||
function userOpen() {
|
||||
http.get(config.API.openPoint(id.value)).then(async (res) => {
|
||||
// success($q, "เปิดการประเมินสำเร็จ");
|
||||
});
|
||||
}
|
||||
|
||||
function getData() {
|
||||
http
|
||||
.get(config.API.kpiSendToGet(id.value))
|
||||
|
|
@ -197,14 +207,19 @@ 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
|
||||
|
||||
result1.value = data.totalPoint1;
|
||||
result2.value = data.totalPoint2_1 + data.totalPoint2_2;
|
||||
weight1.value = data.weightPoint1;
|
||||
weight2.value = data.weightPoint2;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -216,6 +231,7 @@ onMounted(() => {
|
|||
fetchEvaluation();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="q-pa-sm">
|
||||
<!-- 1-4 สรุปผลการประเมิน -->
|
||||
|
|
@ -456,7 +472,10 @@ onMounted(() => {
|
|||
lazy-rules
|
||||
v-model="superiorComment"
|
||||
outlined
|
||||
:readonly="superiorCommentCheck == 'true'||store.dataEvaluation.evaluationStatus !== 'SUMMARY_COMMANDER'"
|
||||
:readonly="
|
||||
superiorCommentCheck == 'true' ||
|
||||
store.dataEvaluation.evaluationStatus !== 'SUMMARY_COMMANDER'
|
||||
"
|
||||
type="textarea"
|
||||
label="ความเห็นของผู้บังคับบัญชาเหนือขึ้นไป"
|
||||
hide-bottom-space
|
||||
|
|
|
|||
|
|
@ -18,7 +18,14 @@ const numLevel = ref<string>("");
|
|||
const store = useKpiDataStore();
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { dialogConfirm, showLoader, hideLoader, messageError, success,dialogMessageNotify } = mixin;
|
||||
const {
|
||||
dialogConfirm,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
dialogMessageNotify,
|
||||
} = mixin;
|
||||
|
||||
const check = ref<string>("");
|
||||
const rows = defineModel<any>("rows");
|
||||
|
|
@ -87,19 +94,18 @@ function clickList(index: string, data: any) {
|
|||
|
||||
function onSubmitAdd() {
|
||||
// type
|
||||
if (numLevel.value == "") {
|
||||
dialogMessageNotify($q,'กรุณาเลือกคะแนน')
|
||||
if (
|
||||
numLevel.value == "" &&
|
||||
type.value != "capacity" &&
|
||||
type.value != "development"
|
||||
) {
|
||||
dialogMessageNotify($q, "กรุณาเลือกคะแนน");
|
||||
} else {
|
||||
dialogConfirm($q, () => {
|
||||
showLoader();
|
||||
http
|
||||
.put(
|
||||
config.API.kpiCommentP(
|
||||
"progress",
|
||||
type.value,
|
||||
store.rolePerson.toLocaleLowerCase(),
|
||||
idList.value
|
||||
),
|
||||
config.API.kpiCommentP("progress", type.value, "user", idList.value),
|
||||
{
|
||||
reason: formDataAdd.reason,
|
||||
topic: formDataAdd.topic,
|
||||
|
|
@ -139,6 +145,7 @@ function closeAdd() {
|
|||
modalAdd.value = false;
|
||||
formDataAdd.topic = "";
|
||||
formDataAdd.reason = "";
|
||||
numLevel.value = "";
|
||||
}
|
||||
|
||||
function getList() {
|
||||
|
|
@ -246,6 +253,13 @@ watch(
|
|||
<template v-slot:before>
|
||||
<div class="q-pa-sm">
|
||||
<q-btn
|
||||
v-if="
|
||||
type == 'capacity' ||
|
||||
type == 'development' ||
|
||||
(type != 'capacity' &&
|
||||
type != 'development' &&
|
||||
store.rolePerson == 'USER')
|
||||
"
|
||||
icon="add"
|
||||
color="teal"
|
||||
flat
|
||||
|
|
@ -263,7 +277,12 @@ watch(
|
|||
}}</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-card bordered flat class="no-shadow bg-white col-12">
|
||||
<q-card
|
||||
bordered
|
||||
flat
|
||||
class="no-shadow bg-white col-12"
|
||||
style="min-height: 300px"
|
||||
>
|
||||
<div class="row q-px-md q-py-sm items-center bg-grey-1">
|
||||
<div class="col-12">
|
||||
<span>{{
|
||||
|
|
@ -356,11 +375,15 @@ watch(
|
|||
<div class="col-4 text-grey-6">ผู้สร้าง</div>
|
||||
<div class="col-8">{{ formDataView.createdFullName }}</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-separator />
|
||||
</div>
|
||||
|
||||
<div if="type == 'capacity' || type == 'development'">
|
||||
<div
|
||||
class="col-12"
|
||||
v-if="type != 'capacity' && type != 'development'"
|
||||
>
|
||||
<div class="col-12">
|
||||
<q-separator />
|
||||
</div>
|
||||
|
||||
<!-- ความคิดเห็นของผู้ประเมิน -->
|
||||
<q-form
|
||||
v-if="store.dataEvaluation.evaluatorId"
|
||||
|
|
@ -572,6 +595,10 @@ watch(
|
|||
class="col-12"
|
||||
v-if="type !== 'capacity' && type !== 'development'"
|
||||
>
|
||||
<div class="col-12">
|
||||
<q-label class="text-grey-6">คะแนนความก้าวหน้า</q-label>
|
||||
</div>
|
||||
|
||||
<q-btn-group outline>
|
||||
<q-btn
|
||||
v-for="i in 5"
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ function onSubmit() {
|
|||
dialogConfirm($q, async () => {
|
||||
try {
|
||||
showLoader();
|
||||
console.log(rows.value);
|
||||
store.isUpdate = true;
|
||||
|
||||
const formData = rows.value.map((e: any) => ({
|
||||
id: e.id,
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ function onSubmit() {
|
|||
dialogMessageNotify($q, "กรุณาเลือกระดับคะแนนตามเกณฑ์การประเมิน");
|
||||
} else {
|
||||
dialogConfirm($q, () => {
|
||||
store.isUpdate = true;
|
||||
const data = rows.value;
|
||||
const body = data.map((i: any) => ({
|
||||
id: i.id,
|
||||
|
|
|
|||
|
|
@ -5,11 +5,14 @@ import config from "@/app.config";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar, type QTableProps } from "quasar";
|
||||
import { ref } from "vue";
|
||||
import { useKpiDataStore } from "@/modules/08_KPI/store";
|
||||
|
||||
const props = defineProps({
|
||||
getAll: Function,
|
||||
});
|
||||
|
||||
const store = useKpiDataStore();
|
||||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
|
|
@ -89,6 +92,7 @@ function onSubmit() {
|
|||
summary: i.summary,
|
||||
}));
|
||||
showLoader();
|
||||
store.isUpdate = true;
|
||||
http
|
||||
.post(config.API.kpiAchievementDevelop + `/point`, data)
|
||||
.then((res) => {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import DialogListCriteria from "@/modules/08_KPI/components/Tab/Dialog/DialogLis
|
|||
import DialogCompetncyByRow from "@/modules/08_KPI/components/Tab/Dialog/DialogCompetncyByRow.vue";
|
||||
import DialogLevel from "@/modules/08_KPI/components/Tab/Dialog/DialogLevel.vue";
|
||||
|
||||
const modalLevel = ref<boolean>(false)
|
||||
const modalLevel = ref<boolean>(false);
|
||||
const modalCompetncyByRow = ref<boolean>(false);
|
||||
const dataCompetncyByRow = ref<any[]>([]);
|
||||
const dataLevel = ref<any[]>([]);
|
||||
|
|
@ -170,7 +170,10 @@ function getData(type: string) {
|
|||
let weightAvg = weight / total;
|
||||
let resultAvg = result / total;
|
||||
|
||||
if (store.dataEvaluation.posExecutiveName != null) {
|
||||
if (
|
||||
store.dataEvaluation.posTypeName == "อำนวยการ" &&
|
||||
store.dataEvaluation.posTypeName == "บริหาร"
|
||||
) {
|
||||
store.competencyScoreVal =
|
||||
weightAvg != 0
|
||||
? (resultAvg / weightAvg) * store.excusiveCompetencyScore
|
||||
|
|
@ -181,6 +184,24 @@ function getData(type: string) {
|
|||
? (resultAvg / weightAvg) * store.competencyScore
|
||||
: 0;
|
||||
}
|
||||
|
||||
if (
|
||||
store.isUpdate &&
|
||||
store.tabMain === "3" &&
|
||||
(store.dataEvaluation.evaluationStatus === "EVALUATOR" ||
|
||||
store.dataEvaluation.evaluationStatus === "EVALUATING_EVALUATOR")
|
||||
) {
|
||||
http
|
||||
.put(config.API.updatePoint(store.dataEvaluation.id), {
|
||||
totalPoint2_1: store.competencyScoreVal.toFixed(2),
|
||||
summaryPoint: (
|
||||
store.indicatorScoreVal +
|
||||
store.competencyScoreVal +
|
||||
store.devScoreVal
|
||||
).toFixed(2),
|
||||
})
|
||||
.then((res) => {});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -247,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")
|
||||
);
|
||||
|
|
@ -276,9 +294,9 @@ function onAchievement(data: any) {
|
|||
dataCompetncyByRow.value = data;
|
||||
}
|
||||
|
||||
function onLevel(num:number,list:any){
|
||||
dataLevel.value = list.filter((i:any)=> i.level == num)
|
||||
modalLevel.value = true
|
||||
function onLevel(num: number, list: any) {
|
||||
dataLevel.value = list.filter((i: any) => i.level == num);
|
||||
modalLevel.value = true;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
|
@ -407,7 +425,12 @@ onMounted(() => {
|
|||
}}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'level'">
|
||||
<div @click="onLevel(props.row.level,props.row.achievement)" class="text-teal">{{ props.row.level }}</div>
|
||||
<div
|
||||
@click="onLevel(props.row.level, props.row.achievement)"
|
||||
class="text-teal"
|
||||
>
|
||||
{{ props.row.level }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
|
|
@ -595,10 +618,7 @@ onMounted(() => {
|
|||
v-model:rows="dataCompetncyByRow"
|
||||
/>
|
||||
|
||||
<DialogLevel
|
||||
v-model:modal="modalLevel"
|
||||
v-model:rows="dataLevel"
|
||||
/>
|
||||
<DialogLevel v-model:modal="modalLevel" v-model:rows="dataLevel" />
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ const {
|
|||
success,
|
||||
} = mixin;
|
||||
|
||||
const isUpdate = defineModel("isUpdate", {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
});
|
||||
|
||||
const formData = reactive({
|
||||
isDevelopment70: false,
|
||||
isDevelopment20: false,
|
||||
|
|
@ -121,6 +126,24 @@ function getDevelop() {
|
|||
(sum: number, e: any) => sum + e.summary,
|
||||
0
|
||||
);
|
||||
|
||||
if (
|
||||
store.isUpdate &&
|
||||
store.tabMain === "3" &&
|
||||
(store.dataEvaluation.evaluationStatus === "EVALUATOR" ||
|
||||
store.dataEvaluation.evaluationStatus === "EVALUATING_EVALUATOR")
|
||||
) {
|
||||
http
|
||||
.put(config.API.updatePoint(store.dataEvaluation.id), {
|
||||
totalPoint2_2: store.devScoreVal.toFixed(2),
|
||||
summaryPoint: (
|
||||
store.indicatorScoreVal +
|
||||
store.competencyScoreVal +
|
||||
store.devScoreVal
|
||||
).toFixed(2),
|
||||
})
|
||||
.then((res) => {});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -181,7 +204,7 @@ const isEditStep3 = computed(() => {
|
|||
store.tabMain === "3") ||
|
||||
(store.dataEvaluation.evaluationStatus === "EVALUATING_EVALUATOR" &&
|
||||
store.rolePerson === "EVALUATOR" &&
|
||||
store.tabMain === "3")||
|
||||
store.tabMain === "3") ||
|
||||
(store.dataEvaluation.evaluationStatus === "EVALUATING" &&
|
||||
store.rolePerson === "EVALUATOR" &&
|
||||
store.tabMain === "3")
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ export const useKpiDataStore = defineStore("KPIDate", () => {
|
|||
date2Thai,
|
||||
} = mixin;
|
||||
|
||||
const isUpdate = ref<boolean>(false);
|
||||
const tabMainevaluator = ref<string>("1");
|
||||
const yearRound = ref<number>(new Date().getFullYear());
|
||||
const formQuery = reactive<FormQuery>({
|
||||
|
|
@ -259,12 +260,11 @@ export const useKpiDataStore = defineStore("KPIDate", () => {
|
|||
const role = await (dataEvaluation.value.profileId ==
|
||||
dataProfile.value.profileId
|
||||
? "USER"
|
||||
: dataEvaluation.value.evaluatorId == (await dataProfile.value.profileId)
|
||||
: dataEvaluation.value.evaluatorId == dataProfile.value.profileId
|
||||
? "EVALUATOR"
|
||||
: dataEvaluation.value.commanderId == (await dataProfile.value.profileId)
|
||||
: dataEvaluation.value.commanderId == dataProfile.value.profileId
|
||||
? "COMMANDER"
|
||||
: dataEvaluation.value.commanderHighId ==
|
||||
(await dataProfile.value.profileId)
|
||||
: dataEvaluation.value.commanderHighId == dataProfile.value.profileId
|
||||
? "COMMANDERHIGH"
|
||||
: "");
|
||||
// console.log("🚀 ~ checkStep ~ role:", role);
|
||||
|
|
@ -273,41 +273,54 @@ export const useKpiDataStore = defineStore("KPIDate", () => {
|
|||
switch (dataEvaluation.value.evaluationStatus) {
|
||||
case "NEW":
|
||||
tabOpen.value = 1;
|
||||
tabMain.value = "1";
|
||||
break;
|
||||
case "NEW_EVALUATOR":
|
||||
tabOpen.value = 1;
|
||||
tabMain.value = "1";
|
||||
break;
|
||||
case "NEW_COMMANDER":
|
||||
tabOpen.value = 1;
|
||||
tabMain.value = "1";
|
||||
break;
|
||||
case "NEW_COMMANDER_HIGH":
|
||||
tabOpen.value = 1;
|
||||
tabMain.value = "1";
|
||||
break;
|
||||
case "APPROVE":
|
||||
tabOpen.value = 2;
|
||||
tabMain.value = "2";
|
||||
break;
|
||||
case "EVALUATING":
|
||||
tabOpen.value = 3;
|
||||
tabMain.value = "3";
|
||||
break;
|
||||
case "EVALUATING_EVALUATOR":
|
||||
tabOpen.value = 3;
|
||||
tabMain.value = "3";
|
||||
break;
|
||||
case "SUMMARY":
|
||||
tabOpen.value = 4;
|
||||
tabMain.value = "3";
|
||||
break;
|
||||
case "SUMMARY_COMMANDER":
|
||||
tabOpen.value = 4;
|
||||
tabMain.value = "3";
|
||||
break;
|
||||
case "SUMMARY_COMMANDER_HIGH":
|
||||
tabOpen.value = 4;
|
||||
tabMain.value = "3";
|
||||
break;
|
||||
case "COMPLETE":
|
||||
tabOpen.value = 4;
|
||||
tabMain.value = "4";
|
||||
break;
|
||||
default:
|
||||
tabOpen.value = 1;
|
||||
tabMain.value = "1";
|
||||
break;
|
||||
}
|
||||
// console.log("🚀 ~ tabMain ~ role:", tabMain.value);
|
||||
}
|
||||
|
||||
// SUMMARY GENERAL CASE
|
||||
|
|
@ -420,5 +433,6 @@ export const useKpiDataStore = defineStore("KPIDate", () => {
|
|||
yearRound,
|
||||
selected,
|
||||
work,
|
||||
isUpdate,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ const route = useRoute();
|
|||
const id = ref<string>(route.params.id as string);
|
||||
const isReadonly = <boolean>(route.name === "KPIEditEvaluator" ? true : false);
|
||||
|
||||
const plannedPoint = ref<string>("");
|
||||
const rolePoint = ref<string>("");
|
||||
const specialPoint = ref<string>("");
|
||||
const capacityPoint = ref<string>("");
|
||||
// const plannedPoint = ref<string>("");
|
||||
// const rolePoint = ref<string>("");
|
||||
// const specialPoint = ref<string>("");
|
||||
// const capacityPoint = ref<string>("");
|
||||
|
||||
const store = useKpiDataStore();
|
||||
const $q = useQuasar();
|
||||
|
|
@ -66,16 +66,16 @@ async function fetchEvaluation() {
|
|||
store.dataEvaluation = await data;
|
||||
formProfile.status = store.convertStatus(data.evaluationStatus);
|
||||
formProfile.result = store.convertResults(data.evaluationResults);
|
||||
await store.checkCompetency();
|
||||
await store.checkCompetencyDefaultCompetencyLevel();
|
||||
store.checkCompetency();
|
||||
store.checkCompetencyDefaultCompetencyLevel();
|
||||
|
||||
fetchProfile(data.profileId);
|
||||
|
||||
plannedPoint.value = data.plannedPoint == null ? "" : data.plannedPoint;
|
||||
rolePoint.value = data.rolePoint == null ? "" : data.rolePoint;
|
||||
specialPoint.value = data.specialPoint == null ? "" : data.specialPoint;
|
||||
capacityPoint.value =
|
||||
data.capacityPoint == null ? "" : data.capacityPoint;
|
||||
// plannedPoint.value = data.plannedPoint == null ? "" : data.plannedPoint;
|
||||
// rolePoint.value = data.rolePoint == null ? "" : data.rolePoint;
|
||||
// specialPoint.value = data.specialPoint == null ? "" : data.specialPoint;
|
||||
// capacityPoint.value =
|
||||
// data.capacityPoint == null ? "" : data.capacityPoint;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -91,6 +91,7 @@ async function getProfile() {
|
|||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
store.dataProfile = await data;
|
||||
await store.checkStep();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -251,12 +252,11 @@ function filterOption(val: any, update: Function, refData: string) {
|
|||
|
||||
async function getAll() {
|
||||
await fetchEvaluation();
|
||||
await getProfile();
|
||||
await getOrgOp();
|
||||
await store.checkStep();
|
||||
getProfile();
|
||||
getOrgOp();
|
||||
}
|
||||
|
||||
function sendToEvaluatore(status: string) {
|
||||
function sendToEvaluatore() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
|
|
@ -264,7 +264,7 @@ function sendToEvaluatore(status: string) {
|
|||
showLoader();
|
||||
http
|
||||
.put(config.API.kpiSendToStatus(id.value), {
|
||||
status: status,
|
||||
status: "NEW_EVALUATOR",
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "ส่งข้อตกลงให้ผู้ประเมินอนุมัติสำเร็จ");
|
||||
|
|
@ -283,18 +283,19 @@ function sendToEvaluatore(status: string) {
|
|||
);
|
||||
}
|
||||
|
||||
function sendToSummary(status: string) {
|
||||
function sendToEvaluateEvaluatore() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
if (id.value) {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.kpiSendToSummary(id.value))
|
||||
.put(config.API.kpiSendToStatus(id.value), {
|
||||
status: "EVALUATING_EVALUATOR",
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "ส่งไปสรุปผลการประเมินสำเร็จ");
|
||||
getAll()
|
||||
store.tabMain = '4'
|
||||
success($q, "ส่งให้ผู้ประเมินรายงานผลสำเร็จของงานสำเร็จ");
|
||||
close();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -304,10 +305,35 @@ function sendToSummary(status: string) {
|
|||
});
|
||||
}
|
||||
},
|
||||
"ยืนยันการส่งไปสรุปผลการประเมิน",
|
||||
"ต้องการยืนยันส่งไปสรุปผลการประเมินใช่หรือไม่?"
|
||||
"ยืนยันการส่งให้ผู้ประเมินรายงานผลสำเร็จของงาน",
|
||||
"ต้องการยืนยันส่งให้ผู้ประเมินรายงานผลสำเร็จของงานใช่หรือไม่?"
|
||||
);
|
||||
}
|
||||
// function sendToSummary(status: string) {
|
||||
// dialogConfirm(
|
||||
// $q,
|
||||
// () => {
|
||||
// if (id.value) {
|
||||
// showLoader();
|
||||
// http
|
||||
// .get(config.API.kpiSendToSummary(id.value))
|
||||
// .then((res) => {
|
||||
// success($q, "ส่งไปสรุปผลการประเมินสำเร็จ");
|
||||
// getAll();
|
||||
// store.tabMain = "4";
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
// "ยืนยันการส่งไปสรุปผลการประเมิน",
|
||||
// "ต้องการยืนยันส่งไปสรุปผลการประเมินใช่หรือไม่?"
|
||||
// );
|
||||
// }
|
||||
function requireEdit() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
|
|
@ -342,7 +368,7 @@ function openStatus() {
|
|||
modalStatus.value = true;
|
||||
}
|
||||
|
||||
function sendToCommander() {
|
||||
function sendToEvauator() {
|
||||
dialogConfirm($q, () => {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -363,8 +389,32 @@ function sendToCommander() {
|
|||
});
|
||||
}
|
||||
|
||||
function goToSummary() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.sendToSummary(store.dataEvaluation.id))
|
||||
.then(async (res) => {
|
||||
await getAll();
|
||||
store.tabMain = "4";
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
},
|
||||
"ยืนยันการส่งไปสรุปผลการประเมิน",
|
||||
"ต้องการยืนยันส่งไปสรุปผลการประเมินใช่หรือไม่?"
|
||||
);
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
showLoader();
|
||||
store.isUpdate = await false;
|
||||
await getAll();
|
||||
});
|
||||
</script>
|
||||
|
|
@ -430,16 +480,21 @@ onMounted(async () => {
|
|||
>
|
||||
<div class="row col-12 items-center justify-center">
|
||||
<span class="text-h6 text-weight-medium text-primary">{{
|
||||
`${store.dataEvaluation.prefix}${store.dataEvaluation.firstName} ${store.dataEvaluation.lastName}`
|
||||
store.dataEvaluation.firstName
|
||||
? `${store.dataEvaluation.prefix}${store.dataEvaluation.firstName} ${store.dataEvaluation.lastName}`
|
||||
: ""
|
||||
}}</span>
|
||||
<q-space v-if="$q.screen.gt.xs" />
|
||||
|
||||
<div class="q-gutter-x-sm">
|
||||
<span
|
||||
v-if="
|
||||
(store.dataEvaluation.posExecutiveName == null &&
|
||||
(store.tabMain === '1' &&
|
||||
store.dataEvaluation.posTypeName != 'อำนวยการ' &&
|
||||
store.dataEvaluation.posTypeName != 'บริหาร' &&
|
||||
store.indicatorWeightTotal != 100) ||
|
||||
(store.dataEvaluation.posExecutiveName != null &&
|
||||
(store.dataEvaluation.posTypeName == 'อำนวยการ' &&
|
||||
store.dataEvaluation.posTypeName == 'บริหาร' &&
|
||||
(store.indicatorWeight1Total != 100 ||
|
||||
store.indicatorWeight2Total != 20) &&
|
||||
store.dataEvaluation.evaluationStatus == 'NEW')
|
||||
|
|
@ -454,9 +509,11 @@ onMounted(async () => {
|
|||
store.dataEvaluation.evaluationStatus == 'NEW'
|
||||
"
|
||||
:disabled="
|
||||
(store.dataEvaluation.posExecutiveName == null &&
|
||||
(store.dataEvaluation.posTypeName != 'อำนวยการ' &&
|
||||
store.dataEvaluation.posTypeName != 'บริหาร' &&
|
||||
store.indicatorWeightTotal != 100) ||
|
||||
(store.dataEvaluation.posExecutiveName != null &&
|
||||
(store.dataEvaluation.posTypeName == 'อำนวยการ' &&
|
||||
store.dataEvaluation.posTypeName == 'บริหาร' &&
|
||||
(store.indicatorWeight1Total != 100 ||
|
||||
store.indicatorWeight2Total != 20))
|
||||
"
|
||||
|
|
@ -466,12 +523,13 @@ onMounted(async () => {
|
|||
color="grey-2"
|
||||
text-color="blue-6"
|
||||
size="md"
|
||||
@click="sendToEvaluatore('NEW_EVALUATOR')"
|
||||
@click="sendToEvaluatore()"
|
||||
>
|
||||
<q-tooltip>ส่งให้ผู้ประเมินอนุมัติ</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="
|
||||
store.rolePerson == 'USER' &&
|
||||
store.tabMain == '2' &&
|
||||
store.dataEvaluation.evaluationStatus == 'APPROVE'
|
||||
"
|
||||
|
|
@ -481,7 +539,7 @@ onMounted(async () => {
|
|||
color="grey-2"
|
||||
text-color="blue-6"
|
||||
size="md"
|
||||
@click="sendToCommander"
|
||||
@click="sendToEvauator"
|
||||
>
|
||||
<q-tooltip>ทำการประเมิน</q-tooltip>
|
||||
</q-btn>
|
||||
|
|
@ -497,13 +555,13 @@ onMounted(async () => {
|
|||
color="grey-2"
|
||||
text-color="blue-6"
|
||||
size="md"
|
||||
@click="sendToEvaluatore('EVALUATING_EVALUATOR')"
|
||||
@click="sendToEvaluateEvaluatore()"
|
||||
>
|
||||
<q-tooltip
|
||||
>ส่งให้ผู้ประเมินรายงานผลสำเร็จของงาน</q-tooltip
|
||||
>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
<!-- <q-btn
|
||||
v-if="
|
||||
store.rolePerson == 'EVALUATOR' &&
|
||||
store.dataEvaluation.evaluationStatus ==
|
||||
|
|
@ -519,7 +577,7 @@ onMounted(async () => {
|
|||
@click="sendToSummary('SUMMARY')"
|
||||
>
|
||||
<q-tooltip>ส่งไปสรุปผลการประเมิน</q-tooltip>
|
||||
</q-btn>
|
||||
</q-btn> -->
|
||||
<q-btn
|
||||
v-if="
|
||||
store.rolePerson == 'USER' &&
|
||||
|
|
@ -541,6 +599,31 @@ onMounted(async () => {
|
|||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="
|
||||
store.rolePerson == 'EVALUATOR' &&
|
||||
store.tabMain === '3' &&
|
||||
store.dataEvaluation.evaluationStatus ===
|
||||
'EVALUATING_EVALUATOR'
|
||||
"
|
||||
:disabled="
|
||||
store.indicatorScoreVal +
|
||||
store.competencyScoreVal +
|
||||
store.devScoreVal <=
|
||||
0
|
||||
"
|
||||
unelevated
|
||||
round
|
||||
icon="mdi-send"
|
||||
color="grey-2"
|
||||
text-color="blue-6"
|
||||
size="md"
|
||||
@click="goToSummary()"
|
||||
>
|
||||
<q-tooltip>สรุปผลการประเมิน</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="store.rolePerson == 'USER'"
|
||||
unelevated
|
||||
round
|
||||
icon="mdi-account"
|
||||
|
|
@ -638,7 +721,8 @@ onMounted(async () => {
|
|||
<span class="text-grey-6 col">คะแนนประเมิน</span>
|
||||
<span class="text-weight-medium text-primary col">
|
||||
{{
|
||||
store.dataEvaluation.posExecutiveName == null
|
||||
store.dataEvaluation.posTypeName != "อำนวยการ" &&
|
||||
store.dataEvaluation.posTypeName != "บริหาร"
|
||||
? (
|
||||
store.indicatorScoreVal +
|
||||
store.competencyScoreVal +
|
||||
|
|
|
|||
|
|
@ -273,10 +273,10 @@ function getProfile() {
|
|||
http
|
||||
.get(config.API.profilePosition())
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
const data = await res.data.result;
|
||||
store.dataProfile = data;
|
||||
await store.checkCompetency();
|
||||
await store.checkCompetencyDefaultCompetencyLevel();
|
||||
store.checkCompetency();
|
||||
store.checkCompetencyDefaultCompetencyLevel();
|
||||
|
||||
formRound.profileId = data.profileId;
|
||||
formRound.prefix = data.prefix;
|
||||
|
|
@ -329,15 +329,21 @@ function getOrgOp() {
|
|||
const data = res.data.result;
|
||||
evaluatorIdMainOp.value = data.caregiver.map((i: any) => ({
|
||||
id: i.id,
|
||||
name: `${i.prefix ? i.prefix :''}${i.firstName ? i.firstName : ''} ${i.lastName ? i.lastName:''}`,
|
||||
name: `${i.prefix ? i.prefix : ""}${i.firstName ? i.firstName : ""} ${
|
||||
i.lastName ? i.lastName : ""
|
||||
}`,
|
||||
}));
|
||||
commanderIdMainOp.value = data.commander.map((i: any) => ({
|
||||
id: i.id,
|
||||
name: `${i.prefix ? i.prefix :''}${i.firstName ? i.firstName : ''} ${i.lastName ? i.lastName:''}`,
|
||||
name: `${i.prefix ? i.prefix : ""}${i.firstName ? i.firstName : ""} ${
|
||||
i.lastName ? i.lastName : ""
|
||||
}`,
|
||||
}));
|
||||
commanderHighMainOp.value = data.chairman.map((i: any) => ({
|
||||
id: i.id,
|
||||
name: `${i.prefix ? i.prefix :''}${i.firstName ? i.firstName : ''} ${i.lastName ? i.lastName:''}`,
|
||||
name: `${i.prefix ? i.prefix : ""}${i.firstName ? i.firstName : ""} ${
|
||||
i.lastName ? i.lastName : ""
|
||||
}`,
|
||||
}));
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -636,7 +642,7 @@ onMounted(() => {
|
|||
:options="roundDialgOp"
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
:rules="[(val) => !!val.id || `${'กรุณาเลือกรอบการประเมิน'}`]"
|
||||
:rules="[(val:any) => !!val.id || `${'กรุณาเลือกรอบการประเมิน'}`]"
|
||||
@update:model-value="checkClosed"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ watch(
|
|||
|
||||
function onChangTab() {
|
||||
store.formQuery.page = 1;
|
||||
dataListMain.value = [];
|
||||
fetchList();
|
||||
store.selected = [];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue