updated คะแนนประเมินระบบ kpi
This commit is contained in:
parent
1cbaecce8e
commit
1ae9e85af9
3 changed files with 29 additions and 4 deletions
|
|
@ -142,8 +142,11 @@ function fetchAssigned() {
|
||||||
function onInfo() {
|
function onInfo() {
|
||||||
modalCriteria.value = true;
|
modalCriteria.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const totalCompetency = ref<number>(0);
|
||||||
const resultWork = computed(() => {
|
const resultWork = computed(() => {
|
||||||
const total = totalResults1.value + totalResults2.value + totalResults3.value;
|
const total = totalResults1.value + totalResults2.value + totalResults3.value;
|
||||||
|
score.value = total;
|
||||||
return total.toFixed(2);
|
return total.toFixed(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -162,6 +165,19 @@ function getCriteria() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => totalCompetency.value,
|
||||||
|
(newValue, oldValue) => {
|
||||||
|
if (newValue !== oldValue) {
|
||||||
|
score.value =
|
||||||
|
totalResults1.value +
|
||||||
|
totalResults2.value +
|
||||||
|
totalResults3.value +
|
||||||
|
newValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => store.dataEvaluation.plannedPoint,
|
() => store.dataEvaluation.plannedPoint,
|
||||||
(newValue, oldValue) => {
|
(newValue, oldValue) => {
|
||||||
|
|
@ -203,7 +219,7 @@ onMounted(() => {
|
||||||
class="bg-white row col-12 text-dark q-pa-md"
|
class="bg-white row col-12 text-dark q-pa-md"
|
||||||
>
|
>
|
||||||
<div class="text-weight-bold text-body2">
|
<div class="text-weight-bold text-body2">
|
||||||
<span class="txt-under text-blue-6">องค์ประกอบที่ 1</span>
|
<span class="txt-under text-blue-6">องค์ประกอบที่ 1 </span>
|
||||||
<span class="q-ml-sm"> ผลสัมฤทธิ์ของงาน</span>
|
<span class="q-ml-sm"> ผลสัมฤทธิ์ของงาน</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -268,7 +284,10 @@ onMounted(() => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Competency v-model:dataListCriteria="dataListCriteria" />
|
<Competency
|
||||||
|
v-model:dataListCriteria="dataListCriteria"
|
||||||
|
v-model:total-competency="totalCompetency"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-scroll-area>
|
</q-scroll-area>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,10 @@ import type {
|
||||||
const dataListCriteria = defineModel<ListCriteria[]>("dataListCriteria", {
|
const dataListCriteria = defineModel<ListCriteria[]>("dataListCriteria", {
|
||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
|
const totalCompetency = defineModel("totalCompetency", {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
});
|
||||||
|
|
||||||
const sortedDataListCriteria = computed(() => {
|
const sortedDataListCriteria = computed(() => {
|
||||||
return dataListCriteria.value.sort((a, b) => a.level - b.level);
|
return dataListCriteria.value.sort((a, b) => a.level - b.level);
|
||||||
|
|
@ -159,6 +163,7 @@ function getData(type: string) {
|
||||||
? (resultAvg / weightAvg) * store.dataEvaluation.capacityPoint
|
? (resultAvg / weightAvg) * store.dataEvaluation.capacityPoint
|
||||||
: 0;
|
: 0;
|
||||||
resultEvaluation.value = sum.toFixed(2);
|
resultEvaluation.value = sum.toFixed(2);
|
||||||
|
totalCompetency.value = sum;
|
||||||
}
|
}
|
||||||
// end cal summary
|
// end cal summary
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ const commanderHighMainOp = ref<DataOptions[]>([]);
|
||||||
const evaluatorId = ref<any>(null);
|
const evaluatorId = ref<any>(null);
|
||||||
const commanderId = ref<any>(null);
|
const commanderId = ref<any>(null);
|
||||||
const commanderHighId = ref<any>(null);
|
const commanderHighId = ref<any>(null);
|
||||||
|
const score = ref<number>(0);
|
||||||
|
|
||||||
const formProfile = reactive<FormProfile>({
|
const formProfile = reactive<FormProfile>({
|
||||||
fullName: "",
|
fullName: "",
|
||||||
|
|
@ -440,7 +441,7 @@ onMounted(() => {
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<span class="text-grey-6">คะแนนประเมิน</span>
|
<span class="text-grey-6">คะแนนประเมิน</span>
|
||||||
<span class="text-weight-medium text-primary">{{
|
<span class="text-weight-medium text-primary">{{
|
||||||
formProfile.score
|
score.toFixed(2)
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -451,7 +452,7 @@ onMounted(() => {
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<q-card class="q-mt-md rounded">
|
<q-card class="q-mt-md rounded">
|
||||||
<TabMain />
|
<TabMain v-model:score="score" />
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue