From 4dfc9bf4d6d4d9dadf87475bbcb076b5796040ab Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 13 Jul 2026 15:01:41 +0700 Subject: [PATCH] refactor(probation): calculate score4 score5 --- .../probation/FormEvaluation/FormEvaluateScore.vue | 13 +++++++------ .../FormEvaluation/FormEvaluateScoreAdd.vue | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue index 7cd5fdf42..16a32d20b 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue @@ -214,21 +214,22 @@ const percent_sum: any = computed(() => { }); const score4 = computed(() => { return ( - (Number(orientation.value) + - Number(self_learning.value) + - Number(training_seminar.value) + - Number(other_training.value)) / - (isSelectionPartfour.value ? 4 : 3) + Number(orientation.value) + + Number(self_learning.value) + + Number(training_seminar.value) + + (isSelectionPartfour.value ? Number(other_training.value) : 0) ); }); const score5 = computed(() => { - const total = + const rawTotal = (Number(orientation_percent.value) + Number(self_learning_percent.value) + Number(training_seminar_percent.value) + Number(other_training_percent.value)) / (isSelectionPartfour.value ? 4 : 3); + const total = Math.round(rawTotal); + develop_result.value = total > 60 ? 1 : 0; return total; diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue index 047b3db6e..79c0be03c 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue @@ -241,21 +241,22 @@ const percent_sum: any = computed(() => { }); const score4 = computed(() => { return ( - (Number(orientation.value) + - Number(self_learning.value) + - Number(training_seminar.value) + - Number(other_training.value)) / - (isSelectionPartfour.value ? 4 : 3) + Number(orientation.value) + + Number(self_learning.value) + + Number(training_seminar.value) + + (isSelectionPartfour.value ? Number(other_training.value) : 0) ); }); const score5 = computed(() => { - const total = + const rawTotal = (Number(orientation_percent.value) + Number(self_learning_percent.value) + Number(training_seminar_percent.value) + Number(other_training_percent.value)) / (isSelectionPartfour.value ? 4 : 3); + const total = Math.round(rawTotal); + develop_result.value = total > 60 ? 1 : 0; return total;