2024-04-04 14:14:25 +07:00
|
|
|
<script setup lang="ts">
|
2024-04-29 13:41:41 +07:00
|
|
|
import { ref, onMounted, reactive, computed, watch } from "vue";
|
2024-04-09 15:22:23 +07:00
|
|
|
import { useRoute, useRouter } from "vue-router";
|
|
|
|
|
import http from "@/plugins/http";
|
|
|
|
|
import config from "@/app.config";
|
2024-04-23 11:18:33 +07:00
|
|
|
import TabMain from "@/modules/08_KPI/components/Tab/TabMain.vue";
|
2024-04-22 17:25:58 +07:00
|
|
|
import { useQuasar } from "quasar";
|
2024-04-09 15:22:23 +07:00
|
|
|
|
|
|
|
|
import { useCounterMixin } from "@/stores/mixin";
|
2024-04-22 17:25:58 +07:00
|
|
|
import { useKpiDataStore } from "@/modules/08_KPI/store";
|
2024-04-09 15:22:23 +07:00
|
|
|
|
2024-04-26 15:18:28 +07:00
|
|
|
import DialogHeader from "@/components/DialogHeader.vue";
|
2024-04-09 15:22:23 +07:00
|
|
|
import type { FormProfile } from "@/modules/08_KPI/interface/request/index";
|
2024-04-26 15:18:28 +07:00
|
|
|
import type { DataOptions } from "@/modules/08_KPI/interface/index/Main";
|
2024-04-09 15:22:23 +07:00
|
|
|
|
2024-04-29 13:41:41 +07:00
|
|
|
const scoreTotal = ref<boolean>(false);
|
|
|
|
|
const modalScore = ref<boolean>(false);
|
2024-04-26 15:18:28 +07:00
|
|
|
const modalEdit = ref<boolean>(false);
|
2024-04-10 10:07:41 +07:00
|
|
|
const route = useRoute();
|
2024-04-22 17:25:58 +07:00
|
|
|
const id = ref<string>(route.params.id as string);
|
2024-04-26 09:34:17 +07:00
|
|
|
const isReadonly = <boolean>(route.name === "KPIEditEvaluator" ? true : false);
|
|
|
|
|
|
2024-04-29 13:41:41 +07:00
|
|
|
const totalScore = computed(
|
|
|
|
|
() =>
|
|
|
|
|
Number(plannedPoint.value) +
|
|
|
|
|
Number(rolePoint.value) +
|
|
|
|
|
Number(specialPoint.value) +
|
|
|
|
|
Number(capacityPoint.value)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const plannedPoint = ref<string>("");
|
|
|
|
|
const rolePoint = ref<string>("");
|
|
|
|
|
const specialPoint = ref<string>("");
|
|
|
|
|
const capacityPoint = ref<string>("");
|
|
|
|
|
|
2024-04-22 17:25:58 +07:00
|
|
|
const store = useKpiDataStore();
|
2024-04-09 15:22:23 +07:00
|
|
|
const $q = useQuasar();
|
|
|
|
|
const mixin = useCounterMixin();
|
2024-04-26 16:28:38 +07:00
|
|
|
const { showLoader, hideLoader, messageError, dialogConfirm, success } = mixin;
|
2024-04-26 15:18:28 +07:00
|
|
|
|
|
|
|
|
const evaluatorIdOp = ref<DataOptions[]>([]);
|
|
|
|
|
const commanderIdOp = ref<DataOptions[]>([]);
|
|
|
|
|
const commanderHighOp = ref<DataOptions[]>([]);
|
|
|
|
|
|
2024-04-26 16:28:38 +07:00
|
|
|
const evaluatorIdMainOp = ref<DataOptions[]>([]);
|
|
|
|
|
const commanderIdMainOp = ref<DataOptions[]>([]);
|
|
|
|
|
const commanderHighMainOp = ref<DataOptions[]>([]);
|
|
|
|
|
|
2024-04-26 17:02:01 +07:00
|
|
|
const evaluatorId = ref<any>(null);
|
|
|
|
|
const commanderId = ref<any>(null);
|
|
|
|
|
const commanderHighId = ref<any>(null);
|
2024-04-09 15:22:23 +07:00
|
|
|
|
|
|
|
|
const formProfile = reactive<FormProfile>({
|
2024-04-22 18:11:24 +07:00
|
|
|
fullName: "",
|
|
|
|
|
position: "",
|
|
|
|
|
type: "",
|
|
|
|
|
level: "",
|
|
|
|
|
status: "",
|
|
|
|
|
result: "",
|
|
|
|
|
score: "-",
|
2024-04-22 18:12:33 +07:00
|
|
|
avartar: "",
|
2024-04-09 15:22:23 +07:00
|
|
|
});
|
2024-04-04 14:14:25 +07:00
|
|
|
|
|
|
|
|
const router = useRouter();
|
2024-04-09 15:22:23 +07:00
|
|
|
|
2024-04-22 17:25:58 +07:00
|
|
|
function fetchEvaluation() {
|
|
|
|
|
showLoader();
|
|
|
|
|
http
|
|
|
|
|
.get(config.API.kpiEvaluation + `/${id.value}`)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
const data = res.data.result;
|
|
|
|
|
store.dataEvaluation = data;
|
2024-04-22 18:11:24 +07:00
|
|
|
formProfile.status = store.convertStatus(data.evaluationStatus);
|
|
|
|
|
formProfile.result = store.convertResults(data.evaluationResults);
|
|
|
|
|
fetchProfile(data.profileId);
|
2024-04-29 13:41:41 +07:00
|
|
|
|
|
|
|
|
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;
|
2024-04-22 17:25:58 +07:00
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-09 15:22:23 +07:00
|
|
|
function getProfile() {
|
|
|
|
|
showLoader();
|
|
|
|
|
http
|
2024-04-22 17:25:58 +07:00
|
|
|
.get(config.API.profilePosition())
|
2024-04-09 15:22:23 +07:00
|
|
|
.then((res) => {
|
|
|
|
|
const data = res.data.result;
|
2024-04-22 17:25:58 +07:00
|
|
|
store.dataProfile = data;
|
2024-04-23 11:10:39 +07:00
|
|
|
store.checkCompetency();
|
|
|
|
|
store.checkCompetencyDefaultCompetencyLevel();
|
2024-04-22 17:25:58 +07:00
|
|
|
|
|
|
|
|
formProfile.fullName = `${data.prefix}${data.firstName} ${data.lastName}`;
|
2024-04-22 18:11:24 +07:00
|
|
|
formProfile.position = data.position;
|
|
|
|
|
formProfile.type = data.posTypeName;
|
|
|
|
|
formProfile.level = data.posLevelName;
|
2024-04-09 15:22:23 +07:00
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
}
|
2024-04-09 16:30:20 +07:00
|
|
|
|
2024-04-22 18:11:24 +07:00
|
|
|
async function fetchProfile(id: string) {
|
|
|
|
|
showLoader();
|
|
|
|
|
await http
|
|
|
|
|
.get(
|
|
|
|
|
config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `profile-${id}`)
|
|
|
|
|
)
|
|
|
|
|
.then(async (res) => {
|
|
|
|
|
formProfile.avartar = res.data.downloadUrl;
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
// profilePicture.value = avatar;
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-26 15:18:28 +07:00
|
|
|
function close() {
|
|
|
|
|
modalEdit.value = false;
|
2024-04-26 16:28:38 +07:00
|
|
|
evaluatorId.value = null;
|
|
|
|
|
commanderId.value = null;
|
|
|
|
|
commanderHighId.value = null;
|
2024-04-30 09:47:56 +07:00
|
|
|
getAll();
|
2024-04-26 15:18:28 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function onSubmit() {
|
|
|
|
|
dialogConfirm($q, () => {
|
2024-04-29 13:41:41 +07:00
|
|
|
if (id.value) {
|
2024-04-26 17:02:01 +07:00
|
|
|
showLoader();
|
2024-04-29 13:41:41 +07:00
|
|
|
http
|
|
|
|
|
.put(config.API.kpiEvaluationCheck + `/${id.value}`, {
|
|
|
|
|
evaluatorId: evaluatorId.value ? evaluatorId.value.id : null,
|
|
|
|
|
commanderId: commanderId.value ? commanderId.value.id : null,
|
|
|
|
|
commanderHighId: commanderHighId.value
|
|
|
|
|
? commanderHighId.value.id
|
|
|
|
|
: null,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
success($q, "บันทึกสำเร็จ");
|
2024-04-30 09:47:56 +07:00
|
|
|
close();
|
2024-04-29 13:41:41 +07:00
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
2024-04-26 17:02:01 +07:00
|
|
|
}
|
2024-04-26 15:18:28 +07:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-26 16:28:38 +07:00
|
|
|
function getOrgOp() {
|
|
|
|
|
http
|
|
|
|
|
.get(config.API.Kpiorg)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
const data = res.data.result;
|
|
|
|
|
evaluatorIdMainOp.value = data.caregiver.map((i: any) => ({
|
|
|
|
|
id: i.id,
|
|
|
|
|
name: `${i.prefix}${i.firstName} ${i.lastName}`,
|
|
|
|
|
}));
|
|
|
|
|
commanderIdMainOp.value = data.commander.map((i: any) => ({
|
|
|
|
|
id: i.id,
|
|
|
|
|
name: `${i.prefix}${i.firstName} ${i.lastName}`,
|
|
|
|
|
}));
|
|
|
|
|
commanderHighMainOp.value = data.chairman.map((i: any) => ({
|
|
|
|
|
id: i.id,
|
|
|
|
|
name: `${i.prefix}${i.firstName} ${i.lastName}`,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
evaluatorId.value = data.caregiver
|
|
|
|
|
.map((i: any) => ({
|
|
|
|
|
id: i.id,
|
|
|
|
|
name: `${i.prefix}${i.firstName} ${i.lastName}`,
|
|
|
|
|
}))
|
|
|
|
|
.find((i: any) => i.id == store.dataEvaluation.evaluatorId);
|
|
|
|
|
commanderId.value = data.caregiver
|
|
|
|
|
.map((i: any) => ({
|
|
|
|
|
id: i.id,
|
|
|
|
|
name: `${i.prefix}${i.firstName} ${i.lastName}`,
|
|
|
|
|
}))
|
|
|
|
|
.find((i: any) => i.id == store.dataEvaluation.commanderId);
|
|
|
|
|
commanderHighId.value = data.caregiver
|
|
|
|
|
.map((i: any) => ({
|
|
|
|
|
id: i.id,
|
|
|
|
|
name: `${i.prefix}${i.firstName} ${i.lastName}`,
|
|
|
|
|
}))
|
|
|
|
|
.find((i: any) => i.id == store.dataEvaluation.commanderHighId);
|
|
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function filterOption(val: any, update: Function, refData: string) {
|
|
|
|
|
switch (refData) {
|
|
|
|
|
case "evaluatorIdOp":
|
|
|
|
|
update(() => {
|
|
|
|
|
evaluatorIdOp.value = evaluatorIdMainOp.value.filter(
|
|
|
|
|
(v: any) => v.name.indexOf(val) > -1
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
case "commanderIdOp":
|
|
|
|
|
update(() => {
|
|
|
|
|
commanderIdOp.value = commanderIdMainOp.value.filter(
|
|
|
|
|
(v: any) => v.name.indexOf(val) > -1
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
case "commanderHighOp":
|
|
|
|
|
update(() => {
|
|
|
|
|
commanderHighOp.value = commanderHighMainOp.value.filter(
|
|
|
|
|
(v: any) => v.name.indexOf(val) > -1
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-29 13:41:41 +07:00
|
|
|
watch(
|
|
|
|
|
[plannedPoint, rolePoint, specialPoint, capacityPoint],
|
|
|
|
|
(
|
|
|
|
|
[newPlannedPoint, newRolePoint, newSpecialPoint, newCapacityPoint],
|
|
|
|
|
[oldPlannedPoint, oldRolePoint, oldSpecialPoint, oldCapacityPoint]
|
|
|
|
|
) => {
|
|
|
|
|
if (
|
|
|
|
|
newPlannedPoint !== "" &&
|
|
|
|
|
newRolePoint !== "" &&
|
|
|
|
|
newSpecialPoint !== "" &&
|
|
|
|
|
newCapacityPoint !== ""
|
|
|
|
|
) {
|
|
|
|
|
if (totalScore.value == 100) {
|
|
|
|
|
scoreTotal.value = false;
|
|
|
|
|
} else {
|
|
|
|
|
scoreTotal.value = true;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
console.log(2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
function onSubmitScore() {
|
|
|
|
|
showLoader();
|
|
|
|
|
http
|
|
|
|
|
.put(config.API.kpiScoreTotal() + `/${id.value}`, {
|
2024-04-30 09:22:46 +07:00
|
|
|
plannedPoint: plannedPoint.value,
|
|
|
|
|
rolePoint: rolePoint.value,
|
|
|
|
|
specialPoint: specialPoint.value,
|
|
|
|
|
capacityPoint: capacityPoint.value,
|
2024-04-29 13:41:41 +07:00
|
|
|
})
|
|
|
|
|
.then(async (res) => {
|
|
|
|
|
await fetchEvaluation();
|
|
|
|
|
await getProfile();
|
|
|
|
|
await getOrgOp();
|
|
|
|
|
await success($q, "บันทึกสำเร็จ");
|
2024-04-30 09:22:46 +07:00
|
|
|
modalScore.value = false;
|
2024-04-29 13:41:41 +07:00
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-30 09:47:56 +07:00
|
|
|
async function clearScore() {
|
|
|
|
|
modalScore.value = false;
|
|
|
|
|
plannedPoint.value = "";
|
|
|
|
|
rolePoint.value = "";
|
|
|
|
|
specialPoint.value = "";
|
|
|
|
|
capacityPoint.value = "";
|
|
|
|
|
getAll();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function getAll() {
|
2024-04-26 16:28:38 +07:00
|
|
|
await fetchEvaluation();
|
|
|
|
|
await getProfile();
|
|
|
|
|
await getOrgOp();
|
2024-04-30 09:47:56 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getAll();
|
2024-04-09 15:22:23 +07:00
|
|
|
});
|
2024-04-04 14:14:25 +07:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="col-12 row justify-center">
|
|
|
|
|
<div class="col-xs-12 col-sm-12 col-md-11">
|
|
|
|
|
<div class="toptitle text-white col-12 row items-center">
|
|
|
|
|
<q-btn
|
|
|
|
|
icon="mdi-arrow-left"
|
|
|
|
|
unelevated
|
|
|
|
|
round
|
|
|
|
|
dense
|
|
|
|
|
flat
|
|
|
|
|
color="primary"
|
|
|
|
|
class="q-mr-sm"
|
2024-04-26 09:34:17 +07:00
|
|
|
@click="
|
|
|
|
|
isReadonly ? router.push(`/KPI-evaluator`) : router.push(`/KPI`)
|
|
|
|
|
"
|
2024-04-04 14:14:25 +07:00
|
|
|
/>
|
2024-04-26 16:28:38 +07:00
|
|
|
{{
|
|
|
|
|
isReadonly
|
|
|
|
|
? "รายละเอียดการประเมินผลการปฏิบัติราชการระดับบุคคล"
|
|
|
|
|
: id
|
|
|
|
|
? `แก้ไขแบบประเมิน`
|
|
|
|
|
: `เพิ่มแบบประเมิน`
|
|
|
|
|
}}
|
2024-04-10 10:07:41 +07:00
|
|
|
<q-space />
|
2024-04-04 14:14:25 +07:00
|
|
|
</div>
|
|
|
|
|
<div class="col-12">
|
2024-04-22 17:25:58 +07:00
|
|
|
<q-card bordered flat class="relative-position">
|
2024-04-19 15:30:39 +07:00
|
|
|
<div
|
2024-04-22 18:11:24 +07:00
|
|
|
class="absolute-center-left"
|
2024-04-22 17:25:58 +07:00
|
|
|
style="left: 2%; top: 50%; transform: translateY(-50%)"
|
|
|
|
|
>
|
|
|
|
|
<q-avatar size="95px">
|
2024-04-30 09:22:46 +07:00
|
|
|
<q-img :src="formProfile.avartar" />
|
2024-04-22 17:25:58 +07:00
|
|
|
</q-avatar>
|
|
|
|
|
</div>
|
2024-04-19 15:30:39 +07:00
|
|
|
<div class="row col-12">
|
|
|
|
|
<div class="row items-center col-12 q-pa-sm">
|
2024-04-22 17:25:58 +07:00
|
|
|
<div class="col-12" style="padding-left: 12%">
|
2024-04-19 15:30:39 +07:00
|
|
|
<div class="row col-12 items-center">
|
|
|
|
|
<span class="text-h6 text-weight-medium text-primary">{{
|
2024-04-09 15:22:23 +07:00
|
|
|
formProfile.fullName ? formProfile.fullName : "-"
|
|
|
|
|
}}</span>
|
|
|
|
|
<q-space />
|
|
|
|
|
<div class="q-gutter-x-sm">
|
2024-04-29 13:41:41 +07:00
|
|
|
<q-btn
|
|
|
|
|
v-if="!isReadonly"
|
|
|
|
|
unelevated
|
|
|
|
|
round
|
|
|
|
|
icon="mdi-format-list-bulleted-square"
|
|
|
|
|
color="grey-2"
|
|
|
|
|
text-color="amber-10"
|
|
|
|
|
size="md"
|
|
|
|
|
@click="modalScore = true"
|
|
|
|
|
>
|
|
|
|
|
<q-tooltip>แก้ไขคะแนนเต็ม</q-tooltip>
|
|
|
|
|
</q-btn>
|
2024-04-26 15:18:28 +07:00
|
|
|
<q-btn
|
2024-04-26 16:28:38 +07:00
|
|
|
v-if="!isReadonly"
|
2024-04-26 15:18:28 +07:00
|
|
|
unelevated
|
|
|
|
|
round
|
|
|
|
|
icon="edit"
|
|
|
|
|
color="grey-2"
|
|
|
|
|
text-color="edit"
|
|
|
|
|
size="md"
|
|
|
|
|
@click="modalEdit = true"
|
|
|
|
|
>
|
|
|
|
|
<q-tooltip>แก้ไขผู้ประเมิน</q-tooltip>
|
|
|
|
|
</q-btn>
|
2024-04-09 15:22:23 +07:00
|
|
|
<q-btn
|
|
|
|
|
unelevated
|
|
|
|
|
round
|
|
|
|
|
icon="mdi-file-eye-outline"
|
|
|
|
|
color="grey-2"
|
|
|
|
|
text-color="primary"
|
2024-04-19 15:30:39 +07:00
|
|
|
size="md"
|
2024-04-09 15:22:23 +07:00
|
|
|
>
|
|
|
|
|
<q-tooltip>ดูข้อมูลการช่วยราชการ</q-tooltip>
|
|
|
|
|
</q-btn>
|
2024-04-10 10:07:41 +07:00
|
|
|
<q-btn
|
|
|
|
|
unelevated
|
|
|
|
|
round
|
|
|
|
|
color="grey-2"
|
|
|
|
|
text-color="blue-5"
|
|
|
|
|
icon="mdi-file-eye-outline"
|
2024-04-19 15:30:39 +07:00
|
|
|
size="md"
|
2024-04-10 10:07:41 +07:00
|
|
|
>
|
2024-04-09 15:22:23 +07:00
|
|
|
<q-tooltip>ดูข้อมูลการทดลองงาน</q-tooltip>
|
|
|
|
|
</q-btn>
|
|
|
|
|
</div>
|
2024-04-19 15:30:39 +07:00
|
|
|
</div>
|
2024-04-09 15:22:23 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-04-19 15:30:39 +07:00
|
|
|
<div class="row items-center bg-toolbar col-12 q-pa-sm">
|
2024-04-22 17:25:58 +07:00
|
|
|
<div class="col-12 q-py-xs" style="padding-left: 12%">
|
2024-04-19 15:30:39 +07:00
|
|
|
<div class="row no-wrap">
|
2024-04-09 15:22:23 +07:00
|
|
|
<div class="col-2">
|
|
|
|
|
<div class="column">
|
|
|
|
|
<span class="text-grey-6">ตำแหน่งในสายงาน</span>
|
2024-04-19 15:30:39 +07:00
|
|
|
<span class="text-weight-medium text-dark">{{
|
2024-04-10 10:07:41 +07:00
|
|
|
formProfile.position
|
|
|
|
|
}}</span>
|
2024-04-09 15:22:23 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-2">
|
|
|
|
|
<div class="column">
|
2024-04-22 18:11:24 +07:00
|
|
|
<span class="text-grey-6">ประเภทตำแหน่ง</span>
|
2024-04-19 15:30:39 +07:00
|
|
|
<span class="text-weight-medium text-dark">{{
|
2024-04-10 10:07:41 +07:00
|
|
|
formProfile.type
|
|
|
|
|
}}</span>
|
2024-04-09 15:22:23 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-2">
|
|
|
|
|
<div class="column">
|
2024-04-22 18:11:24 +07:00
|
|
|
<span class="text-grey-6">ระดับตำแหน่ง</span>
|
2024-04-19 15:30:39 +07:00
|
|
|
<span class="text-weight-medium text-dark">{{
|
2024-04-10 10:07:41 +07:00
|
|
|
formProfile.level
|
|
|
|
|
}}</span>
|
2024-04-09 15:22:23 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-2">
|
|
|
|
|
<div class="column">
|
|
|
|
|
<span class="text-grey-6">สถานะการประเมิน</span>
|
2024-04-19 15:30:39 +07:00
|
|
|
<span class="text-weight-medium text-dark">{{
|
2024-04-10 10:07:41 +07:00
|
|
|
formProfile.status
|
|
|
|
|
}}</span>
|
2024-04-09 15:22:23 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-04-22 18:11:24 +07:00
|
|
|
<div class="col-2">
|
|
|
|
|
<div class="column">
|
|
|
|
|
<span class="text-grey-6">ผลการประเมิน</span>
|
|
|
|
|
<span class="text-weight-medium text-dark">{{
|
|
|
|
|
formProfile.result
|
|
|
|
|
}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-04-09 15:22:23 +07:00
|
|
|
<div class="col-2">
|
|
|
|
|
<div class="column">
|
|
|
|
|
<span class="text-grey-6">คะแนนประเมิน</span>
|
2024-04-19 15:30:39 +07:00
|
|
|
<span class="text-weight-medium text-primary">{{
|
2024-04-10 10:07:41 +07:00
|
|
|
formProfile.score
|
|
|
|
|
}}</span>
|
2024-04-09 15:22:23 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</q-card>
|
|
|
|
|
|
|
|
|
|
<q-card class="q-mt-md rounded">
|
|
|
|
|
<TabMain />
|
|
|
|
|
</q-card>
|
2024-04-04 14:14:25 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-04-26 15:18:28 +07:00
|
|
|
|
|
|
|
|
<q-dialog v-model="modalEdit" persistent>
|
|
|
|
|
<q-card bordered style="width: 50vh">
|
|
|
|
|
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
|
|
|
|
<DialogHeader tittle="แก้ไขผู้ประเมิน" :close="close" />
|
|
|
|
|
<q-separator />
|
|
|
|
|
<q-card-section>
|
|
|
|
|
<div class="column q-gutter-sm">
|
|
|
|
|
<q-select
|
2024-04-26 16:28:38 +07:00
|
|
|
v-model="evaluatorId"
|
2024-04-26 15:18:28 +07:00
|
|
|
outlined
|
|
|
|
|
label="ผู้ประเมิน"
|
|
|
|
|
dense
|
|
|
|
|
option-label="name"
|
|
|
|
|
option-value="id"
|
|
|
|
|
:options="evaluatorIdOp"
|
2024-04-26 16:28:38 +07:00
|
|
|
class="inputgreen"
|
2024-04-26 15:18:28 +07:00
|
|
|
map-options
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
lazy-rules
|
|
|
|
|
:rules="[
|
|
|
|
|
(val:string) =>
|
|
|
|
|
!!val || `${'กรุณาเลือกผู้ประเมิน'}`,
|
|
|
|
|
]"
|
2024-04-26 16:28:38 +07:00
|
|
|
use-input
|
|
|
|
|
@filter="(inputValue:any,
|
|
|
|
|
doneFn:Function) => filterOption(inputValue, doneFn,'evaluatorIdOp'
|
|
|
|
|
) "
|
2024-04-26 15:18:28 +07:00
|
|
|
/>
|
|
|
|
|
<q-select
|
2024-04-26 16:28:38 +07:00
|
|
|
v-model="commanderId"
|
2024-04-26 15:18:28 +07:00
|
|
|
outlined
|
|
|
|
|
label="ผู้บังคับบัญชาเหนือขึ้นไป"
|
|
|
|
|
dense
|
|
|
|
|
option-label="name"
|
|
|
|
|
option-value="id"
|
|
|
|
|
:options="commanderIdOp"
|
|
|
|
|
map-options
|
2024-04-26 16:28:38 +07:00
|
|
|
class="inputgreen"
|
|
|
|
|
use-input
|
|
|
|
|
@filter="(inputValue:any,
|
|
|
|
|
doneFn:Function) => filterOption(inputValue, doneFn,'commanderIdOp'
|
|
|
|
|
) "
|
2024-04-26 15:18:28 +07:00
|
|
|
>
|
2024-04-26 16:28:38 +07:00
|
|
|
<template v-if="commanderId" v-slot:append>
|
2024-04-26 15:18:28 +07:00
|
|
|
<q-icon
|
|
|
|
|
name="cancel"
|
2024-04-26 16:28:38 +07:00
|
|
|
@click.stop.prevent="commanderId = null"
|
2024-04-26 15:18:28 +07:00
|
|
|
class="cursor-pointer"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</q-select>
|
|
|
|
|
<q-select
|
2024-04-26 16:28:38 +07:00
|
|
|
v-model="commanderHighId"
|
2024-04-26 15:18:28 +07:00
|
|
|
outlined
|
|
|
|
|
label="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง"
|
|
|
|
|
dense
|
|
|
|
|
option-label="name"
|
|
|
|
|
option-value="id"
|
|
|
|
|
:options="commanderHighOp"
|
|
|
|
|
map-options
|
2024-04-26 16:28:38 +07:00
|
|
|
use-input
|
|
|
|
|
class="inputgreen"
|
|
|
|
|
@filter="(inputValue:any,
|
|
|
|
|
doneFn:Function) => filterOption(inputValue, doneFn,'commanderHighOp'
|
|
|
|
|
) "
|
2024-04-26 15:18:28 +07:00
|
|
|
>
|
2024-04-26 16:28:38 +07:00
|
|
|
<template v-if="commanderHighId" v-slot:append>
|
2024-04-26 15:18:28 +07:00
|
|
|
<q-icon
|
|
|
|
|
name="cancel"
|
2024-04-26 16:28:38 +07:00
|
|
|
@click.stop.prevent="commanderHighId = null"
|
2024-04-26 15:18:28 +07:00
|
|
|
class="cursor-pointer"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</q-select>
|
|
|
|
|
</div>
|
|
|
|
|
</q-card-section>
|
|
|
|
|
<q-separator />
|
|
|
|
|
<q-card-actions align="right" class="bg-white text-teal">
|
|
|
|
|
<q-btn label="บันทึก" color="secondary" type="submit"
|
|
|
|
|
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
|
|
|
|
>
|
|
|
|
|
</q-card-actions>
|
|
|
|
|
</q-form>
|
|
|
|
|
</q-card>
|
|
|
|
|
</q-dialog>
|
2024-04-29 13:41:41 +07:00
|
|
|
|
|
|
|
|
<q-dialog v-model="modalScore" persistent>
|
|
|
|
|
<q-card bordered style="width: 50vh">
|
|
|
|
|
<q-form greedy @submit.prevent @validation-success="onSubmitScore">
|
2024-04-30 09:47:56 +07:00
|
|
|
<DialogHeader tittle="แก้ไขคะแนนเต็ม" :close="clearScore" />
|
2024-04-29 13:41:41 +07:00
|
|
|
<q-separator />
|
|
|
|
|
<q-card-section>
|
|
|
|
|
<div class="column q-gutter-sm">
|
|
|
|
|
<q-input
|
|
|
|
|
v-model="plannedPoint"
|
|
|
|
|
label="งานตามแผนปฏิบัติราชการประจำปี"
|
|
|
|
|
dense
|
|
|
|
|
outlined
|
|
|
|
|
class="inputgreen"
|
|
|
|
|
mask="###"
|
2024-04-30 09:47:56 +07:00
|
|
|
:rules="[
|
|
|
|
|
(val) =>
|
|
|
|
|
!!val ||
|
|
|
|
|
val == '0' ||
|
|
|
|
|
'กรุณากรอกคะเเนนงานตามแผนปฏิบัติราชการประจำปี หรือ 0',
|
|
|
|
|
]"
|
2024-04-29 13:41:41 +07:00
|
|
|
hide-bottom-space
|
|
|
|
|
lazy-rules
|
|
|
|
|
/>
|
|
|
|
|
<q-input
|
|
|
|
|
v-model="rolePoint"
|
|
|
|
|
label="งานตามหน้าที่ความรับผิดชอบหลัก"
|
|
|
|
|
dense
|
|
|
|
|
outlined
|
|
|
|
|
class="inputgreen"
|
|
|
|
|
mask="###"
|
2024-04-30 09:47:56 +07:00
|
|
|
:rules="[(val:string) => !!val || val == '0' || `${'กรุณากรอกคะเเนนงานตามหน้าที่ความรับผิดชอบหลัก หรือ 0'}`,]"
|
2024-04-29 13:41:41 +07:00
|
|
|
hide-bottom-space
|
|
|
|
|
lazy-rules
|
|
|
|
|
/>
|
|
|
|
|
<q-input
|
|
|
|
|
v-model="specialPoint"
|
|
|
|
|
label="งานที่ได้รับมอบหมายพิเศษ"
|
|
|
|
|
dense
|
|
|
|
|
outlined
|
|
|
|
|
class="inputgreen"
|
|
|
|
|
mask="###"
|
2024-04-30 09:47:56 +07:00
|
|
|
:rules="[(val:string) => !!val || val == '0' ||`${'กรุณากรอกคะเเนนงานที่ได้รับมอบหมายพิเศษ หรือ 0'}`,]"
|
2024-04-29 13:41:41 +07:00
|
|
|
hide-bottom-space
|
|
|
|
|
lazy-rules
|
|
|
|
|
/>
|
|
|
|
|
<q-input
|
|
|
|
|
v-model="capacityPoint"
|
|
|
|
|
label="สมรรถนะ"
|
|
|
|
|
dense
|
|
|
|
|
outlined
|
|
|
|
|
class="inputgreen"
|
|
|
|
|
mask="###"
|
2024-04-30 09:47:56 +07:00
|
|
|
:rules="[(val:string) => !!val || val == '0' ||`${'กรุณากรอกคะเเนนสมรรถนะ หรือ 0'}`,]"
|
2024-04-29 13:41:41 +07:00
|
|
|
hide-bottom-space
|
|
|
|
|
lazy-rules
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</q-card-section>
|
|
|
|
|
<q-separator />
|
|
|
|
|
<q-card-actions class="bg-white row justify-between">
|
|
|
|
|
<div class="col-8 text-center text-red text-bold">
|
|
|
|
|
<span v-if="scoreTotal == true"
|
|
|
|
|
>คะแนนเต็มรวมกันต้องเท่ากับ 100 คะแนน</span
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
<q-btn
|
|
|
|
|
label="บันทึก"
|
|
|
|
|
color="secondary"
|
|
|
|
|
type="submit"
|
|
|
|
|
:disable="totalScore !== 100"
|
|
|
|
|
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
|
|
|
|
>
|
|
|
|
|
</q-card-actions>
|
|
|
|
|
</q-form>
|
|
|
|
|
</q-card>
|
|
|
|
|
</q-dialog>
|
2024-04-04 14:14:25 +07:00
|
|
|
</template>
|
2024-04-19 15:30:39 +07:00
|
|
|
<style>
|
2024-04-22 17:25:58 +07:00
|
|
|
.bg-toolbar {
|
|
|
|
|
background-color: #f2fbfa;
|
2024-04-19 15:30:39 +07:00
|
|
|
}
|
2024-04-22 18:11:24 +07:00
|
|
|
|
|
|
|
|
.absolute-center-left {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
}
|
2024-04-19 15:30:39 +07:00
|
|
|
</style>
|