KPI
This commit is contained in:
parent
243f500d4a
commit
4f973738a3
15 changed files with 1896 additions and 733 deletions
|
|
@ -21,14 +21,8 @@ const dataListCriteria = ref<ListCriteria[]>([]);
|
|||
const modalCriteria = ref<boolean>(false);
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const {
|
||||
hideLoader,
|
||||
messageError,
|
||||
date2Thai,
|
||||
success,
|
||||
showLoader,
|
||||
dialogRemove,
|
||||
} = useCounterMixin();
|
||||
const { hideLoader, messageError, success, showLoader, dialogRemove } =
|
||||
useCounterMixin();
|
||||
const store = useKpiDataStore();
|
||||
|
||||
const evaluationId = ref<string>(route.params.id.toString());
|
||||
|
|
@ -152,10 +146,6 @@ function fetchAssigned() {
|
|||
});
|
||||
}
|
||||
|
||||
function onInfo() {
|
||||
modalCriteria.value = true;
|
||||
}
|
||||
|
||||
function getCriteria() {
|
||||
http
|
||||
.get(config.API.KpiEvaluationInfo)
|
||||
|
|
@ -169,7 +159,7 @@ function getCriteria() {
|
|||
}
|
||||
|
||||
const isShowScore = computed(() => {
|
||||
return store.tabOpen === 3 && store.tabMain === "3";
|
||||
return store.tabMain === "3";
|
||||
});
|
||||
|
||||
watch(
|
||||
|
|
@ -195,32 +185,40 @@ watch(
|
|||
|
||||
store.indicatorScoreVal =
|
||||
store.indicatorPercentVal * (store.indicatorScore / 100);
|
||||
|
||||
if (store.isUpdate && store.tabMain === "3") {
|
||||
http
|
||||
.put(config.API.updatePoint(evaluationId.value), {
|
||||
totalPoint1: (
|
||||
store.indicatorPercentVal *
|
||||
(store.indicatorScore / 100)
|
||||
).toFixed(2),
|
||||
summaryPoint: (
|
||||
store.indicatorScoreVal +
|
||||
store.competencyScoreVal +
|
||||
store.devScoreVal
|
||||
).toFixed(2),
|
||||
})
|
||||
.then((res) => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(async () => {
|
||||
showLoader();
|
||||
try {
|
||||
await Promise.all([
|
||||
getCriteria(),
|
||||
fetchListPlanned(),
|
||||
fetchListRole(),
|
||||
fetchAssigned(),
|
||||
]);
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
} finally {
|
||||
setTimeout(() => {
|
||||
hideLoader();
|
||||
}, 4000);
|
||||
}
|
||||
onMounted(() => {
|
||||
getCriteria();
|
||||
fetchListPlanned();
|
||||
fetchListRole();
|
||||
fetchAssigned();
|
||||
setTimeout(() => {
|
||||
hideLoader();
|
||||
}, 1000);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-scroll-area
|
||||
style="height: 100vh"
|
||||
style="height: 100vh; width: auto"
|
||||
class="bg-white row col-12 text-dark q-pa-md"
|
||||
>
|
||||
<div class="text-weight-bold text-body2">
|
||||
|
|
@ -229,7 +227,12 @@ onMounted(async () => {
|
|||
</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 ภารกิจตามนโยบายและยุทธศาสตร์ของกรุงเทพมหานคร`"
|
||||
|
|
@ -415,16 +418,6 @@ onMounted(async () => {
|
|||
<div class="text-weight-bold text-body2 q-mb-sm">
|
||||
<span class="txt-under text-blue-6">องค์ประกอบที่ 2</span>
|
||||
<span class="q-ml-sm"> พฤติกรรมการปฎิบัติราชการ (สมรรถนะ)</span>
|
||||
<q-btn
|
||||
flat
|
||||
icon="info"
|
||||
color="info"
|
||||
round
|
||||
class="q-ml-xs"
|
||||
@click="onInfo"
|
||||
>
|
||||
<q-tooltip>เกณฑ์การประเมิน</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<Competency v-model:dataListCriteria="dataListCriteria" />
|
||||
|
|
@ -437,7 +430,8 @@ onMounted(async () => {
|
|||
:rows="[
|
||||
{
|
||||
name: `สรุปผลการประเมินสมรรถนะ (คะแนนเต็ม ${
|
||||
!store.dataEvaluation.posExecutiveName
|
||||
store.dataEvaluation.posTypeName != 'อำนวยการ' &&
|
||||
store.dataEvaluation.posTypeName != 'บริหาร'
|
||||
? store.competencyScore
|
||||
: store.excusiveCompetencyScore
|
||||
} คะแนน)`,
|
||||
|
|
@ -464,7 +458,12 @@ onMounted(async () => {
|
|||
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">
|
||||
|
|
@ -502,7 +501,10 @@ onMounted(async () => {
|
|||
|
||||
<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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue