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() {
|
||||
modalCriteria.value = true;
|
||||
}
|
||||
|
||||
const totalCompetency = ref<number>(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"
|
||||
>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
|
@ -268,7 +284,10 @@ onMounted(() => {
|
|||
</q-btn>
|
||||
</div>
|
||||
|
||||
<Competency v-model:dataListCriteria="dataListCriteria" />
|
||||
<Competency
|
||||
v-model:dataListCriteria="dataListCriteria"
|
||||
v-model:total-competency="totalCompetency"
|
||||
/>
|
||||
</div>
|
||||
</q-scroll-area>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ import type {
|
|||
const dataListCriteria = defineModel<ListCriteria[]>("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
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ const commanderHighMainOp = ref<DataOptions[]>([]);
|
|||
const evaluatorId = ref<any>(null);
|
||||
const commanderId = ref<any>(null);
|
||||
const commanderHighId = ref<any>(null);
|
||||
const score = ref<number>(0);
|
||||
|
||||
const formProfile = reactive<FormProfile>({
|
||||
fullName: "",
|
||||
|
|
@ -440,7 +441,7 @@ onMounted(() => {
|
|||
<div class="column">
|
||||
<span class="text-grey-6">คะแนนประเมิน</span>
|
||||
<span class="text-weight-medium text-primary">{{
|
||||
formProfile.score
|
||||
score.toFixed(2)
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -451,7 +452,7 @@ onMounted(() => {
|
|||
</q-card>
|
||||
|
||||
<q-card class="q-mt-md rounded">
|
||||
<TabMain />
|
||||
<TabMain v-model:score="score" />
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue