From b77c6e695b2a8cafd9b6cf735a6ddaf8141a23e8 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Sun, 24 Sep 2023 11:52:41 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AA=E0=B8=A3=E0=B8=A3=E0=B8=AB=E0=B8=B2?= =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=E0=B8=84=E0=B8=B0?= =?UTF-8?q?=E0=B9=81=E0=B8=99=E0=B8=99=20=E0=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../03_recruiting/components/ExamFinished.vue | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/src/modules/03_recruiting/components/ExamFinished.vue b/src/modules/03_recruiting/components/ExamFinished.vue index 397e4741c..87282aa20 100644 --- a/src/modules/03_recruiting/components/ExamFinished.vue +++ b/src/modules/03_recruiting/components/ExamFinished.vue @@ -61,6 +61,15 @@
+
ภาค ก
+
+ {{ scoreAFull }} +
+
+ {{ scoreA }} +
+
คะแนน
+
ภาค ข
{{ scoreBFull }} @@ -169,6 +178,8 @@ const examNumber = ref(""); const citizenId = ref(""); const examSeat = ref(""); const number = ref(""); +const scoreAFull = ref(null); +const scoreA = ref(null); const scoreBFull = ref(null); const scoreB = ref(null); const scoreCFull = ref(null); @@ -195,30 +206,20 @@ const fetchCard = async () => { examNumber.value = data.examIdenNumber; citizenId.value = data.citizenId; examSeat.value = data.seatNumber; + scoreAFull.value = data.pointTotalA; + scoreA.value = data.pointA; scoreBFull.value = data.pointTotalB; scoreB.value = data.pointB; scoreCFull.value = data.pointTotalC; scoreC.value = data.pointC; - if (data.pointB != null && data.pointC != null) { - scoreSum.value = parseInt(data.pointB) + parseInt(data.pointC); - } else if (data.pointC != null) { - scoreSum.value = parseInt(data.pointC); - } else if (data.pointB != null) { - scoreSum.value = parseInt(data.pointB); - } else { - scoreSum.value = null; - } - if (data.pointTotalB != null && data.pointTotalC != null) { - scoreSumFull.value = - parseInt(data.pointTotalB) + parseInt(data.pointTotalC); - } else if (data.pointTotalC != null) { - scoreSumFull.value = parseInt(data.pointTotalC); - } else if (data.pointTotalB != null) { - scoreSumFull.value = parseInt(data.pointTotalB); - } else { - scoreSumFull.value = null; - } - scoreC.value = data.pointC; + scoreSum.value = + parseInt(data.pointA == null ? 0 : data.pointA) + + parseInt(data.pointB == null ? 0 : data.pointB) + + parseInt(data.pointC == null ? 0 : data.pointC); + scoreSumFull.value = + parseInt(data.pointTotalA == null ? 0 : data.pointTotalA) + + parseInt(data.pointTotalB == null ? 0 : data.pointTotalB) + + parseInt(data.pointTotalC == null ? 0 : data.pointTotalC); examResultinscore.value = data.pass; avatar.value = data.avatar; score_expired.value = new Date(data.announcementDate);