updated kpi progress & problem
This commit is contained in:
parent
9156fb8e72
commit
beebb44d2f
8 changed files with 291 additions and 213 deletions
|
|
@ -21,6 +21,14 @@ const indicatorWeightTotal = defineModel("indicatorWeightTotal", {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0,
|
default: 0,
|
||||||
});
|
});
|
||||||
|
const indicatorWeight1Total = defineModel("indicatorWeight1Total", {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
});
|
||||||
|
const indicatorWeight2Total = defineModel("indicatorWeight2Total", {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
});
|
||||||
const dataListCriteria = ref<ListCriteria[]>([]);
|
const dataListCriteria = ref<ListCriteria[]>([]);
|
||||||
|
|
||||||
const modalCriteria = ref<boolean>(false);
|
const modalCriteria = ref<boolean>(false);
|
||||||
|
|
@ -72,6 +80,8 @@ function fetchListPlanned() {
|
||||||
);
|
);
|
||||||
|
|
||||||
weightPlanned.value = weight;
|
weightPlanned.value = weight;
|
||||||
|
indicatorWeight1Total.value = Number(weight);
|
||||||
|
store.indicatorScoreVal = result;
|
||||||
|
|
||||||
totalResults1.value =
|
totalResults1.value =
|
||||||
(result * store.dataEvaluation.plannedPoint) / weight;
|
(result * store.dataEvaluation.plannedPoint) / weight;
|
||||||
|
|
@ -104,6 +114,7 @@ function fetchListRole() {
|
||||||
);
|
);
|
||||||
|
|
||||||
weightRole.value = weight;
|
weightRole.value = weight;
|
||||||
|
indicatorWeight1Total.value = Number(weight);
|
||||||
|
|
||||||
totalResults2.value =
|
totalResults2.value =
|
||||||
(result * store.dataEvaluation.rolePoint) / weight;
|
(result * store.dataEvaluation.rolePoint) / weight;
|
||||||
|
|
@ -168,6 +179,13 @@ function getCriteria() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isShowScore = computed(() => {
|
||||||
|
return (
|
||||||
|
store.tabOpen === 3 &&
|
||||||
|
store.dataEvaluation.evaluationStatus === "EVALUATING"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
[weightPlanned, weightRole, weightAssigned],
|
[weightPlanned, weightRole, weightAssigned],
|
||||||
([newA, newB, newC], [prevA, prevB, prevC]) => {
|
([newA, newB, newC], [prevA, prevB, prevC]) => {
|
||||||
|
|
@ -219,6 +237,7 @@ onMounted(() => {
|
||||||
:total="totalResults1"
|
:total="totalResults1"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<div v-if="isShowScore">
|
||||||
<q-table
|
<q-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -252,6 +271,9 @@ onMounted(() => {
|
||||||
hide-bottom
|
hide-bottom
|
||||||
class="q-mt-xs q-mb-md"
|
class="q-mt-xs q-mb-md"
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else class="q-mt-md"></div>
|
||||||
|
|
||||||
<Work
|
<Work
|
||||||
v-model:data="rows_03"
|
v-model:data="rows_03"
|
||||||
|
|
@ -261,6 +283,7 @@ onMounted(() => {
|
||||||
:total="totalResults3"
|
:total="totalResults3"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<div v-if="isShowScore">
|
||||||
<q-table
|
<q-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -309,6 +332,7 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<Work
|
<Work
|
||||||
|
|
@ -333,6 +357,7 @@ onMounted(() => {
|
||||||
:total="totalResults3"
|
:total="totalResults3"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<div v-if="isShowScore">
|
||||||
<q-table
|
<q-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -376,6 +401,7 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<q-separator size="3px" class="q-my-lg" />
|
<q-separator size="3px" class="q-my-lg" />
|
||||||
|
|
||||||
|
|
@ -398,6 +424,7 @@ onMounted(() => {
|
||||||
<Competency v-model:dataListCriteria="dataListCriteria" />
|
<Competency v-model:dataListCriteria="dataListCriteria" />
|
||||||
|
|
||||||
<q-table
|
<q-table
|
||||||
|
v-if="isShowScore"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
bordered
|
bordered
|
||||||
|
|
@ -434,6 +461,7 @@ onMounted(() => {
|
||||||
<div v-if="!store.dataProfile.posExecutiveName">
|
<div v-if="!store.dataProfile.posExecutiveName">
|
||||||
<Develop />
|
<Develop />
|
||||||
|
|
||||||
|
<div v-if="isShowScore">
|
||||||
<q-table
|
<q-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -466,7 +494,7 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="!store.dataProfile.posExecutiveName"
|
v-if="isShowScore && !store.dataProfile.posExecutiveName"
|
||||||
class="row text-body2 text-weight-bold"
|
class="row text-body2 text-weight-bold"
|
||||||
>
|
>
|
||||||
<div class="col-12 text-center row justify-center">
|
<div class="col-12 text-center row justify-center">
|
||||||
|
|
@ -491,6 +519,7 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</q-scroll-area>
|
</q-scroll-area>
|
||||||
|
|
||||||
<DialogListCriteria
|
<DialogListCriteria
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,14 @@ const indicatorWeightTotal = defineModel("indicatorWeightTotal", {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0,
|
default: 0,
|
||||||
});
|
});
|
||||||
|
const indicatorWeight1Total = defineModel("indicatorWeight1Total", {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
});
|
||||||
|
const indicatorWeight2Total = defineModel("indicatorWeight2Total", {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
});
|
||||||
|
|
||||||
const itemsTab = ref<any>([
|
const itemsTab = ref<any>([
|
||||||
{
|
{
|
||||||
|
|
@ -102,6 +110,8 @@ const splitterModel = ref<number>(12);
|
||||||
<Assessment
|
<Assessment
|
||||||
v-if="store.tabMain === '1'"
|
v-if="store.tabMain === '1'"
|
||||||
v-model:indicatorWeightTotal="indicatorWeightTotal"
|
v-model:indicatorWeightTotal="indicatorWeightTotal"
|
||||||
|
v-model:indicatorWeight1Total="indicatorWeight1Total"
|
||||||
|
v-model:indicatorWeight2Total="indicatorWeight2Total"
|
||||||
/>
|
/>
|
||||||
<Assessment v-if="store.tabMain === '2'" :type="'evaluator'" />
|
<Assessment v-if="store.tabMain === '2'" :type="'evaluator'" />
|
||||||
<Assessment v-if="store.tabMain === '3'" :type="'commander'" />
|
<Assessment v-if="store.tabMain === '3'" :type="'commander'" />
|
||||||
|
|
|
||||||
|
|
@ -357,7 +357,12 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<td>
|
<td>
|
||||||
<!-- <div v-if="store.dataEvaluation.evaluationStatus == 'APPROVE'"> -->
|
<div
|
||||||
|
v-if="
|
||||||
|
store.dataEvaluation.evaluationStatus == 'APPROVE' &&
|
||||||
|
store.tabMain === '2'
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -381,12 +386,13 @@ watch(
|
||||||
>
|
>
|
||||||
<q-tooltip>รายงานปัญหา</q-tooltip>
|
<q-tooltip>รายงานปัญหา</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<!-- </div> -->
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
||||||
store.rolePerson === 'USER'
|
store.rolePerson === 'USER' &&
|
||||||
|
store.tabMain === '1'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
|
|
@ -290,13 +290,7 @@ onMounted(() => {
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th
|
<q-th auto-width />
|
||||||
auto-width
|
|
||||||
v-if="
|
|
||||||
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
|
||||||
store.rolePerson === 'USER'
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
|
|
@ -359,7 +353,12 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td>
|
<q-td>
|
||||||
<div v-if="store.dataEvaluation.evaluationStatus == 'APPROVE'">
|
<div
|
||||||
|
v-if="
|
||||||
|
store.dataEvaluation.evaluationStatus == 'APPROVE' &&
|
||||||
|
store.tabMain === '2'
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -388,7 +387,8 @@ onMounted(() => {
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
||||||
store.rolePerson === 'USER'
|
store.rolePerson === 'USER' &&
|
||||||
|
store.tabMain === '1'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,12 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td>
|
<q-td>
|
||||||
<div v-if="store.dataEvaluation.evaluationStatus == 'APPROVE'">
|
<div
|
||||||
|
v-if="
|
||||||
|
store.dataEvaluation.evaluationStatus == 'APPROVE' &&
|
||||||
|
store.tabMain === '1'
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -316,7 +321,8 @@ onMounted(() => {
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
||||||
store.rolePerson === 'USER'
|
store.rolePerson === 'USER' &&
|
||||||
|
store.tabMain === '2'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
|
|
@ -273,15 +273,36 @@ export const useKpiDataStore = defineStore("KPIDate", () => {
|
||||||
rolePerson.value = role;
|
rolePerson.value = role;
|
||||||
|
|
||||||
switch (dataEvaluation.value.evaluationStatus) {
|
switch (dataEvaluation.value.evaluationStatus) {
|
||||||
case "NEW" || "NEW_EVALUATOR" || "NEW_COMMANDER" || "NEW_COMMANDER_HIGH":
|
case "NEW":
|
||||||
|
tabOpen.value = 1;
|
||||||
|
break;
|
||||||
|
case "NEW_EVALUATOR":
|
||||||
|
tabOpen.value = 1;
|
||||||
|
break;
|
||||||
|
case "NEW_COMMANDER":
|
||||||
|
tabOpen.value = 1;
|
||||||
|
break;
|
||||||
|
case "NEW_COMMANDER_HIGH":
|
||||||
tabOpen.value = 1;
|
tabOpen.value = 1;
|
||||||
break;
|
break;
|
||||||
case "APPROVE":
|
case "APPROVE":
|
||||||
tabOpen.value = 2;
|
tabOpen.value = 2;
|
||||||
break;
|
break;
|
||||||
default:
|
case "EVALUATING":
|
||||||
tabOpen.value = 3;
|
tabOpen.value = 3;
|
||||||
break;
|
break;
|
||||||
|
case "EVALUATING_EVALUATOR":
|
||||||
|
tabOpen.value = 3;
|
||||||
|
break;
|
||||||
|
case "EVALUATING_COMMANDER":
|
||||||
|
tabOpen.value = 3;
|
||||||
|
break;
|
||||||
|
case "EVALUATING_COMMANDER_HIGH":
|
||||||
|
tabOpen.value = 3;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
tabOpen.value = 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -346,6 +346,8 @@ function requireEdit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const indicatorWeightTotal = ref<number>(0);
|
const indicatorWeightTotal = ref<number>(0);
|
||||||
|
const indicatorWeight1Total = ref<number>(0);
|
||||||
|
const indicatorWeight2Total = ref<number>(0);
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await getAll();
|
await getAll();
|
||||||
|
|
@ -400,9 +402,12 @@ onMounted(async () => {
|
||||||
<div class="q-gutter-x-sm">
|
<div class="q-gutter-x-sm">
|
||||||
<span
|
<span
|
||||||
v-if="
|
v-if="
|
||||||
store.dataProfile.posExecutiveName == null &&
|
(store.dataProfile.posExecutiveName == null &&
|
||||||
indicatorWeightTotal > 0 &&
|
indicatorWeightTotal > 0 &&
|
||||||
indicatorWeightTotal != 100
|
indicatorWeightTotal != 100) ||
|
||||||
|
(store.dataEvaluation.evaluatorId != null &&
|
||||||
|
indicatorWeight1Total != 100 &&
|
||||||
|
indicatorWeight2Total != 20)
|
||||||
"
|
"
|
||||||
class="text-red"
|
class="text-red"
|
||||||
>*น้ำหนัก(ร้อยละ) ผลสัมฤทธิ์ของงานไม่ถูกต้อง</span
|
>*น้ำหนัก(ร้อยละ) ผลสัมฤทธิ์ของงานไม่ถูกต้อง</span
|
||||||
|
|
@ -413,9 +418,12 @@ onMounted(async () => {
|
||||||
store.dataEvaluation.evaluationStatus == 'NEW'
|
store.dataEvaluation.evaluationStatus == 'NEW'
|
||||||
"
|
"
|
||||||
:disabled="
|
:disabled="
|
||||||
store.dataEvaluation.evaluatorId == null ||
|
(store.dataProfile.posExecutiveName == null &&
|
||||||
(indicatorWeightTotal > 0 &&
|
indicatorWeightTotal > 0 &&
|
||||||
indicatorWeightTotal != 100)
|
indicatorWeightTotal != 100) ||
|
||||||
|
(store.dataEvaluation.evaluatorId != null &&
|
||||||
|
indicatorWeight1Total != 100 &&
|
||||||
|
indicatorWeight2Total != 20)
|
||||||
"
|
"
|
||||||
unelevated
|
unelevated
|
||||||
round
|
round
|
||||||
|
|
@ -558,6 +566,8 @@ onMounted(async () => {
|
||||||
v-model:indicatorScore="indicatorScore"
|
v-model:indicatorScore="indicatorScore"
|
||||||
v-model:competencyScore="competencyScore"
|
v-model:competencyScore="competencyScore"
|
||||||
v-model:indicatorWeightTotal="indicatorWeightTotal"
|
v-model:indicatorWeightTotal="indicatorWeightTotal"
|
||||||
|
v-model:indicatorWeight1Total="indicatorWeight1Total"
|
||||||
|
v-model:indicatorWeight2Total="indicatorWeight2Total"
|
||||||
/>
|
/>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -305,11 +305,7 @@ onMounted(async () => {
|
||||||
narrow-indicator
|
narrow-indicator
|
||||||
>
|
>
|
||||||
<q-tab name="1" label="รายการทั้งหมด" @click="onChangTab" />
|
<q-tab name="1" label="รายการทั้งหมด" @click="onChangTab" />
|
||||||
<q-tab
|
<q-tab name="2" label="รออนุมัติข้อตกลง" @click="onChangTab" />
|
||||||
name="2"
|
|
||||||
label="อนุมัติเพื่อเริ่มประเมิน"
|
|
||||||
@click="onChangTab"
|
|
||||||
/>
|
|
||||||
<q-tab
|
<q-tab
|
||||||
name="3"
|
name="3"
|
||||||
label="รออนุมัติแก้ไขข้อตกลง"
|
label="รออนุมัติแก้ไขข้อตกลง"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue