diff --git a/src/modules/08_KPI/components/Tab/01_Assessment.vue b/src/modules/08_KPI/components/Tab/01_Assessment.vue index 4fe3aed..680a5d6 100644 --- a/src/modules/08_KPI/components/Tab/01_Assessment.vue +++ b/src/modules/08_KPI/components/Tab/01_Assessment.vue @@ -142,8 +142,11 @@ function fetchAssigned() { function onInfo() { modalCriteria.value = true; } + +const totalCompetency = ref(0); const resultWork = computed(() => { const total = totalResults1.value + totalResults2.value + totalResults3.value; + score.value = total; 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( () => store.dataEvaluation.plannedPoint, (newValue, oldValue) => { @@ -203,7 +219,7 @@ onMounted(() => { class="bg-white row col-12 text-dark q-pa-md" >
- องค์ประกอบที่ 1 + องค์ประกอบที่ 1 ผลสัมฤทธิ์ของงาน
@@ -268,7 +284,10 @@ onMounted(() => { - + diff --git a/src/modules/08_KPI/components/Tab/Topic/02_Competency.vue b/src/modules/08_KPI/components/Tab/Topic/02_Competency.vue index e841800..7ee27a2 100644 --- a/src/modules/08_KPI/components/Tab/Topic/02_Competency.vue +++ b/src/modules/08_KPI/components/Tab/Topic/02_Competency.vue @@ -18,6 +18,10 @@ import type { const dataListCriteria = defineModel("dataListCriteria", { required: true, }); +const totalCompetency = defineModel("totalCompetency", { + type: Number, + default: 0, +}); const sortedDataListCriteria = computed(() => { return dataListCriteria.value.sort((a, b) => a.level - b.level); @@ -159,6 +163,7 @@ function getData(type: string) { ? (resultAvg / weightAvg) * store.dataEvaluation.capacityPoint : 0; resultEvaluation.value = sum.toFixed(2); + totalCompetency.value = sum; } // end cal summary diff --git a/src/modules/08_KPI/views/form.vue b/src/modules/08_KPI/views/form.vue index 939f0c5..e685def 100644 --- a/src/modules/08_KPI/views/form.vue +++ b/src/modules/08_KPI/views/form.vue @@ -49,6 +49,7 @@ const commanderHighMainOp = ref([]); const evaluatorId = ref(null); const commanderId = ref(null); const commanderHighId = ref(null); +const score = ref(0); const formProfile = reactive({ fullName: "", @@ -440,7 +441,7 @@ onMounted(() => {
คะแนนประเมิน {{ - formProfile.score + score.toFixed(2) }}
@@ -451,7 +452,7 @@ onMounted(() => { - +